Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support latest versions of Bitcoin Core #216

Open
thobson88 opened this issue Nov 22, 2024 · 0 comments
Open

Support latest versions of Bitcoin Core #216

thobson88 opened this issue Nov 22, 2024 · 0 comments

Comments

@thobson88
Copy link
Collaborator

Our ION installation docs recommend Bitcoin Core v24.0.1 because Sidetree requires a legacy wallet type which is deprecated in more recent versions.

Already in v24.0.1 we have to pass the descriptors=false parameter to the CLI when creating the wallet:

bitcoin-cli -named createwallet wallet_name="sidetreeDefaultWallet" descriptors=false

In the latest version v28.0 (as of Nov 2024), the above command fails unless bitcoind is started with the deprecatedrpc=create_bdb flag, so the docs will need to be updated here so the command to create the alias for bitcoind becomes:

echo 'alias bitcoind="/usr/local/bin/bitcoind -conf=$BITCOIN_DATA/bitcoin.conf -deprecatedrpc=create_bdb"' >> $SHELL_CONFIG; source $SHELL_CONFIG

With this change, the above createwallet CLI command succeeds (albeit with the warning about legacy wallet type being deprecated, which is already mentioned in our docs).

However, there is this new invalid_magic_bytes error when starting the ION bitcoin microservice:

Parsing file: blk00890.dat
Sidetree-Bitcoin node initialization failed with error: {"stack":"Error: 3f6421a4 at cursor position 0 is not valid bitcoin mainnet, testnet or regtest magic bytes\n    at BitcoinRawDataParser.parseRawDataFile (/home/tim/ion/node_modules/@decentralized-identity/sidetree/dist/lib/bitcoin/BitcoinRawDataParser.js:33:23)\n    at BitcoinBlockDataIterator.previous (/home/tim/ion/node_modules/@decentralized-identity/sidetree/dist/lib/bitcoin/BitcoinBlockDataIterator.js:30:59)\n    at BitcoinProcessor.<anonymous> (/home/tim/ion/node_modules/@decentralized-identity/sidetree/dist/lib/bitcoin/BitcoinProcessor.js:153:57)\n    at Generator.next (<anonymous>)\n    at fulfilled (/home/tim/ion/node_modules/@decentralized-identity/sidetree/dist/lib/bitcoin/BitcoinProcessor.js:5:58)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","message":"3f6421a4 at cursor position 0 is not valid bitcoin mainnet, testnet or regtest magic bytes","code":"bitcoin_raw_data_parser_invalid_magic_bytes"}
Screenshot 2024-11-22 at 15 41 13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant