Hey everyone, we’re happy to share that we are still on track to launch the Bitcoin integration this week. Since the Bitcoin mainnet canister will be under NNS control (just like existing NNS canisters and internet identity), the launch will consist of three NNS proposals, all in the topic of “system canister management”:
A proposal to install an
uploader canister. This is a canister that will be used to upload a precomputed state of the Bitcoin mainnet canister at a height of 764,684.
A proposal to upgrade the
uploader canister to the Bitcoin mainnet canister. The canister will start syncing new blocks, but the endpoints of the canister will be disabled.
A proposal to enable the endpoints of the Bitcoin mainnet canister, making them accessible and concluding the launch.
Why upload a precomputed state of the Bitcoin mainnet canister?
The alternative to precomputing the state of the canister would be to sync from genesis. However, a full sync of Bitcoin mainnet from genesis would take weeks. Precomputing the state offline, on the other hand, takes ~24 hours and uploading it takes ~12-18 hours.
How can I verify the Wasm hash of the uploader canister and the bitcoin canister?
- Clone the bitcoin-canister repo.
- Checkout the
docker build -t canisters . to build the canisters and output their Wasm hashes.
How can I verify the state that will be uploaded?
We’ll be uploading the state using what we call the uploader canister. Once the
uploader canister is deployed, we can upload “chunks” of the bitcoin canister’s state using ingress messages. The uploader canister is initialized with the hashes of each of these chunks to verify their correctness, meaning that the NNS still controls the state that will be uploaded. Here you’ll find the hashes of the chunks, which are hard-coded in the uploader canister.
If you’d like to compute the Bitcoin canister’s state for yourself to verify the correctness of these hashes, please follow the instructions here, setting the
764684. Note that the computation takes around 24 hours. At different points in the computation process, the checksums of various files are emitted. If everything is working as expected, you should see the following checksums:
Once you’re done with the instructions, you’ll have a file called
chunk_hashes.txt, which should be identical to the hard-coded
chunk_hashes.txt file in the
git switch launch # switch to the launch branch.
# The chunk hashes you computed and the ones hard-coded in the uploader canister
# should be identical.
diff chunk_hashes.txt ./uploader/src/chunk_hashes.txt
If you managed to recompute this state and verify its integrity, or if you tried but ran into issues, please let us know here!