Skip to content

docs: add block header serialization doc and examples#1217

Merged
psgreco merged 2 commits intoElementsProject:masterfrom
delta1:block-header-format
Sep 14, 2023
Merged

docs: add block header serialization doc and examples#1217
psgreco merged 2 commits intoElementsProject:masterfrom
delta1:block-header-format

Conversation

@delta1
Copy link
Copy Markdown
Member

@delta1 delta1 commented Mar 6, 2023

adds a doc that describes the serialization of block header fields, and a few examples of deserializing block headers from hex

rendered

@delta1 delta1 force-pushed the block-header-format branch from dd606ce to a272c3d Compare March 16, 2023 13:28
| Proposed | Yes | | `DynaFedParamEntry` | The proposed DynaFed parameters for the next [epoch](https://github.com/ElementsProject/elements/blob/elements-22.1/src/chainparamsbase.cpp#L60) |

#### DynaFed Parameters Entry (`class DynaFedParamEntry`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be helpful to add an explanation of when the different entry types appear (e.g. beginning of epochs, proposing and non-proposing epochs)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread doc/elements-block-header-format.md Outdated
Comment thread doc/elements-block-header-format.md Outdated

32 bytes - **previous block hash**

`f66be8726f4afecc9a7b087a78cd25edd53485755d26e456d546bcc0613a30f9`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it worth pointing out that this the hash here is in little-endian (reversed) order?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is noted on line 43

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

@philippem philippem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@philippem
Copy link
Copy Markdown
Contributor

ack

@psgreco psgreco merged commit ae023ea into ElementsProject:master Sep 14, 2023
@delta1 delta1 deleted the block-header-format branch September 15, 2023 05:30
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

Successfully merging this pull request may close these issues.

3 participants