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

Soft-forkable header structure #271

Open
kushti opened this issue Jul 13, 2024 · 0 comments
Open

Soft-forkable header structure #271

kushti opened this issue Jul 13, 2024 · 0 comments

Comments

@kushti
Copy link

kushti commented Jul 13, 2024

As header is versioned, it is possible to introduce possibility of soft-forkable header structure updates by just adding one byte to it (for the initial version). This would be helpful for introducing new commitments in the header, new block sections etc.

So add two new fields to the binary representation of the header (one field for Rust structure)

  • a byte indicating cumulative length of new fields in new versions of the protocol. For the initial version it must be set to 0.
  • new fields bytes coming from future versions of the protocol. Needed for PoW verification for the node and its peers. Must be empty for the initial version of the protocol.

So with increased version of the protocol, the length byte could be non-zero, and then the client of the initial version will just read byte array of given length and able to check PoW and propagate blocks without understanding semantics of new bytes.

And for changing header structure only miners would need to update, and other nodes on old versions will stay in the game after protocol update.

This technique is used in Ergo blockchain.

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