-
Notifications
You must be signed in to change notification settings - Fork 67
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
docs: Detailed documentation #16
Conversation
@@ -662,8 +765,16 @@ pub fn to_nibs(slice: &[u8]) -> Vec<u8> { | |||
result | |||
} | |||
|
|||
/// Encodes a given slice of nibbles as a vector of bytes, along with additional | |||
/// information about the node itself. | |||
/// Encodes a slice of nibbles into a vector of bytes, with an additional prefix to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I understand this correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the first nibble of the first byte in the resulting vector encodes two pieces of information:
- If the encoded path is for a leaf or extension (2nd least significant bit in nibble)
- If the number of nibbles encoded in the path is even or odd (least significant bit in nibble)
The second nibble of the first byte is used to represent the first nibble in the slice only if the length of the slice is odd, otherwise that second nibble is set to zero and just considered as padding.
I don't think the description makes that distinction.
* optimizations * header prep strategy
* optimizations * header prep strategy * block build strategy * nit
* optimizations * header prep strategy * block build strategy * db init strategy * nit
* optimizations * header prep strategy * block build strategy * db init strategy * nit * remove BlockBuilderDatabase * nits * fix
* optimizations * header prep strategy * block build strategy * db init strategy * nit * remove BlockBuilderDatabase * nits * from over into * fix * block header field mismatch error messages * take tx and withdrawal lists * NoHashBuilder for faster lookups of prehashed keys * test mining empty blocks (#23)
Closing this and opening new PRs to split up into smaller PRs and to avoid conflicts with latest refactor. |
This (WIP) PR adds detailed documentation to Zeth. The updates aim to provide clearer context and more detailed explanations for developers.
TODO:
guests
host
lib
validation.rsprimitives
Draft: looking for early feedback - lmk if it missing anything, typos, or is too pedantic.