Skip to content

Commit

Permalink
Stop Signing over the PartSetHeader for Votes and remove it from th…
Browse files Browse the repository at this point in the history
…e `Header` (#457)

* add the partsetheader to the proposal

* add partsetheader to Commit

* add the partsetheader to vote

* add the partsetheader to Header

* begin relying on decoupled partsetheader

* fix all tests in the types package

* add partset header to and from proto for consensus messages

* revert blockid.Key requiring the partsetheader

* clean up todos

* stop signing over the vote

* remove LastPartSetHeader from the Header

* fix hardcoded tests

* linter

* fix hardcoded test TestTxFilter

* clean up rebase

* regenerate proto files
  • Loading branch information
evan-forbes committed Jul 27, 2021
1 parent 9d4265d commit 818be04
Show file tree
Hide file tree
Showing 17 changed files with 290 additions and 476 deletions.
2 changes: 1 addition & 1 deletion blockchain/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestBlockchainMessageVectors(t *testing.T) {
BlockRequest: &bcproto.BlockRequest{Height: math.MaxInt64}}},
"0a0a08ffffffffffffffff7f"},
{"BlockResponseMessage", &bcproto.Message{Sum: &bcproto.Message_BlockResponse{
BlockResponse: &bcproto.BlockResponse{Block: bpb}}}, "1ac2020abf020a5d0a02080b1803220b088092b8c398feffffff012a00320040014a204c149a7cfadc92b669b0cbfa4951a1b18c2d9f3177a3b8756d39ebb96e9d63317a20e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b85512130a0b48656c6c6f20576f726c6412001a0022001ac8010a3000000000000000010000000000000001b81cb5596c28d044214b9f935e4af7dbe76e417f6182d86fbee68bfff7b2ff3a0a30ffffffffffffffffffffffffffffffffc4096ba8fccf882c309896e9168fa43fe62fccb752cb12d5160cc1d9c2ebffe7123000000000000000010000000000000001b81cb5596c28d044214b9f935e4af7dbe76e417f6182d86fbee68bfff7b2ff3a1230ffffffffffffffffffffffffffffffffc4096ba8fccf882c309896e9168fa43fe62fccb752cb12d5160cc1d9c2ebffe7"},
BlockResponse: &bcproto.BlockResponse{Block: bpb}}}, "1ac0020abd020a5b0a02080b1803220b088092b8c398feffffff012a00380142204c149a7cfadc92b669b0cbfa4951a1b18c2d9f3177a3b8756d39ebb96e9d63317220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b85512130a0b48656c6c6f20576f726c6412001a0022001ac8010a3000000000000000010000000000000001b81cb5596c28d044214b9f935e4af7dbe76e417f6182d86fbee68bfff7b2ff3a0a30ffffffffffffffffffffffffffffffffc4096ba8fccf882c309896e9168fa43fe62fccb752cb12d5160cc1d9c2ebffe7123000000000000000010000000000000001b81cb5596c28d044214b9f935e4af7dbe76e417f6182d86fbee68bfff7b2ff3a1230ffffffffffffffffffffffffffffffffc4096ba8fccf882c309896e9168fa43fe62fccb752cb12d5160cc1d9c2ebffe7"},
{"NoBlockResponseMessage", &bcproto.Message{Sum: &bcproto.Message_NoBlockResponse{
NoBlockResponse: &bcproto.NoBlockResponse{Height: 1}}}, "12020801"},
{"NoBlockResponseMessage", &bcproto.Message{Sum: &bcproto.Message_NoBlockResponse{
Expand Down
1 change: 0 additions & 1 deletion evidence/verify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ func makeHeaderRandom(height int64) *types.Header {
Height: height,
Time: defaultEvidenceTime,
LastBlockID: makeBlockID([]byte("headerhash")),
LastPartSetHeader: makePartSetHeader(1000, []byte("partshash")),
LastCommitHash: crypto.CRandBytes(tmhash.Size),
DataHash: crypto.CRandBytes(tmhash.Size),
ValidatorsHash: crypto.CRandBytes(tmhash.Size),
Expand Down
151 changes: 45 additions & 106 deletions proto/tendermint/types/canonical.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion proto/tendermint/types/canonical.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ message CanonicalVote {
CanonicalBlockID block_id = 4 [(gogoproto.customname) = "BlockID"];
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
string chain_id = 6 [(gogoproto.customname) = "ChainID"];
CanonicalPartSetHeader part_set_header = 7;
}
Loading

0 comments on commit 818be04

Please sign in to comment.