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
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

Viacheslav Litvinov
@litvinof
🎉🎉🎉🎉
Ben Scherrey
@scherrey
Here's the link to our multiple OP_RETURN proposal on BitcoinCashResearch.org
https://bitcoincashresearch.org/t/multiple-op-returns-this-time-for-real/315/11
Napat
@SuperCipher
@traysonkelii
We just improve our getting start page.
https://github.com/ActorForth/bch-toolkit#getting-start
1 reply
Viacheslav Litvinov
@litvinof
Ben Scherrey
@scherrey
yep - another insane bubble. but nft's that have some other inherent value are a real promising thing. We've got ideas on how to make our tickets turn into NFTs with additional value.
siraben
@siraben:matrix.org
[m]
Apparently the Ethereum Foundation is sponsoring this formalization of the Vyper compiler effort: https://github.com/formalize/coq-vyper
Still WIP but seems to have verified the translation of arithmetic and small programs, found the small-step semantics for the bounded imperative language here: https://github.com/formalize/coq-vyper/blob/831ebccfa156670dc1125f7a3ac93f67dedf101e/L10/Stmt.v#L38
siraben
@siraben:matrix.org
[m]
Oh wow, did anyone hear about Fe? Looks like a new smart contract language but notably would compile to an intermediate representation https://snakecharmers.ethereum.org/fe-a-new-language-for-the-ethereum-ecosystem/
Ben Scherrey
@scherrey
Again the Ethereum Foundation just throws its support for things that are not going the direction it needs to be going in order to keep its position as the decentralized compute engine. Such a waste...
Yukai Doge
@yukaijerng_twitter
Guys I need help! I tried to use bitcoin.com wallet to receive SLP NFT and now I can't access them... Is there a way? 😳
Ben Scherrey
@scherrey
Hey Yukai - I'm not sure if that wallet recognizes SLP NFTs. Where did you get the NFT from?
@nicolaiskye do you know what wallets can recognize SLP NFTs?
Yukai Doge
@yukaijerng_twitter
I got the NFT from www.juungle.net
Tried to recover the wallet with Electrum Cash SLP but can't find my SLPs
Ben Scherrey
@scherrey
@nicolaiskye can you try with one of our client APIs to try to confirm the NFTs are withth
that address.
?
Nicolai Skye
@nicolaiskye
Yes, I just used the Bitcash SLP to check, and I can see that @yukaijerng_twitter has 3 NFTs that are part of the same 'parent' group
The main issue it seems now is that you have them sitting in the Bitcoin.com wallet, which does support SLP, but it does not support NFTs
So I'm looking into being able to import the private key into something like Electron Cash SLP instead so you can access your NFTs
Ben Scherrey
@scherrey
Cool - that's what I anticipated was the issue. Glad everything looks good.
Nicolai Skye
@nicolaiskye

Okay, so I've managed to get my Bitcoin.com wallet loaded into Electron Cash SLP and I can see my SLP stuff there. If you follow these steps I think you should be able to get the same result as well.

First, you need your BCH seed from the Bitcoin.com. In Settings -> Security Center -> Manual Backup -> My BCH wallet .. you should be able to get the list of 12 words as your seed.

Then in Electron Cash SLP you can go through the "New/Restore Wallet" prompts. You'll need to select:

  • Standard wallet
  • I already have a seed
  • [write your seed in the textbox]
  • Derivation path: m/44'/0'/0'
After that, you can go to the "Tokens" tab, and you should be able to see your NFTs. @yukaijerng_twitter
Yukai Doge
@yukaijerng_twitter
I’ve done it but the wallet I restored get seems to be incomplete, I couldn’t see my SLPs
Yukai Doge
@yukaijerng_twitter
So we seem to have figured out my Waifu problem!😆 After I used bitcoin.com wallet to receive an NFT, I tried to import the seed to Electron Cash SLP to access them.😂 However Electron didn't include the specific address which contains my NFT (could be something to do with bitcoin.com wallet, not sure), so I couldn't see them and I thought they were lost!😱 In the end we tried <Wallet> -> <Scan more addresses> and my NFTs eventually showed up!🤩 Thank you 😎crypto hackers😎 who helped!🤗