diff --git a/api/opinit/ophost/v1/types.pulsar.go b/api/opinit/ophost/v1/types.pulsar.go index 3299e25..df05744 100644 --- a/api/opinit/ophost/v1/types.pulsar.go +++ b/api/opinit/ophost/v1/types.pulsar.go @@ -2362,6 +2362,7 @@ func (x *fastReflection_TokenPair) ProtoMethods() *protoiface.Methods { var ( md_Output protoreflect.MessageDescriptor fd_Output_output_root protoreflect.FieldDescriptor + fd_Output_l1_block_number protoreflect.FieldDescriptor fd_Output_l1_block_time protoreflect.FieldDescriptor fd_Output_l2_block_number protoreflect.FieldDescriptor ) @@ -2370,6 +2371,7 @@ func init() { file_opinit_ophost_v1_types_proto_init() md_Output = File_opinit_ophost_v1_types_proto.Messages().ByName("Output") fd_Output_output_root = md_Output.Fields().ByName("output_root") + fd_Output_l1_block_number = md_Output.Fields().ByName("l1_block_number") fd_Output_l1_block_time = md_Output.Fields().ByName("l1_block_time") fd_Output_l2_block_number = md_Output.Fields().ByName("l2_block_number") } @@ -2445,6 +2447,12 @@ func (x *fastReflection_Output) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.L1BlockNumber != uint64(0) { + value := protoreflect.ValueOfUint64(x.L1BlockNumber) + if !f(fd_Output_l1_block_number, value) { + return + } + } if x.L1BlockTime != nil { value := protoreflect.ValueOfMessage(x.L1BlockTime.ProtoReflect()) if !f(fd_Output_l1_block_time, value) { @@ -2474,6 +2482,8 @@ func (x *fastReflection_Output) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "opinit.ophost.v1.Output.output_root": return len(x.OutputRoot) != 0 + case "opinit.ophost.v1.Output.l1_block_number": + return x.L1BlockNumber != uint64(0) case "opinit.ophost.v1.Output.l1_block_time": return x.L1BlockTime != nil case "opinit.ophost.v1.Output.l2_block_number": @@ -2496,6 +2506,8 @@ func (x *fastReflection_Output) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "opinit.ophost.v1.Output.output_root": x.OutputRoot = nil + case "opinit.ophost.v1.Output.l1_block_number": + x.L1BlockNumber = uint64(0) case "opinit.ophost.v1.Output.l1_block_time": x.L1BlockTime = nil case "opinit.ophost.v1.Output.l2_block_number": @@ -2519,6 +2531,9 @@ func (x *fastReflection_Output) Get(descriptor protoreflect.FieldDescriptor) pro case "opinit.ophost.v1.Output.output_root": value := x.OutputRoot return protoreflect.ValueOfBytes(value) + case "opinit.ophost.v1.Output.l1_block_number": + value := x.L1BlockNumber + return protoreflect.ValueOfUint64(value) case "opinit.ophost.v1.Output.l1_block_time": value := x.L1BlockTime return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -2547,6 +2562,8 @@ func (x *fastReflection_Output) Set(fd protoreflect.FieldDescriptor, value proto switch fd.FullName() { case "opinit.ophost.v1.Output.output_root": x.OutputRoot = value.Bytes() + case "opinit.ophost.v1.Output.l1_block_number": + x.L1BlockNumber = value.Uint() case "opinit.ophost.v1.Output.l1_block_time": x.L1BlockTime = value.Message().Interface().(*timestamppb.Timestamp) case "opinit.ophost.v1.Output.l2_block_number": @@ -2578,6 +2595,8 @@ func (x *fastReflection_Output) Mutable(fd protoreflect.FieldDescriptor) protore return protoreflect.ValueOfMessage(x.L1BlockTime.ProtoReflect()) case "opinit.ophost.v1.Output.output_root": panic(fmt.Errorf("field output_root of message opinit.ophost.v1.Output is not mutable")) + case "opinit.ophost.v1.Output.l1_block_number": + panic(fmt.Errorf("field l1_block_number of message opinit.ophost.v1.Output is not mutable")) case "opinit.ophost.v1.Output.l2_block_number": panic(fmt.Errorf("field l2_block_number of message opinit.ophost.v1.Output is not mutable")) default: @@ -2595,6 +2614,8 @@ func (x *fastReflection_Output) NewField(fd protoreflect.FieldDescriptor) protor switch fd.FullName() { case "opinit.ophost.v1.Output.output_root": return protoreflect.ValueOfBytes(nil) + case "opinit.ophost.v1.Output.l1_block_number": + return protoreflect.ValueOfUint64(uint64(0)) case "opinit.ophost.v1.Output.l1_block_time": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -2673,6 +2694,9 @@ func (x *fastReflection_Output) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.L1BlockNumber != 0 { + n += 1 + runtime.Sov(uint64(x.L1BlockNumber)) + } if x.L1BlockTime != nil { l = options.Size(x.L1BlockTime) n += 1 + l + runtime.Sov(uint64(l)) @@ -2712,7 +2736,7 @@ func (x *fastReflection_Output) ProtoMethods() *protoiface.Methods { if x.L2BlockNumber != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.L2BlockNumber)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } if x.L1BlockTime != nil { encoded, err := options.Marshal(x.L1BlockTime) @@ -2726,7 +2750,12 @@ func (x *fastReflection_Output) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + } + if x.L1BlockNumber != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.L1BlockNumber)) + i-- + dAtA[i] = 0x10 } if len(x.OutputRoot) > 0 { i -= len(x.OutputRoot) @@ -2819,6 +2848,25 @@ func (x *fastReflection_Output) ProtoMethods() *protoiface.Methods { } iNdEx = postIndex case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field L1BlockNumber", wireType) + } + x.L1BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.L1BlockNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field L1BlockTime", wireType) } @@ -2854,7 +2902,7 @@ func (x *fastReflection_Output) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field L2BlockNumber", wireType) } @@ -3715,10 +3763,12 @@ type Output struct { // Hash of the l2 output. OutputRoot []byte `protobuf:"bytes,1,opt,name=output_root,json=outputRoot,proto3" json:"output_root,omitempty"` + // The l1 block number that the output root was submitted in. + L1BlockNumber uint64 `protobuf:"varint,2,opt,name=l1_block_number,json=l1BlockNumber,proto3" json:"l1_block_number,omitempty"` // Timestamp of the l1 block that the output root was submitted in. - L1BlockTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=l1_block_time,json=l1BlockTime,proto3" json:"l1_block_time,omitempty"` + L1BlockTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=l1_block_time,json=l1BlockTime,proto3" json:"l1_block_time,omitempty"` // The l2 block number that the output root was submitted in. - L2BlockNumber uint64 `protobuf:"varint,3,opt,name=l2_block_number,json=l2BlockNumber,proto3" json:"l2_block_number,omitempty"` + L2BlockNumber uint64 `protobuf:"varint,4,opt,name=l2_block_number,json=l2BlockNumber,proto3" json:"l2_block_number,omitempty"` } func (x *Output) Reset() { @@ -3748,6 +3798,13 @@ func (x *Output) GetOutputRoot() []byte { return nil } +func (x *Output) GetL1BlockNumber() uint64 { + if x != nil { + return x.L1BlockNumber + } + return 0 +} + func (x *Output) GetL1BlockTime() *timestamppb.Timestamp { if x != nil { return x.L1BlockTime @@ -3882,40 +3939,43 @@ var file_opinit_ophost_v1_types_proto_rawDesc = []byte{ 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x69, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x31, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x31, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x32, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x32, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0xa0, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x32, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0xc8, 0x01, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x4d, 0x0a, 0x0d, 0x6c, 0x31, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, - 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x6c, 0x31, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x22, 0x99, 0x01, 0x0a, 0x13, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x57, 0x69, - 0x74, 0x68, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x45, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, - 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, - 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x3b, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0xc9, 0x01, 0xc8, - 0xe1, 0x1e, 0x00, 0xa8, 0xe2, 0x1e, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, - 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, - 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, - 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, - 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, - 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, - 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, - 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, - 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x31, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x4d, 0x0a, 0x0d, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x99, 0x01, 0x0a, 0x13, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x12, 0x45, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, + 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, + 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, + 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x42, 0xc9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0xa8, 0xe2, 0x1e, 0x01, 0x0a, + 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, + 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, + 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, + 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x70, 0x69, 0x6e, + 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, + 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4f, 0x70, + 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/opinit/ophost/v1/types.proto b/proto/opinit/ophost/v1/types.proto index e4d782b..6b34584 100644 --- a/proto/opinit/ophost/v1/types.proto +++ b/proto/opinit/ophost/v1/types.proto @@ -84,11 +84,13 @@ message TokenPair { message Output { // Hash of the l2 output. bytes output_root = 1; + // The l1 block number that the output root was submitted in. + uint64 l1_block_number = 2; // Timestamp of the l1 block that the output root was submitted in. - google.protobuf.Timestamp l1_block_time = 2 + google.protobuf.Timestamp l1_block_time = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; // The l2 block number that the output root was submitted in. - uint64 l2_block_number = 3; + uint64 l2_block_number = 4; } // BatchInfoWithOutput defines the batch information with output. diff --git a/x/ophost/keeper/genesis_test.go b/x/ophost/keeper/genesis_test.go index 0c4cf0c..be91964 100644 --- a/x/ophost/keeper/genesis_test.go +++ b/x/ophost/keeper/genesis_test.go @@ -42,16 +42,19 @@ func Test_GenesisExport(t *testing.T) { output1 := types.Output{ OutputRoot: []byte{1, 2, 3}, L1BlockTime: time.Now().UTC(), + L1BlockNumber: 1, L2BlockNumber: 100, } output2 := types.Output{ OutputRoot: []byte{1, 2, 3}, L1BlockTime: time.Now().UTC(), + L1BlockNumber: 2, L2BlockNumber: 200, } output3 := types.Output{ OutputRoot: []byte{1, 2, 3}, L1BlockTime: time.Now().UTC(), + L1BlockNumber: 1, L2BlockNumber: 100, } require.NoError(t, input.OPHostKeeper.SetOutputProposal(ctx, 1, 1, output1)) @@ -118,16 +121,19 @@ func Test_GenesisImportExport(t *testing.T) { } output1 := types.Output{ OutputRoot: []byte{1, 2, 3}, + L1BlockNumber: 1, L1BlockTime: time.Now().UTC(), L2BlockNumber: 100, } output2 := types.Output{ OutputRoot: []byte{1, 2, 3}, + L1BlockNumber: 2, L1BlockTime: time.Now().UTC(), L2BlockNumber: 200, } output3 := types.Output{ OutputRoot: []byte{1, 2, 3}, + L1BlockNumber: 1, L1BlockTime: time.Now().UTC(), L2BlockNumber: 100, } diff --git a/x/ophost/keeper/msg_server.go b/x/ophost/keeper/msg_server.go index aad9721..e7706d5 100644 --- a/x/ophost/keeper/msg_server.go +++ b/x/ophost/keeper/msg_server.go @@ -151,6 +151,7 @@ func (ms MsgServer) ProposeOutput(ctx context.Context, req *types.MsgProposeOutp // store output proposal if err := ms.SetOutputProposal(ctx, bridgeId, outputIndex, types.Output{ OutputRoot: outputRoot, + L1BlockNumber: uint64(sdkCtx.BlockHeight()), L1BlockTime: sdkCtx.BlockTime(), L2BlockNumber: l2BlockNumber, }); err != nil { diff --git a/x/ophost/keeper/msg_server_test.go b/x/ophost/keeper/msg_server_test.go index f586992..10e80e3 100644 --- a/x/ophost/keeper/msg_server_test.go +++ b/x/ophost/keeper/msg_server_test.go @@ -85,6 +85,7 @@ func Test_ProposeOutput(t *testing.T) { require.NoError(t, err) require.Equal(t, types.Output{ OutputRoot: []byte{1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + L1BlockNumber: uint64(ctx.BlockHeight()), L1BlockTime: blockTime, L2BlockNumber: 100, }, output) diff --git a/x/ophost/keeper/output_test.go b/x/ophost/keeper/output_test.go index a66d890..318d84c 100644 --- a/x/ophost/keeper/output_test.go +++ b/x/ophost/keeper/output_test.go @@ -28,21 +28,25 @@ func Test_IterateOutputProposal(t *testing.T) { ctx, input := createDefaultTestInput(t) output1 := types.Output{ OutputRoot: []byte{1, 2, 3}, + L1BlockNumber: 1, L1BlockTime: time.Now().UTC(), L2BlockNumber: 101, } output2 := types.Output{ OutputRoot: []byte{4, 5, 6}, + L1BlockNumber: 2, L1BlockTime: time.Now().UTC(), L2BlockNumber: 102, } output3 := types.Output{ OutputRoot: []byte{7, 8, 9}, + L1BlockNumber: 3, L1BlockTime: time.Now().UTC(), L2BlockNumber: 103, } output4 := types.Output{ OutputRoot: []byte{10, 11, 12}, + L1BlockNumber: 4, L1BlockTime: time.Now().UTC(), L2BlockNumber: 104, } @@ -93,6 +97,7 @@ func Test_IsFinalized(t *testing.T) { proposeTime := time.Now().UTC() err = input.OPHostKeeper.SetOutputProposal(ctx, 1, 1, types.Output{ OutputRoot: []byte{1, 2, 3}, + L1BlockNumber: 1, L1BlockTime: proposeTime, L2BlockNumber: 100, }) @@ -151,6 +156,7 @@ func Test_GetLastFinalizedOutput(t *testing.T) { proposeTime := time.Now().UTC() err = input.OPHostKeeper.SetOutputProposal(ctx, 1, 1, types.Output{ OutputRoot: []byte{1, 2, 3}, + L1BlockNumber: 1, L1BlockTime: proposeTime, L2BlockNumber: 100, }) @@ -166,6 +172,7 @@ func Test_GetLastFinalizedOutput(t *testing.T) { require.Equal(t, uint64(1), index) require.Equal(t, types.Output{ OutputRoot: []byte{1, 2, 3}, + L1BlockNumber: 1, L1BlockTime: proposeTime, L2BlockNumber: 100, }, output) @@ -176,6 +183,7 @@ func Test_DeleteOutputProposal(t *testing.T) { output := types.Output{ OutputRoot: []byte{1, 2, 3}, + L1BlockNumber: 1, L1BlockTime: ctx.BlockTime(), L2BlockNumber: 100, } diff --git a/x/ophost/keeper/querier_test.go b/x/ophost/keeper/querier_test.go index 414e4d7..cab7794 100644 --- a/x/ophost/keeper/querier_test.go +++ b/x/ophost/keeper/querier_test.go @@ -130,7 +130,7 @@ func Test_QueryOutputProposal(t *testing.T) { ctx, input := createDefaultTestInput(t) output := types.Output{ OutputRoot: []byte{1, 2, 3}, - L1BlockTime: time.Now().UTC(), + L1BlockNumber: 1, L2BlockNumber: 100, } require.NoError(t, input.OPHostKeeper.SetOutputProposal(ctx, 1, 1, output)) @@ -148,12 +148,14 @@ func Test_QueryOutputProposals(t *testing.T) { ctx, input := createDefaultTestInput(t) output1 := types.Output{ OutputRoot: []byte{1, 2, 3}, - L1BlockTime: time.Now().UTC(), + L1BlockNumber: 1, + L1BlockTime: ctx.BlockTime(), L2BlockNumber: 100, } output2 := types.Output{ OutputRoot: []byte{3, 4, 5}, - L1BlockTime: time.Now().UTC(), + L1BlockNumber: 1, + L1BlockTime: ctx.BlockTime(), L2BlockNumber: 100, } require.NoError(t, input.OPHostKeeper.SetOutputProposal(ctx, 1, 1, output1)) @@ -194,7 +196,8 @@ func Test_QueryLastFinalizedOutput(t *testing.T) { proposeTime := time.Now().UTC() err = input.OPHostKeeper.SetOutputProposal(ctx, 1, 1, types.Output{ OutputRoot: []byte{1, 2, 3}, - L1BlockTime: proposeTime, + L1BlockNumber: 1, + L1BlockTime: ctx.BlockTime(), L2BlockNumber: 100, }) require.NoError(t, err) @@ -214,7 +217,8 @@ func Test_QueryLastFinalizedOutput(t *testing.T) { require.Equal(t, uint64(1), res.OutputIndex) require.Equal(t, types.Output{ OutputRoot: []byte{1, 2, 3}, - L1BlockTime: proposeTime, + L1BlockNumber: 1, + L1BlockTime: ctx.BlockTime(), L2BlockNumber: 100, }, res.OutputProposal) } @@ -271,7 +275,7 @@ func Test_QueryBatchInfos(t *testing.T) { }, Output: types.Output{ OutputRoot: []byte{1, 2, 3}, - L1BlockTime: time.Now().UTC(), + L1BlockNumber: 100, L2BlockNumber: 300, }, } diff --git a/x/ophost/types/output.go b/x/ophost/types/output.go index b856c83..04a40ed 100644 --- a/x/ophost/types/output.go +++ b/x/ophost/types/output.go @@ -16,7 +16,7 @@ func (output Output) Validate() error { } func (output Output) IsEmpty() bool { - return len(output.OutputRoot) == 0 && output.L1BlockTime.IsZero() && output.L2BlockNumber == 0 + return len(output.OutputRoot) == 0 && output.L1BlockNumber == 0 && output.L2BlockNumber == 0 } func GenerateOutputRoot(version byte, storageRoot []byte, latestBlockHash []byte) [32]byte { diff --git a/x/ophost/types/types.pb.go b/x/ophost/types/types.pb.go index a90a6eb..c90d3bd 100644 --- a/x/ophost/types/types.pb.go +++ b/x/ophost/types/types.pb.go @@ -239,10 +239,12 @@ var xxx_messageInfo_TokenPair proto.InternalMessageInfo type Output struct { // Hash of the l2 output. OutputRoot []byte `protobuf:"bytes,1,opt,name=output_root,json=outputRoot,proto3" json:"output_root,omitempty"` + // The l1 block number that the output root was submitted in. + L1BlockNumber uint64 `protobuf:"varint,2,opt,name=l1_block_number,json=l1BlockNumber,proto3" json:"l1_block_number,omitempty"` // Timestamp of the l1 block that the output root was submitted in. - L1BlockTime time.Time `protobuf:"bytes,2,opt,name=l1_block_time,json=l1BlockTime,proto3,stdtime" json:"l1_block_time"` + L1BlockTime time.Time `protobuf:"bytes,3,opt,name=l1_block_time,json=l1BlockTime,proto3,stdtime" json:"l1_block_time"` // The l2 block number that the output root was submitted in. - L2BlockNumber uint64 `protobuf:"varint,3,opt,name=l2_block_number,json=l2BlockNumber,proto3" json:"l2_block_number,omitempty"` + L2BlockNumber uint64 `protobuf:"varint,4,opt,name=l2_block_number,json=l2BlockNumber,proto3" json:"l2_block_number,omitempty"` } func (m *Output) Reset() { *m = Output{} } @@ -330,61 +332,62 @@ func init() { func init() { proto.RegisterFile("opinit/ophost/v1/types.proto", fileDescriptor_29cadbd84ee898dd) } var fileDescriptor_29cadbd84ee898dd = []byte{ - // 862 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4d, 0x6f, 0xdb, 0x36, - 0x18, 0x36, 0xd3, 0xcc, 0x8d, 0xe9, 0x64, 0x4d, 0x99, 0x76, 0x55, 0xbc, 0x4e, 0x36, 0x0c, 0x6c, - 0x30, 0x8a, 0x46, 0x82, 0xbd, 0x8f, 0x43, 0x77, 0x8a, 0x1c, 0x17, 0x35, 0xb0, 0xb9, 0x86, 0xe2, - 0xa1, 0xd8, 0x2e, 0x02, 0x65, 0xd3, 0x32, 0x11, 0x49, 0x14, 0x48, 0x3a, 0x58, 0xba, 0x7f, 0xb0, - 0x53, 0x81, 0x5d, 0xba, 0x5b, 0x76, 0x2b,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6a, - 0x83, 0x17, 0xa7, 0x36, 0xf8, 0xf3, 0xd4, 0x06, 0x4f, 0xce, 0xec, 0xd2, 0x8b, 0x33, 0xbb, 0xf4, - 0xc7, 0x99, 0x5d, 0xfa, 0xee, 0x6e, 0xe1, 0x81, 0x53, 0x69, 0x29, 0xde, 0x89, 0x71, 0x28, 0xdc, - 0x87, 0x43, 0xfd, 0x51, 0xf8, 0x7e, 0xf1, 0x59, 0xd0, 0x4f, 0x5d, 0x58, 0xd6, 0x33, 0xfc, 0xf4, - 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x84, 0x78, 0x38, 0x1a, 0x34, 0x06, 0x00, 0x00, + // 868 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4f, 0x6f, 0xdb, 0x36, + 0x14, 0x37, 0x53, 0xcf, 0x8d, 0xe9, 0x64, 0x4d, 0x99, 0x76, 0x55, 0xbc, 0x4e, 0x36, 0x0c, 0x6c, + 0x30, 0x8a, 0x46, 0x82, 0xbd, 0x3f, 0x87, 0xee, 0x14, 0x39, 0x2e, 0x6a, 0x60, 0x73, 0x0d, 0xc5, + 0x43, 0xb1, 0x5d, 0x04, 0xca, 0xa6, 0x65, 0x22, 0x92, 0x28, 0x90, 0x74, 0xb0, 0x74, 0xdf, 0x60, + 0xa7, 0x02, 0xbb, 0x74, 0xb7, 0xee, 0x56, 0xec, 0xd4, 0xc3, 0x3e, 0x44, 0x8e, 0xc5, 0x4e, 0x3b, + 0xb5, 0x5b, 0x72, 0xe8, 0xb0, 0x4f, 0x31, 0x90, 0xa2, 0x1d, 0xb5, 0x0d, 0x8a, 0x61, 0x17, 0x9b, + 0x7c, 0xbf, 0xdf, 0x7b, 0xbf, 0xc7, 0xf7, 0x1e, 0x29, 0x78, 0x93, 0x65, 0x34, 0xa5, 0xd2, 0x65, + 0xd9, 0x9c, 0x09, 0xe9, 0x1e, 0x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0xcf, 0x87, 0x7e, + 0x12, 0xc3, 0x8a, 0xae, 0xe1, 0xa7, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x31, 0x44, 0xf1, + 0x5c, 0x06, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -539,6 +542,9 @@ func (this *Output) Equal(that interface{}) bool { if !bytes.Equal(this.OutputRoot, that1.OutputRoot) { return false } + if this.L1BlockNumber != that1.L1BlockNumber { + return false + } if !this.L1BlockTime.Equal(that1.L1BlockTime) { return false } @@ -783,7 +789,7 @@ func (m *Output) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.L2BlockNumber != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.L2BlockNumber)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.L1BlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.L1BlockTime):]) if err4 != nil { @@ -792,7 +798,12 @@ func (m *Output) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n4 i = encodeVarintTypes(dAtA, i, uint64(n4)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + if m.L1BlockNumber != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.L1BlockNumber)) + i-- + dAtA[i] = 0x10 + } if len(m.OutputRoot) > 0 { i -= len(m.OutputRoot) copy(dAtA[i:], m.OutputRoot) @@ -947,6 +958,9 @@ func (m *Output) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.L1BlockNumber != 0 { + n += 1 + sovTypes(uint64(m.L1BlockNumber)) + } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.L1BlockTime) n += 1 + l + sovTypes(uint64(l)) if m.L2BlockNumber != 0 { @@ -1603,6 +1617,25 @@ func (m *Output) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1BlockNumber", wireType) + } + m.L1BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.L1BlockNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field L1BlockTime", wireType) } @@ -1635,7 +1668,7 @@ func (m *Output) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field L2BlockNumber", wireType) }