Skip to content
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

Closed
wants to merge 15 commits into from
Closed

Conversation

greg-szabo
Copy link
Member

@greg-szabo greg-szabo commented May 7, 2020

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.

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGES.md

@greg-szabo greg-szabo changed the title Greg/serialization 3 Serialization refactor step 2 May 7, 2020
@greg-szabo greg-szabo changed the title Serialization refactor step 2 Serialization refactor step 3 May 7, 2020
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (greg/serialization-2@c4098a0). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                  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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c4098a0...4ab5ac6. Read the comment docs.

@greg-szabo greg-szabo mentioned this pull request May 8, 2020
5 tasks
@greg-szabo greg-szabo marked this pull request as draft May 13, 2020 02:01
@greg-szabo greg-szabo changed the base branch from greg/serialization-2 to greg/serialization-2-alter May 13, 2020 02:01
Copy link
Contributor

@melekes melekes left a 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,
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Member Author

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.

@greg-szabo greg-szabo changed the base branch from greg/serialization-2-alter to master May 14, 2020 15:11
@greg-szabo greg-szabo changed the title Serialization refactor step 3 CommitSig Serialization refactor May 14, 2020
@greg-szabo
Copy link
Member Author

Closing in favor of #277 . Anton's notes were carried over too.

@greg-szabo greg-szabo closed this May 21, 2020
@greg-szabo greg-szabo deleted the greg/serialization-3 branch May 26, 2020 11:33
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.

4 participants