diff --git a/data/block/block.go b/data/block/block.go index 0ac8fd2a..c601bb71 100644 --- a/data/block/block.go +++ b/data/block/block.go @@ -14,7 +14,7 @@ var _ = data.HeaderHandler(&Header{}) var _ = data.ShardHeaderHandler(&Header{}) // MiniBlockSlice should be used when referring to subset of mini blocks that is not -// necessarily representing a full block body +// necessarily representing a full block body type MiniBlockSlice []*MiniBlock // MiniblockAndHash holds the info related to a miniblock and its hash @@ -615,3 +615,14 @@ func (h *Header) CheckFieldsForNil() error { return nil } + +// GetPreviousAggregatedSignatureAndBitmap returns the previous aggregated signature and the previous pubkeys bitmap +func (h *Header) GetPreviousAggregatedSignatureAndBitmap() ([]byte, []byte) { + // no proof for the initial header + return nil, nil +} + +// SetPreviousAggregatedSignatureAndBitmap sets the previous aggregated signature and the previous pubkeys bitmap +func (h *Header) SetPreviousAggregatedSignatureAndBitmap(_ []byte, _ []byte) { + // no proof for the initial header +} diff --git a/data/block/blockV2.go b/data/block/blockV2.go index 0a690e2e..08a1acaa 100644 --- a/data/block/blockV2.go +++ b/data/block/blockV2.go @@ -650,3 +650,19 @@ func (hv2 *HeaderV2) CheckFieldsForNil() error { return nil } + +// GetPreviousAggregatedSignatureAndBitmap returns the previous aggregated signature and the previous pubkeys bitmap +func (hv2 *HeaderV2) GetPreviousAggregatedSignatureAndBitmap() ([]byte, []byte) { + if hv2.PreviousHeaderProof == nil { + return nil, nil + } + return hv2.PreviousHeaderProof.AggregatedSignature, hv2.PreviousHeaderProof.PubKeysBitmap +} + +// SetPreviousAggregatedSignatureAndBitmap sets the previous aggregated signature and the previous pubkeys bitmap +func (hv2 *HeaderV2) SetPreviousAggregatedSignatureAndBitmap(aggregatedSignature []byte, pubKeysBitmap []byte) { + hv2.PreviousHeaderProof = &PreviousHeaderProof{ + PubKeysBitmap: pubKeysBitmap, + AggregatedSignature: aggregatedSignature, + } +} diff --git a/data/block/blockV2.pb.go b/data/block/blockV2.pb.go index a7a2eaca..add958a5 100644 --- a/data/block/blockV2.pb.go +++ b/data/block/blockV2.pb.go @@ -30,13 +30,14 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // HeaderV2 extends the Header structure with extra fields for version 2 type HeaderV2 struct { - Header *Header `protobuf:"bytes,1,opt,name=Header,proto3" json:"header,omitempty"` - ScheduledRootHash []byte `protobuf:"bytes,2,opt,name=ScheduledRootHash,proto3" json:"scheduledRootHash,omitempty"` - ScheduledAccumulatedFees *math_big.Int `protobuf:"bytes,3,opt,name=ScheduledAccumulatedFees,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"scheduledAccumulatedFees,omitempty"` - ScheduledDeveloperFees *math_big.Int `protobuf:"bytes,4,opt,name=ScheduledDeveloperFees,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"scheduledDeveloperFees,omitempty"` - ScheduledGasProvided uint64 `protobuf:"varint,5,opt,name=ScheduledGasProvided,proto3" json:"scheduledGasProvided"` - ScheduledGasPenalized uint64 `protobuf:"varint,6,opt,name=ScheduledGasPenalized,proto3" json:"scheduledGasPenalized"` - ScheduledGasRefunded uint64 `protobuf:"varint,7,opt,name=ScheduledGasRefunded,proto3" json:"scheduledGasRefunded"` + Header *Header `protobuf:"bytes,1,opt,name=Header,proto3" json:"header,omitempty"` + ScheduledRootHash []byte `protobuf:"bytes,2,opt,name=ScheduledRootHash,proto3" json:"scheduledRootHash,omitempty"` + ScheduledAccumulatedFees *math_big.Int `protobuf:"bytes,3,opt,name=ScheduledAccumulatedFees,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"scheduledAccumulatedFees,omitempty"` + ScheduledDeveloperFees *math_big.Int `protobuf:"bytes,4,opt,name=ScheduledDeveloperFees,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"scheduledDeveloperFees,omitempty"` + ScheduledGasProvided uint64 `protobuf:"varint,5,opt,name=ScheduledGasProvided,proto3" json:"scheduledGasProvided"` + ScheduledGasPenalized uint64 `protobuf:"varint,6,opt,name=ScheduledGasPenalized,proto3" json:"scheduledGasPenalized"` + ScheduledGasRefunded uint64 `protobuf:"varint,7,opt,name=ScheduledGasRefunded,proto3" json:"scheduledGasRefunded"` + PreviousHeaderProof *PreviousHeaderProof `protobuf:"bytes,8,opt,name=PreviousHeaderProof,proto3" json:"previousHeaderProof"` } func (m *HeaderV2) Reset() { *m = HeaderV2{} } @@ -116,6 +117,13 @@ func (m *HeaderV2) GetScheduledGasRefunded() uint64 { return 0 } +func (m *HeaderV2) GetPreviousHeaderProof() *PreviousHeaderProof { + if m != nil { + return m.PreviousHeaderProof + } + return nil +} + type MiniBlockReserved struct { ExecutionType ProcessingType `protobuf:"varint,1,opt,name=ExecutionType,proto3,enum=proto.ProcessingType" json:"executionType"` TransactionsType []byte `protobuf:"bytes,2,opt,name=TransactionsType,proto3" json:"transactionsType"` @@ -226,55 +234,110 @@ func (m *MiniBlockHeaderReserved) GetIndexOfLastTxProcessed() int32 { return 0 } +// PreviousHeaderProof defines a header proof +type PreviousHeaderProof struct { + PubKeysBitmap []byte `protobuf:"bytes,1,opt,name=PubKeysBitmap,proto3" json:"pubKeysBitmap"` + AggregatedSignature []byte `protobuf:"bytes,2,opt,name=AggregatedSignature,proto3" json:"aggregatedSignature"` +} + +func (m *PreviousHeaderProof) Reset() { *m = PreviousHeaderProof{} } +func (*PreviousHeaderProof) ProtoMessage() {} +func (*PreviousHeaderProof) Descriptor() ([]byte, []int) { + return fileDescriptor_17a3844aa051366e, []int{3} +} +func (m *PreviousHeaderProof) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PreviousHeaderProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *PreviousHeaderProof) XXX_Merge(src proto.Message) { + xxx_messageInfo_PreviousHeaderProof.Merge(m, src) +} +func (m *PreviousHeaderProof) XXX_Size() int { + return m.Size() +} +func (m *PreviousHeaderProof) XXX_DiscardUnknown() { + xxx_messageInfo_PreviousHeaderProof.DiscardUnknown(m) +} + +var xxx_messageInfo_PreviousHeaderProof proto.InternalMessageInfo + +func (m *PreviousHeaderProof) GetPubKeysBitmap() []byte { + if m != nil { + return m.PubKeysBitmap + } + return nil +} + +func (m *PreviousHeaderProof) GetAggregatedSignature() []byte { + if m != nil { + return m.AggregatedSignature + } + return nil +} + func init() { proto.RegisterType((*HeaderV2)(nil), "proto.HeaderV2") proto.RegisterType((*MiniBlockReserved)(nil), "proto.MiniBlockReserved") proto.RegisterType((*MiniBlockHeaderReserved)(nil), "proto.MiniBlockHeaderReserved") + proto.RegisterType((*PreviousHeaderProof)(nil), "proto.PreviousHeaderProof") } func init() { proto.RegisterFile("blockV2.proto", fileDescriptor_17a3844aa051366e) } var fileDescriptor_17a3844aa051366e = []byte{ - // 622 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x3f, 0x6f, 0xd3, 0x40, - 0x14, 0xcf, 0x95, 0xba, 0xc0, 0x95, 0xa0, 0xd6, 0xea, 0x1f, 0xd3, 0x4a, 0xe7, 0x28, 0x53, 0x07, - 0x92, 0x48, 0x41, 0x62, 0xe9, 0x00, 0x18, 0x5a, 0x5a, 0xa9, 0xa5, 0xd5, 0xb5, 0x74, 0x60, 0xbb, - 0xd8, 0xaf, 0xce, 0x89, 0xd8, 0x17, 0xf9, 0xce, 0x51, 0xca, 0xc4, 0x47, 0xe0, 0x4b, 0x54, 0x42, - 0xf0, 0x45, 0x18, 0x18, 0x3a, 0x96, 0xc5, 0x50, 0x77, 0x41, 0x9e, 0xfa, 0x11, 0x50, 0xce, 0x21, - 0xfd, 0xe7, 0x8c, 0x9d, 0xfc, 0xee, 0xfd, 0xfe, 0xdc, 0x4f, 0xa7, 0xf7, 0x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 0xcc, 0xc7, 0x5e, 0xef, 0x8b, 0xba, 0x81, 0xd1, - 0x5b, 0xec, 0xea, 0xcf, 0x09, 0xbc, 0x38, 0xca, 0x99, 0x6f, 0xd3, 0x9d, 0xa5, 0x7d, 0x8e, 0x8d, - 0x3d, 0xc5, 0x54, 0x1e, 0xf1, 0xd2, 0x67, 0x74, 0xbd, 0x06, 0x9d, 0x87, 0x59, 0x62, 0x1b, 0x72, - 0x50, 0xd2, 0x9c, 0x6e, 0xbe, 0xc7, 0x8b, 0x9b, 0xa1, 0x07, 0xfd, 0x9d, 0xc3, 0x75, 0x1e, 0x49, - 0xb5, 0xdf, 0x1f, 0xde, 0x0c, 0x9e, 0x5e, 0x46, 0xc3, 0x59, 0xce, 0x12, 0x7b, 0x91, 0x17, 0x53, - 0xe8, 0x38, 0xad, 0x49, 0xf1, 0xc2, 0x10, 0xda, 0x62, 0xd7, 0x5d, 0x27, 0xb5, 0xeb, 0x52, 0x96, - 0xd8, 0x0b, 0xbc, 0x90, 0x41, 0xc7, 0x28, 0x9d, 0x17, 0x27, 0x67, 0xa4, 0x74, 0x7a, 0x46, 0x4a, - 0x17, 0x67, 0x04, 0x7d, 0x4e, 0x09, 0xfa, 0x9a, 0x12, 0xf4, 0x23, 0x25, 0xe8, 0x24, 0x25, 0xe8, - 0x34, 0x25, 0xe8, 0x4f, 0x4a, 0xd0, 0xdf, 0x94, 0x94, 0x2e, 0x52, 0x82, 0xbe, 0x9c, 0x93, 0xd2, - 0xc9, 0x39, 0x29, 0x9d, 0x9e, 0x93, 0xd2, 0x07, 0x43, 0xff, 0x19, 0x5b, 0x53, 0xfa, 0x4d, 0x9e, - 0xfd, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xc8, 0x73, 0x7c, 0x6e, 0x05, 0x00, 0x00, + // 717 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x3f, 0x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 0x78, 0x04, 0xba, 0xa1, + 0x3f, 0x8e, 0xf7, 0x71, 0x76, 0xbc, 0x67, 0x9c, 0x64, 0xaa, 0x34, 0xc0, 0xdb, 0xed, 0x00, 0x86, + 0x8c, 0x87, 0x22, 0xed, 0xd1, 0x76, 0xc0, 0x79, 0x57, 0x5f, 0x53, 0xbd, 0x5d, 0x9e, 0xf4, 0x76, + 0x06, 0xc3, 0x2a, 0x25, 0x91, 0xb9, 0x3d, 0x58, 0x04, 0x48, 0x96, 0x5f, 0xf5, 0x16, 0xe1, 0xad, + 0x73, 0xe6, 0x33, 0x6b, 0x3c, 0x56, 0x04, 0x04, 0x04, 0x43, 0x70, 0xb4, 0x1f, 0x71, 0xf1, 0x78, + 0x04, 0x76, 0x28, 0x19, 0xf7, 0xaf, 0x6e, 0x06, 0xa0, 0x46, 0xea, 0xd3, 0xe6, 0xee, 0xf4, 0x58, + 0x6e, 0x83, 0x10, 0xcc, 0x77, 0xc7, 0xa0, 0xb5, 0x95, 0x44, 0x66, 0x11, 0x66, 0xf9, 0x64, 0x5e, + 0xae, 0x7d, 0x83, 0x37, 0xaf, 0x02, 0xea, 0x0b, 0x6a, 0x8f, 0x4b, 0x42, 0x59, 0xa6, 0xd3, 0xa5, + 0xc6, 0x52, 0xbe, 0xc2, 0xc8, 0x02, 0xbb, 0xfa, 0xdf, 0x0a, 0x2e, 0x4d, 0x73, 0xa6, 0x5f, 0xe0, + 0xcd, 0xd2, 0x7e, 0x89, 0xf3, 0x97, 0x92, 0xca, 0x34, 0xe2, 0x8b, 0xcf, 0xf4, 0x78, 0x05, 0x5a, + 0x9f, 0x24, 0x91, 0x99, 0x17, 0xe3, 0x25, 0x49, 0xe9, 0xda, 0x4f, 0xb8, 0xd4, 0xf2, 0x1d, 0x18, + 0x5d, 0x74, 0x4f, 0x58, 0x20, 0xe4, 0xd5, 0x68, 0x72, 0x32, 0x38, 0x6a, 0xe6, 0xf3, 0xd6, 0x7e, + 0x12, 0x99, 0x25, 0x96, 0x4d, 0x21, 0xcb, 0xb4, 0x1a, 0xc1, 0x7b, 0x13, 0xe8, 0x8c, 0xce, 0xbb, + 0xae, 0x2a, 0xd7, 0x72, 0x12, 0x99, 0x7b, 0x2c, 0x93, 0x41, 0x96, 0x28, 0xab, 0x7f, 0xa0, 0xcc, + 0xf6, 0xd2, 0xbe, 0xc2, 0xc5, 0x76, 0xd8, 0xf9, 0x01, 0x6e, 0x84, 0xc5, 0xa4, 0x47, 0x07, 0xea, + 0x2a, 0x37, 0xd2, 0x3b, 0x1b, 0xcc, 0x02, 0x64, 0x9e, 0xa7, 0xb5, 0xf0, 0xf6, 0x91, 0xeb, 0x06, + 0xe0, 0x8e, 0x7f, 0x55, 0x2e, 0x99, 0xeb, 0x53, 0x19, 0x06, 0xcf, 0x8f, 0xac, 0x5a, 0x92, 0x2e, + 0xc2, 0x24, 0x4b, 0x63, 0x7d, 0x7d, 0xf7, 0x60, 0xe4, 0xee, 0x1f, 0x8c, 0xdc, 0xd3, 0x83, 0x81, + 0x7e, 0x8b, 0x0d, 0xf4, 0x67, 0x6c, 0xa0, 0x7f, 0x63, 0x03, 0xdd, 0xc5, 0x06, 0xba, 0x8f, 0x0d, + 0xf4, 0x2e, 0x36, 0xd0, 0xfb, 0xd8, 0xc8, 0x3d, 0xc5, 0x06, 0xfa, 0xfd, 0xd1, 0xc8, 0xdd, 0x3d, + 0x1a, 0xb9, 0xfb, 0x47, 0x23, 0xf7, 0x73, 0x5e, 0xfd, 0x39, 0x74, 0x0a, 0xea, 0xbd, 0xbe, 0xf8, + 0x10, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xe3, 0xe1, 0x73, 0x71, 0x06, 0x00, 0x00, } func (this *HeaderV2) Equal(that interface{}) bool { @@ -323,6 +386,9 @@ func (this *HeaderV2) Equal(that interface{}) bool { if this.ScheduledGasRefunded != that1.ScheduledGasRefunded { return false } + if !this.PreviousHeaderProof.Equal(that1.PreviousHeaderProof) { + return false + } return true } func (this *MiniBlockReserved) Equal(that interface{}) bool { @@ -385,11 +451,38 @@ func (this *MiniBlockHeaderReserved) Equal(that interface{}) bool { } return true } +func (this *PreviousHeaderProof) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*PreviousHeaderProof) + if !ok { + that2, ok := that.(PreviousHeaderProof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.PubKeysBitmap, that1.PubKeysBitmap) { + return false + } + if !bytes.Equal(this.AggregatedSignature, that1.AggregatedSignature) { + return false + } + return true +} func (this *HeaderV2) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 11) + s := make([]string, 0, 12) s = append(s, "&block.HeaderV2{") if this.Header != nil { s = append(s, "Header: "+fmt.Sprintf("%#v", this.Header)+",\n") @@ -400,6 +493,9 @@ func (this *HeaderV2) GoString() string { s = append(s, "ScheduledGasProvided: "+fmt.Sprintf("%#v", this.ScheduledGasProvided)+",\n") s = append(s, "ScheduledGasPenalized: "+fmt.Sprintf("%#v", this.ScheduledGasPenalized)+",\n") s = append(s, "ScheduledGasRefunded: "+fmt.Sprintf("%#v", this.ScheduledGasRefunded)+",\n") + if this.PreviousHeaderProof != nil { + s = append(s, "PreviousHeaderProof: "+fmt.Sprintf("%#v", this.PreviousHeaderProof)+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -427,6 +523,17 @@ func (this *MiniBlockHeaderReserved) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *PreviousHeaderProof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&block.PreviousHeaderProof{") + s = append(s, "PubKeysBitmap: "+fmt.Sprintf("%#v", this.PubKeysBitmap)+",\n") + s = append(s, "AggregatedSignature: "+fmt.Sprintf("%#v", this.AggregatedSignature)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} func valueToGoStringBlockV2(v interface{}, typ string) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -455,6 +562,18 @@ func (m *HeaderV2) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.PreviousHeaderProof != nil { + { + size, err := m.PreviousHeaderProof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBlockV2(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } if m.ScheduledGasRefunded != 0 { i = encodeVarintBlockV2(dAtA, i, uint64(m.ScheduledGasRefunded)) i-- @@ -592,6 +711,43 @@ func (m *MiniBlockHeaderReserved) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *PreviousHeaderProof) 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 *PreviousHeaderProof) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PreviousHeaderProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AggregatedSignature) > 0 { + i -= len(m.AggregatedSignature) + copy(dAtA[i:], m.AggregatedSignature) + i = encodeVarintBlockV2(dAtA, i, uint64(len(m.AggregatedSignature))) + i-- + dAtA[i] = 0x12 + } + if len(m.PubKeysBitmap) > 0 { + i -= len(m.PubKeysBitmap) + copy(dAtA[i:], m.PubKeysBitmap) + i = encodeVarintBlockV2(dAtA, i, uint64(len(m.PubKeysBitmap))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintBlockV2(dAtA []byte, offset int, v uint64) int { offset -= sovBlockV2(v) base := offset @@ -636,6 +792,10 @@ func (m *HeaderV2) Size() (n int) { if m.ScheduledGasRefunded != 0 { n += 1 + sovBlockV2(uint64(m.ScheduledGasRefunded)) } + if m.PreviousHeaderProof != nil { + l = m.PreviousHeaderProof.Size() + n += 1 + l + sovBlockV2(uint64(l)) + } return n } @@ -676,6 +836,23 @@ func (m *MiniBlockHeaderReserved) Size() (n int) { return n } +func (m *PreviousHeaderProof) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PubKeysBitmap) + if l > 0 { + n += 1 + l + sovBlockV2(uint64(l)) + } + l = len(m.AggregatedSignature) + if l > 0 { + n += 1 + l + sovBlockV2(uint64(l)) + } + return n +} + func sovBlockV2(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -694,6 +871,7 @@ func (this *HeaderV2) String() string { `ScheduledGasProvided:` + fmt.Sprintf("%v", this.ScheduledGasProvided) + `,`, `ScheduledGasPenalized:` + fmt.Sprintf("%v", this.ScheduledGasPenalized) + `,`, `ScheduledGasRefunded:` + fmt.Sprintf("%v", this.ScheduledGasRefunded) + `,`, + `PreviousHeaderProof:` + strings.Replace(this.PreviousHeaderProof.String(), "PreviousHeaderProof", "PreviousHeaderProof", 1) + `,`, `}`, }, "") return s @@ -722,6 +900,17 @@ func (this *MiniBlockHeaderReserved) String() string { }, "") return s } +func (this *PreviousHeaderProof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PreviousHeaderProof{`, + `PubKeysBitmap:` + fmt.Sprintf("%v", this.PubKeysBitmap) + `,`, + `AggregatedSignature:` + fmt.Sprintf("%v", this.AggregatedSignature) + `,`, + `}`, + }, "") + return s +} func valueToStringBlockV2(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -962,6 +1151,42 @@ func (m *HeaderV2) Unmarshal(dAtA []byte) error { break } } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PreviousHeaderProof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBlockV2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBlockV2 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBlockV2 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PreviousHeaderProof == nil { + m.PreviousHeaderProof = &PreviousHeaderProof{} + } + if err := m.PreviousHeaderProof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipBlockV2(dAtA[iNdEx:]) @@ -1221,6 +1446,127 @@ func (m *MiniBlockHeaderReserved) Unmarshal(dAtA []byte) error { } return nil } +func (m *PreviousHeaderProof) 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 ErrIntOverflowBlockV2 + } + 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: PreviousHeaderProof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PreviousHeaderProof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PubKeysBitmap", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBlockV2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthBlockV2 + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthBlockV2 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PubKeysBitmap = append(m.PubKeysBitmap[:0], dAtA[iNdEx:postIndex]...) + if m.PubKeysBitmap == nil { + m.PubKeysBitmap = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregatedSignature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBlockV2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthBlockV2 + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthBlockV2 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggregatedSignature = append(m.AggregatedSignature[:0], dAtA[iNdEx:postIndex]...) + if m.AggregatedSignature == nil { + m.AggregatedSignature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBlockV2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthBlockV2 + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthBlockV2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipBlockV2(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/data/block/blockV2.proto b/data/block/blockV2.proto index 0e5a4b9b..0f49680f 100644 --- a/data/block/blockV2.proto +++ b/data/block/blockV2.proto @@ -11,13 +11,14 @@ import "block.proto"; // HeaderV2 extends the Header structure with extra fields for version 2 message HeaderV2 { - Header Header = 1 [(gogoproto.jsontag) = "header,omitempty"]; - bytes ScheduledRootHash = 2 [(gogoproto.jsontag) = "scheduledRootHash,omitempty"]; - bytes ScheduledAccumulatedFees = 3 [(gogoproto.jsontag) = "scheduledAccumulatedFees,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; - bytes ScheduledDeveloperFees = 4 [(gogoproto.jsontag) = "scheduledDeveloperFees,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; - uint64 ScheduledGasProvided = 5 [(gogoproto.jsontag) = "scheduledGasProvided"]; - uint64 ScheduledGasPenalized = 6 [(gogoproto.jsontag) = "scheduledGasPenalized"]; - uint64 ScheduledGasRefunded = 7 [(gogoproto.jsontag) = "scheduledGasRefunded"]; + Header Header = 1 [(gogoproto.jsontag) = "header,omitempty"]; + bytes ScheduledRootHash = 2 [(gogoproto.jsontag) = "scheduledRootHash,omitempty"]; + bytes ScheduledAccumulatedFees = 3 [(gogoproto.jsontag) = "scheduledAccumulatedFees,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; + bytes ScheduledDeveloperFees = 4 [(gogoproto.jsontag) = "scheduledDeveloperFees,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; + uint64 ScheduledGasProvided = 5 [(gogoproto.jsontag) = "scheduledGasProvided"]; + uint64 ScheduledGasPenalized = 6 [(gogoproto.jsontag) = "scheduledGasPenalized"]; + uint64 ScheduledGasRefunded = 7 [(gogoproto.jsontag) = "scheduledGasRefunded"]; + PreviousHeaderProof PreviousHeaderProof = 8 [(gogoproto.jsontag) = "previousHeaderProof"]; } message MiniBlockReserved { @@ -31,3 +32,9 @@ message MiniBlockHeaderReserved { int32 IndexOfFirstTxProcessed = 3 [(gogoproto.jsontag) = "indexOfFirstTxProcessed"]; int32 IndexOfLastTxProcessed = 4 [(gogoproto.jsontag) = "indexOfLastTxProcessed"]; } + +// PreviousHeaderProof defines a header proof +message PreviousHeaderProof { + bytes PubKeysBitmap = 1 [(gogoproto.jsontag) = "pubKeysBitmap"]; + bytes AggregatedSignature = 2 [(gogoproto.jsontag) = "aggregatedSignature"]; +} diff --git a/data/block/blockV2Checks_test.go b/data/block/blockV2Checks_test.go index b44e2d43..28abfaa8 100644 --- a/data/block/blockV2Checks_test.go +++ b/data/block/blockV2Checks_test.go @@ -12,6 +12,7 @@ import ( var headerV2ExceptionFields = []string{ "Header", "ScheduledRootHash", + "PreviousHeaderProof", } func TestBlockHeaderV2_Checks(t *testing.T) { @@ -68,7 +69,8 @@ func TestBlockHeaderV2_Checks(t *testing.T) { t.Parallel() objectToTest := &HeaderV2{ - Header: &Header{}, + Header: &Header{}, + PreviousHeaderProof: &PreviousHeaderProof{}, } fieldsForHeaderV1 := prepareFieldsList(objectToTest.Header, headerV1ExceptionFields...) diff --git a/data/block/blockV2_test.go b/data/block/blockV2_test.go index a0e28f58..12b26640 100644 --- a/data/block/blockV2_test.go +++ b/data/block/blockV2_test.go @@ -1217,3 +1217,20 @@ func TestHeaderV2_HasScheduledMiniBlocks(t *testing.T) { require.False(t, shardBlock.HasScheduledMiniBlocks()) } + +func TestHeaderV2_GetPreviousAggregatedSignatureAndBitmap(t *testing.T) { + t.Parallel() + + shardBlock := &block.HeaderV2{} + sig, bitmap := shardBlock.GetPreviousAggregatedSignatureAndBitmap() + require.Nil(t, sig) + require.Nil(t, bitmap) + + previousPubkeysBitmap := []byte("previous pub keys bitmap") + previousAggregatedSignature := []byte("previous aggregated signature") + + shardBlock.SetPreviousAggregatedSignatureAndBitmap(previousAggregatedSignature, previousPubkeysBitmap) + sig, bitmap = shardBlock.GetPreviousAggregatedSignatureAndBitmap() + require.Equal(t, previousPubkeysBitmap, bitmap) + require.Equal(t, previousAggregatedSignature, sig) +} diff --git a/data/block/metaBlock.go b/data/block/metaBlock.go index ebaf8da8..db254e07 100644 --- a/data/block/metaBlock.go +++ b/data/block/metaBlock.go @@ -566,3 +566,19 @@ func (m *MetaBlock) CheckFieldsForNil() error { return nil } + +// GetPreviousAggregatedSignatureAndBitmap returns the previous aggregated signature and the previous pubkeys bitmap +func (m *MetaBlock) GetPreviousAggregatedSignatureAndBitmap() ([]byte, []byte) { + if m.PreviousHeaderProof == nil { + return nil, nil + } + return m.PreviousHeaderProof.AggregatedSignature, m.PreviousHeaderProof.PubKeysBitmap +} + +// SetPreviousAggregatedSignatureAndBitmap sets the previous aggregated signature and the previous pubkeys bitmap +func (m *MetaBlock) SetPreviousAggregatedSignatureAndBitmap(aggregatedSignature []byte, pubKeysBitmap []byte) { + m.PreviousHeaderProof = &PreviousHeaderProof{ + PubKeysBitmap: pubKeysBitmap, + AggregatedSignature: aggregatedSignature, + } +} diff --git a/data/block/metaBlock.pb.go b/data/block/metaBlock.pb.go index 9595a0ed..f1591283 100644 --- a/data/block/metaBlock.pb.go +++ b/data/block/metaBlock.pb.go @@ -70,8 +70,8 @@ func (PeerAction) EnumDescriptor() ([]byte, []int) { } // PeerData holds information about actions taken by a peer: -// - a peer can register with an amount to become a validator -// - a peer can choose to deregister and get back the deposited value +// - a peer can register with an amount to become a validator +// - a peer can choose to deregister and get back the deposited value type PeerData struct { Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"address,omitempty"` PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"publicKey,omitempty"` @@ -545,31 +545,32 @@ func (m *EpochStart) GetEconomics() Economics { // MetaBlock holds the data that will be saved to the metachain each round type MetaBlock struct { - Nonce uint64 `protobuf:"varint,1,opt,name=Nonce,proto3" json:"nonce"` - Epoch uint32 `protobuf:"varint,2,opt,name=Epoch,proto3" json:"epoch"` - Round uint64 `protobuf:"varint,3,opt,name=Round,proto3" json:"round"` - TimeStamp uint64 `protobuf:"varint,4,opt,name=TimeStamp,proto3" json:"timeStamp,omitempty"` - ShardInfo []ShardData `protobuf:"bytes,5,rep,name=ShardInfo,proto3" json:"shardInfo"` - PeerInfo []PeerData `protobuf:"bytes,6,rep,name=PeerInfo,proto3" json:"peerInfo"` - Signature []byte `protobuf:"bytes,7,opt,name=Signature,proto3" json:"signature,omitempty"` - LeaderSignature []byte `protobuf:"bytes,8,opt,name=LeaderSignature,proto3" json:"leaderSignature,omitempty"` - PubKeysBitmap []byte `protobuf:"bytes,9,opt,name=PubKeysBitmap,proto3" json:"pubKeysBitmap,omitempty"` - PrevHash []byte `protobuf:"bytes,10,opt,name=PrevHash,proto3" json:"prevHash,omitempty"` - PrevRandSeed []byte `protobuf:"bytes,11,opt,name=PrevRandSeed,proto3" json:"prevRandSeed,omitempty"` - RandSeed []byte `protobuf:"bytes,12,opt,name=RandSeed,proto3" json:"randSeed,omitempty"` - RootHash []byte `protobuf:"bytes,13,opt,name=RootHash,proto3" json:"rootHash,omitempty"` - ValidatorStatsRootHash []byte `protobuf:"bytes,14,opt,name=ValidatorStatsRootHash,proto3" json:"validatorStatsRootHash,omitempty"` - MiniBlockHeaders []MiniBlockHeader `protobuf:"bytes,16,rep,name=MiniBlockHeaders,proto3" json:"miniBlockHeaders"` - ReceiptsHash []byte `protobuf:"bytes,17,opt,name=ReceiptsHash,proto3" json:"receiptsHash,omitempty"` - EpochStart EpochStart `protobuf:"bytes,18,opt,name=EpochStart,proto3" json:"epochStart,omitempty"` - ChainID []byte `protobuf:"bytes,19,opt,name=ChainID,proto3" json:"chainID,omitempty"` - SoftwareVersion []byte `protobuf:"bytes,20,opt,name=SoftwareVersion,proto3" json:"softwareVersion,omitempty"` - AccumulatedFees *math_big.Int `protobuf:"bytes,21,opt,name=AccumulatedFees,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"accumulatedFees,omitempty"` - AccumulatedFeesInEpoch *math_big.Int `protobuf:"bytes,22,opt,name=AccumulatedFeesInEpoch,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"accumulatedFeesInEpoch,omitempty"` - DeveloperFees *math_big.Int `protobuf:"bytes,23,opt,name=DeveloperFees,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"developerFees,omitempty"` - DevFeesInEpoch *math_big.Int `protobuf:"bytes,24,opt,name=DevFeesInEpoch,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"devFeesInEpoch,omitempty"` - TxCount uint32 `protobuf:"varint,25,opt,name=TxCount,proto3" json:"txCount"` - Reserved []byte `protobuf:"bytes,26,opt,name=Reserved,proto3" json:"reserved,omitempty"` + Nonce uint64 `protobuf:"varint,1,opt,name=Nonce,proto3" json:"nonce"` + Epoch uint32 `protobuf:"varint,2,opt,name=Epoch,proto3" json:"epoch"` + Round uint64 `protobuf:"varint,3,opt,name=Round,proto3" json:"round"` + TimeStamp uint64 `protobuf:"varint,4,opt,name=TimeStamp,proto3" json:"timeStamp,omitempty"` + ShardInfo []ShardData `protobuf:"bytes,5,rep,name=ShardInfo,proto3" json:"shardInfo"` + PeerInfo []PeerData `protobuf:"bytes,6,rep,name=PeerInfo,proto3" json:"peerInfo"` + Signature []byte `protobuf:"bytes,7,opt,name=Signature,proto3" json:"signature,omitempty"` + LeaderSignature []byte `protobuf:"bytes,8,opt,name=LeaderSignature,proto3" json:"leaderSignature,omitempty"` + PubKeysBitmap []byte `protobuf:"bytes,9,opt,name=PubKeysBitmap,proto3" json:"pubKeysBitmap,omitempty"` + PrevHash []byte `protobuf:"bytes,10,opt,name=PrevHash,proto3" json:"prevHash,omitempty"` + PrevRandSeed []byte `protobuf:"bytes,11,opt,name=PrevRandSeed,proto3" json:"prevRandSeed,omitempty"` + RandSeed []byte `protobuf:"bytes,12,opt,name=RandSeed,proto3" json:"randSeed,omitempty"` + RootHash []byte `protobuf:"bytes,13,opt,name=RootHash,proto3" json:"rootHash,omitempty"` + ValidatorStatsRootHash []byte `protobuf:"bytes,14,opt,name=ValidatorStatsRootHash,proto3" json:"validatorStatsRootHash,omitempty"` + MiniBlockHeaders []MiniBlockHeader `protobuf:"bytes,16,rep,name=MiniBlockHeaders,proto3" json:"miniBlockHeaders"` + ReceiptsHash []byte `protobuf:"bytes,17,opt,name=ReceiptsHash,proto3" json:"receiptsHash,omitempty"` + EpochStart EpochStart `protobuf:"bytes,18,opt,name=EpochStart,proto3" json:"epochStart,omitempty"` + ChainID []byte `protobuf:"bytes,19,opt,name=ChainID,proto3" json:"chainID,omitempty"` + SoftwareVersion []byte `protobuf:"bytes,20,opt,name=SoftwareVersion,proto3" json:"softwareVersion,omitempty"` + AccumulatedFees *math_big.Int `protobuf:"bytes,21,opt,name=AccumulatedFees,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"accumulatedFees,omitempty"` + AccumulatedFeesInEpoch *math_big.Int `protobuf:"bytes,22,opt,name=AccumulatedFeesInEpoch,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"accumulatedFeesInEpoch,omitempty"` + DeveloperFees *math_big.Int `protobuf:"bytes,23,opt,name=DeveloperFees,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"developerFees,omitempty"` + DevFeesInEpoch *math_big.Int `protobuf:"bytes,24,opt,name=DevFeesInEpoch,proto3,casttypewith=math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster" json:"devFeesInEpoch,omitempty"` + TxCount uint32 `protobuf:"varint,25,opt,name=TxCount,proto3" json:"txCount"` + Reserved []byte `protobuf:"bytes,26,opt,name=Reserved,proto3" json:"reserved,omitempty"` + PreviousHeaderProof *PreviousHeaderProof `protobuf:"bytes,27,opt,name=PreviousHeaderProof,proto3" json:"previousHeaderProof"` } func (m *MetaBlock) Reset() { *m = MetaBlock{} } @@ -775,6 +776,13 @@ func (m *MetaBlock) GetReserved() []byte { return nil } +func (m *MetaBlock) GetPreviousHeaderProof() *PreviousHeaderProof { + if m != nil { + return m.PreviousHeaderProof + } + return nil +} + func init() { proto.RegisterEnum("proto.PeerAction", PeerAction_name, PeerAction_value) proto.RegisterType((*PeerData)(nil), "proto.PeerData") @@ -788,111 +796,113 @@ func init() { func init() { proto.RegisterFile("metaBlock.proto", fileDescriptor_87b91ab531130b2b) } var fileDescriptor_87b91ab531130b2b = []byte{ - // 1651 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4f, 0x6b, 0x1b, 0x47, - 0x1b, 0xd7, 0xda, 0x91, 0x25, 0x8d, 0x2c, 0x5b, 0x1a, 0xff, 0xdb, 0x38, 0x89, 0x56, 0xf8, 0x7d, - 0x5f, 0x30, 0xe1, 0xb5, 0x0d, 0x2e, 0x81, 0x42, 0x69, 0x8b, 0x65, 0xc7, 0x8d, 0x9a, 0xd8, 0x11, - 0x2b, 0x37, 0xd0, 0x92, 0x43, 0x47, 0xbb, 0x63, 0x69, 0xf0, 0xfe, 0xeb, 0xee, 0xac, 0x1d, 0xf7, - 0x50, 0x7a, 0x68, 0x2f, 0x85, 0x42, 0xa0, 0xd0, 0x4f, 0xd0, 0x42, 0xe9, 0x17, 0xe8, 0xa9, 0x50, - 0xe8, 0x25, 0xc7, 0x1c, 0x73, 0xda, 0x36, 0xca, 0xa1, 0x65, 0x2f, 0xcd, 0x47, 0x28, 0x3b, 0xbb, - 0xab, 0x1d, 0x49, 0xab, 0xc4, 0x09, 0x88, 0x9c, 0x6c, 0xfd, 0x9e, 0xbf, 0x3b, 0xfb, 0xcc, 0xef, - 0x79, 0x9e, 0x05, 0xf3, 0x3a, 0xa6, 0xa8, 0xae, 0x99, 0xca, 0xc9, 0xa6, 0x65, 0x9b, 0xd4, 0x84, - 0x59, 0xf6, 0x67, 0x75, 0xa3, 0x43, 0x68, 0xd7, 0x6d, 0x6f, 0x2a, 0xa6, 0xbe, 0xd5, 0x31, 0x3b, - 0xe6, 0x16, 0x83, 0xdb, 0xee, 0x31, 0xfb, 0xc5, 0x7e, 0xb0, 0xff, 0x42, 0xab, 0xd5, 0x62, 0x3b, - 0x71, 0xb1, 0xf6, 0xd7, 0x14, 0xc8, 0x37, 0x31, 0xb6, 0xf7, 0x10, 0x45, 0x70, 0x0b, 0xe4, 0x76, - 0x54, 0xd5, 0xc6, 0x8e, 0x23, 0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0xd3, 0x43, 0xd3, 0x50, 0xb0, 0x08, 0x12, 0xa7, 0x46, 0x00, 0xc8, 0x21, 0x0e, 0x1f, 0x0a, 0x60, - 0x7e, 0x47, 0x51, 0x5c, 0xdd, 0xd5, 0x10, 0xc5, 0xea, 0x3e, 0xc6, 0x8e, 0x38, 0xcb, 0x9c, 0x1f, - 0xfb, 0x9e, 0x74, 0x19, 0x0d, 0x8a, 0x26, 0x51, 0x73, 0xc3, 0xe1, 0xe1, 0x37, 0x02, 0x28, 0xed, - 0xe1, 0x53, 0xac, 0x99, 0x16, 0xb6, 0x59, 0x42, 0x73, 0x2c, 0x21, 0x35, 0x78, 0x07, 0x2a, 0x2f, - 0x98, 0x44, 0x3a, 0x83, 0xa1, 0xe1, 0x1d, 0xb0, 0x78, 0xe8, 0xea, 0x4d, 0x6c, 0xa8, 0xc4, 0xe8, - 0xf4, 0xab, 0xcd, 0x11, 0x8b, 0x35, 0x61, 0xbd, 0x14, 0x5e, 0x00, 0x23, 0x45, 0x2e, 0xa7, 0x5a, - 0xc1, 0xbb, 0x60, 0xe9, 0x0e, 0x72, 0x68, 0xc3, 0x50, 0x34, 0x57, 0xc5, 0xea, 0x01, 0xa6, 0x28, - 0x7c, 0x3d, 0x25, 0xf6, 0x7a, 0x2e, 0x07, 0xe5, 0xae, 0xa5, 0x29, 0xc8, 0xe9, 0x76, 0xf0, 0x7f, - 0x20, 0xc7, 0xee, 0x41, 0x63, 0x8f, 0x11, 0x60, 0xa9, 0x5e, 0xf4, 0x3d, 0x29, 0xe7, 0x84, 0x90, - 0x1c, 0xcb, 0x02, 0xb5, 0xa3, 0x07, 0xbb, 0xa6, 0x6b, 0x50, 0x31, 0x97, 0xa8, 0xd1, 0x10, 0x92, - 0x63, 0xd9, 0xda, 0xd7, 0x59, 0xb0, 0x70, 0xd3, 0x32, 0x95, 0x6e, 0x8b, 0x22, 0x9b, 0x26, 0x77, - 0xff, 0x82, 0x51, 0x24, 0x90, 0x65, 0xd6, 0xac, 0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x29, 0x8e, - 0x4a, 0xb0, 0x1b, 0x54, 0x03, 0x1d, 0x16, 0x4e, 0x22, 0xa5, 0xd1, 0x14, 0xe0, 0x77, 0x02, 0x28, - 0x33, 0xf4, 0x10, 0x9f, 0x69, 0xe7, 0x07, 0xc4, 0xa0, 0x58, 0x8d, 0x4a, 0xbc, 0xe3, 0x7b, 0xd2, - 0x2a, 0x1d, 0x92, 0x4d, 0x22, 0xad, 0x91, 0x04, 0x58, 0x63, 0x91, 0xf1, 0x19, 0xb2, 0x55, 0xa7, - 0x89, 0x6d, 0xbe, 0xce, 0x59, 0x63, 0xb1, 0x07, 0x45, 0x13, 0x69, 0x2c, 0x43, 0xe1, 0xe1, 0xef, - 0x02, 0xa8, 0x45, 0xd8, 0xbe, 0x69, 0x37, 0x83, 0xa2, 0x55, 0x4c, 0xad, 0xe5, 0x3a, 0x14, 0x11, - 0x03, 0xb5, 0x89, 0x46, 0xe8, 0x79, 0x74, 0x61, 0xce, 0x7c, 0x4f, 0xba, 0x6e, 0xbf, 0x44, 0x77, - 0x12, 0x49, 0xbf, 0x34, 0x41, 0xf8, 0x05, 0x28, 0x1c, 0x9a, 0x2a, 0x6e, 0xda, 0x44, 0x89, 0xc7, - 0x8b, 0x4f, 0x83, 0xf1, 0xc2, 0x88, 0xc1, 0x49, 0xa4, 0x95, 0x84, 0x84, 0x0d, 0xb0, 0x10, 0x8c, - 0x17, 0x49, 0x9f, 0xe0, 0x29, 0x3d, 0x1c, 0xa6, 0x47, 0xc5, 0x72, 0x9a, 0x0d, 0x6c, 0x02, 0x38, - 0x08, 0x33, 0x82, 0xcd, 0xb3, 0x67, 0xaa, 0xf9, 0x9e, 0x74, 0xd5, 0x1a, 0x91, 0x72, 0x7c, 0x95, - 0x62, 0xbb, 0xf6, 0xab, 0x00, 0x40, 0x02, 0x41, 0x0d, 0x2c, 0x46, 0xa4, 0x86, 0x34, 0xf2, 0x39, - 0x56, 0x63, 0xe2, 0x12, 0x18, 0x71, 0xad, 0x46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 0x45, 0xd4, 0xb4, 0x5b, - 0x14, 0x51, 0xa7, 0xef, 0x21, 0x1c, 0xe6, 0xff, 0xeb, 0x7b, 0x52, 0xed, 0x34, 0x55, 0x83, 0xf3, - 0x37, 0xc6, 0x07, 0xbc, 0x0f, 0xca, 0x23, 0xc3, 0x48, 0xf9, 0x85, 0xc3, 0x88, 0x18, 0x95, 0x52, - 0x59, 0x1f, 0x9e, 0x42, 0xca, 0x69, 0x3b, 0xa4, 0x8c, 0x15, 0x4c, 0x2c, 0xea, 0xb0, 0x8c, 0x2b, - 0xc9, 0x19, 0xdb, 0x1c, 0xce, 0x9f, 0x31, 0xaf, 0x0f, 0xef, 0xf2, 0x1c, 0x24, 0x42, 0x46, 0x04, - 0x95, 0x11, 0xae, 0x49, 0x28, 0x06, 0xf7, 0x31, 0x7e, 0x76, 0xe5, 0x68, 0x6c, 0x0b, 0xe4, 0x76, - 0x03, 0x82, 0x6e, 0xec, 0x89, 0x0b, 0xc9, 0x67, 0x0e, 0x25, 0x84, 0xf8, 0xcf, 0x1c, 0x91, 0x56, - 0x50, 0xe5, 0x2d, 0xf3, 0x98, 0x9e, 0x21, 0x1b, 0xdf, 0xc3, 0xb6, 0x43, 0x4c, 0x43, 0x5c, 0x4c, - 0xaa, 0xdc, 0x19, 0x14, 0xf1, 0x55, 0x3e, 0x64, 0x95, 0xba, 0x1e, 0x2e, 0xbd, 0xd9, 0xf5, 0xf0, - 0x47, 0x01, 0x2c, 0x0f, 0x61, 0x0d, 0x23, 0x64, 0xc1, 0x65, 0x96, 0x99, 0x1e, 0x94, 0x16, 0x4a, - 0xd5, 0x98, 0x44, 0x82, 0x63, 0x92, 0x49, 0x59, 0x63, 0x57, 0xde, 0xdc, 0x1a, 0xfb, 0xad, 0x00, - 0xe6, 0xf6, 0xf0, 0x29, 0x7f, 0x58, 0x22, 0xcb, 0x06, 0xfb, 0x9e, 0x24, 0xaa, 0x03, 0x92, 0x49, - 0xa4, 0x33, 0x14, 0x9c, 0x5f, 0x48, 0x2f, 0x8f, 0x5f, 0x48, 0x19, 0xf3, 0x60, 0x07, 0xdb, 0xa7, - 0x58, 0x15, 0x57, 0x39, 0xe6, 0x89, 0xb0, 0x01, 0xe6, 0x89, 0xb0, 0xeb, 0x3f, 0x08, 0x00, 0x24, - 0xdf, 0xe5, 0x60, 0x05, 0x94, 0x1a, 0x06, 0x23, 0x9a, 0x10, 0x28, 0x67, 0xe0, 0x22, 0x28, 0x07, - 0x0a, 0x32, 0xee, 0x04, 0x43, 0x34, 0x62, 0xa8, 0x10, 0x28, 0x06, 0xe8, 0x47, 0x86, 0x43, 0xd1, - 0x09, 0x31, 0x3a, 0xe5, 0x29, 0xb8, 0x0c, 0x20, 0xeb, 0x45, 0xd8, 0xe6, 0x55, 0xa7, 0xe1, 0x5c, - 0x18, 0xe1, 0x43, 0x44, 0x34, 0xac, 0x96, 0x2f, 0xc1, 0x32, 0x98, 0x0d, 0x4d, 0x23, 0x24, 0x0b, - 0xe7, 0x41, 0x31, 0x40, 0x5a, 0x1a, 0x0a, 0x96, 0xa9, 0xf2, 0x4c, 0x0c, 0xc8, 0x41, 0xff, 0x3c, - 0xc1, 0xe5, 0x5c, 0xfd, 0xfd, 0xc7, 0x4f, 0xab, 0x99, 0x27, 0x4f, 0xab, 0x99, 0xe7, 0x4f, 0xab, - 0xc2, 0x97, 0xbd, 0xaa, 0xf0, 0x53, 0xaf, 0x2a, 0x3c, 0xea, 0x55, 0x85, 0xc7, 0xbd, 0xaa, 0xf0, - 0xa4, 0x57, 0x15, 0xfe, 0xec, 0x55, 0x85, 0xbf, 0x7b, 0xd5, 0xcc, 0xf3, 0x5e, 0x55, 0x78, 0xf8, - 0xac, 0x9a, 0x79, 0xfc, 0xac, 0x9a, 0x79, 0xf2, 0xac, 0x9a, 0xf9, 0x24, 0xcb, 0x3e, 0x87, 0xb6, - 0x67, 0x18, 0xa1, 0xbc, 0xf5, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x22, 0xba, 0x7e, 0x65, - 0x15, 0x00, 0x00, + // 1690 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4f, 0x6f, 0xdb, 0xc8, + 0x15, 0x17, 0xed, 0xc8, 0x92, 0x46, 0x96, 0x2d, 0x8d, 0xff, 0x31, 0x4e, 0x22, 0x0a, 0x6e, 0x0b, + 0x18, 0x41, 0x6d, 0x03, 0x2e, 0x02, 0x14, 0x28, 0xda, 0xc2, 0xb2, 0xe3, 0x46, 0x4d, 0xec, 0x08, + 0x94, 0x6b, 0xa0, 0x45, 0x0e, 0x1d, 0x91, 0x63, 0x69, 0x60, 0x8a, 0xc3, 0x92, 0x43, 0x3b, 0xee, + 0xa1, 0xe8, 0xa1, 0xbd, 0x14, 0x28, 0x10, 0x60, 0x81, 0xfd, 0x04, 0xbb, 0xd8, 0xc5, 0x7e, 0x81, + 0x3d, 0xed, 0x69, 0x2f, 0x39, 0xe6, 0x98, 0x13, 0x77, 0xa3, 0x1c, 0x76, 0xc1, 0xcb, 0xe6, 0x23, + 0x2c, 0x38, 0x24, 0xc5, 0x91, 0x44, 0x25, 0x4e, 0x00, 0x21, 0x27, 0x9b, 0xbf, 0xf7, 0x67, 0x1e, + 0x1f, 0xdf, 0xfc, 0xde, 0x7b, 0x02, 0x8b, 0x3d, 0xcc, 0x50, 0xdd, 0xa0, 0xda, 0xf9, 0xb6, 0x65, + 0x53, 0x46, 0x61, 0x96, 0xff, 0x59, 0xdf, 0xea, 0x10, 0xd6, 0x75, 0xdb, 0xdb, 0x1a, 0xed, 0xed, + 0x74, 0x68, 0x87, 0xee, 0x70, 0xb8, 0xed, 0x9e, 0xf1, 0x27, 0xfe, 0xc0, 0xff, 0x0b, 0xad, 0xd6, + 0x8b, 0xed, 0xc4, 0xc5, 0x7a, 0x89, 0x3f, 0x9c, 0xee, 0x86, 0x8f, 0x1b, 0x3f, 0xcc, 0x80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, 0x7e, 0x55, 0x7a, + 0xde, 0xaf, 0x4a, 0x2f, 0xfa, 0x55, 0xe9, 0x65, 0xbf, 0x2a, 0x7d, 0xdf, 0xaf, 0x4a, 0x3f, 0xf6, + 0xab, 0x99, 0x37, 0xfd, 0xaa, 0xf4, 0xec, 0x75, 0x35, 0xf3, 0xe2, 0x75, 0x35, 0xf3, 0xf2, 0x75, + 0x35, 0xf3, 0xb7, 0x2c, 0xff, 0xdd, 0xb5, 0x3d, 0xc7, 0x13, 0xf6, 0x9b, 0x9f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0x82, 0xd1, 0xd4, 0xe6, 0xdb, 0x15, 0x00, 0x00, } func (x PeerAction) String() string { @@ -1287,6 +1297,9 @@ func (this *MetaBlock) Equal(that interface{}) bool { if !bytes.Equal(this.Reserved, that1.Reserved) { return false } + if !this.PreviousHeaderProof.Equal(that1.PreviousHeaderProof) { + return false + } return true } func (this *PeerData) GoString() string { @@ -1395,7 +1408,7 @@ func (this *MetaBlock) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 29) + s := make([]string, 0, 30) s = append(s, "&block.MetaBlock{") s = append(s, "Nonce: "+fmt.Sprintf("%#v", this.Nonce)+",\n") s = append(s, "Epoch: "+fmt.Sprintf("%#v", this.Epoch)+",\n") @@ -1440,6 +1453,9 @@ func (this *MetaBlock) GoString() string { s = append(s, "DevFeesInEpoch: "+fmt.Sprintf("%#v", this.DevFeesInEpoch)+",\n") s = append(s, "TxCount: "+fmt.Sprintf("%#v", this.TxCount)+",\n") s = append(s, "Reserved: "+fmt.Sprintf("%#v", this.Reserved)+",\n") + if this.PreviousHeaderProof != nil { + s = append(s, "PreviousHeaderProof: "+fmt.Sprintf("%#v", this.PreviousHeaderProof)+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -1893,6 +1909,20 @@ func (m *MetaBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.PreviousHeaderProof != nil { + { + size, err := m.PreviousHeaderProof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetaBlock(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xda + } if len(m.Reserved) > 0 { i -= len(m.Reserved) copy(dAtA[i:], m.Reserved) @@ -2444,6 +2474,10 @@ func (m *MetaBlock) Size() (n int) { if l > 0 { n += 2 + l + sovMetaBlock(uint64(l)) } + if m.PreviousHeaderProof != nil { + l = m.PreviousHeaderProof.Size() + n += 2 + l + sovMetaBlock(uint64(l)) + } return n } @@ -2597,6 +2631,7 @@ func (this *MetaBlock) String() string { `DevFeesInEpoch:` + fmt.Sprintf("%v", this.DevFeesInEpoch) + `,`, `TxCount:` + fmt.Sprintf("%v", this.TxCount) + `,`, `Reserved:` + fmt.Sprintf("%v", this.Reserved) + `,`, + `PreviousHeaderProof:` + strings.Replace(fmt.Sprintf("%v", this.PreviousHeaderProof), "PreviousHeaderProof", "PreviousHeaderProof", 1) + `,`, `}`, }, "") return s @@ -4859,6 +4894,42 @@ func (m *MetaBlock) Unmarshal(dAtA []byte) error { m.Reserved = []byte{} } iNdEx = postIndex + case 27: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PreviousHeaderProof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetaBlock + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetaBlock + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetaBlock + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PreviousHeaderProof == nil { + m.PreviousHeaderProof = &PreviousHeaderProof{} + } + if err := m.PreviousHeaderProof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMetaBlock(dAtA[iNdEx:]) diff --git a/data/block/metaBlock.proto b/data/block/metaBlock.proto index db3a9bc3..20d8f9f0 100644 --- a/data/block/metaBlock.proto +++ b/data/block/metaBlock.proto @@ -9,6 +9,7 @@ option (gogoproto.stable_marshaler_all) = true; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; import "block.proto"; +import "blockV2.proto"; // PeerAction type represents the possible events that a node can trigger for the metachain to notarize @@ -86,29 +87,30 @@ message EpochStart { // MetaBlock holds the data that will be saved to the metachain each round message MetaBlock { - uint64 Nonce = 1 [(gogoproto.jsontag) = "nonce"]; - uint32 Epoch = 2 [(gogoproto.jsontag) = "epoch"]; - uint64 Round = 3 [(gogoproto.jsontag) = "round"]; - uint64 TimeStamp = 4 [(gogoproto.jsontag) = "timeStamp,omitempty"]; + uint64 Nonce = 1 [(gogoproto.jsontag) = "nonce"]; + uint32 Epoch = 2 [(gogoproto.jsontag) = "epoch"]; + uint64 Round = 3 [(gogoproto.jsontag) = "round"]; + uint64 TimeStamp = 4 [(gogoproto.jsontag) = "timeStamp,omitempty"]; repeated ShardData ShardInfo = 5 [(gogoproto.jsontag) = "shardInfo", (gogoproto.nullable) = false]; repeated PeerData PeerInfo = 6 [(gogoproto.jsontag) = "peerInfo", (gogoproto.nullable) = false]; - bytes Signature = 7 [(gogoproto.jsontag) = "signature,omitempty"]; - bytes LeaderSignature = 8 [(gogoproto.jsontag) = "leaderSignature,omitempty"]; - bytes PubKeysBitmap = 9 [(gogoproto.jsontag) = "pubKeysBitmap,omitempty"]; - bytes PrevHash = 10 [(gogoproto.jsontag) = "prevHash,omitempty"]; - bytes PrevRandSeed = 11 [(gogoproto.jsontag) = "prevRandSeed,omitempty"]; - bytes RandSeed = 12 [(gogoproto.jsontag) = "randSeed,omitempty"]; - bytes RootHash = 13 [(gogoproto.jsontag) = "rootHash,omitempty"]; - bytes ValidatorStatsRootHash = 14 [(gogoproto.jsontag) = "validatorStatsRootHash,omitempty"]; + bytes Signature = 7 [(gogoproto.jsontag) = "signature,omitempty"]; + bytes LeaderSignature = 8 [(gogoproto.jsontag) = "leaderSignature,omitempty"]; + bytes PubKeysBitmap = 9 [(gogoproto.jsontag) = "pubKeysBitmap,omitempty"]; + bytes PrevHash = 10 [(gogoproto.jsontag) = "prevHash,omitempty"]; + bytes PrevRandSeed = 11 [(gogoproto.jsontag) = "prevRandSeed,omitempty"]; + bytes RandSeed = 12 [(gogoproto.jsontag) = "randSeed,omitempty"]; + bytes RootHash = 13 [(gogoproto.jsontag) = "rootHash,omitempty"]; + bytes ValidatorStatsRootHash = 14 [(gogoproto.jsontag) = "validatorStatsRootHash,omitempty"]; repeated MiniBlockHeader MiniBlockHeaders = 16 [(gogoproto.jsontag) = "miniBlockHeaders", (gogoproto.nullable) = false]; - bytes ReceiptsHash = 17 [(gogoproto.jsontag) = "receiptsHash,omitempty"]; - EpochStart EpochStart = 18 [(gogoproto.jsontag) = "epochStart,omitempty", (gogoproto.nullable) = false]; - bytes ChainID = 19 [(gogoproto.jsontag) = "chainID,omitempty"]; - bytes SoftwareVersion = 20 [(gogoproto.jsontag) = "softwareVersion,omitempty"]; - bytes AccumulatedFees = 21 [(gogoproto.jsontag) = "accumulatedFees,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; - bytes AccumulatedFeesInEpoch = 22 [(gogoproto.jsontag) = "accumulatedFeesInEpoch,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; - bytes DeveloperFees = 23 [(gogoproto.jsontag) = "developerFees,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; - bytes DevFeesInEpoch = 24 [(gogoproto.jsontag) = "devFeesInEpoch,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; - uint32 TxCount = 25 [(gogoproto.jsontag) = "txCount"]; - bytes Reserved = 26 [(gogoproto.jsontag) = "reserved,omitempty"]; + bytes ReceiptsHash = 17 [(gogoproto.jsontag) = "receiptsHash,omitempty"]; + EpochStart EpochStart = 18 [(gogoproto.jsontag) = "epochStart,omitempty", (gogoproto.nullable) = false]; + bytes ChainID = 19 [(gogoproto.jsontag) = "chainID,omitempty"]; + bytes SoftwareVersion = 20 [(gogoproto.jsontag) = "softwareVersion,omitempty"]; + bytes AccumulatedFees = 21 [(gogoproto.jsontag) = "accumulatedFees,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; + bytes AccumulatedFeesInEpoch = 22 [(gogoproto.jsontag) = "accumulatedFeesInEpoch,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; + bytes DeveloperFees = 23 [(gogoproto.jsontag) = "developerFees,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; + bytes DevFeesInEpoch = 24 [(gogoproto.jsontag) = "devFeesInEpoch,omitempty", (gogoproto.casttypewith) = "math/big.Int;github.com/multiversx/mx-chain-core-go/data.BigIntCaster"]; + uint32 TxCount = 25 [(gogoproto.jsontag) = "txCount"]; + bytes Reserved = 26 [(gogoproto.jsontag) = "reserved,omitempty"]; + PreviousHeaderProof PreviousHeaderProof = 27 [(gogoproto.jsontag) = "previousHeaderProof"]; } diff --git a/data/block/metaBlockChecks_test.go b/data/block/metaBlockChecks_test.go index befb3377..fded840d 100644 --- a/data/block/metaBlockChecks_test.go +++ b/data/block/metaBlockChecks_test.go @@ -18,6 +18,7 @@ var metablockExceptionFields = []string{ "PubKeysBitmap", "ReceiptsHash", "Reserved", + "PreviousHeaderProof", } func TestMetaBlockHeader_Checks(t *testing.T) { diff --git a/data/block/metaBlock_test.go b/data/block/metaBlock_test.go index 1eca1260..3c2c0b8d 100644 --- a/data/block/metaBlock_test.go +++ b/data/block/metaBlock_test.go @@ -402,3 +402,20 @@ func TestMetaBlock_HasScheduledMiniBlocks(t *testing.T) { require.True(t, metaBlock.HasScheduledMiniBlocks()) } + +func TestMetaBlock2_GetPreviousAggregatedSignatureAndBitmap(t *testing.T) { + t.Parallel() + + metaBlock := &block.MetaBlock{} + sig, bitmap := metaBlock.GetPreviousAggregatedSignatureAndBitmap() + require.Nil(t, sig) + require.Nil(t, bitmap) + + previousPubkeysBitmap := []byte("previous pub keys bitmap") + previousAggregatedSignature := []byte("previous aggregated signature") + + metaBlock.SetPreviousAggregatedSignatureAndBitmap(previousAggregatedSignature, previousPubkeysBitmap) + sig, bitmap = metaBlock.GetPreviousAggregatedSignatureAndBitmap() + require.Equal(t, previousPubkeysBitmap, bitmap) + require.Equal(t, previousAggregatedSignature, sig) +} diff --git a/data/interface.go b/data/interface.go index 80b039da..bd2a3027 100644 --- a/data/interface.go +++ b/data/interface.go @@ -83,6 +83,8 @@ type HeaderHandler interface { IsStartOfEpochBlock() bool ShallowClone() HeaderHandler CheckFieldsForNil() error + GetPreviousAggregatedSignatureAndBitmap() ([]byte, []byte) + SetPreviousAggregatedSignatureAndBitmap(aggregatedSignature []byte, pubkeysBitmap []byte) IsInterfaceNil() bool } @@ -256,6 +258,8 @@ type ChainHandler interface { GetCurrentBlockRootHash() []byte SetFinalBlockInfo(nonce uint64, blockHash []byte, rootHash []byte) GetFinalBlockInfo() (nonce uint64, blockHash []byte, rootHash []byte) + SetCurrentAggregatedSignatureAndBitmap(signature []byte, pubKeysBitmap []byte) + GetCurrentAggregatedSignatureAndBitmap() ([]byte, []byte) IsInterfaceNil() bool }