Skip to content

How to customize block header structure #1515

Answered by melekes
JackPiri asked this question in Q&A
Discussion options

You must be logged in to vote

in particular, is it possible to customize the block header structure (type Header struct in block.go) without forking from cometbft codebase?

Unfortunately, this is not possible with the current implementation. The structure of the Header is fixed.

However, you can attach an event (or a list of events) to each block or even an individual transaction - https://docs.cometbft.com/v0.37/app-dev/indexing-transactions (spec: https://github.com/cometbft/cometbft/blob/v0.37.x/spec/abci/abci++_basic_concepts.md#events). These can later be used to query blocks/transactions via RPC. You can also have a special transaction in your application (see #448 (comment)). Also, votes can be extended with …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JackPiri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants