diff --git a/Makefile b/Makefile index 3bd75af5dc..52413e3fa9 100644 --- a/Makefile +++ b/Makefile @@ -155,7 +155,7 @@ endif proto-gen: check-proto-deps @echo "Generating Protobuf files" - @go run github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION) generate + @go run github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION) generate --exclude-path proto/nmt @mv ./proto/tendermint/abci/types.pb.go ./abci/types/ @cp ./proto/tendermint/rpc/grpc/types.pb.go ./rpc/grpc .PHONY: proto-gen diff --git a/proto/nmt/proof.proto b/proto/nmt/proof.proto new file mode 100644 index 0000000000..fde722d8a2 --- /dev/null +++ b/proto/nmt/proof.proto @@ -0,0 +1,22 @@ +syntax="proto3"; + +package nmt; + +option go_package = "github.com/celestiaorg/nmt/pb"; + +message Proof { + // Start index of the leaves that match the queried namespace.ID. + int64 start = 1; + // End index (non-inclusive) of the leaves that match the queried + // namespace.ID. + int64 end = 2; + // Nodes hold the tree nodes necessary for the Merkle range proof. + repeated bytes nodes = 3; + // leaf_hash contains the namespace.ID if NMT does not have it and + // it should be proven. leaf_hash is necessary to prove the Absence Proof. + // This field will be empty in case of Inclusion Proof. + bytes leaf_hash = 4; + // The is_max_namespace_ignored flag influences the calculation of the + // namespace ID range for intermediate nodes in the tree. + bool is_max_namespace_ignored=5; +} diff --git a/proto/tendermint/types/types.pb.go b/proto/tendermint/types/types.pb.go index ff6a726e09..1a8d6b9261 100644 --- a/proto/tendermint/types/types.pb.go +++ b/proto/tendermint/types/types.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + pb "github.com/celestiaorg/nmt/pb" crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" version "github.com/cometbft/cometbft/proto/tendermint/version" _ "github.com/gogo/protobuf/gogoproto" @@ -1260,7 +1261,7 @@ func (m *BlobTx) GetTypeId() string { // Merkle proof that those rows exist in a Merkle tree with a given data root. type ShareProof struct { Data [][]byte `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` - ShareProofs []*NMTProof `protobuf:"bytes,2,rep,name=share_proofs,json=shareProofs,proto3" json:"share_proofs,omitempty"` + ShareProofs []*pb.Proof `protobuf:"bytes,2,rep,name=share_proofs,json=shareProofs,proto3" json:"share_proofs,omitempty"` NamespaceId []byte `protobuf:"bytes,3,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` RowProof *RowProof `protobuf:"bytes,4,opt,name=row_proof,json=rowProof,proto3" json:"row_proof,omitempty"` NamespaceVersion uint32 `protobuf:"varint,5,opt,name=namespace_version,json=namespaceVersion,proto3" json:"namespace_version,omitempty"` @@ -1306,7 +1307,7 @@ func (m *ShareProof) GetData() [][]byte { return nil } -func (m *ShareProof) GetShareProofs() []*NMTProof { +func (m *ShareProof) GetShareProofs() []*pb.Proof { if m != nil { return m.ShareProofs } @@ -1412,89 +1413,6 @@ func (m *RowProof) GetEndRow() uint32 { return 0 } -// NMTProof is a proof of a namespace.ID in an NMT. -// In case this proof proves the absence of a namespace.ID -// in a tree it also contains the leaf hashes of the range -// where that namespace would be. -type NMTProof struct { - // Start index of this proof. - Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` - // End index of this proof. - End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` - // Nodes that together with the corresponding leaf values can be used to - // recompute the root and verify this proof. Nodes should consist of the max - // and min namespaces along with the actual hash, resulting in each being 48 - // bytes each - Nodes [][]byte `protobuf:"bytes,3,rep,name=nodes,proto3" json:"nodes,omitempty"` - // leafHash are nil if the namespace is present in the NMT. In case the - // namespace to be proved is in the min/max range of the tree but absent, this - // will contain the leaf hash necessary to verify the proof of absence. Leaf - // hashes should consist of the namespace along with the actual hash, - // resulting 40 bytes total. - LeafHash []byte `protobuf:"bytes,4,opt,name=leaf_hash,json=leafHash,proto3" json:"leaf_hash,omitempty"` -} - -func (m *NMTProof) Reset() { *m = NMTProof{} } -func (m *NMTProof) String() string { return proto.CompactTextString(m) } -func (*NMTProof) ProtoMessage() {} -func (*NMTProof) Descriptor() ([]byte, []int) { - return fileDescriptor_d3a6e55e2345de56, []int{18} -} -func (m *NMTProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NMTProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NMTProof.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NMTProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_NMTProof.Merge(m, src) -} -func (m *NMTProof) XXX_Size() int { - return m.Size() -} -func (m *NMTProof) XXX_DiscardUnknown() { - xxx_messageInfo_NMTProof.DiscardUnknown(m) -} - -var xxx_messageInfo_NMTProof proto.InternalMessageInfo - -func (m *NMTProof) GetStart() int32 { - if m != nil { - return m.Start - } - return 0 -} - -func (m *NMTProof) GetEnd() int32 { - if m != nil { - return m.End - } - return 0 -} - -func (m *NMTProof) GetNodes() [][]byte { - if m != nil { - return m.Nodes - } - return nil -} - -func (m *NMTProof) GetLeafHash() []byte { - if m != nil { - return m.LeafHash - } - return nil -} - func init() { proto.RegisterEnum("tendermint.types.BlockIDFlag", BlockIDFlag_name, BlockIDFlag_value) proto.RegisterEnum("tendermint.types.SignedMsgType", SignedMsgType_name, SignedMsgType_value) @@ -1516,117 +1434,114 @@ func init() { proto.RegisterType((*BlobTx)(nil), "tendermint.types.BlobTx") proto.RegisterType((*ShareProof)(nil), "tendermint.types.ShareProof") proto.RegisterType((*RowProof)(nil), "tendermint.types.RowProof") - proto.RegisterType((*NMTProof)(nil), "tendermint.types.NMTProof") } func init() { proto.RegisterFile("tendermint/types/types.proto", fileDescriptor_d3a6e55e2345de56) } var fileDescriptor_d3a6e55e2345de56 = []byte{ - // 1663 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4f, 0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0x29, 0xdd, 0x7d, 0xb5, 0x5d, 0x38, - 0x10, 0xb4, 0xee, 0xa1, 0x55, 0x40, 0x66, 0xd7, 0x35, 0x1f, 0x40, 0x7e, 0x4c, 0xbc, 0xd1, 0x98, - 0x63, 0x58, 0xb2, 0x96, 0x3a, 0x99, 0xbf, 0x00, 0x5d, 0x14, 0x44, 0x4d, 0xc7, 0xbb, 0xeb, 0x6d, - 0x59, 0x2d, 0xed, 0xb8, 0x5a, 0xda, 0xfd, 0xb8, 0x5a, 0x3a, 0x86, 0xb8, 0xf8, 0xb3, 0x7f, 0x6d, - 0x6b, 0x16, 0x4a, 0x98, 0x07, 0x50, 0xf1, 0x1d, 0xc6, 0xed, 0x81, 0x08, 0x9b, 0xb8, 0x3e, 0x87, - 0x2a, 0x1e, 0x2e, 0x06, 0x44, 0x05, 0x56, 0x99, 0x5e, 0x12, 0x52, 0x92, 0xe4, 0x9a, 0x3b, 0x50, - 0x45, 0x25, 0x43, 0x3a, 0x99, 0x78, 0xdc, 0xc6, 0xb8, 0xe7, 0x31, 0xee, 0xeb, 0x82, 0x7e, 0x80, - 0xe4, 0x0f, 0x44, 0x06, 0x1e, 0x41, 0xd1, 0x75, 0xb8, 0x23, 0x21, 0x05, 0x84, 0x18, 0x82, 0x80, - 0xcc, 0x1f, 0xc1, 0x46, 0x52, 0x75, 0x4c, 0x42, 0x0c, 0xa9, 0x65, 0x46, 0x46, 0xe0, 0x13, 0xd8, - 0x0a, 0xc8, 0x35, 0xb7, 0xef, 0xa3, 0x8b, 0x88, 0x36, 0x05, 0xef, 0xc5, 0xbc, 0xc4, 0x0f, 0x60, - 0x7d, 0x18, 0x07, 0x5f, 0x62, 0x01, 0xb1, 0x95, 0x84, 0x8a, 0xb0, 0x87, 0x60, 0x38, 0x61, 0x28, - 0x01, 0x25, 0x04, 0x14, 0x9c, 0x30, 0x44, 0xd6, 0x3b, 0xb0, 0x89, 0x3e, 0x46, 0x84, 0x4d, 0x7d, - 0xae, 0x94, 0x94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x7c, 0x03, 0x7b, 0x10, 0x00, 0x00, + // 1620 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0xdb, 0x56, + 0x12, 0x37, 0x25, 0x4a, 0xa2, 0x46, 0x92, 0x4d, 0x13, 0x4e, 0xa2, 0x28, 0xb1, 0xac, 0xd5, 0x62, + 0x77, 0x9d, 0x6c, 0x56, 0xce, 0x3a, 0x8b, 0x6d, 0x7b, 0xe8, 0xc1, 0xb2, 0x9d, 0x44, 0x89, 0xff, + 0x08, 0x94, 0xe2, 0xa0, 0x45, 0x01, 0x82, 0x12, 0x9f, 0x25, 0x36, 0x12, 0x1f, 0x4b, 0x3e, 0xd9, + 0x72, 0x3e, 0x41, 0xe1, 0x4b, 0x73, 0xea, 0xcd, 0xa7, 0xf4, 0xd0, 0x7b, 0xbf, 0x40, 0xd1, 0x53, + 0x8e, 0xb9, 0x35, 0x97, 0xa6, 0x85, 0x03, 0x14, 0xfd, 0x18, 0xc5, 0xfb, 0x43, 0x8a, 0xb2, 0xa4, + 0x36, 0x08, 0x82, 0x5e, 0x04, 0xbe, 0x99, 0xdf, 0xcc, 0x9b, 0xbf, 0x6f, 0x46, 0x70, 0x9d, 0x20, + 0xc7, 0x42, 0x5e, 0xdf, 0x76, 0xc8, 0x1a, 0x39, 0x71, 0x91, 0xcf, 0x7f, 0x2b, 0xae, 0x87, 0x09, + 0xd6, 0xd4, 0x11, 0xb7, 0xc2, 0xe8, 0x85, 0xa5, 0x0e, 0xee, 0x60, 0xc6, 0x5c, 0xa3, 0x5f, 0x1c, + 0x57, 0x58, 0xe9, 0x60, 0xdc, 0xe9, 0xa1, 0x35, 0x76, 0x6a, 0x0d, 0x0e, 0xd7, 0x88, 0xdd, 0x47, + 0x3e, 0x31, 0xfb, 0xae, 0x00, 0x2c, 0x38, 0x7d, 0x42, 0xb9, 0xf8, 0x50, 0x10, 0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d, 0xf2, 0xb5, 0x0d, 0xc8, 0x05, 0x76, 0x19, + 0x87, 0x3d, 0xb3, 0x23, 0x6a, 0x67, 0x79, 0xa6, 0x71, 0x77, 0x7b, 0x66, 0x47, 0xcf, 0x08, 0x7b, + 0xe8, 0x61, 0x7a, 0x1e, 0x62, 0x33, 0xf2, 0x30, 0x96, 0xf8, 0xf8, 0xbb, 0x25, 0x7e, 0x2c, 0x45, + 0xf2, 0xc5, 0x14, 0x7d, 0x17, 0x03, 0xa5, 0xce, 0x1e, 0x05, 0xb3, 0xf7, 0x57, 0x74, 0xc4, 0x35, + 0x48, 0xbb, 0xb8, 0x67, 0x70, 0x8e, 0xcc, 0x38, 0x8a, 0x8b, 0x7b, 0xfa, 0x44, 0xda, 0x13, 0xef, + 0xa9, 0x5d, 0x92, 0xef, 0x21, 0x6a, 0xa9, 0x8b, 0x51, 0xf3, 0x20, 0xcb, 0x43, 0x21, 0x86, 0xf4, + 0x6d, 0x1a, 0x03, 0x36, 0xf5, 0xa5, 0xc9, 0xa5, 0x82, 0x9b, 0xcd, 0x91, 0xba, 0xc0, 0x51, 0x09, + 0x3e, 0xd3, 0xc4, 0x9e, 0x90, 0x9f, 0x55, 0x96, 0xba, 0xc0, 0x95, 0xbf, 0x96, 0x00, 0x76, 0x68, + 0x64, 0x99, 0xbf, 0x74, 0xbc, 0xfa, 0xcc, 0x04, 0x63, 0xec, 0xe6, 0xe2, 0xac, 0xa4, 0x89, 0xfb, + 0xb3, 0x7e, 0xd4, 0xee, 0x4d, 0xc8, 0x8d, 0x8a, 0xd1, 0x47, 0x81, 0x31, 0x53, 0x94, 0x84, 0x53, + 0xaf, 0x81, 0x88, 0x9e, 0x3d, 0x8a, 0x9c, 0xca, 0x3f, 0x48, 0x90, 0x66, 0x36, 0xed, 0x22, 0x62, + 0x8e, 0xe5, 0x50, 0x7a, 0xf7, 0x1c, 0x2e, 0x03, 0x70, 0x35, 0x6c, 0xfa, 0xf0, 0xca, 0x4a, 0x33, + 0x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, 0x97, 0xcf, 0x8b, 0x73, 0xdf, + 0x7e, 0x53, 0x94, 0xa8, 0x67, 0xb9, 0xb1, 0x19, 0xa3, 0xdd, 0x82, 0x2b, 0x8d, 0xda, 0xbd, 0xbd, + 0xed, 0x2d, 0x63, 0xb7, 0x71, 0xcf, 0x68, 0x7e, 0x52, 0xdf, 0x8e, 0x78, 0xb7, 0x70, 0x7a, 0x56, + 0xca, 0x08, 0x97, 0x66, 0xa1, 0xeb, 0xfa, 0xf6, 0xc1, 0x7e, 0x73, 0x5b, 0x95, 0x38, 0xba, 0xee, + 0xa1, 0x23, 0x4c, 0x10, 0x43, 0xdf, 0x86, 0xab, 0x53, 0xd0, 0xa1, 0x63, 0x8b, 0xa7, 0x67, 0xa5, + 0x5c, 0xdd, 0x43, 0xfc, 0xfd, 0x65, 0x12, 0x15, 0xc8, 0x4f, 0x4a, 0xec, 0xd7, 0xf7, 0x1b, 0x1b, + 0x3b, 0x6a, 0xa9, 0xa0, 0x9e, 0x9e, 0x95, 0xb2, 0xc1, 0x30, 0xa5, 0xf8, 0x91, 0x67, 0xd5, 0xdd, + 0x17, 0xe7, 0x45, 0xe9, 0xe5, 0x79, 0x51, 0xfa, 0xe5, 0xbc, 0x28, 0x3d, 0x7b, 0x53, 0x9c, 0x7b, + 0xf9, 0xa6, 0x38, 0xf7, 0xea, 0x4d, 0x71, 0xee, 0xd3, 0x3b, 0x1d, 0x9b, 0x74, 0x07, 0xad, 0x4a, + 0x1b, 0xf7, 0xd7, 0xda, 0xb8, 0x8f, 0x48, 0xeb, 0x90, 0x8c, 0x3e, 0xf8, 0x1f, 0xf8, 0x8b, 0xff, + 0xa1, 0x5b, 0x49, 0x46, 0xbf, 0xf3, 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x57, 0x62, 0x38, + 0x15, 0x10, 0x00, 0x00, } func (m *PartSetHeader) Marshal() (dAtA []byte, err error) { @@ -2651,55 +2566,6 @@ func (m *RowProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *NMTProof) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NMTProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NMTProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.LeafHash) > 0 { - i -= len(m.LeafHash) - copy(dAtA[i:], m.LeafHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.LeafHash))) - i-- - dAtA[i] = 0x22 - } - if len(m.Nodes) > 0 { - for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Nodes[iNdEx]) - copy(dAtA[i:], m.Nodes[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Nodes[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if m.End != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.End)) - i-- - dAtA[i] = 0x10 - } - if m.Start != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Start)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -3154,31 +3020,6 @@ func (m *RowProof) Size() (n int) { return n } -func (m *NMTProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Start != 0 { - n += 1 + sovTypes(uint64(m.Start)) - } - if m.End != 0 { - n += 1 + sovTypes(uint64(m.End)) - } - if len(m.Nodes) > 0 { - for _, b := range m.Nodes { - l = len(b) - n += 1 + l + sovTypes(uint64(l)) - } - } - l = len(m.LeafHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -6133,7 +5974,7 @@ func (m *ShareProof) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ShareProofs = append(m.ShareProofs, &NMTProof{}) + m.ShareProofs = append(m.ShareProofs, &pb.Proof{}) if err := m.ShareProofs[len(m.ShareProofs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6436,160 +6277,6 @@ func (m *RowProof) Unmarshal(dAtA []byte) error { } return nil } -func (m *NMTProof) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NMTProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NMTProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) - } - m.Start = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Start |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) - } - m.End = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.End |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nodes = append(m.Nodes, make([]byte, postIndex-iNdEx)) - copy(m.Nodes[len(m.Nodes)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LeafHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LeafHash = append(m.LeafHash[:0], dAtA[iNdEx:postIndex]...) - if m.LeafHash == nil { - m.LeafHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index dcd23c01d9..8f12e0c4b5 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -5,6 +5,7 @@ option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; +import "nmt/proof.proto"; import "tendermint/crypto/proof.proto"; import "tendermint/version/types.proto"; import "tendermint/types/validator.proto"; @@ -93,7 +94,7 @@ message Data { // field number 2 is reserved for intermediate state roots // field number 3 is reserved for evidence // field number 4 is reserved for blobs - + // SquareSize is the number of rows or columns in the original data square. uint64 square_size = 5; @@ -211,11 +212,11 @@ message BlobTx { // ShareProof is an NMT proof that a set of shares exist in a set of rows and a // Merkle proof that those rows exist in a Merkle tree with a given data root. message ShareProof { - repeated bytes data = 1; - repeated NMTProof share_proofs = 2; - bytes namespace_id = 3; - RowProof row_proof = 4; - uint32 namespace_version = 5; + repeated bytes data = 1; + repeated nmt.Proof share_proofs = 2; + bytes namespace_id = 3; + RowProof row_proof = 4; + uint32 namespace_version = 5; } // RowProof is a Merkle proof that a set of rows exist in a Merkle tree with a @@ -227,25 +228,3 @@ message RowProof { uint32 start_row = 4; uint32 end_row = 5; } - -// NMTProof is a proof of a namespace.ID in an NMT. -// In case this proof proves the absence of a namespace.ID -// in a tree it also contains the leaf hashes of the range -// where that namespace would be. -message NMTProof { - // Start index of this proof. - int32 start = 1; - // End index of this proof. - int32 end = 2; - // Nodes that together with the corresponding leaf values can be used to - // recompute the root and verify this proof. Nodes should consist of the max - // and min namespaces along with the actual hash, resulting in each being 48 - // bytes each - repeated bytes nodes = 3; - // leafHash are nil if the namespace is present in the NMT. In case the - // namespace to be proved is in the min/max range of the tree but absent, this - // will contain the leaf hash necessary to verify the proof of absence. Leaf - // hashes should consist of the namespace along with the actual hash, - // resulting 40 bytes total. - bytes leaf_hash = 4; -} diff --git a/types/share_proof.go b/types/share_proof.go index dc5d9a0aad..537341fd52 100644 --- a/types/share_proof.go +++ b/types/share_proof.go @@ -6,6 +6,7 @@ import ( "math" "github.com/celestiaorg/nmt" + "github.com/celestiaorg/nmt/pb" "github.com/cometbft/cometbft/pkg/consts" "github.com/cometbft/cometbft/proto/tendermint/crypto" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" @@ -18,7 +19,7 @@ type ShareProof struct { Data [][]byte `json:"data"` // ShareProofs are NMT proofs that the shares in Data exist in a set of // rows. There will be one ShareProof per row that the shares occupy. - ShareProofs []*tmproto.NMTProof `json:"share_proofs"` + ShareProofs []*pb.Proof `json:"share_proofs"` // NamespaceID is the namespace id of the shares being proven. This // namespace id is used when verifying the proof. If the namespace id doesn't // match the namespace of the shares, the proof will fail verification. @@ -67,7 +68,7 @@ func ShareProofFromProto(pb tmproto.ShareProof) (ShareProof, error) { // If the proof is not correctly constructed, it returns a sensible error. // Note: these proofs are tested on the app side. func (sp ShareProof) Validate() error { - numberOfSharesInProofs := int32(0) + numberOfSharesInProofs := int64(0) for _, proof := range sp.ShareProofs { // the range is not inclusive from the left. numberOfSharesInProofs += proof.End - proof.Start @@ -103,7 +104,7 @@ func (sp ShareProof) VerifyProof(root []byte) bool { if err := sp.Validate(); err != nil { return false } - cursor := int32(0) + cursor := int64(0) for i, proof := range sp.ShareProofs { nmtProof := nmt.NewInclusionProof( int(proof.Start), diff --git a/types/share_proof_test.go b/types/share_proof_test.go index b199b74d41..4756d38d73 100644 --- a/types/share_proof_test.go +++ b/types/share_proof_test.go @@ -3,8 +3,8 @@ package types import ( "testing" + "github.com/celestiaorg/nmt/pb" "github.com/cometbft/cometbft/pkg/consts" - "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/assert" ) @@ -100,7 +100,7 @@ func TestShareProofVerify(t *testing.T) { func mismatchedShareProofs() ShareProof { sp := validShareProof() - sp.ShareProofs = []*types.NMTProof{} + sp.ShareProofs = []*pb.Proof{} return sp } @@ -116,7 +116,7 @@ func mismatchedShares() ShareProof { func validShareProof() ShareProof { return ShareProof{ Data: [][]uint8{{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0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38, 0x53, 0xfd, 0x77, 0xe, 0x17, 0xcc, 0x93, 0x5e, 0x4e, 0x60, 0x87, 0xda, 0xbd, 0xfc, 0x86, 0xdd, 0xb1, 0xd6, 0x74, 0x41, 0x71, 0x24, 0xda, 0x1, 0x3f, 0x11, 0x17, 0x9e, 0x54, 0x66, 0xb6, 0xc4, 0x9a, 0xb8, 0x59, 0xb9, 0x13, 0x4e, 0xed, 0x8, 0xe5, 0x99, 0x27, 0xa0, 0x6b, 0x1, 0x6c, 0x8a, 0xbf, 0x20, 0x3d, 0x75, 0xd5, 0x7e, 0xea, 0xe0, 0xef, 0x7f, 0xfe, 0xa8, 0xaf, 0x76, 0xad, 0x30, 0x55, 0x65, 0x9d, 0xbe, 0x30, 0x32, 0x9f, 0x3b, 0xb7, 0xa1, 0x5c, 0x98, 0xef, 0xe1, 0xe4, 0x33, 0x1a, 0x56, 0x5a, 0x22, 0xd1, 0x38, 0x9b, 0xee, 0xfa, 0x11, 0x6f, 0xa7, 0xd7, 0x6, 0x17, 0xdc, 0xc6, 0x4d, 0xbd, 0x3f, 0x3c, 0xe6, 0xac, 0x54, 0x70, 0xda, 0x11, 0xdb, 0x87, 0xe2, 0xc2, 0x26, 0x7e, 0x48, 0x3b, 0xda, 0xf4, 0x98, 0x3c, 0x51}}, - ShareProofs: []*types.NMTProof{ + ShareProofs: []*pb.Proof{ { Start: 0, End: 1,