-
Notifications
You must be signed in to change notification settings - Fork 225
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
CommitSig Serialization refactor #258
Conversation
…ializers into module
Co-authored-by: Ismail Khoffi <[email protected]>
Codecov Report
@@ Coverage Diff @@
## greg/serialization-2 #258 +/- ##
======================================================
Coverage ? 27.9%
======================================================
Files ? 102
Lines ? 3656
Branches ? 1160
======================================================
Hits ? 1023
Misses ? 1823
Partials ? 810 Continue to review full report at Codecov.
|
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.
great work 💯
return Err("signature is present for BlockIDFlagAbsent CommitSig"); | ||
} | ||
Ok(CommitSig::BlockIDFlagAbsent { | ||
validator_address: value.validator_address, |
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.
where's validator_address validation?
@@ -59,8 +60,18 @@ impl lite::Commit for block::signed_header::SignedHeader { | |||
); | |||
} | |||
|
|||
// TODO: this last check is only necessary if we do full verification (2/3) |
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.
why it's a TODO?
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.
No idea, it was in the code from before.
Closing in favor of #277 . Anton's notes were carried over too. |
Issue #247 - serialization refactor CommitSig "blob"
While chopping up PR #248 into multiple smaller PRs, this one that implements the enum-based CommitSig derailed from master so much that it's easier to cherry-pick the commits from this and open a new PR. That's what's going to happen. I'm keeping this open and in draft state until we were able to merge all changes from this into master using these smaller PRs. Then I'll close it.
In this step the CommitSig enum is introduced and the serializers.rs file is moved into its own folder and broken out into multiple files.
Unfortunately I couldn't separate the file move from the implementation of the CimmitSig. (Originally, the steps were 1. interim CommitSig implementation 2. move to folder 3. CommitSig enum implementation and cherry-picking the second step didn't work well without using the first step, but that's not needed any more.)
Converting this into a draft as long as step 2 (#269) is not merged.