Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 19 14:38
    nicolaiskye removed as member
  • Nov 15 2021 09:41
    italy starred ActorForth/ActorForth
  • Sep 06 2021 11:38
    JacekAndrzejewski starred ActorForth/ActorForth
  • Aug 20 2021 00:11
  • Aug 20 2021 00:11
    baby636 starred ActorForth/ActorForth
  • Jun 12 2021 09:53
    siraben commented #1
  • Jun 12 2021 09:53
    siraben commented #1
  • May 26 2021 06:44
    scherrey commented #23
  • May 23 2021 17:10
    Sameeranjoshi commented #23
  • May 21 2021 12:37

    scherrey on filepos

    Updated refdocs. (compare)

  • May 20 2021 10:11

    scherrey on filepos

    Added compiling to categories a… Merge branch 'filepos' of githu… (compare)

  • May 12 2021 07:34
    Sameeranjoshi commented #23
  • May 12 2021 07:16
    scherrey commented #23
  • May 12 2021 07:16
    scherrey commented #23
  • May 12 2021 05:33
    Sameeranjoshi commented #23
  • May 12 2021 05:32
    Sameeranjoshi commented #23
  • May 09 2021 17:06

    scherrey on filepos

    Add initial Makefile. Uncomment… Improve parallel builds. Improve parallel builds. and 7 more (compare)

  • May 08 2021 13:51
    MayaPosch commented #23
  • May 08 2021 13:45

    MayaPosch on master

    Separate unit tests into separa… (compare)

  • May 08 2021 09:56
    scherrey closed #17

Node and rest

Note we never test the testnet before. So you will be our first tester.

merc1er
@merc1er
Ok, thanks
Oh but that's from a different repo
matrixbot
@matrixbot
Napat
@SuperCipher

Oh but that's from a different repo

It’s a git submodule the repo is already include in the bch-toolkit

Screen Shot 2020-10-10 at 1.31.54 PM.png
merc1er
@merc1er
Ok, will try this out
merc1er
@merc1er

Btw, there is a new bitcash update, including a change from @nicolaiskye :)

https://twitter.com/merc1er/status/1318096241872445440?s=21

merc1er
@merc1er
BitCash now supports regtest thanks to @nicolaiskye!
Ben Scherrey
@scherrey
Nice going guys!
Ben Scherrey
@scherrey
Interesting project: https://scryptdoc.readthedocs.io/en/latest/ Another attempt at a scripting language for BitCoin SV. Is that different than regular BitCoin?
1 reply
Ben Scherrey
@scherrey
Here's another one - not for crypto - but it's a concatenative stack-based language with strong static types and doesn't have garbage collection. Lots of similar goals as ActorForth and compiles to C & Verilog which is cool. GPL3 unfortunately. https://github.com/HackerFoo/poprc
siraben
@siraben:matrix.org
[m]
porc looks great
1 reply
siraben
@siraben:matrix.org
[m]
scherrey (Ben Scherrey): looks like just the spec right now :/
Ben Scherrey
@scherrey
Yeah.... something smells fishy. But porc looks interesting.
Ben Scherrey
@scherrey
Seems that this is the place to discuss research and protocol concepts for BCH: https://bitcoincashresearch.org/latest
Ben Scherrey
@scherrey
@nicolaiskye this guy Tom makes a case that the mempool issue for a particular app could be overcome by running your own node with a mempool as large as you like and it's only submitting to public mempools with such limits that would be an issue. See https://bitcoincashresearch.org/t/specific-needs-for-increasing-or-removing-chained-tx-limit/240/5 . Now my question would be does the gossip protocol between the private node and public nodes automatically negotiate this or does the private node have to be smart about it. Anyway - sounds like a potential "easy" work around for now and something for us to keep an eye on.
Nicolai Skye
@nicolaiskye
Yeah, if we’re running our own node I believe that would be a good workaround. If the user’s app is pinging a public SLPDB which is using a 50 tx limited mempool though, we would still have the same problem I think
Ben Scherrey
@scherrey
Yeah they'd need to point to the "official" node that we run.
Ultimately this limit needs to disappear or be so large that it won't be a problem. Elsewhere Tom points out that a related existing issue makes this potentially a problem for the miners so have to keep an eye on that.
Trayson Kala Keli'i
@traysonkelii

I am currently following the installation walkthrough for the bch-toolkit. When I run the command ./setup all it leaves the following error:

Cloning into '/Users/traysonkelii/Projects/block-chain/bch-toolkit/bch-api'...
The authenticity of host 'github.com (140.82.112.3)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,140.82.112.3' (RSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights
and the repository exists.

Looks like the publickey that gets downloaded isn't working? Or should I have selected fingerprint? IDK. Any help would be great. I am running it on Mac OS big version 11.2

It did validate that all the dependencies were installed.

2 replies
Trayson Kala Keli'i
@traysonkelii
Here is the full stack trace of the error.
Setting up Bitcoin Unlimited node.
Checking that necessary software is available: 
Looking for Docker...
Docker found.
Looking for docker-compose...
Docker-compose found.
Looking for openssl...
Openssl found.
Looking for git...
Git found.
OpenSSL certificates already exist.
Starting local node servers...
nginx-regtest is up-to-date
opensight is up-to-date
bitcoin-restapi is up-to-date
bitcoind-regtest is up-to-date

Stopping nginx-regtest    ... done
Stopping bitcoind-regtest ... done
Stopping bitcoin-restapi  ... done
Stopping opensight        ... done
Python3 found.
Looking for virtualenv...
Virtualenv found.
Electron Cash SLP already exists.
Setting up python virtual environment...
Environment already exists.
Cloning into '/Users/traysonkelii/Projects/block-chain/bch-toolkit/bch-api'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

[ long list of IDs here didn't want to paste them all]

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:ActorForth/bch-api.git' into submodule path '/Users/traysonkelii/Projects/block-chain/bch-toolkit/bch-api' failed
Failed to clone 'bch-api'. Retry scheduled
Cloning into '/Users/traysonkelii/Projects/block-chain/bch-toolkit/bch-api'...
Warning: Permanently added the RSA host key for IP address '140.82.112.4' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:ActorForth/bch-api.git' into submodule path '/Users/traysonkelii/Projects/block-chain/bch-toolkit/bch-api' failed
Failed to clone 'bch-api' a second time, aborting
Nicolai Skye
@nicolaiskye
Hello @traysonkelii , we're actually working mostly under the "Refactor" branch as we've dockerized a few more of the component and no longer build them from git submodules. If you could run "./clean all" and then "git checkout refactor" and try again, I believe it should work in that case.
At the moment it automatically defaults to a 'regtest' node that lets you easily test out local development on your machine. I have it running on my machine (also macOS 11.2). With a few changes to the config files, however, you can change it to work with testnet or mainnet. I also have a machine at home (Ubuntu 20.10) currently using the toolkit to run a mainnet node as well
Nicolai Skye
@nicolaiskye
It's a goal of ours to eventually have an option to automate the 'mainnet' setup, but if you need help in the meantime with the config files then let me know and I'll be happy to share the configs I'm using
Trayson Kala Keli'i
@traysonkelii
@nicolaiskye I think connecting to regtest is what I am looking for (local development before going live). This has been incredibly helpful. I will reach out if I run into any issues. I am planning on the ./clean all and git checkout refactor route. I appreciate the response!
merc1er
@merc1er

Here is the full stack trace of the error.

Setting up Bitcoin Unlimited node.
Checking that necessary software is available: 
Looking for Docker...
Docker found.
Looking for docker-compose...
Docker-compose found.
Looking for openssl...
Openssl found.
Looking for git...
Git found.
OpenSSL certificates already exist.
Starting local node servers...
nginx-regtest is up-to-date
opensight is up-to-date
bitcoin-restapi is up-to-date
bitcoind-regtest is up-to-date

Stopping nginx-regtest    ... done
Stopping bitcoind-regtest ... done
Stopping bitcoin-restapi  ... done
Stopping opensight        ... done
Python3 found.
Looking for virtualenv...
Virtualenv found.
Electron Cash SLP already exists.
Setting up python virtual environment...
Environment already exists.
Cloning into '/Users/traysonkelii/Projects/block-chain/bch-toolkit/bch-api'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

[ long list of IDs here didn't want to paste them all]

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:ActorForth/bch-api.git' into submodule path '/Users/traysonkelii/Projects/block-chain/bch-toolkit/bch-api' failed
Failed to clone 'bch-api'. Retry scheduled
Cloning into '/Users/traysonkelii/Projects/block-chain/bch-toolkit/bch-api'...
Warning: Permanently added the RSA host key for IP address '140.82.112.4' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:ActorForth/bch-api.git' into submodule path '/Users/traysonkelii/Projects/block-chain/bch-toolkit/bch-api' failed
Failed to clone 'bch-api' a second time, aborting

I was running into the same error

Switched to the refactor branch, it is now working
1 reply
merc1er
@merc1er
To use anything other then regtest, I need to edit configs/bitcoin.conf and comment out regtest=1 and replace with mainnet or testnet=1?. Is this correct @nicolaiskye
merc1er
@merc1er
Doesn't seem to work, it uses regtest even though I selected mainnet in bitcoin.conf
Ben Scherrey
@scherrey
@merc1er do you have your public key added to your GitHub account? The system uses ssh to clone submodules so you need that setup in order to properly clone the full repos.
Regarding getting off regtest - there's several config files that will need to be changed. Nick or one of the other staff will reply by tomorrow and help out with that.
merc1er
@merc1er
Yes I do have my SSH keys on github, but I am not a member of the ActorForth org

Regarding getting off regtest - there's several config files that will need to be changed. Nick or one of the other staff will reply by tomorrow and help out with that.

OK thanks

Ben Scherrey
@scherrey
Hmm... shouldn't need to be a member I wouldn't think. Will let into this tomorrow with the team and get back with you.
Nicolai Skye
@nicolaiskye

To use anything other then regtest, I need to edit configs/bitcoin.conf and comment out regtest=1 and replace with mainnet or testnet=1?. Is this correct @nicolaiskye

the bitcoin-unlimited.conf needs to be changed (as you described .. however only either 'regtest=1' or 'testnet=1' are needed .. without them it will default to mainnet, so no need for 'mainnet=1'). The bitcoin.conf (without 'unlimited') should be ignored for now--it's intended for use with the BCHN node, which we don't have automated yet. In addition to bitcoin-unlimited.conf these files ( bch-api-config.sh , restapi-config.sh ) also have a NETWORK=regtest setting that should be adjusted to reflect the network you're aiming for.

Trayson Kala Keli'i
@traysonkelii
@merc1er @nicolaiskye Thank you for the support. I think I have things building on regtest. I'll keep you all posted as I test things out.
Ben Scherrey
@scherrey
@traysonkelii we're dealing with some issues with running on Mainnet right now. There seems to be a syncing issue with the indexer. If you wanna run on Mainnet let us know before you waste time on it. Hopefully we'll have a solution already prepared by then. It's a priority item for us right now.
Meanwhile - hope this works well for your dev/test regtest efforts. Do let us know how things go.
Trayson Kala Keli'i
@traysonkelii

Steps taken thus far:

  1. Installed all dependencies
  2. Checked out refactor branch
  3. ./setup default
  4. ./services run
  5. Navigated to localhost:3000 and I am taken to an instructional page

Questions:

  1. Is the rest API catered specifically for the bch-api?
  2. How do I set up a wallet? (Electron cash GUI hasn't opened up for me)
  3. The application I was writing hits the endpoints from https://rest.bitcoin.com/ can I still use this tool for these cases?
  4. Is there a hello world example of how to use the tool after successfully installing everything?
Ben Scherrey
@scherrey
  1. If you're using js then yes, bch-api and bch-js are what we support (as well as bitbox for typescript). For python it's BitCash.
  2. One of my staff will have to follow up with you on that.
  3. Our deployment fully supports the rest.bitcoin.com model so tools that work there can point to your instance and should just work.
  4. I think one of my team will be able to provide something along those lines tomorrow. (It's 11p BKK time now. Not sure what time zone you're in.)
1 reply
Nicolai Skye
@nicolaiskye

Questions:

  1. Is the rest API catered specifically for the bch-api?
  2. How do I set up a wallet? (Electron cash GUI hasn't opened up for me)
  3. The application I was writing hits the endpoints from https://rest.bitcoin.com/ can I still use this tool for these cases?
  4. Is there a hello world example of how to use the tool after successfully installing everything?
  1. Two REST APIs are provided with the toolkit. There's one that's based on "rest.bitcoin.com" which is used by SDKs like Bitcash (Python), and one based on "bch-api" which is used by SDKs like bch-js (JavaScript). Other SDKs that use either of these endpoints may also work, but you would need to ensure they support addresses with the "bchreg:" prefix. I've found that in many projects, the maintainers only provide "bitcoincash:" and "bchtest:" by default.

  2. The node itself has a basic wallet built-in. You can access it with the ./bitcoin-cli command, and running./bitcoin-cli help will get you the full list of commands. I most commonly use ./bitcoin-cli sendtoaddress bchreg:[myaddress] 100 in order to send funds to my addresses (generated from Bitcash or bch-js) so that I have satoshis to play around with. Additionally ./bitcoin-cli generate 10 (or whatever number of blocks you want to generate) is very useful, and is one of the biggest benefits of having a local node (i.e., controlling exactly when blocks get mined). Electron Cash doesn't currently support the "bchreg:" prefix, and so currently isn't usable with our toolkit.

  3. Yes, if you're able to redirect your application to localhost:12500 instead of rest.bitcoin.com, then it should work just as you'd expect the mainnet API to work.

  4. That's a great idea. I'll try and put together some examples and documentation to make getting started with the toolkit easier. In the meantime, if you can let me know what SDK you're using, I can probably help with a few examples and make sure it's set up and working with the toolkit as expected.

2 replies
Trayson Kala Keli'i
@traysonkelii

Here is my current flow towards trying to successfully hit localhost:12500 and verify that the address I created and the amount that I sent to it was correct.

Create bchreg address. I created it via the following code (could have also been made with the bitcoin-cli)

const bitcore = require('bitcore-lib-cash');
bitcore.Networks.defaultNetwork = bitcore.Networks.regtest;

var privateKey = new bitcore.PrivateKey();
var publicKey = new bitcore.PublicKey(privateKey)

console.log('WIF:', privateKey.toWIF());
console.log('cashaddr:', publicKey.toAddress().toString());

ran the following command to send some money to the address:

/bitcoin-cli sendtoaddress bchreg:qre76hccdcmrj8jafcy6gzcgyum9650g95cj7cf62k 100

this returns what I assume is the txid 4cabb8f034538d52e938e2c22f3828fd06b366d3b5c50e05bb52332a96e0fa8b.

leveraging bitbox SDK and slpjs I attempt to hit the localhost instance at port 12500. Here is what I have scripted up:

const BITBOXSDK = require('bitbox-sdk')
const slpjs = require('slpjs');

let addr = 'bchreg:qre76hccdcmrj8jafcy6gzcgyum9650g95cj7cf62k';
const BITBOX = new BITBOXSDK.BITBOX({ restURL: 'http://localhost:12500/' });

const bitboxNetwork = new slpjs.BitboxNetwork(BITBOX);

let balances;
(async function() {
  balances = await bitboxNetwork.getAllSlpBalancesAndUtxos(addr);
  console.log("balances: ", balances.nonSlpUtxos[0].amount);
})();

I am getting the following error here and I am trying to trace it:

(node:88847) UnhandledPromiseRejectionWarning: #<Object>
(Use `node --trace-warnings ...` to show where the warning was created)
(node:88847) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:88847) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(base) traysonkelii@Traysons-MacBook-Pro bch_regtest % node --trace-warnings balance.js
(node:88861) UnhandledPromiseRejectionWarning: #<Object>
    at emitUnhandledRejectionWarning (internal/process/promises.js:170:15)
    at processPromiseRejections (internal/process/promises.js:247:11)
    at processTicksAndRejections (internal/process/task_queues.js:94:32)
(node:88861) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:88861) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    at emitDeprecationWarning (internal/process/promises.js:180:11)
    at processPromiseRejections (internal/process/promises.js:249:13)
    at processTicksAndRejections (internal/process/task_queues.js:94:32)

Can I get a santity check? Am I doing this right?

Napat
@SuperCipher
I believe the current bitbox-sdk and slpjs is not regtest compatible
If you want to go with JS route I suggest you to use bch-js-reg which is bitbox-sdk forked. It’s work with bch-api with is similar to rest.bitcoin.com the. rest.bitcoin.com is close source but bch-api is opensource that you can host your own. currently bch-api is not working in the refactor branch. We are working on getting master brach back working as intend and once that done we will notify you.
2 way to sanity check
  1. using bitcoin-cli (always the best way to verify transaction)
    ./bitcoin-cli getrawblocktransactions 4cabb8f034538d52e938e2c22f3828fd06b366d3b5c50e05bb52332a96e0fa8b
    after you get a raw hex transaction
    ./bitcoin-cli decoderawtransaction hextransaction
    would suggest you to play around with ./bitcoin-cli help
  2. using rest.bitcoin.com
    go to http://localhost:12500
    go to /rawtransactions/getRawTransaction/{txid}
    click try it out button
    input yours txid
Damascene
@uak_gitlab
hey glad to find this community
I've a question about bitcash, I'm using the slp_development version for testing. is there a way to burn tokens in an address?
1 reply
Napat
@SuperCipher

ANNOUNCEMENT :
We have a new beta release v0.1-beta1

This version is a major change. Restructuring how we clone, pull and build image.
We no longer build images locally. It’s now only pulls prebuilt images from Docker Hub.
We also have a Docker Hub organization https://hub.docker.com/u/actorforth to organize all the dependent images.
The changes address issues relating to git submodules not working, and bch-api not working.

Release found here:
https://github.com/ActorForth/bch-toolkit/releases/tag/v0.1-beta1