diff --git a/go.mod b/go.mod index a9ed174..7aa2e0c 100644 --- a/go.mod +++ b/go.mod @@ -113,7 +113,7 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.9.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.2 // indirect + github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.1.2 // indirect diff --git a/types/genesis.pb.go b/types/genesis.pb.go index 72721eb..50c0873 100644 --- a/types/genesis.pb.go +++ b/types/genesis.pb.go @@ -85,23 +85,22 @@ func init() { func init() { proto.RegisterFile("sdk/avail/v1beta1/genesis.proto", fileDescriptor_b83d128538762178) } var fileDescriptor_b83d128538762178 = []byte{ - // 250 bytes of a gzipped FileDescriptorProto + // 239 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0x4e, 0xc9, 0xd6, 0x4f, 0x2c, 0x4b, 0xcc, 0xcc, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x2c, 0x4e, 0xc9, 0xd6, 0x03, 0x2b, 0xd0, 0x83, 0x2a, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xea, 0x83, 0x58, 0x10, 0x85, 0x52, 0x8a, 0x98, 0x26, 0x95, 0x25, 0xe6, 0x64, 0xa6, 0x24, 0x96, 0xe4, 0x17, - 0x41, 0x95, 0xc8, 0x62, 0x2a, 0x29, 0x2c, 0x4d, 0x2d, 0xaa, 0x84, 0x48, 0x2b, 0x95, 0x73, 0xf1, - 0xb8, 0x43, 0xec, 0x0e, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0x72, 0xe2, 0xe2, 0x82, 0x9b, 0x50, 0x2c, - 0xc1, 0xa8, 0xc0, 0xac, 0xc1, 0x6d, 0x24, 0xa3, 0x87, 0xe1, 0x1e, 0xbd, 0x30, 0x98, 0x22, 0x27, - 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0x90, 0x74, 0x09, 0x29, 0x73, 0xf1, 0x16, 0x14, 0xe5, 0x97, - 0xa5, 0xe6, 0xc5, 0x67, 0xa4, 0x66, 0xa6, 0x67, 0x94, 0x48, 0x30, 0x29, 0x30, 0x6a, 0xb0, 0x04, - 0xf1, 0x40, 0x04, 0x3d, 0xc0, 0x62, 0x4e, 0x8e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, - 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, - 0xc7, 0x10, 0xa5, 0x9e, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x96, - 0x59, 0x52, 0x9e, 0x59, 0x02, 0x71, 0xbf, 0x6e, 0x4a, 0xa2, 0x6e, 0x6e, 0x7e, 0x4a, 0x69, 0x4e, - 0xaa, 0x7e, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0x0b, 0xc6, 0x80, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x27, 0x7e, 0xd8, 0xcd, 0x50, 0x01, 0x00, 0x00, + 0x41, 0x94, 0x28, 0x95, 0x73, 0xf1, 0xb8, 0x43, 0x0c, 0x0f, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0x72, + 0xe2, 0xe2, 0x82, 0x2b, 0x29, 0x96, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x92, 0xd1, 0xc3, 0xb0, + 0x50, 0x2f, 0x0c, 0xa6, 0xc8, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0x24, 0x5d, 0x42, 0xca, + 0x5c, 0xbc, 0x05, 0x45, 0xf9, 0x65, 0xa9, 0x79, 0xf1, 0x19, 0xa9, 0x99, 0xe9, 0x19, 0x25, 0x12, + 0x4c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x3c, 0x10, 0x41, 0x0f, 0xb0, 0x98, 0x93, 0xe3, 0x89, 0x47, + 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, + 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xa9, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, + 0x25, 0xe7, 0xe7, 0xea, 0x97, 0x65, 0x96, 0x94, 0x67, 0x96, 0x40, 0xfc, 0xa0, 0x9b, 0x92, 0xa8, + 0x9b, 0x9b, 0x9f, 0x52, 0x9a, 0x93, 0xaa, 0x5f, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0xf6, + 0x82, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x46, 0x1e, 0x50, 0xc0, 0x31, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/types/tx.pb.go b/types/tx.pb.go index 59cf1af..4f01415 100644 --- a/types/tx.pb.go +++ b/types/tx.pb.go @@ -220,255 +220,6 @@ func (m *MsgUpdateBlobStatusResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateBlobStatusResponse proto.InternalMessageInfo -// MsgSetAvailAddress defines a SDK message for validators to set their Avail address -type MsgSubmitBlobRequest struct { - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - BlocksRange *Range `protobuf:"bytes,2,opt,name=blocks_range,json=blocksRange,proto3" json:"blocks_range,omitempty"` -} - -func (m *MsgSubmitBlobRequest) Reset() { *m = MsgSubmitBlobRequest{} } -func (m *MsgSubmitBlobRequest) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitBlobRequest) ProtoMessage() {} -func (*MsgSubmitBlobRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7f88203cb33986bc, []int{2} -} -func (m *MsgSubmitBlobRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitBlobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitBlobRequest.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 *MsgSubmitBlobRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitBlobRequest.Merge(m, src) -} -func (m *MsgSubmitBlobRequest) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitBlobRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitBlobRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitBlobRequest proto.InternalMessageInfo - -func (m *MsgSubmitBlobRequest) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *MsgSubmitBlobRequest) GetBlocksRange() *Range { - if m != nil { - return m.BlocksRange - } - return nil -} - -// blocks range from to to -type Range struct { - From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` - To uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` -} - -func (m *Range) Reset() { *m = Range{} } -func (m *Range) String() string { return proto.CompactTextString(m) } -func (*Range) ProtoMessage() {} -func (*Range) Descriptor() ([]byte, []int) { - return fileDescriptor_7f88203cb33986bc, []int{3} -} -func (m *Range) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Range.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 *Range) XXX_Merge(src proto.Message) { - xxx_messageInfo_Range.Merge(m, src) -} -func (m *Range) XXX_Size() int { - return m.Size() -} -func (m *Range) XXX_DiscardUnknown() { - xxx_messageInfo_Range.DiscardUnknown(m) -} - -var xxx_messageInfo_Range proto.InternalMessageInfo - -func (m *Range) GetFrom() uint64 { - if m != nil { - return m.From - } - return 0 -} - -func (m *Range) GetTo() uint64 { - if m != nil { - return m.To - } - return 0 -} - -// MsgSetAvailAddressResponse is the response type for the Msg/SetAvailAddress RPC method. -type MsgSubmitBlobResponse struct { -} - -func (m *MsgSubmitBlobResponse) Reset() { *m = MsgSubmitBlobResponse{} } -func (m *MsgSubmitBlobResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitBlobResponse) ProtoMessage() {} -func (*MsgSubmitBlobResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7f88203cb33986bc, []int{4} -} -func (m *MsgSubmitBlobResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitBlobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitBlobResponse.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 *MsgSubmitBlobResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitBlobResponse.Merge(m, src) -} -func (m *MsgSubmitBlobResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitBlobResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitBlobResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitBlobResponse proto.InternalMessageInfo - -// message update blob state response -type MsgUpdateBlobStatusRequest struct { - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - BlocksRange *Range `protobuf:"bytes,2,opt,name=blocks_range,json=blocksRange,proto3" json:"blocks_range,omitempty"` - AvailHeight uint64 `protobuf:"varint,3,opt,name=avail_height,json=availHeight,proto3" json:"avail_height,omitempty"` - IsSuccess bool `protobuf:"varint,4,opt,name=is_success,json=isSuccess,proto3" json:"is_success,omitempty"` -} - -func (m *MsgUpdateBlobStatusRequest) Reset() { *m = MsgUpdateBlobStatusRequest{} } -func (m *MsgUpdateBlobStatusRequest) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateBlobStatusRequest) ProtoMessage() {} -func (*MsgUpdateBlobStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7f88203cb33986bc, []int{5} -} -func (m *MsgUpdateBlobStatusRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateBlobStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateBlobStatusRequest.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 *MsgUpdateBlobStatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateBlobStatusRequest.Merge(m, src) -} -func (m *MsgUpdateBlobStatusRequest) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateBlobStatusRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateBlobStatusRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateBlobStatusRequest proto.InternalMessageInfo - -func (m *MsgUpdateBlobStatusRequest) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *MsgUpdateBlobStatusRequest) GetBlocksRange() *Range { - if m != nil { - return m.BlocksRange - } - return nil -} - -func (m *MsgUpdateBlobStatusRequest) GetAvailHeight() uint64 { - if m != nil { - return m.AvailHeight - } - return 0 -} - -func (m *MsgUpdateBlobStatusRequest) GetIsSuccess() bool { - if m != nil { - return m.IsSuccess - } - return false -} - -// message update blob state response -type MsgUpdateBlobStatusResponse struct { -} - -func (m *MsgUpdateBlobStatusResponse) Reset() { *m = MsgUpdateBlobStatusResponse{} } -func (m *MsgUpdateBlobStatusResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateBlobStatusResponse) ProtoMessage() {} -func (*MsgUpdateBlobStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7f88203cb33986bc, []int{6} -} -func (m *MsgUpdateBlobStatusResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateBlobStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateBlobStatusResponse.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 *MsgUpdateBlobStatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateBlobStatusResponse.Merge(m, src) -} -func (m *MsgUpdateBlobStatusResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateBlobStatusResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateBlobStatusResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateBlobStatusResponse proto.InternalMessageInfo - func init() { proto.RegisterEnum("sdk.avail.v1beta1.BlobStatus", BlobStatus_name, BlobStatus_value) proto.RegisterType((*Range)(nil), "sdk.avail.v1beta1.Range") @@ -545,24 +296,6 @@ func (c *msgClient) UpdateBlobStatus(ctx context.Context, in *MsgUpdateBlobStatu return out, nil } -func (c *msgClient) SubmitBlob(ctx context.Context, in *MsgSubmitBlobRequest, opts ...grpc.CallOption) (*MsgSubmitBlobResponse, error) { - out := new(MsgSubmitBlobResponse) - err := c.cc.Invoke(ctx, "/sdk.avail.v1beta1.Msg/SubmitBlob", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateBlobStatus(ctx context.Context, in *MsgUpdateBlobStatusRequest, opts ...grpc.CallOption) (*MsgUpdateBlobStatusResponse, error) { - out := new(MsgUpdateBlobStatusResponse) - err := c.cc.Invoke(ctx, "/sdk.avail.v1beta1.Msg/UpdateBlobStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. type MsgServer interface { // UpdateBlobStatus @@ -573,12 +306,6 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) UpdateBlobStatus(ctx context.Context, req *MsgUpdateBlobStatusRequest) (*MsgUpdateBlobStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateBlobStatus not implemented") -} -func (*UnimplementedMsgServer) SubmitBlob(ctx context.Context, req *MsgSubmitBlobRequest) (*MsgSubmitBlobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitBlob not implemented") -} func (*UnimplementedMsgServer) UpdateBlobStatus(ctx context.Context, req *MsgUpdateBlobStatusRequest) (*MsgUpdateBlobStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateBlobStatus not implemented") } @@ -605,61 +332,17 @@ func _Msg_UpdateBlobStatus_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -func _Msg_SubmitBlob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitBlobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitBlob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/sdk.avail.v1beta1.Msg/SubmitBlob", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitBlob(ctx, req.(*MsgSubmitBlobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateBlobStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateBlobStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateBlobStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/sdk.avail.v1beta1.Msg/UpdateBlobStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateBlobStatus(ctx, req.(*MsgUpdateBlobStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "sdk.avail.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateBlobStatus", - Handler: _Msg_UpdateBlobStatus_Handler, - }, - { - MethodName: "SubmitBlob", - Handler: _Msg_SubmitBlob_Handler, - }, - { - MethodName: "UpdateBlobStatus", - Handler: _Msg_UpdateBlobStatus_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "sdk/avail/v1beta1/tx.proto", +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sdk.avail.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateBlobStatus", + Handler: _Msg_UpdateBlobStatus_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sdk/avail/v1beta1/tx.proto", } func (m *Range) Marshal() (dAtA []byte, err error) { @@ -775,14 +458,16 @@ func (m *MsgUpdateBlobStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *MsgSubmitBlobRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil + dAtA[offset] = uint8(v) + return base } func (m *Range) Size() (n int) { if m == nil { @@ -805,17 +490,9 @@ func (m *MsgUpdateBlobStatusRequest) Size() (n int) { } var l int _ = l - if m.BlocksRange != nil { - { - size, err := m.BlocksRange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) } if m.BlocksRange != nil { l = m.BlocksRange.Size() @@ -1140,469 +817,6 @@ func (m *MsgUpdateBlobStatusResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSubmitBlobRequest) 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 ErrIntOverflowTx - } - 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: MsgSubmitBlobRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitBlobRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlocksRange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlocksRange == nil { - m.BlocksRange = &Range{} - } - if err := m.BlocksRange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Range) 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 ErrIntOverflowTx - } - 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: Range: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Range: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - m.From = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.From |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - m.To = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.To |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitBlobResponse) 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 ErrIntOverflowTx - } - 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: MsgSubmitBlobResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitBlobResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateBlobStatusRequest) 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 ErrIntOverflowTx - } - 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: MsgUpdateBlobStatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateBlobStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlocksRange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlocksRange == nil { - m.BlocksRange = &Range{} - } - if err := m.BlocksRange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AvailHeight", wireType) - } - m.AvailHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AvailHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSuccess", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSuccess = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateBlobStatusResponse) 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 ErrIntOverflowTx - } - 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: MsgUpdateBlobStatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateBlobStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0