-
Notifications
You must be signed in to change notification settings - Fork 300
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
Update core data types #17
Conversation
Signed-off-by: Ismail Khoffi <[email protected]>
- define `DataAvailabilityHeader` and add to `Block` - comment about `DataHash` (not true yet) - define `Message` type - add `IntermediateStateRoots` and `Messages` to Data - update comments and add a bunch of TODOs Signed-off-by: Ismail Khoffi <[email protected]>
types/block.go
Outdated
// | ||
// TODO: replace with a dedicated type `IntermediateStateRoot` | ||
// as soon as we settle on the format / sparse Merkle tree etc | ||
IntermediateStateRoots []tmbytes.HexBytes |
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.
If you wonder about tmbytes.HexBytes
: just think of it as []byte
(it's just for encoding really).
Note that CI currently doesn't run (tests and everything defined under .circleci). I ran all tests locally. Will add using github actions instead of circleci soon. In the meantime I'd recommend enabling circleci for this org! |
closing and reopening to trigger circleci |
types/block.go
Outdated
// RowRoot_j = root((M_{j,1} || M_{j,2} || ... || M_{j,2k} )) | ||
RowsRoots [][]byte | ||
// ColumnRoot_j = root((M_{1,j} || M_{2,j} || ... || M_{2k,j} )) | ||
ColumnRoots [][]byte |
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.
If there's not a type for hash digests then we should add one. Is there is then []byte
can be replaced with it.
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.
There is none. At least a type alias would be good! Will add in a followup PR!
Co-Authored-By: John Adler <[email protected]>
Signed-off-by: Ismail Khoffi <[email protected]>
…yLedger/lazyledger-core into ismail/align_block_with_spec
* unrelated change: update go.mod file Signed-off-by: Ismail Khoffi <[email protected]> * Add all non-breaking changes to core types (Block, Header) - define `DataAvailabilityHeader` and add to `Block` - comment about `DataHash` (not true yet) - define `Message` type - add `IntermediateStateRoots` and `Messages` to Data - update comments and add a bunch of TODOs Signed-off-by: Ismail Khoffi <[email protected]> * Update types/block.go Co-Authored-By: John Adler <[email protected]> * consistent json annotation Signed-off-by: Ismail Khoffi <[email protected]> Co-authored-by: John Adler <[email protected]>
closes: #16
Description
This PR aims to align the current core data types, Block and Header, with what we have in the spec with the constraint that we agreed not to tackle immediate execution immediately (no pun intended). Further, I've limited this to all changes that do not change any other parts besides that (e.g. I did not move evidence over to
Block.Data
as this will make this less contained and more difficult to review). Also I didn't change any hashing hashing logic s.t. none of the current tests break. Both these constraints will be addressed in separate smaller PRs.