-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Description --- Add new header field, block output mmr which only tracks outputs in current block Motivation and Context --- This is needed in order to validate that all outputs included in the block is correctly captured in the pow of the header. The current strategy is to only use the output smt, which commits to all outputs on the blockchain. This is required for horizon sync and prune mode to verify the blockchain as we sync. But someone else wants to verify the block outputs, they have to have the entire outputs set aka entire blockchain in order to verify that the outputs are indeed locked behind pow. This addition allows any person to take only the block and know that the outputs contained in that block, is correctly locked behind the pow of the header. The output field is constructed as two merkle mountain ranges. the primary one used in the header field is constructed as [coinbase_1, coinbase_2, .., coinbase_x, non_coinbase_ouputs_merkle_root] with the non_coinbase_ouputs_merkle_root constructed as [output_1, output_2, .., output_x] This double mountain range approach allows you to prove the output are in the block header, as well as create a proof for a specific output. But separating them allows p2pool to only need to store a single hash + list of all outputs in order to verify all coin bases are correctly included in the header. Rather than all outputs or before this pr, the entire block. Breaking change --- Need to resync database
- Loading branch information
1 parent
a2aa20e
commit 69a5872
Showing
17 changed files
with
159 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.