Repository navigation
types: change Commit to consist of just signatures - #4146
Conversation
commented
Nov 15, 2019
|
this is so exciting!!! 😄 |
cd3a8ad to
0376b70
Compare
This comment has been minimized.
This comment has been minimized.
fbb0063 to
62f0e4a
Compare
|
TODO:
|
| } | ||
| blockID := types.BlockID{Hash: block.Hash(), PartsHeader: types.PartSetHeader{}} | ||
| blockID := types.BlockID{Hash: block.Hash(), | ||
| PartsHeader: types.PartSetHeader{Total: 3, Hash: cmn.RandBytes(32)}} |
There was a problem hiding this comment.
For my own education: Can you tell me what the PartsHeader is, and why we're setting the Hash now when we weren't before?
There was a problem hiding this comment.
It's basically an alternative hash for the block that's only used for gossipping the block during consensus but has unfortunately leaked into the more global BlockID. A better design might see it removed from the BlockID, but would probably make the consensus reactor more complicated. Probably it's filled in now because there's more validation and its expected to be populated
There was a problem hiding this comment.
Correct. It's because I've added a panic in Vote#CommitSig() func if BlockID is neither Empty nor Complete. Normally ValidateBasic() catches this kind of errors, but since in tests we construct objects manually you will get a panic if PartsHeader is empty here
commented
Nov 20, 2019
|
OK so this is definitely a silly question. But my understanding from reading https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-025-commit.md is that all of this is happening by making |
commented
Nov 21, 2019
Indeed, we made a lot of preliminary changes to prepare for the final breaking change. It happened in a series of non-breaking PRs that paved the way for this final PR which actually makes the breaking change. We did introduce the CommitSig type before, but until this PR, it's just an alias for the Vote type! You can see the three merged PRs on the way to this one in #1648: |
commented
Nov 21, 2019
|
Yes! @marbar3778 pointed it out to me above ^ I guess I missed it just because it looked small. Thanks all for the explanations. |
+ make Commit#Precommits array of non-pointers because precommit will never be nil
0208d5c to
500d8dc
Compare
Codecov Report
@@ Coverage Diff @@
## master #4146 +/- ##
==========================================
+ Coverage 67.43% 67.48% +0.05%
==========================================
Files 221 221
Lines 18666 18672 +6
==========================================
+ Hits 12587 12601 +14
+ Misses 5125 5117 -8
Partials 954 954
|
continue does not make sense in these cases
6da33c4 to
a6be746
Compare
These are final changes towards removing votes from commit and leaving
"only" signatures (see ADR-25)
Fixes #1648