0

Electrum uses hardcoded block Merkle roots as checkpoints to help validate blocks. It's not the same thing as the transaction Merkle root that is included in each block.

https://electrumx.readthedocs.io/en/latest/protocol-methods.html#blockchain-block-header

For example, the Merkle root checkpoint of block 8 is e347b1c43fd9b5415bf0d92708db8284b78daf4d0e24f9c3405f45feb85e25db. It seems like it's not quite the same calculation as used for transactions. The documentation says this should be hardcoded into the client but unless I glossed over something it never mentions where this value comes from.

To my understanding the block hashes from 1-8 are all the information that's needed to calculate this. So given that the block hashes of blocks 1-8 are:

00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048
000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd
0000000082b5015589a3fdf2d4baff403e6f0be035a5d9742c1cae6295464449
000000004ebadb55ee9096c9a2f8880e09da59c0d68b1c228da88e48844a1485
000000009b7262315dbf071787ad3656097b892abffd1f95a1a022f896f533fc
000000003031a0e73735690c5a1ff2a4be82553b2a12b776fbd3a215dc8f778d
0000000071966c2b1d065fd446b1e485b2c9d9594acd2007ccbd5441cfc89444
00000000408c48f847aa786c2268fc3e6ec2af68e8468a34a28c61b7f1de0dc6

How do I calculate it?

Doing this for all 712,000 blocks is probably not the most efficient choice; the Electrum client seems to be able to safely perform its validation without actually downloading and processing through all 712k blocks. How is Electrum doing its validation?

Thank you!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.