Skip to content

Soft-forkable header structure #271

Open
@kushti

Description

@kushti

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions