From 818be04956367e3f43bc323126fe8f744e2ccd40 Mon Sep 17 00:00:00 2001 From: Evan Forbes <42654277+evan-forbes@users.noreply.github.com> Date: Tue, 27 Jul 2021 02:10:18 -0500 Subject: [PATCH] Stop Signing over the `PartSetHeader` for Votes and remove it from the `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 --- blockchain/msgs_test.go | 2 +- evidence/verify_test.go | 1 - proto/tendermint/types/canonical.pb.go | 151 +++------ proto/tendermint/types/canonical.proto | 1 - proto/tendermint/types/types.pb.go | 423 +++++++++++-------------- proto/tendermint/types/types.proto | 21 +- state/state.go | 2 +- state/tx_filter_test.go | 4 +- state/validation.go | 7 - state/validation_test.go | 1 - types/block.go | 29 +- types/block_test.go | 63 +--- types/canonical.go | 14 +- types/evidence_test.go | 1 - types/protobuf.go | 4 +- types/vote.go | 4 + types/vote_test.go | 38 ++- 17 files changed, 290 insertions(+), 476 deletions(-) diff --git a/blockchain/msgs_test.go b/blockchain/msgs_test.go index abf9eb8035..1cd04f5e80 100644 --- a/blockchain/msgs_test.go +++ b/blockchain/msgs_test.go @@ -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{ diff --git a/evidence/verify_test.go b/evidence/verify_test.go index c038fb0025..e9aeb83951 100644 --- a/evidence/verify_test.go +++ b/evidence/verify_test.go @@ -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), diff --git a/proto/tendermint/types/canonical.pb.go b/proto/tendermint/types/canonical.pb.go index f362c30feb..b058083ff5 100644 --- a/proto/tendermint/types/canonical.pb.go +++ b/proto/tendermint/types/canonical.pb.go @@ -233,13 +233,12 @@ func (m *CanonicalProposal) GetPartSetHeader() *CanonicalPartSetHeader { } type CanonicalVote struct { - Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` - Height int64 `protobuf:"fixed64,2,opt,name=height,proto3" json:"height,omitempty"` - Round int64 `protobuf:"fixed64,3,opt,name=round,proto3" json:"round,omitempty"` - BlockID *CanonicalBlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` - ChainID string `protobuf:"bytes,6,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - PartSetHeader *CanonicalPartSetHeader `protobuf:"bytes,7,opt,name=part_set_header,json=partSetHeader,proto3" json:"part_set_header,omitempty"` + Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.types.SignedMsgType" json:"type,omitempty"` + Height int64 `protobuf:"fixed64,2,opt,name=height,proto3" json:"height,omitempty"` + Round int64 `protobuf:"fixed64,3,opt,name=round,proto3" json:"round,omitempty"` + BlockID *CanonicalBlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` + Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + ChainID string `protobuf:"bytes,6,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` } func (m *CanonicalVote) Reset() { *m = CanonicalVote{} } @@ -317,13 +316,6 @@ func (m *CanonicalVote) GetChainID() string { return "" } -func (m *CanonicalVote) GetPartSetHeader() *CanonicalPartSetHeader { - if m != nil { - return m.PartSetHeader - } - return nil -} - func init() { proto.RegisterType((*CanonicalBlockID)(nil), "tendermint.types.CanonicalBlockID") proto.RegisterType((*CanonicalPartSetHeader)(nil), "tendermint.types.CanonicalPartSetHeader") @@ -334,41 +326,40 @@ func init() { func init() { proto.RegisterFile("tendermint/types/canonical.proto", fileDescriptor_8d1a1a84ff7267ed) } var fileDescriptor_8d1a1a84ff7267ed = []byte{ - // 533 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x3d, 0x6f, 0xdb, 0x30, - 0x10, 0xb5, 0x12, 0x7f, 0xc8, 0x4c, 0xdc, 0xba, 0x44, 0x10, 0x18, 0x46, 0x21, 0x19, 0x1e, 0x02, - 0x77, 0xa8, 0x04, 0x24, 0x6b, 0x97, 0x28, 0x1e, 0xea, 0xa2, 0x45, 0x0d, 0x3a, 0xc8, 0xd0, 0xc5, - 0xa0, 0x45, 0x56, 0x22, 0x4a, 0x8b, 0x82, 0x44, 0x17, 0x70, 0xa7, 0xfe, 0x84, 0xfc, 0xac, 0x8c, - 0x19, 0x3b, 0xb9, 0x85, 0xfc, 0x37, 0x3a, 0x14, 0x22, 0xe5, 0x0f, 0xd8, 0x69, 0x97, 0x14, 0x59, - 0x84, 0x7b, 0x77, 0x8f, 0xef, 0x4e, 0xf7, 0x08, 0x82, 0x8e, 0xa4, 0x11, 0xa1, 0xc9, 0x94, 0x45, - 0xd2, 0x95, 0xf3, 0x98, 0xa6, 0xae, 0x8f, 0x23, 0x11, 0x31, 0x1f, 0x73, 0x27, 0x4e, 0x84, 0x14, - 0xb0, 0xb9, 0x61, 0x38, 0x8a, 0xd1, 0x3e, 0x09, 0x44, 0x20, 0x54, 0xd1, 0xcd, 0x23, 0xcd, 0x6b, - 0xbf, 0xdc, 0x53, 0x52, 0xdf, 0xa2, 0x6a, 0x07, 0x42, 0x04, 0x9c, 0xba, 0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0xb6, 0xc2, 0xd7, 0xbe, 0x48, 0x8a, 0x77, 0xc4, - 0xdd, 0x7d, 0x72, 0x26, 0x55, 0x95, 0xbf, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x86, 0x9b, 0x2b, - 0x01, 0xd7, 0x04, 0x00, 0x00, + // 528 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xbd, 0x6e, 0xdb, 0x3c, + 0x14, 0xb5, 0x12, 0xff, 0xc8, 0x4c, 0xfc, 0x7d, 0x2e, 0x11, 0x04, 0x86, 0x51, 0x48, 0x86, 0x87, + 0xc0, 0x1d, 0x2a, 0x01, 0xc9, 0xda, 0x25, 0x8a, 0x87, 0xba, 0x68, 0x51, 0x83, 0x0e, 0x32, 0x74, + 0x31, 0x28, 0x91, 0x95, 0x88, 0xd2, 0xa2, 0x20, 0xd1, 0x05, 0xdc, 0xa9, 0x8f, 0x90, 0xe7, 0xe8, + 0x93, 0x64, 0xcc, 0xd8, 0xc9, 0x2d, 0xe4, 0x17, 0x29, 0x44, 0xca, 0x3f, 0xb0, 0x9b, 0xa9, 0x45, + 0x17, 0xe1, 0x9e, 0x7b, 0x0f, 0xcf, 0xbd, 0xba, 0x47, 0x22, 0xe8, 0x49, 0x1a, 0x13, 0x9a, 0xce, + 0x58, 0x2c, 0x5d, 0xb9, 0x48, 0x68, 0xe6, 0x06, 0x38, 0x16, 0x31, 0x0b, 0x30, 0x77, 0x92, 0x54, + 0x48, 0x01, 0xdb, 0x5b, 0x86, 0xa3, 0x18, 0xdd, 0xb3, 0x50, 0x84, 0x42, 0x15, 0xdd, 0x22, 0xd2, + 0xbc, 0xee, 0xf3, 0x03, 0x25, 0xf5, 0x2c, 0xab, 0x76, 0x28, 0x44, 0xc8, 0xa9, 0xab, 0x90, 0x3f, + 0xff, 0xe8, 0x4a, 0x36, 0xa3, 0x99, 0xc4, 0xb3, 0x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xff, 0xff, 0xa4, 0x25, 0x48, 0x96, 0x85, 0x04, 0x00, 0x00, } func (m *CanonicalBlockID) Marshal() (dAtA []byte, err error) { @@ -552,18 +543,6 @@ func (m *CanonicalVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.PartSetHeader != nil { - { - size, err := m.PartSetHeader.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCanonical(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } if len(m.ChainID) > 0 { i -= len(m.ChainID) copy(dAtA[i:], m.ChainID) @@ -571,12 +550,12 @@ func (m *CanonicalVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err6 != nil { - return 0, err6 + n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err5 != nil { + return 0, err5 } - i -= n6 - i = encodeVarintCanonical(dAtA, i, uint64(n6)) + i -= n5 + i = encodeVarintCanonical(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x2a if m.BlockID != nil { @@ -715,10 +694,6 @@ func (m *CanonicalVote) Size() (n int) { if l > 0 { n += 1 + l + sovCanonical(uint64(l)) } - if m.PartSetHeader != nil { - l = m.PartSetHeader.Size() - n += 1 + l + sovCanonical(uint64(l)) - } return n } @@ -1365,42 +1340,6 @@ func (m *CanonicalVote) Unmarshal(dAtA []byte) error { } m.ChainID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartSetHeader", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCanonical - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCanonical - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCanonical - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PartSetHeader == nil { - m.PartSetHeader = &CanonicalPartSetHeader{} - } - if err := m.PartSetHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCanonical(dAtA[iNdEx:]) diff --git a/proto/tendermint/types/canonical.proto b/proto/tendermint/types/canonical.proto index e33c833134..030fc8e759 100644 --- a/proto/tendermint/types/canonical.proto +++ b/proto/tendermint/types/canonical.proto @@ -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; } diff --git a/proto/tendermint/types/types.pb.go b/proto/tendermint/types/types.pb.go index e7f131bf76..8bc2bfe5e2 100644 --- a/proto/tendermint/types/types.pb.go +++ b/proto/tendermint/types/types.pb.go @@ -261,21 +261,20 @@ type Header struct { Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` // prev block info - LastBlockId BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` - LastPartSetHeader *PartSetHeader `protobuf:"bytes,6,opt,name=last_part_set_header,json=lastPartSetHeader,proto3" json:"last_part_set_header,omitempty"` + LastBlockId BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` // hashes of block data - LastCommitHash []byte `protobuf:"bytes,7,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` - NumOriginalDataShares uint64 `protobuf:"varint,8,opt,name=num_original_data_shares,json=numOriginalDataShares,proto3" json:"num_original_data_shares,omitempty"` - DataHash []byte `protobuf:"bytes,9,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` + LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` + NumOriginalDataShares uint64 `protobuf:"varint,7,opt,name=num_original_data_shares,json=numOriginalDataShares,proto3" json:"num_original_data_shares,omitempty"` + DataHash []byte `protobuf:"bytes,8,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` // hashes from the app output from the prev block - ValidatorsHash []byte `protobuf:"bytes,10,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` - NextValidatorsHash []byte `protobuf:"bytes,11,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` - ConsensusHash []byte `protobuf:"bytes,12,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` - AppHash []byte `protobuf:"bytes,13,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` - LastResultsHash []byte `protobuf:"bytes,14,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` + ValidatorsHash []byte `protobuf:"bytes,9,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + NextValidatorsHash []byte `protobuf:"bytes,10,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` + ConsensusHash []byte `protobuf:"bytes,11,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` + AppHash []byte `protobuf:"bytes,12,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` + LastResultsHash []byte `protobuf:"bytes,13,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` // consensus info - EvidenceHash []byte `protobuf:"bytes,15,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` - ProposerAddress []byte `protobuf:"bytes,16,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + EvidenceHash []byte `protobuf:"bytes,14,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,15,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` } func (m *Header) Reset() { *m = Header{} } @@ -346,13 +345,6 @@ func (m *Header) GetLastBlockId() BlockID { return BlockID{} } -func (m *Header) GetLastPartSetHeader() *PartSetHeader { - if m != nil { - return m.LastPartSetHeader - } - return nil -} - func (m *Header) GetLastCommitHash() []byte { if m != nil { return m.LastCommitHash @@ -1640,127 +1632,126 @@ func init() { func init() { proto.RegisterFile("tendermint/types/types.proto", fileDescriptor_d3a6e55e2345de56) } var fileDescriptor_d3a6e55e2345de56 = []byte{ - // 1910 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x73, 0xdb, 0xc8, - 0x11, 0x16, 0xf8, 0x66, 0x93, 0x94, 0xa8, 0x89, 0x24, 0x53, 0xb2, 0x45, 0x31, 0xcc, 0x63, 0xb5, - 0x2f, 0xca, 0xf1, 0xa6, 0xf2, 0xa8, 0xda, 0x6c, 0x2d, 0x29, 0x69, 0x6d, 0x66, 0xf5, 0x60, 0x81, - 0x5a, 0xe5, 0x71, 0x41, 0x0d, 0x89, 0x31, 0x89, 0x18, 0x04, 0x58, 0xc0, 0x50, 0x96, 0x7c, 0xcc, - 0x29, 0xa5, 0x93, 0xff, 0x80, 0x4e, 0xc9, 0x21, 0x95, 0x5b, 0xfe, 0xc5, 0x5e, 0x52, 0xb5, 0xc9, - 0x25, 0xb9, 0xc4, 0x49, 0xc9, 0xb9, 0xe5, 0x94, 0x7f, 0x90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x89, 0xd4, 0xeb, 0xcb, 0x42, 0x78, 0xb2, 0x1a, 0xb6, 0xa1, - 0x88, 0x1a, 0xbb, 0xee, 0x60, 0x60, 0x71, 0x03, 0x43, 0x9f, 0xc6, 0xd0, 0x2f, 0x0a, 0xfa, 0x2e, - 0x92, 0x9f, 0x50, 0xbf, 0x4f, 0x7e, 0x08, 0x25, 0x67, 0x34, 0x30, 0x5c, 0xcf, 0xea, 0x59, 0x0e, - 0xb5, 0x0d, 0x93, 0x72, 0x6a, 0xf8, 0x7d, 0xea, 0x31, 0xbf, 0x94, 0xa9, 0x68, 0xdb, 0x09, 0x7d, - 0xd5, 0x19, 0x0d, 0x8e, 0x15, 0x7b, 0x8f, 0x72, 0xda, 0x46, 0x26, 0xb9, 0x0f, 0x59, 0xc4, 0xa2, - 0xee, 0x2c, 0xea, 0xce, 0x08, 0x02, 0x6a, 0x7d, 0x07, 0x96, 0xc2, 0x8a, 0xf5, 0x25, 0x04, 0xe4, - 0xf1, 0x63, 0x32, 0x02, 0x1f, 0xc2, 0x8a, 0xc3, 0xce, 0xb9, 0x71, 0x13, 0x9d, 0x43, 0x34, 0x11, - 0xbc, 0xd3, 0x49, 0x89, 0xef, 0xc0, 0x62, 0x37, 0xa8, 0x03, 0x89, 0xcd, 0x23, 0xb6, 0x10, 0x52, - 0x11, 0xb6, 0x0e, 0x19, 0x3a, 0x1c, 0x4a, 0x40, 0x01, 0x01, 0x69, 0x3a, 0x1c, 0x22, 0xeb, 0x3d, - 0xc0, 0x88, 0x19, 0x1e, 0xf3, 0x47, 0x36, 0x57, 0x4a, 0x16, 0x11, 0xb3, 0x24, 0x18, 0xba, 0xa4, - 0x23, 0xf6, 0x5b, 0x50, 0x60, 0x67, 0x96, 0xc9, 0x9c, 0x2e, 0x93, 0xb8, 0x25, 0xc4, 0xe5, 0x03, - 0x22, 0x82, 0xde, 0x85, 0xe2, 0xd0, 0x73, 0x87, 0xae, 0xcf, 0x3c, 0x83, 0x9a, 0xa6, 0xc7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0x04, 0xb6, 0x10, 0x51, 0x05, 0x6c, 0x03, 0x74, 0xec, 0xfb, 0x12, 0x90, 0x17, 0x80, 0x0c, + 0xf6, 0x7d, 0xc1, 0x7a, 0x0f, 0x56, 0x44, 0x70, 0x02, 0x42, 0x47, 0x0e, 0x53, 0x4a, 0x0a, 0x02, + 0xb3, 0xcc, 0x19, 0x86, 0xa4, 0x0b, 0xec, 0x37, 0xa0, 0x40, 0xce, 0x6d, 0x8b, 0xb8, 0x3d, 0x22, + 0x71, 0x4b, 0x02, 0x97, 0x0f, 0x89, 0x02, 0xf4, 0x2e, 0x14, 0xfd, 0xc0, 0xf3, 0x3d, 0x4a, 0x02, + 0x13, 0x5b, 0x56, 0x40, 0x28, 0x2d, 0x2d, 0x4b, 0x7d, 0x21, 0xbd, 0x21, 0xc9, 0xb5, 0x5f, 0x26, + 0x20, 0xc5, 0x83, 0x88, 0x8a, 0x90, 0x64, 0x17, 0xb4, 0xa4, 0x55, 0x93, 0xdb, 0x79, 0x83, 0xff, + 0x45, 0x03, 0x28, 0xd9, 0x2e, 0x23, 0xc1, 0x90, 0x58, 0x36, 0x66, 0xc4, 0xa4, 0x8c, 0xff, 0x06, + 0x9e, 0xc7, 0x64, 0xeb, 0xe4, 0x76, 0xb7, 0xa7, 0x6b, 0xa0, 0x15, 0x93, 0xe8, 0x70, 0x01, 0x83, + 0xe3, 0x55, 0x49, 0xac, 0xdb, 0x33, 0xb9, 0xe8, 0x53, 0xd0, 0x43, 0xfb, 0x55, 0xfb, 0x55, 0xa6, + 0x35, 0x1f, 0x28, 0xc4, 0xa1, 0x4d, 0x99, 0xd2, 0x17, 0x49, 0xa1, 0x8f, 0x41, 0x1f, 0x12, 0x4a, + 0x71, 0x9f, 0xd0, 0xa8, 0xc4, 0xa7, 0x34, 0x1c, 0x29, 0x44, 0x28, 0x1d, 0x4a, 0xd4, 0xfe, 0xa9, + 0x81, 0x1e, 0xaa, 0x47, 0x18, 0x1e, 0x58, 0x23, 0xdf, 0x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 0x4d, + 0x45, 0xfb, 0xc7, 0x4d, 0x45, 0x7b, 0xf5, 0xa6, 0xb2, 0xf0, 0xd5, 0x9b, 0xca, 0xc2, 0x5f, 0xdf, + 0x54, 0x16, 0x7e, 0xfe, 0x71, 0xdf, 0x66, 0x83, 0x51, 0xb7, 0xde, 0xf3, 0x86, 0x3b, 0x0e, 0x7e, + 0x79, 0xe9, 0x10, 0xab, 0x4f, 0x82, 0xd8, 0xdf, 0x0f, 0x7b, 0x5e, 0xa0, 0xbe, 0x28, 0xee, 0xdc, + 0xfe, 0xfc, 0xd7, 0x5d, 0x14, 0xf4, 0x8f, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x09, 0x91, 0xde, + 0x4a, 0xbf, 0x14, 0x00, 0x00, } func (m *PartSetHeader) Marshal() (dAtA []byte, err error) { @@ -1898,81 +1889,67 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.ProposerAddress) i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 + dAtA[i] = 0x7a } if len(m.EvidenceHash) > 0 { i -= len(m.EvidenceHash) copy(dAtA[i:], m.EvidenceHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) i-- - dAtA[i] = 0x7a + dAtA[i] = 0x72 } if len(m.LastResultsHash) > 0 { i -= len(m.LastResultsHash) copy(dAtA[i:], m.LastResultsHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) i-- - dAtA[i] = 0x72 + dAtA[i] = 0x6a } if len(m.AppHash) > 0 { i -= len(m.AppHash) copy(dAtA[i:], m.AppHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) i-- - dAtA[i] = 0x6a + dAtA[i] = 0x62 } if len(m.ConsensusHash) > 0 { i -= len(m.ConsensusHash) copy(dAtA[i:], m.ConsensusHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) i-- - dAtA[i] = 0x62 + dAtA[i] = 0x5a } if len(m.NextValidatorsHash) > 0 { i -= len(m.NextValidatorsHash) copy(dAtA[i:], m.NextValidatorsHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x52 } if len(m.ValidatorsHash) > 0 { i -= len(m.ValidatorsHash) copy(dAtA[i:], m.ValidatorsHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x4a } if len(m.DataHash) > 0 { i -= len(m.DataHash) copy(dAtA[i:], m.DataHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x42 } if m.NumOriginalDataShares != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.NumOriginalDataShares)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x38 } if len(m.LastCommitHash) > 0 { i -= len(m.LastCommitHash) copy(dAtA[i:], m.LastCommitHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) i-- - dAtA[i] = 0x3a - } - if m.LastPartSetHeader != nil { - { - size, err := m.LastPartSetHeader.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x32 } { @@ -1985,12 +1962,12 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x2a - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) - if err4 != nil { - return 0, err4 + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err3 != nil { + return 0, err3 } - i -= n4 - i = encodeVarintTypes(dAtA, i, uint64(n4)) + i -= n3 + i = encodeVarintTypes(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x22 if m.Height != 0 { @@ -2174,12 +2151,12 @@ func (m *DuplicateVoteEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err11 != nil { - return 0, err11 + n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err10 != nil { + return 0, err10 } - i -= n11 - i = encodeVarintTypes(dAtA, i, uint64(n11)) + i -= n10 + i = encodeVarintTypes(dAtA, i, uint64(n10)) i-- dAtA[i] = 0x2a if m.ValidatorPower != 0 { @@ -2239,12 +2216,12 @@ func (m *LightClientAttackEvidence) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l - n14, err14 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err14 != nil { - return 0, err14 + n13, err13 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err13 != nil { + return 0, err13 } - i -= n14 - i = encodeVarintTypes(dAtA, i, uint64(n14)) + i -= n13 + i = encodeVarintTypes(dAtA, i, uint64(n13)) i-- dAtA[i] = 0x2a if m.TotalVotingPower != 0 { @@ -2521,12 +2498,12 @@ func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - n17, err17 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err17 != nil { - return 0, err17 + n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err16 != nil { + return 0, err16 } - i -= n17 - i = encodeVarintTypes(dAtA, i, uint64(n17)) + i -= n16 + i = encodeVarintTypes(dAtA, i, uint64(n16)) i-- dAtA[i] = 0x2a { @@ -2660,12 +2637,12 @@ func (m *CommitSig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - n21, err21 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err21 != nil { - return 0, err21 + n20, err20 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err20 != nil { + return 0, err20 } - i -= n21 - i = encodeVarintTypes(dAtA, i, uint64(n21)) + i -= n20 + i = encodeVarintTypes(dAtA, i, uint64(n20)) i-- dAtA[i] = 0x1a if len(m.ValidatorAddress) > 0 { @@ -2734,12 +2711,12 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3a } - n24, err24 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) - if err24 != nil { - return 0, err24 + n23, err23 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err23 != nil { + return 0, err23 } - i -= n24 - i = encodeVarintTypes(dAtA, i, uint64(n24)) + i -= n23 + i = encodeVarintTypes(dAtA, i, uint64(n23)) i-- dAtA[i] = 0x32 { @@ -3084,10 +3061,6 @@ func (m *Header) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) l = m.LastBlockId.Size() n += 1 + l + sovTypes(uint64(l)) - if m.LastPartSetHeader != nil { - l = m.LastPartSetHeader.Size() - n += 1 + l + sovTypes(uint64(l)) - } l = len(m.LastCommitHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) @@ -3125,7 +3098,7 @@ func (m *Header) Size() (n int) { } l = len(m.ProposerAddress) if l > 0 { - n += 2 + l + sovTypes(uint64(l)) + n += 1 + l + sovTypes(uint64(l)) } return n } @@ -4044,42 +4017,6 @@ func (m *Header) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastPartSetHeader", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastPartSetHeader == nil { - m.LastPartSetHeader = &PartSetHeader{} - } - if err := m.LastPartSetHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) } @@ -4113,7 +4050,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.LastCommitHash = []byte{} } iNdEx = postIndex - case 8: + case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NumOriginalDataShares", wireType) } @@ -4132,7 +4069,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { break } } - case 9: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) } @@ -4166,7 +4103,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.DataHash = []byte{} } iNdEx = postIndex - case 10: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) } @@ -4200,7 +4137,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.ValidatorsHash = []byte{} } iNdEx = postIndex - case 11: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) } @@ -4234,7 +4171,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.NextValidatorsHash = []byte{} } iNdEx = postIndex - case 12: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) } @@ -4268,7 +4205,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.ConsensusHash = []byte{} } iNdEx = postIndex - case 13: + case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) } @@ -4302,7 +4239,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.AppHash = []byte{} } iNdEx = postIndex - case 14: + case 13: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) } @@ -4336,7 +4273,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.LastResultsHash = []byte{} } iNdEx = postIndex - case 15: + case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) } @@ -4370,7 +4307,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { m.EvidenceHash = []byte{} } iNdEx = postIndex - case 16: + case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) } diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 65637d094b..3fa8e4ea76 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -63,23 +63,22 @@ message Header { // prev block info BlockID last_block_id = 5 [(gogoproto.nullable) = false]; - PartSetHeader last_part_set_header = 6; // hashes of block data - bytes last_commit_hash = 7; // commit from validators from the last block - uint64 num_original_data_shares = 8; // number of shares used in the original data square - bytes data_hash = 9; // transactions + bytes last_commit_hash = 6; // commit from validators from the last block + uint64 num_original_data_shares = 7; // number of shares used in the original data square + bytes data_hash = 8; // transactions // hashes from the app output from the prev block - bytes validators_hash = 10; // validators for the current block - bytes next_validators_hash = 11; // validators for the next block - bytes consensus_hash = 12; // consensus params for current block - bytes app_hash = 13; // state after txs from the previous block - bytes last_results_hash = 14; // root hash of all results from the txs from the previous block + bytes validators_hash = 9; // validators for the current block + bytes next_validators_hash = 10; // validators for the next block + bytes consensus_hash = 11; // consensus params for current block + bytes app_hash = 12; // state after txs from the previous block + bytes last_results_hash = 13; // root hash of all results from the txs from the previous block // consensus info - bytes evidence_hash = 15; // evidence included in the block - bytes proposer_address = 16; // original proposer of the block + bytes evidence_hash = 14; // evidence included in the block + bytes proposer_address = 15; // original proposer of the block } // Data contains the set of transactions included in the block diff --git a/state/state.go b/state/state.go index 7099234b47..d465b21967 100644 --- a/state/state.go +++ b/state/state.go @@ -268,7 +268,7 @@ func (state State) MakeBlock( // Fill rest of header with state data. block.Header.Populate( state.Version.Consensus, state.ChainID, - timestamp, state.LastBlockID, state.LastPartSetHeader, + timestamp, state.LastBlockID, state.Validators.Hash(), state.NextValidators.Hash(), types.HashConsensusParams(state.ConsensusParams), state.AppHash, state.LastResultsHash, proposerAddress, diff --git a/state/tx_filter_test.go b/state/tx_filter_test.go index f801306616..fd3c9ca3b8 100644 --- a/state/tx_filter_test.go +++ b/state/tx_filter_test.go @@ -14,7 +14,7 @@ import ( func TestTxFilter(t *testing.T) { genDoc := randomGenesisDoc() - genDoc.ConsensusParams.Block.MaxBytes = 3001 + genDoc.ConsensusParams.Block.MaxBytes = 3000 genDoc.ConsensusParams.Evidence.MaxBytes = 1500 // Max size of Txs is much smaller than size of block, @@ -24,7 +24,7 @@ func TestTxFilter(t *testing.T) { isErr bool }{ {types.Tx(tmrand.Bytes(2139)), false}, - {types.Tx(tmrand.Bytes(2150)), true}, + {types.Tx(tmrand.Bytes(2190)), true}, {types.Tx(tmrand.Bytes(3000)), true}, } diff --git a/state/validation.go b/state/validation.go index c532452501..bb0fbdd2fd 100644 --- a/state/validation.go +++ b/state/validation.go @@ -49,13 +49,6 @@ func validateBlock(state State, block *types.Block) error { ) } - if !block.LastPartSetHeader.Equals(state.LastPartSetHeader) { - return fmt.Errorf("wrong Block.Header.LastPartSetHeader. Expected %v, got %v", - state.LastPartSetHeader, - block.LastPartSetHeader, - ) - } - // Validate app info if !bytes.Equal(block.AppHash, state.AppHash) { return fmt.Errorf("wrong Block.Header.AppHash. Expected %X, got %v", diff --git a/state/validation_test.go b/state/validation_test.go index d242047bff..61bb56da33 100644 --- a/state/validation_test.go +++ b/state/validation_test.go @@ -57,7 +57,6 @@ func TestValidateBlockHeader(t *testing.T) { {"Time wrong", func(block *types.Block) { block.Time = block.Time.Add(-time.Second * 1) }}, {"Time wrong 2", func(block *types.Block) { block.Time = block.Time.Add(time.Second * 1) }}, - {"LastBlockID wrong", func(block *types.Block) { block.LastPartSetHeader.Total += 10 }}, {"LastCommitHash wrong", func(block *types.Block) { block.LastCommitHash = wrongHash }}, {"DataHash wrong", func(block *types.Block) { block.DataHash = wrongHash }}, diff --git a/types/block.go b/types/block.go index 9ee72b3319..6947c96c6b 100644 --- a/types/block.go +++ b/types/block.go @@ -32,7 +32,7 @@ const ( // MaxHeaderBytes is a maximum header size. // NOTE: Because app hash can be of arbitrary size, the header is therefore not // capped in size and thus this number should be seen as a soft max - MaxHeaderBytes int64 = 637 + MaxHeaderBytes int64 = 594 // MaxOverheadForBlock - maximum overhead to encode a block (up to // MaxBlockSizeBytes in size) not including it's parts except Data. @@ -513,8 +513,7 @@ type Header struct { Time time.Time `json:"time"` // prev block info - LastBlockID BlockID `json:"last_block_id"` - LastPartSetHeader PartSetHeader `json:"last_part_set_header"` + LastBlockID BlockID `json:"last_block_id"` // hashes of block data LastCommitHash tmbytes.HexBytes `json:"last_commit_hash"` // commit from validators from the last block @@ -544,7 +543,6 @@ func (h *Header) Populate( chainID string, timestamp time.Time, lastBlockID BlockID, - lastPartSetHeader PartSetHeader, valHash, nextValHash []byte, consensusHash, appHash, lastResultsHash []byte, proposerAddress Address, @@ -552,7 +550,6 @@ func (h *Header) Populate( h.Version = version h.ChainID = chainID h.Time = timestamp - h.LastPartSetHeader = lastPartSetHeader h.LastBlockID = lastBlockID h.ValidatorsHash = valHash h.NextValidatorsHash = nextValHash @@ -584,10 +581,6 @@ func (h Header) ValidateBasic() error { return fmt.Errorf("wrong LastBlockID: %w", err) } - if err := h.LastPartSetHeader.ValidateBasic(); err != nil { - return fmt.Errorf("wrong PartSetHeader: %w", err) - } - if err := ValidateHash(h.LastCommitHash); err != nil { return fmt.Errorf("wrong LastCommitHash: %v", err) } @@ -652,19 +645,12 @@ func (h *Header) Hash() tmbytes.HexBytes { return nil } - pbpsh := h.LastPartSetHeader.ToProto() - bzpsh, err := pbpsh.Marshal() - if err != nil { - return nil - } - return merkle.HashFromByteSlices([][]byte{ hbz, cdcEncode(h.ChainID), cdcEncode(h.Height), pbt, bzbi, - bzpsh, cdcEncode(h.LastCommitHash), cdcEncode(h.DataHash), cdcEncode(h.NumOriginalDataShares), @@ -689,7 +675,6 @@ func (h *Header) StringIndented(indent string) string { %s Height: %v %s Time: %v %s LastBlockID: %v -%s LastPartSetHeader: %v %s LastCommit: %v %s Data: %v %s Validators: %v @@ -705,7 +690,6 @@ func (h *Header) StringIndented(indent string) string { indent, h.Height, indent, h.Time, indent, h.LastBlockID, - indent, h.LastPartSetHeader, indent, h.LastCommitHash, indent, h.DataHash, indent, h.ValidatorsHash, @@ -724,15 +708,12 @@ func (h *Header) ToProto() *tmproto.Header { return nil } - ppsh := h.LastPartSetHeader.ToProto() - return &tmproto.Header{ Version: h.Version, ChainID: h.ChainID, Height: h.Height, Time: h.Time, LastBlockId: h.LastBlockID.ToProto(), - LastPartSetHeader: &ppsh, ValidatorsHash: h.ValidatorsHash, NextValidatorsHash: h.NextValidatorsHash, ConsensusHash: h.ConsensusHash, @@ -760,18 +741,12 @@ func HeaderFromProto(ph *tmproto.Header) (Header, error) { return Header{}, err } - lpsh, err := PartSetHeaderFromProto(ph.LastPartSetHeader) - if err != nil { - return Header{}, err - } - h.Version = ph.Version h.ChainID = ph.ChainID h.Height = ph.Height h.Time = ph.Time h.Height = ph.Height h.LastBlockID = *bi - h.LastPartSetHeader = *lpsh h.ValidatorsHash = ph.ValidatorsHash h.NextValidatorsHash = ph.NextValidatorsHash h.ConsensusHash = ph.ConsensusHash diff --git a/types/block_test.go b/types/block_test.go index 8a477cddc4..b20b63bb4b 100644 --- a/types/block_test.go +++ b/types/block_test.go @@ -355,7 +355,6 @@ func TestHeaderHash(t *testing.T) { Height: 3, Time: time.Date(2019, 10, 13, 16, 14, 44, 0, time.UTC), LastBlockID: makeBlockID(make([]byte, tmhash.Size)), - LastPartSetHeader: makePartSetHeader(6, make([]byte, tmhash.Size)), LastCommitHash: tmhash.Sum([]byte("last_commit_hash")), DataHash: tmhash.Sum([]byte("data_hash")), NumOriginalDataShares: 4, @@ -366,7 +365,7 @@ func TestHeaderHash(t *testing.T) { LastResultsHash: tmhash.Sum([]byte("last_results_hash")), EvidenceHash: tmhash.Sum([]byte("evidence_hash")), ProposerAddress: crypto.AddressHash([]byte("proposer_address")), - }, hexBytesFromString("CBE1A9A83217E1EEDE92B9F85B6519B6DA2B2AC8BF69421A1CB0227C5CD3B353")}, + }, hexBytesFromString("0E5747B09FE96A3F1DC58DBB137A82825B6E046A753D52FBB0F4C692D5F6F57E")}, {"nil header yields nil", nil, nil}, {"nil ValidatorsHash yields nil", &Header{ Version: tmversion.Consensus{Block: 1, App: 2}, @@ -374,7 +373,6 @@ func TestHeaderHash(t *testing.T) { Height: 3, Time: time.Date(2019, 10, 13, 16, 14, 44, 0, time.UTC), LastBlockID: makeBlockID(make([]byte, tmhash.Size)), - LastPartSetHeader: makePartSetHeader(6, make([]byte, tmhash.Size)), LastCommitHash: tmhash.Sum([]byte("last_commit_hash")), DataHash: tmhash.Sum([]byte("data_hash")), ValidatorsHash: nil, @@ -455,7 +453,6 @@ func TestMaxHeaderBytes(t *testing.T) { Height: math.MaxInt64, Time: timestamp, LastBlockID: makeBlockID(make([]byte, tmhash.Size)), - LastPartSetHeader: makePartSetHeader(math.MaxInt32, make([]byte, tmhash.Size)), LastCommitHash: tmhash.Sum([]byte("last_commit_hash")), DataHash: tmhash.Sum([]byte("data_hash")), NumOriginalDataShares: math.MaxInt64, @@ -504,11 +501,11 @@ func TestBlockMaxDataBytes(t *testing.T) { }{ 0: {-10, 1, 0, true, 0}, 1: {10, 1, 0, true, 0}, - 2: {851, 1, 0, true, 0}, - 3: {853, 1, 0, false, 0}, - 4: {854, 1, 0, false, 1}, - 5: {965, 2, 0, false, 1}, - 6: {1064, 2, 100, false, 0}, + 2: {808, 1, 0, true, 0}, + 3: {810, 1, 0, false, 0}, + 4: {811, 1, 0, false, 1}, + 5: {922, 2, 0, false, 1}, + 6: {1021, 2, 100, false, 0}, } for i, tc := range testCases { @@ -535,9 +532,9 @@ func TestBlockMaxDataBytesNoEvidence(t *testing.T) { }{ 0: {-10, 1, true, 0}, 1: {10, 1, true, 0}, - 2: {851, 1, true, 0}, - 3: {853, 1, false, 0}, - 4: {854, 1, false, 1}, + 2: {808, 1, true, 0}, + 3: {810, 1, false, 0}, + 4: {811, 1, false, 1}, } for i, tc := range testCases { @@ -1033,21 +1030,6 @@ func TestHeader_ValidateBasic(t *testing.T) { }, true, "wrong Hash", }, - { - "invalid block ID parts header hash", - Header{ - Version: tmversion.Consensus{Block: version.BlockProtocol}, - ChainID: string(make([]byte, MaxChainIDLen)), - Height: 1, - LastBlockID: BlockID{ - Hash: make([]byte, tmhash.Size), - }, - LastPartSetHeader: PartSetHeader{ - Hash: make([]byte, tmhash.Size+1), - }, - }, - true, "wrong PartSetHeader", - }, { "invalid last commit hash", Header{ @@ -1057,9 +1039,6 @@ func TestHeader_ValidateBasic(t *testing.T) { LastBlockID: BlockID{ Hash: make([]byte, tmhash.Size), }, - LastPartSetHeader: PartSetHeader{ - Hash: make([]byte, tmhash.Size), - }, LastCommitHash: make([]byte, tmhash.Size+1), }, true, "wrong LastCommitHash", @@ -1073,9 +1052,6 @@ func TestHeader_ValidateBasic(t *testing.T) { LastBlockID: BlockID{ Hash: make([]byte, tmhash.Size), }, - LastPartSetHeader: PartSetHeader{ - Hash: make([]byte, tmhash.Size), - }, LastCommitHash: make([]byte, tmhash.Size), DataHash: make([]byte, tmhash.Size+1), }, @@ -1090,9 +1066,6 @@ func TestHeader_ValidateBasic(t *testing.T) { LastBlockID: BlockID{ Hash: make([]byte, tmhash.Size), }, - LastPartSetHeader: PartSetHeader{ - Hash: make([]byte, tmhash.Size), - }, LastCommitHash: make([]byte, tmhash.Size), DataHash: make([]byte, tmhash.Size), EvidenceHash: make([]byte, tmhash.Size+1), @@ -1108,9 +1081,6 @@ func TestHeader_ValidateBasic(t *testing.T) { LastBlockID: BlockID{ Hash: make([]byte, tmhash.Size), }, - LastPartSetHeader: PartSetHeader{ - Hash: make([]byte, tmhash.Size), - }, LastCommitHash: make([]byte, tmhash.Size), DataHash: make([]byte, tmhash.Size), EvidenceHash: make([]byte, tmhash.Size), @@ -1127,9 +1097,6 @@ func TestHeader_ValidateBasic(t *testing.T) { LastBlockID: BlockID{ Hash: make([]byte, tmhash.Size), }, - LastPartSetHeader: PartSetHeader{ - Hash: make([]byte, tmhash.Size), - }, LastCommitHash: make([]byte, tmhash.Size), DataHash: make([]byte, tmhash.Size), EvidenceHash: make([]byte, tmhash.Size), @@ -1147,9 +1114,6 @@ func TestHeader_ValidateBasic(t *testing.T) { LastBlockID: BlockID{ Hash: make([]byte, tmhash.Size), }, - LastPartSetHeader: PartSetHeader{ - Hash: make([]byte, tmhash.Size), - }, LastCommitHash: make([]byte, tmhash.Size), DataHash: make([]byte, tmhash.Size), EvidenceHash: make([]byte, tmhash.Size), @@ -1168,9 +1132,6 @@ func TestHeader_ValidateBasic(t *testing.T) { LastBlockID: BlockID{ Hash: make([]byte, tmhash.Size), }, - LastPartSetHeader: PartSetHeader{ - Hash: make([]byte, tmhash.Size), - }, LastCommitHash: make([]byte, tmhash.Size), DataHash: make([]byte, tmhash.Size), EvidenceHash: make([]byte, tmhash.Size), @@ -1190,9 +1151,6 @@ func TestHeader_ValidateBasic(t *testing.T) { LastBlockID: BlockID{ Hash: make([]byte, tmhash.Size), }, - LastPartSetHeader: PartSetHeader{ - Hash: make([]byte, tmhash.Size), - }, LastCommitHash: make([]byte, tmhash.Size), DataHash: make([]byte, tmhash.Size), EvidenceHash: make([]byte, tmhash.Size), @@ -1213,9 +1171,6 @@ func TestHeader_ValidateBasic(t *testing.T) { LastBlockID: BlockID{ Hash: make([]byte, tmhash.Size), }, - LastPartSetHeader: PartSetHeader{ - Hash: make([]byte, tmhash.Size), - }, LastCommitHash: make([]byte, tmhash.Size), DataHash: make([]byte, tmhash.Size), EvidenceHash: make([]byte, tmhash.Size), diff --git a/types/canonical.go b/types/canonical.go index 4fe4f2b88a..82f09a4434 100644 --- a/types/canonical.go +++ b/types/canonical.go @@ -56,15 +56,13 @@ func CanonicalizeProposal(chainID string, proposal *tmproto.Proposal) tmproto.Ca // CanonicalizeVote transforms the given Vote to a CanonicalVote, which does // not contain ValidatorIndex and ValidatorAddress fields. func CanonicalizeVote(chainID string, vote *tmproto.Vote) tmproto.CanonicalVote { - cppsh := CanonicalizePartSetHeader(*vote.PartSetHeader) return tmproto.CanonicalVote{ - Type: vote.Type, - Height: vote.Height, // encoded as sfixed64 - Round: int64(vote.Round), // encoded as sfixed64 - BlockID: CanonicalizeBlockID(vote.BlockID), - Timestamp: vote.Timestamp, - ChainID: chainID, - PartSetHeader: &cppsh, + Type: vote.Type, + Height: vote.Height, // encoded as sfixed64 + Round: int64(vote.Round), // encoded as sfixed64 + BlockID: CanonicalizeBlockID(vote.BlockID), + Timestamp: vote.Timestamp, + ChainID: chainID, } } diff --git a/types/evidence_test.go b/types/evidence_test.go index 10d4149709..af795bc0df 100644 --- a/types/evidence_test.go +++ b/types/evidence_test.go @@ -256,7 +256,6 @@ func makeHeaderRandom() *Header { Height: int64(mrand.Uint32() + 1), Time: time.Now(), LastBlockID: makeBlockIDRandom(), - LastPartSetHeader: makePartSetHeaderRandom(), LastCommitHash: crypto.CRandBytes(tmhash.Size), DataHash: crypto.CRandBytes(tmhash.Size), ValidatorsHash: crypto.CRandBytes(tmhash.Size), diff --git a/types/protobuf.go b/types/protobuf.go index a328ea6d30..d8de0d34d2 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -33,15 +33,13 @@ var TM2PB = tm2pb{} type tm2pb struct{} func (tm2pb) Header(header *Header) tmproto.Header { - lpsh := header.LastPartSetHeader.ToProto() return tmproto.Header{ Version: header.Version, ChainID: header.ChainID, Height: header.Height, Time: header.Time, - LastBlockId: header.LastBlockID.ToProto(), - LastPartSetHeader: &lpsh, + LastBlockId: header.LastBlockID.ToProto(), LastCommitHash: header.LastCommitHash, DataHash: header.DataHash, diff --git a/types/vote.go b/types/vote.go index 181b9092bf..5120fca054 100644 --- a/types/vote.go +++ b/types/vote.go @@ -180,6 +180,10 @@ func (vote *Vote) ValidateBasic() error { return fmt.Errorf("wrong PartSetHeader: %v", err) } + if err := vote.PartSetHeader.ValidateBasic(); err != nil { + return fmt.Errorf("wrong PartSetHeader: %v", err) + } + // BlockID.ValidateBasic would not err if we for instance have an empty hash but a // non-empty PartsSetHeader: if !vote.BlockID.IsZero() && !vote.BlockID.IsComplete() { diff --git a/types/vote_test.go b/types/vote_test.go index abe3a20e55..505d0a1abf 100644 --- a/types/vote_test.go +++ b/types/vote_test.go @@ -67,13 +67,13 @@ func TestVoteSignBytesTestVectors(t *testing.T) { 0: { "", &Vote{}, // NOTE: Height and Round are skipped here. This case needs to be considered while parsing. - []byte{0xf, 0x2a, 0xb, 0x8, 0x80, 0x92, 0xb8, 0xc3, 0x98, 0xfe, 0xff, 0xff, 0xff, 0x1, 0x3a, 0x0}, + []byte{0xd, 0x2a, 0xb, 0x8, 0x80, 0x92, 0xb8, 0xc3, 0x98, 0xfe, 0xff, 0xff, 0xff, 0x1}, }, // with proper (fixed size) height and round (PreCommit): 1: { "", &Vote{Height: 1, Round: 1, Type: tmproto.PrecommitType}, []byte{ - 0x23, // length + 0x21, // length 0x8, // (field_number << 3) | wire_type 0x2, // PrecommitType 0x11, // (field_number << 3) | wire_type @@ -82,13 +82,13 @@ func TestVoteSignBytesTestVectors(t *testing.T) { 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // round 0x2a, // (field_number << 3) | wire_type // remaining fields (timestamp): - 0xb, 0x8, 0x80, 0x92, 0xb8, 0xc3, 0x98, 0xfe, 0xff, 0xff, 0xff, 0x1, 0x3a, 0x0}, + 0xb, 0x8, 0x80, 0x92, 0xb8, 0xc3, 0x98, 0xfe, 0xff, 0xff, 0xff, 0x1}, }, // with proper (fixed size) height and round (PreVote): 2: { "", &Vote{Height: 1, Round: 1, Type: tmproto.PrevoteType}, []byte{ - 0x23, // length + 0x21, // length 0x8, // (field_number << 3) | wire_type 0x1, // PrevoteType 0x11, // (field_number << 3) | wire_type @@ -97,25 +97,25 @@ func TestVoteSignBytesTestVectors(t *testing.T) { 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // round 0x2a, // (field_number << 3) | wire_type // remaining fields (timestamp): - 0xb, 0x8, 0x80, 0x92, 0xb8, 0xc3, 0x98, 0xfe, 0xff, 0xff, 0xff, 0x1, 0x3a, 0x0}, + 0xb, 0x8, 0x80, 0x92, 0xb8, 0xc3, 0x98, 0xfe, 0xff, 0xff, 0xff, 0x1}, }, 3: { "", &Vote{Height: 1, Round: 1}, []byte{ - 0x21, // length + 0x1f, // length 0x11, // (field_number << 3) | wire_type 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // height 0x19, // (field_number << 3) | wire_type 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // round // remaining fields (timestamp): 0x2a, - 0xb, 0x8, 0x80, 0x92, 0xb8, 0xc3, 0x98, 0xfe, 0xff, 0xff, 0xff, 0x1, 0x3a, 0x0}, + 0xb, 0x8, 0x80, 0x92, 0xb8, 0xc3, 0x98, 0xfe, 0xff, 0xff, 0xff, 0x1}, }, // containing non-empty chain_id: 4: { "test_chain_id", &Vote{Height: 1, Round: 1}, []byte{ - 0x30, // length + 0x2e, // length 0x11, // (field_number << 3) | wire_type 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, // height 0x19, // (field_number << 3) | wire_type @@ -125,7 +125,7 @@ func TestVoteSignBytesTestVectors(t *testing.T) { 0xb, 0x8, 0x80, 0x92, 0xb8, 0xc3, 0x98, 0xfe, 0xff, 0xff, 0xff, 0x1, // timestamp // (field_number << 3) | wire_type 0x32, - 0xd, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x3a, 0x0}, // chainID + 0xd, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64}, // chainID }, } for i, tc := range tests { @@ -294,3 +294,23 @@ func TestVoteProtobuf(t *testing.T) { } } } + +// TestDoNotSignOverPartSetHeader simply ensures that the partset header is not signed over while voting. +func TestDoNotSignOverPartSetHeader(t *testing.T) { + pv := NewMockPV() + pubKey, err := pv.GetPubKey() + require.NoError(t, err) + blockID := randBlockID() + psh := randPartSetHeader() + currentTime := time.Now() + voteA := makeMockVote(1, 0, 0, pubKey.Address(), blockID, psh, currentTime).ToProto() + voteB := makeMockVote(1, 0, 0, pubKey.Address(), blockID, PartSetHeader{}, currentTime).ToProto() + + err = pv.SignVote("test", voteA) + require.NoError(t, err) + err = pv.SignVote("test", voteB) + require.NoError(t, err) + + require.Equal(t, voteA.Signature, voteB.Signature) + +}