From c4d7a64fbe525465a2c1e7892528692da6f09da5 Mon Sep 17 00:00:00 2001 From: keruch Date: Thu, 27 Jun 2024 11:57:31 +0200 Subject: [PATCH 01/12] feat(da): added interchain-da proto contracts --- proto/get_deps.sh | 15 + proto/protoc.sh | 1 + proto/types/cosmos/base/v1beta1/coin.proto | 43 + proto/types/cosmos/msg/v1/msg.proto | 22 + proto/types/interchain_da/da.proto | 24 + proto/types/interchain_da/query.proto | 39 + proto/types/interchain_da/tx.proto | 40 + third_party/proto/cosmos_proto/cosmos.proto | 112 +++ types/pb/interchain_da/da.pb.go | 576 +++++++++++ types/pb/interchain_da/query.pb.go | 960 +++++++++++++++++++ types/pb/interchain_da/tx.pb.go | 997 ++++++++++++++++++++ 11 files changed, 2829 insertions(+) create mode 100644 proto/types/cosmos/base/v1beta1/coin.proto create mode 100644 proto/types/cosmos/msg/v1/msg.proto create mode 100644 proto/types/interchain_da/da.proto create mode 100644 proto/types/interchain_da/query.proto create mode 100644 proto/types/interchain_da/tx.proto create mode 100644 third_party/proto/cosmos_proto/cosmos.proto create mode 100644 types/pb/interchain_da/da.pb.go create mode 100644 types/pb/interchain_da/query.pb.go create mode 100644 types/pb/interchain_da/tx.pb.go diff --git a/proto/get_deps.sh b/proto/get_deps.sh index c0ce5ca93..40c6558d4 100755 --- a/proto/get_deps.sh +++ b/proto/get_deps.sh @@ -25,3 +25,18 @@ for FILE in "${TM_PROTO_FILES[@]}"; do mkdir -p "tendermint/$(dirname $FILE)" curl -sSL "$TM_PROTO_URL/$FILE" > "tendermint/$FILE" done + +COSMOS_VERSION=v0.46.16 +COSMOS_PROTO_URL=https://raw.githubusercontent.com/cosmos/cosmos-sdk/$COSMOS_VERSION/proto/cosmos + +COSMOS_PROTO_FILES=( + base/v1beta1/coin.proto + msg/v1/msg.proto +) + +echo Fetching protobuf dependencies from Cosmos $COSMOS_VERSION +for FILE in "${COSMOS_PROTO_FILES[@]}"; do + echo Fetching "$FILE" + mkdir -p "cosmos/$(dirname $FILE)" + curl -sSL "$COSMOS_PROTO_URL/$FILE" > "cosmos/$FILE" +done diff --git a/proto/protoc.sh b/proto/protoc.sh index 5ee74f431..6e676b8ac 100755 --- a/proto/protoc.sh +++ b/proto/protoc.sh @@ -5,6 +5,7 @@ set -eo pipefail # Generate the `types` proto files buf generate --path="./proto/types/dalc" --template="buf.gen.yaml" --config="buf.yaml" buf generate --path="./proto/types/dymint" --template="buf.gen.yaml" --config="buf.yaml" +buf generate --path="./proto/types/interchain_da" --template="buf.gen.yaml" --config="buf.yaml" # Generate the `test` proto files buf generate --path="./proto/test" --template="buf.gen.yaml" --config="buf.yaml" diff --git a/proto/types/cosmos/base/v1beta1/coin.proto b/proto/types/cosmos/base/v1beta1/coin.proto new file mode 100644 index 000000000..69e67e099 --- /dev/null +++ b/proto/types/cosmos/base/v1beta1/coin.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; +package cosmos.base.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types"; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; + +// Coin defines a token with a denomination and an amount. +// +// NOTE: The amount field is an Int which implements the custom method +// signatures required by gogoproto. +message Coin { + option (gogoproto.equal) = true; + + string denom = 1; + string amount = 2 + [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; +} + +// DecCoin defines a token with a denomination and a decimal amount. +// +// NOTE: The amount field is an Dec which implements the custom method +// signatures required by gogoproto. +message DecCoin { + option (gogoproto.equal) = true; + + string denom = 1; + string amount = 2 + [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; +} + +// IntProto defines a Protobuf wrapper around an Int object. +message IntProto { + string int = 1 [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; +} + +// DecProto defines a Protobuf wrapper around a Dec object. +message DecProto { + string dec = 1 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; +} diff --git a/proto/types/cosmos/msg/v1/msg.proto b/proto/types/cosmos/msg/v1/msg.proto new file mode 100644 index 000000000..89bdf3129 --- /dev/null +++ b/proto/types/cosmos/msg/v1/msg.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package cosmos.msg.v1; + +import "google/protobuf/descriptor.proto"; + +// TODO(fdymylja): once we fully migrate to protov2 the go_package needs to be updated. +// We need this right now because gogoproto codegen needs to import the extension. +option go_package = "github.com/cosmos/cosmos-sdk/types/msgservice"; + +extend google.protobuf.MessageOptions { + // signer must be used in cosmos messages in order + // to signal to external clients which fields in a + // given cosmos message must be filled with signer + // information (address). + // The field must be the protobuf name of the message + // field extended with this MessageOption. + // The field must either be of string kind, or of message + // kind in case the signer information is contained within + // a message inside the cosmos message. + repeated string signer = 11110000; +} \ No newline at end of file diff --git a/proto/types/interchain_da/da.proto b/proto/types/interchain_da/da.proto new file mode 100644 index 000000000..f647b9129 --- /dev/null +++ b/proto/types/interchain_da/da.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package dymension.interchain_da; + +import "gogoproto/gogo.proto"; +import "types/cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/dymensionxyz/dymint/types/pb/interchain_da"; + +message Params { + // CostPerByte defines the coin cost to store each byte of the blob. This + // allows for multidimensional gas pricing on different resources of the + // network. + cosmos.base.v1beta1.Coin cost_per_byte = 1 [ (gogoproto.nullable) = false ]; + // MaxBlobSize is the hard cap of how many bytes a blob can be. + uint32 max_blob_size = 2; + // DisputePeriod is the number of blocks the blob is stored for. + uint64 dispute_period = 3; +} + +// BlobMetadata holds blob metadata, which is stored in the state. +message BlobMetadata { + // BlobHash is the hash of the submitted blob. + string blob_hash = 1; +} diff --git a/proto/types/interchain_da/query.proto b/proto/types/interchain_da/query.proto new file mode 100644 index 000000000..433c12e28 --- /dev/null +++ b/proto/types/interchain_da/query.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package dymension.interchain_da; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "types/interchain_da/da.proto"; + +option go_package = "github.com/dymensionxyz/dymint/types/pb/interchain_da"; + +// Query defines the gRPC querier service. +service Query { + // Param queries the parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {} + + // Blob queries the blob by the provided BlobID. + rpc Blob(QueryBlobRequest) returns (QueryBlobResponse) {} +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + Params params = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryBlobRequest is the request type for the Query/Blob RPC method. +message QueryBlobRequest { + // BlobID is a unique sequential ID of the blob. + uint64 blob_id = 1; +} + +// QueryBlobResponse is the response type for the Query/Blob RPC method. +message QueryBlobResponse { + // BlobMetadata stores stateful blob metadata. + BlobMetadata blob_metadata = 1 [ (gogoproto.nullable) = false ]; + // Blob is the actual blob. May be empty if the dispute period is over. + bytes blob = 2; +} diff --git a/proto/types/interchain_da/tx.proto b/proto/types/interchain_da/tx.proto new file mode 100644 index 000000000..b72214edb --- /dev/null +++ b/proto/types/interchain_da/tx.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package dymension.interchain_da; + +import "gogoproto/gogo.proto"; +import "types/cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; +import "types/cosmos/msg/v1/msg.proto"; +import "types/interchain_da/da.proto"; + +option go_package = "github.com/dymensionxyz/dymint/types/pb/interchain_da"; + +// MsgUpdateParams allows to update module params. +message MsgUpdateParams { + // Authority is the address that controls the module. + option (cosmos.msg.v1.signer) = "authority"; + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // NewParams should be fully populated. + Params new_params = 2 [ (gogoproto.nullable) = false ]; +} + +message MsgUpdateParamsResponse {} + +// MsgSubmitBlob submits a new blob to the host chain. +message MsgSubmitBlob { + // Creator is the bech32 encoded address of the sequencer sending the update. + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Blob that is sent. + bytes blob = 2; + // Fees defines the storage fees sent. + cosmos.base.v1beta1.Coin fees = 3 [ (gogoproto.nullable) = false ]; +} + +message MsgSubmitBlobResponse { + // BlobID is a unique sequential ID of the submitted blob. + uint64 blob_id = 1; + // BlobHash is the hash of the submitted blob. + string blob_hash = 2; +} \ No newline at end of file diff --git a/third_party/proto/cosmos_proto/cosmos.proto b/third_party/proto/cosmos_proto/cosmos.proto new file mode 100644 index 000000000..ef8a95afe --- /dev/null +++ b/third_party/proto/cosmos_proto/cosmos.proto @@ -0,0 +1,112 @@ +syntax = "proto3"; +package cosmos_proto; + +import "google/protobuf/descriptor.proto"; + +option go_package = "github.com/cosmos/cosmos-proto;cosmos_proto"; + +extend google.protobuf.MethodOptions { + + // method_added_in is used to indicate from which version the method was added. + string method_added_in = 93001; +} + +extend google.protobuf.MessageOptions { + + // implements_interface is used to indicate the type name of the interface + // that a message implements so that it can be used in google.protobuf.Any + // fields that accept that interface. A message can implement multiple + // interfaces. Interfaces should be declared using a declare_interface + // file option. + repeated string implements_interface = 93001; + + // message_added_in is used to indicate from which version the message was added. + string message_added_in = 93002; +} + +extend google.protobuf.FieldOptions { + + // accepts_interface is used to annotate that a google.protobuf.Any + // field accepts messages that implement the specified interface. + // Interfaces should be declared using a declare_interface file option. + string accepts_interface = 93001; + + // scalar is used to indicate that this field follows the formatting defined + // by the named scalar which should be declared with declare_scalar. Code + // generators may choose to use this information to map this field to a + // language-specific type representing the scalar. + string scalar = 93002; + + // field_added_in is used to indicate from which version the field was added. + string field_added_in = 93003; +} + +extend google.protobuf.FileOptions { + + // declare_interface declares an interface type to be used with + // accepts_interface and implements_interface. Interface names are + // expected to follow the following convention such that their declaration + // can be discovered by tools: for a given interface type a.b.C, it is + // expected that the declaration will be found in a protobuf file named + // a/b/interfaces.proto in the file descriptor set. + repeated InterfaceDescriptor declare_interface = 793021; + + // declare_scalar declares a scalar type to be used with + // the scalar field option. Scalar names are + // expected to follow the following convention such that their declaration + // can be discovered by tools: for a given scalar type a.b.C, it is + // expected that the declaration will be found in a protobuf file named + // a/b/scalars.proto in the file descriptor set. + repeated ScalarDescriptor declare_scalar = 793022; + + // file_added_in is used to indicate from which the version the file was added. + string file_added_in = 793023; +} + +// InterfaceDescriptor describes an interface type to be used with +// accepts_interface and implements_interface and declared by declare_interface. +message InterfaceDescriptor { + + // name is the name of the interface. It should be a short-name (without + // a period) such that the fully qualified name of the interface will be + // package.name, ex. for the package a.b and interface named C, the + // fully-qualified name will be a.b.C. + string name = 1; + + // description is a human-readable description of the interface and its + // purpose. + string description = 2; +} + +// ScalarDescriptor describes an scalar type to be used with +// the scalar field option and declared by declare_scalar. +// Scalars extend simple protobuf built-in types with additional +// syntax and semantics, for instance to represent big integers. +// Scalars should ideally define an encoding such that there is only one +// valid syntactical representation for a given semantic meaning, +// i.e. the encoding should be deterministic. +message ScalarDescriptor { + + // name is the name of the scalar. It should be a short-name (without + // a period) such that the fully qualified name of the scalar will be + // package.name, ex. for the package a.b and scalar named C, the + // fully-qualified name will be a.b.C. + string name = 1; + + // description is a human-readable description of the scalar and its + // encoding format. For instance a big integer or decimal scalar should + // specify precisely the expected encoding format. + string description = 2; + + // field_type is the type of field with which this scalar can be used. + // Scalars can be used with one and only one type of field so that + // encoding standards and simple and clear. Currently only string and + // bytes fields are supported for scalars. + repeated ScalarType field_type = 3; +} + +enum ScalarType { + SCALAR_TYPE_UNSPECIFIED = 0; + SCALAR_TYPE_STRING = 1; + SCALAR_TYPE_BYTES = 2; +} \ No newline at end of file diff --git a/types/pb/interchain_da/da.pb.go b/types/pb/interchain_da/da.pb.go new file mode 100644 index 000000000..0f7829bca --- /dev/null +++ b/types/pb/interchain_da/da.pb.go @@ -0,0 +1,576 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: types/interchain_da/da.proto + +package interchain_da + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Params struct { + // CostPerByte defines the coin cost to store each byte of the blob. This + // allows for multidimensional gas pricing on different resources of the + // network. + CostPerByte types.Coin `protobuf:"bytes,1,opt,name=cost_per_byte,json=costPerByte,proto3" json:"cost_per_byte"` + // MaxBlobSize is the hard cap of how many bytes a blob can be. + MaxBlobSize uint32 `protobuf:"varint,2,opt,name=max_blob_size,json=maxBlobSize,proto3" json:"max_blob_size,omitempty"` + // DisputePeriod is the number of blocks the blob is stored for. + DisputePeriod uint64 `protobuf:"varint,3,opt,name=dispute_period,json=disputePeriod,proto3" json:"dispute_period,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_c9a26af1837c1a56, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetCostPerByte() types.Coin { + if m != nil { + return m.CostPerByte + } + return types.Coin{} +} + +func (m *Params) GetMaxBlobSize() uint32 { + if m != nil { + return m.MaxBlobSize + } + return 0 +} + +func (m *Params) GetDisputePeriod() uint64 { + if m != nil { + return m.DisputePeriod + } + return 0 +} + +// BlobMetadata holds blob metadata, which is stored in the state. +type BlobMetadata struct { + // BlobHash is the hash of the submitted blob. + BlobHash string `protobuf:"bytes,1,opt,name=blob_hash,json=blobHash,proto3" json:"blob_hash,omitempty"` +} + +func (m *BlobMetadata) Reset() { *m = BlobMetadata{} } +func (m *BlobMetadata) String() string { return proto.CompactTextString(m) } +func (*BlobMetadata) ProtoMessage() {} +func (*BlobMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_c9a26af1837c1a56, []int{1} +} +func (m *BlobMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlobMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlobMetadata.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 *BlobMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlobMetadata.Merge(m, src) +} +func (m *BlobMetadata) XXX_Size() int { + return m.Size() +} +func (m *BlobMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_BlobMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_BlobMetadata proto.InternalMessageInfo + +func (m *BlobMetadata) GetBlobHash() string { + if m != nil { + return m.BlobHash + } + return "" +} + +func init() { + proto.RegisterType((*Params)(nil), "dymension.interchain_da.Params") + proto.RegisterType((*BlobMetadata)(nil), "dymension.interchain_da.BlobMetadata") +} + +func init() { proto.RegisterFile("types/interchain_da/da.proto", fileDescriptor_c9a26af1837c1a56) } + +var fileDescriptor_c9a26af1837c1a56 = []byte{ + // 325 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xc1, 0x4a, 0xc3, 0x30, + 0x1c, 0xc6, 0x1b, 0x1d, 0xc3, 0x75, 0xd6, 0x43, 0x11, 0x9c, 0x53, 0xea, 0x18, 0x0a, 0x03, 0x21, + 0x61, 0x8a, 0x2f, 0xd0, 0x5d, 0xbc, 0x88, 0xa3, 0xde, 0xbc, 0x94, 0x7f, 0xda, 0xb0, 0x06, 0xd6, + 0xfc, 0x4b, 0x93, 0xc9, 0xba, 0xa7, 0xf0, 0xe8, 0x23, 0xed, 0xb8, 0xa3, 0x27, 0x91, 0xed, 0x45, + 0x24, 0xed, 0x10, 0x76, 0x4b, 0x3e, 0xbe, 0xef, 0x97, 0xf0, 0x73, 0xaf, 0x4d, 0x55, 0x08, 0xcd, + 0xa4, 0x32, 0xa2, 0x4c, 0x32, 0x90, 0x2a, 0x4e, 0x81, 0xa5, 0x40, 0x8b, 0x12, 0x0d, 0xfa, 0x17, + 0x69, 0x95, 0x0b, 0xa5, 0x25, 0x2a, 0x7a, 0xd0, 0xe8, 0x9f, 0xcf, 0x70, 0x86, 0x75, 0x87, 0xd9, + 0x53, 0x53, 0xef, 0xdf, 0x36, 0xb0, 0x04, 0x75, 0x8e, 0x9a, 0x71, 0xd0, 0x82, 0x7d, 0x8c, 0xb9, + 0x30, 0x30, 0x66, 0x09, 0x4a, 0xd5, 0xb4, 0x86, 0x5f, 0xc4, 0x6d, 0x4f, 0xa1, 0x84, 0x5c, 0xfb, + 0x13, 0xd7, 0x4b, 0x50, 0x9b, 0xb8, 0x10, 0x65, 0xcc, 0x2b, 0x23, 0x7a, 0x64, 0x40, 0x46, 0xdd, + 0x87, 0x4b, 0xda, 0x20, 0xa8, 0x45, 0xd0, 0x3d, 0x82, 0x4e, 0x50, 0xaa, 0xb0, 0xb5, 0xfe, 0xb9, + 0x71, 0xa2, 0xae, 0x5d, 0x4d, 0x45, 0x19, 0x56, 0x46, 0xf8, 0x43, 0xd7, 0xcb, 0x61, 0x19, 0xf3, + 0x39, 0xf2, 0x58, 0xcb, 0x95, 0xe8, 0x1d, 0x0d, 0xc8, 0xc8, 0x8b, 0xba, 0x39, 0x2c, 0xc3, 0x39, + 0xf2, 0x37, 0xb9, 0x12, 0xfe, 0x9d, 0x7b, 0x96, 0x4a, 0x5d, 0x2c, 0x8c, 0xb0, 0x6f, 0x49, 0x4c, + 0x7b, 0xc7, 0x03, 0x32, 0x6a, 0x45, 0xde, 0x3e, 0x9d, 0xd6, 0xe1, 0xf0, 0xde, 0x3d, 0xb5, 0x93, + 0x17, 0x61, 0x20, 0x05, 0x03, 0xfe, 0x95, 0xdb, 0xa9, 0xb1, 0x19, 0xe8, 0xac, 0xfe, 0x5b, 0x27, + 0x3a, 0xb1, 0xc1, 0x33, 0xe8, 0x2c, 0x7c, 0x5d, 0x6f, 0x03, 0xb2, 0xd9, 0x06, 0xe4, 0x77, 0x1b, + 0x90, 0xcf, 0x5d, 0xe0, 0x6c, 0x76, 0x81, 0xf3, 0xbd, 0x0b, 0x9c, 0xf7, 0xa7, 0x99, 0x34, 0xd9, + 0x82, 0xd3, 0x04, 0x73, 0xf6, 0x6f, 0x70, 0x59, 0xad, 0xec, 0x45, 0x2a, 0xc3, 0x1a, 0x4d, 0x05, + 0x3f, 0xd4, 0xce, 0xdb, 0xb5, 0x9f, 0xc7, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0xa2, 0x93, + 0xfe, 0x94, 0x01, 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DisputePeriod != 0 { + i = encodeVarintDa(dAtA, i, uint64(m.DisputePeriod)) + i-- + dAtA[i] = 0x18 + } + if m.MaxBlobSize != 0 { + i = encodeVarintDa(dAtA, i, uint64(m.MaxBlobSize)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.CostPerByte.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDa(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *BlobMetadata) 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 *BlobMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlobMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BlobHash) > 0 { + i -= len(m.BlobHash) + copy(dAtA[i:], m.BlobHash) + i = encodeVarintDa(dAtA, i, uint64(len(m.BlobHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintDa(dAtA []byte, offset int, v uint64) int { + offset -= sovDa(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CostPerByte.Size() + n += 1 + l + sovDa(uint64(l)) + if m.MaxBlobSize != 0 { + n += 1 + sovDa(uint64(m.MaxBlobSize)) + } + if m.DisputePeriod != 0 { + n += 1 + sovDa(uint64(m.DisputePeriod)) + } + return n +} + +func (m *BlobMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BlobHash) + if l > 0 { + n += 1 + l + sovDa(uint64(l)) + } + return n +} + +func sovDa(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDa(x uint64) (n int) { + return sovDa(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowDa + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CostPerByte", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDa + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CostPerByte.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxBlobSize", wireType) + } + m.MaxBlobSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxBlobSize |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DisputePeriod", wireType) + } + m.DisputePeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DisputePeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlobMetadata) 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 ErrIntOverflowDa + } + 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: BlobMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlobMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlobHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDa + } + 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 ErrInvalidLengthDa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlobHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDa(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDa + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDa + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDa + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthDa + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDa + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDa + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDa = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDa = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDa = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/pb/interchain_da/query.pb.go b/types/pb/interchain_da/query.pb.go new file mode 100644 index 000000000..f53fb5aab --- /dev/null +++ b/types/pb/interchain_da/query.pb.go @@ -0,0 +1,960 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: types/interchain_da/query.proto + +package interchain_da + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e8224b7b8c94c09f, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e8224b7b8c94c09f, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// QueryBlobRequest is the request type for the Query/Blob RPC method. +type QueryBlobRequest struct { + // BlobID is a unique sequential ID of the blob. + BlobId uint64 `protobuf:"varint,1,opt,name=blob_id,json=blobId,proto3" json:"blob_id,omitempty"` +} + +func (m *QueryBlobRequest) Reset() { *m = QueryBlobRequest{} } +func (m *QueryBlobRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBlobRequest) ProtoMessage() {} +func (*QueryBlobRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e8224b7b8c94c09f, []int{2} +} +func (m *QueryBlobRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBlobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBlobRequest.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 *QueryBlobRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBlobRequest.Merge(m, src) +} +func (m *QueryBlobRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBlobRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBlobRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBlobRequest proto.InternalMessageInfo + +func (m *QueryBlobRequest) GetBlobId() uint64 { + if m != nil { + return m.BlobId + } + return 0 +} + +// QueryBlobResponse is the response type for the Query/Blob RPC method. +type QueryBlobResponse struct { + // BlobMetadata stores stateful blob metadata. + BlobMetadata BlobMetadata `protobuf:"bytes,1,opt,name=blob_metadata,json=blobMetadata,proto3" json:"blob_metadata"` + // Blob is the actual blob. May be empty if the dispute period is over. + Blob []byte `protobuf:"bytes,2,opt,name=blob,proto3" json:"blob,omitempty"` +} + +func (m *QueryBlobResponse) Reset() { *m = QueryBlobResponse{} } +func (m *QueryBlobResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBlobResponse) ProtoMessage() {} +func (*QueryBlobResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e8224b7b8c94c09f, []int{3} +} +func (m *QueryBlobResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBlobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBlobResponse.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 *QueryBlobResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBlobResponse.Merge(m, src) +} +func (m *QueryBlobResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBlobResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBlobResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBlobResponse proto.InternalMessageInfo + +func (m *QueryBlobResponse) GetBlobMetadata() BlobMetadata { + if m != nil { + return m.BlobMetadata + } + return BlobMetadata{} +} + +func (m *QueryBlobResponse) GetBlob() []byte { + if m != nil { + return m.Blob + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "dymension.interchain_da.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "dymension.interchain_da.QueryParamsResponse") + proto.RegisterType((*QueryBlobRequest)(nil), "dymension.interchain_da.QueryBlobRequest") + proto.RegisterType((*QueryBlobResponse)(nil), "dymension.interchain_da.QueryBlobResponse") +} + +func init() { proto.RegisterFile("types/interchain_da/query.proto", fileDescriptor_e8224b7b8c94c09f) } + +var fileDescriptor_e8224b7b8c94c09f = []byte{ + // 362 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0x4b, 0xf3, 0x40, + 0x10, 0xc6, 0xb3, 0x2f, 0x79, 0xf3, 0xc2, 0xbe, 0x15, 0x74, 0x2d, 0xb4, 0x06, 0x49, 0x4b, 0x40, + 0xa8, 0x56, 0x12, 0xa8, 0x78, 0xf4, 0xd2, 0x9b, 0x07, 0xb1, 0x06, 0x4f, 0x5e, 0xc2, 0x6e, 0xb3, + 0xb4, 0x81, 0x26, 0x9b, 0x66, 0xb7, 0x60, 0xfc, 0x14, 0x7e, 0xac, 0xde, 0xec, 0xd1, 0x93, 0x48, + 0xfb, 0x45, 0x64, 0xff, 0x28, 0x2d, 0x5a, 0xe9, 0x6d, 0x67, 0xe6, 0x37, 0xf3, 0x3c, 0x3b, 0x0c, + 0x6c, 0x89, 0xaa, 0xa0, 0x3c, 0x4c, 0x73, 0x41, 0xcb, 0xe1, 0x18, 0xa7, 0x79, 0x9c, 0xe0, 0x70, + 0x3a, 0xa3, 0x65, 0x15, 0x14, 0x25, 0x13, 0x0c, 0x35, 0x92, 0x2a, 0xa3, 0x39, 0x4f, 0x59, 0x1e, + 0x6c, 0x40, 0x6e, 0x7d, 0xc4, 0x46, 0x4c, 0x31, 0xa1, 0x7c, 0x69, 0xdc, 0x3d, 0x1a, 0x32, 0x9e, + 0x31, 0x1e, 0xeb, 0x82, 0x0e, 0x4c, 0xe9, 0xf8, 0x27, 0xa9, 0x04, 0xeb, 0xaa, 0x5f, 0x87, 0xe8, + 0x4e, 0xca, 0x0e, 0x70, 0x89, 0x33, 0x1e, 0xd1, 0xe9, 0x8c, 0x72, 0xe1, 0xdf, 0xc3, 0xc3, 0x8d, + 0x2c, 0x2f, 0x58, 0xce, 0x29, 0xba, 0x82, 0x4e, 0xa1, 0x32, 0x4d, 0xd0, 0x06, 0x9d, 0xff, 0xbd, + 0x56, 0xb0, 0xc5, 0x65, 0xa0, 0x1b, 0xfb, 0xf6, 0xfc, 0xad, 0x65, 0x45, 0xa6, 0xc9, 0xef, 0xc2, + 0x7d, 0x35, 0xb5, 0x3f, 0x61, 0xc4, 0x28, 0xa1, 0x06, 0xfc, 0x47, 0x26, 0x8c, 0xc4, 0x69, 0xa2, + 0x66, 0xda, 0x91, 0x23, 0xc3, 0xeb, 0xc4, 0xaf, 0xe0, 0xc1, 0x1a, 0x6c, 0x0c, 0x0c, 0xe0, 0x9e, + 0xa2, 0x33, 0x2a, 0x70, 0x82, 0x05, 0x36, 0x3e, 0x4e, 0xb6, 0xfa, 0x90, 0xdd, 0x37, 0x06, 0x36, + 0x6e, 0x6a, 0x64, 0x2d, 0x87, 0x10, 0xb4, 0x65, 0xdc, 0xfc, 0xd3, 0x06, 0x9d, 0x5a, 0xa4, 0xde, + 0xbd, 0x17, 0x00, 0xff, 0x2a, 0x6d, 0x44, 0xa1, 0xa3, 0x7f, 0x82, 0xba, 0x5b, 0x25, 0xbe, 0xaf, + 0xcf, 0x3d, 0xdf, 0x0d, 0xd6, 0x9f, 0xf2, 0x2d, 0x14, 0x43, 0x5b, 0x1a, 0x45, 0xa7, 0xbf, 0xf7, + 0xad, 0xed, 0xcd, 0x3d, 0xdb, 0x05, 0xfd, 0x14, 0xe8, 0xdf, 0xce, 0x97, 0x1e, 0x58, 0x2c, 0x3d, + 0xf0, 0xbe, 0xf4, 0xc0, 0xf3, 0xca, 0xb3, 0x16, 0x2b, 0xcf, 0x7a, 0x5d, 0x79, 0xd6, 0xc3, 0xe5, + 0x28, 0x15, 0xe3, 0x19, 0x09, 0x86, 0x2c, 0x0b, 0xbf, 0x26, 0x3e, 0x56, 0x4f, 0x32, 0x48, 0x73, + 0x11, 0xea, 0xe3, 0x29, 0xc8, 0xe6, 0xfd, 0x10, 0x47, 0x5d, 0xcf, 0xc5, 0x47, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xef, 0x5f, 0xf0, 0x63, 0xc8, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Param queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Blob queries the blob by the provided BlobID. + Blob(ctx context.Context, in *QueryBlobRequest, opts ...grpc.CallOption) (*QueryBlobResponse, error) +} + +type queryClient struct { + cc *grpc.ClientConn +} + +func NewQueryClient(cc *grpc.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/dymension.interchain_da.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Blob(ctx context.Context, in *QueryBlobRequest, opts ...grpc.CallOption) (*QueryBlobResponse, error) { + out := new(QueryBlobResponse) + err := c.cc.Invoke(ctx, "/dymension.interchain_da.Query/Blob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Param queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Blob queries the blob by the provided BlobID. + Blob(context.Context, *QueryBlobRequest) (*QueryBlobResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) Blob(ctx context.Context, req *QueryBlobRequest) (*QueryBlobResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Blob not implemented") +} + +func RegisterQueryServer(s *grpc.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dymension.interchain_da.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Blob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBlobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Blob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dymension.interchain_da.Query/Blob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Blob(ctx, req.(*QueryBlobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "dymension.interchain_da.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "Blob", + Handler: _Query_Blob_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "types/interchain_da/query.proto", +} + +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryBlobRequest) 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 *QueryBlobRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBlobRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlobId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlobId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryBlobResponse) 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 *QueryBlobResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBlobResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Blob) > 0 { + i -= len(m.Blob) + copy(dAtA[i:], m.Blob) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Blob))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.BlobMetadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryBlobRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlobId != 0 { + n += 1 + sovQuery(uint64(m.BlobId)) + } + return n +} + +func (m *QueryBlobResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BlobMetadata.Size() + n += 1 + l + sovQuery(uint64(l)) + l = len(m.Blob) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) 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 ErrIntOverflowQuery + } + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) 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 ErrIntOverflowQuery + } + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBlobRequest) 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 ErrIntOverflowQuery + } + 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: QueryBlobRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBlobRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlobId", wireType) + } + m.BlobId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlobId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBlobResponse) 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 ErrIntOverflowQuery + } + 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: QueryBlobResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBlobResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlobMetadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BlobMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Blob", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Blob = append(m.Blob[:0], dAtA[iNdEx:postIndex]...) + if m.Blob == nil { + m.Blob = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/types/pb/interchain_da/tx.pb.go b/types/pb/interchain_da/tx.pb.go new file mode 100644 index 000000000..560311486 --- /dev/null +++ b/types/pb/interchain_da/tx.pb.go @@ -0,0 +1,997 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: types/interchain_da/tx.proto + +package interchain_da + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams allows to update module params. +type MsgUpdateParams struct { + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // NewParams should be fully populated. + NewParams Params `protobuf:"bytes,2,opt,name=new_params,json=newParams,proto3" json:"new_params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_15fe253ab05473c9, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.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 *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetNewParams() Params { + if m != nil { + return m.NewParams + } + return Params{} +} + +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_15fe253ab05473c9, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.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 *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +// MsgSubmitBlob submits a new blob to the host chain. +type MsgSubmitBlob struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + // Blob that is sent. + Blob []byte `protobuf:"bytes,2,opt,name=blob,proto3" json:"blob,omitempty"` + // Fees defines the storage fees sent. + Fees types.Coin `protobuf:"bytes,3,opt,name=fees,proto3" json:"fees"` +} + +func (m *MsgSubmitBlob) Reset() { *m = MsgSubmitBlob{} } +func (m *MsgSubmitBlob) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitBlob) ProtoMessage() {} +func (*MsgSubmitBlob) Descriptor() ([]byte, []int) { + return fileDescriptor_15fe253ab05473c9, []int{2} +} +func (m *MsgSubmitBlob) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitBlob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitBlob.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 *MsgSubmitBlob) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitBlob.Merge(m, src) +} +func (m *MsgSubmitBlob) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitBlob) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitBlob.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitBlob proto.InternalMessageInfo + +func (m *MsgSubmitBlob) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgSubmitBlob) GetBlob() []byte { + if m != nil { + return m.Blob + } + return nil +} + +func (m *MsgSubmitBlob) GetFees() types.Coin { + if m != nil { + return m.Fees + } + return types.Coin{} +} + +type MsgSubmitBlobResponse struct { + // BlobID is a unique sequential ID of the submitted blob. + BlobId uint64 `protobuf:"varint,1,opt,name=blob_id,json=blobId,proto3" json:"blob_id,omitempty"` + // BlobHash is the hash of the submitted blob. + BlobHash string `protobuf:"bytes,2,opt,name=blob_hash,json=blobHash,proto3" json:"blob_hash,omitempty"` +} + +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_15fe253ab05473c9, []int{3} +} +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 + +func (m *MsgSubmitBlobResponse) GetBlobId() uint64 { + if m != nil { + return m.BlobId + } + return 0 +} + +func (m *MsgSubmitBlobResponse) GetBlobHash() string { + if m != nil { + return m.BlobHash + } + return "" +} + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "dymension.interchain_da.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "dymension.interchain_da.MsgUpdateParamsResponse") + proto.RegisterType((*MsgSubmitBlob)(nil), "dymension.interchain_da.MsgSubmitBlob") + proto.RegisterType((*MsgSubmitBlobResponse)(nil), "dymension.interchain_da.MsgSubmitBlobResponse") +} + +func init() { proto.RegisterFile("types/interchain_da/tx.proto", fileDescriptor_15fe253ab05473c9) } + +var fileDescriptor_15fe253ab05473c9 = []byte{ + // 450 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xb1, 0x6e, 0x13, 0x31, + 0x18, 0xc7, 0x73, 0x10, 0xb5, 0x9c, 0x29, 0x20, 0x59, 0x45, 0x49, 0x0a, 0x5c, 0xab, 0x88, 0xa1, + 0x42, 0xe2, 0xac, 0xb4, 0x82, 0xa1, 0x1b, 0x81, 0x01, 0x86, 0x08, 0x74, 0x15, 0x0b, 0x4b, 0x64, + 0x9f, 0xcd, 0x9d, 0xa5, 0x9e, 0x7d, 0xf2, 0xe7, 0xb4, 0x0d, 0x23, 0x4f, 0xc0, 0xcc, 0xc2, 0x2b, + 0x30, 0xf0, 0x10, 0x1d, 0x2b, 0x26, 0x26, 0x84, 0x92, 0x81, 0xd7, 0x40, 0xb6, 0x2f, 0x44, 0x87, + 0x40, 0x4c, 0xe7, 0xcf, 0xff, 0xff, 0xfd, 0xbf, 0x9f, 0xfd, 0x19, 0xdd, 0xb5, 0xf3, 0x5a, 0x00, + 0x91, 0xca, 0x0a, 0x93, 0x97, 0x54, 0xaa, 0x29, 0xa7, 0xc4, 0x9e, 0xa7, 0xb5, 0xd1, 0x56, 0xe3, + 0x1e, 0x9f, 0x57, 0x42, 0x81, 0xd4, 0x2a, 0x6d, 0x39, 0x76, 0xb6, 0x0b, 0x5d, 0x68, 0xef, 0x21, + 0x6e, 0x15, 0xec, 0x3b, 0xf7, 0x43, 0x58, 0xae, 0xa1, 0xd2, 0x40, 0x18, 0x05, 0x41, 0x4e, 0x47, + 0x4c, 0x58, 0x3a, 0x22, 0xb9, 0x96, 0xaa, 0x71, 0x0d, 0x82, 0x3e, 0x0d, 0xbf, 0x87, 0xa2, 0x91, + 0xee, 0xb5, 0x02, 0x2a, 0x28, 0xc8, 0xe9, 0xc8, 0x7d, 0x1a, 0xf9, 0xaf, 0xb0, 0x9c, 0x06, 0x75, + 0xf8, 0x29, 0x42, 0xb7, 0x26, 0x50, 0xbc, 0xae, 0x39, 0xb5, 0xe2, 0x15, 0x35, 0xb4, 0x02, 0xfc, + 0x18, 0xc5, 0x74, 0x66, 0x4b, 0x6d, 0xa4, 0x9d, 0xf7, 0xa3, 0xbd, 0x68, 0x3f, 0x1e, 0xf7, 0xbf, + 0x7e, 0x79, 0xb8, 0xdd, 0x74, 0x7d, 0xc2, 0xb9, 0x11, 0x00, 0xc7, 0xd6, 0x48, 0x55, 0x64, 0x6b, + 0x2b, 0x7e, 0x86, 0x90, 0x12, 0x67, 0xd3, 0xda, 0xa7, 0xf4, 0xaf, 0xec, 0x45, 0xfb, 0xd7, 0x0f, + 0x76, 0xd3, 0x7f, 0xdc, 0x46, 0x1a, 0x9a, 0x8d, 0xbb, 0x17, 0xdf, 0x77, 0x3b, 0x59, 0xac, 0xc4, + 0x59, 0xd8, 0x38, 0xba, 0xf9, 0xfe, 0xe7, 0xe7, 0x07, 0xeb, 0xd4, 0xe1, 0x00, 0xf5, 0xfe, 0x00, + 0xcc, 0x04, 0xd4, 0x5a, 0x81, 0x18, 0x7e, 0x8c, 0xd0, 0x8d, 0x09, 0x14, 0xc7, 0x33, 0x56, 0x49, + 0x3b, 0x3e, 0xd1, 0x0c, 0x1f, 0xa0, 0xcd, 0xdc, 0x08, 0x6a, 0xb5, 0xf9, 0x2f, 0xf8, 0xca, 0x88, + 0x31, 0xea, 0xb2, 0x13, 0xcd, 0x3c, 0xf0, 0x56, 0xe6, 0xd7, 0xf8, 0x10, 0x75, 0xdf, 0x0a, 0x01, + 0xfd, 0xab, 0xfe, 0x10, 0x83, 0xb4, 0x49, 0x70, 0xd3, 0x49, 0x9b, 0xe9, 0xa4, 0x4f, 0xb5, 0x54, + 0x0d, 0xbe, 0x37, 0x1f, 0x6d, 0x39, 0xf2, 0x55, 0xec, 0x70, 0x82, 0x6e, 0xb7, 0xd8, 0x56, 0xd4, + 0xb8, 0x87, 0x36, 0x5d, 0x8f, 0xa9, 0xe4, 0x9e, 0xb1, 0x9b, 0x6d, 0xb8, 0xf2, 0x05, 0xc7, 0x77, + 0x50, 0xec, 0x85, 0x92, 0x42, 0xe9, 0x69, 0xe2, 0xec, 0x9a, 0xdb, 0x78, 0x4e, 0xa1, 0x1c, 0xbf, + 0xbc, 0x58, 0x24, 0xd1, 0xe5, 0x22, 0x89, 0x7e, 0x2c, 0x92, 0xe8, 0xc3, 0x32, 0xe9, 0x5c, 0x2e, + 0x93, 0xce, 0xb7, 0x65, 0xd2, 0x79, 0xf3, 0xa8, 0x90, 0xb6, 0x9c, 0xb1, 0x34, 0xd7, 0x15, 0xf9, + 0x7d, 0xd9, 0xe7, 0xf3, 0x77, 0xae, 0x90, 0xca, 0x92, 0x30, 0xff, 0x9a, 0xb5, 0x9f, 0x00, 0xdb, + 0xf0, 0x0f, 0xe0, 0xf0, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xd6, 0xe5, 0x40, 0xcd, 0x02, + 0x00, 0x00, +} + +func (m *MsgUpdateParams) 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 *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.NewParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) 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 *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSubmitBlob) 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 *MsgSubmitBlob) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitBlob) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Fees.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Blob) > 0 { + i -= len(m.Blob) + copy(dAtA[i:], m.Blob) + i = encodeVarintTx(dAtA, i, uint64(len(m.Blob))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubmitBlobResponse) 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 *MsgSubmitBlobResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitBlobResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.BlobHash) > 0 { + i -= len(m.BlobHash) + copy(dAtA[i:], m.BlobHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.BlobHash))) + i-- + dAtA[i] = 0x12 + } + if m.BlobId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.BlobId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +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++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.NewParams.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSubmitBlob) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Blob) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Fees.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgSubmitBlobResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlobId != 0 { + n += 1 + sovTx(uint64(m.BlobId)) + } + l = len(m.BlobHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewParams", 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 err := m.NewParams.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 *MsgUpdateParamsResponse) 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: 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 *MsgSubmitBlob) 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: MsgSubmitBlob: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitBlob: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Blob", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Blob = append(m.Blob[:0], dAtA[iNdEx:postIndex]...) + if m.Blob == nil { + m.Blob = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fees", 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 err := m.Fees.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 *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 { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlobId", wireType) + } + m.BlobId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlobId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlobHash", 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.BlobHash = string(dAtA[iNdEx:postIndex]) + 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 skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) From 7c85f8c21d62c4f23ee77537937ba5879ee57367 Mon Sep 17 00:00:00 2001 From: keruch Date: Thu, 27 Jun 2024 12:05:50 +0200 Subject: [PATCH 02/12] added more comments --- proto/types/interchain_da/da.proto | 3 +++ proto/types/interchain_da/query.proto | 3 +++ proto/types/interchain_da/tx.proto | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/proto/types/interchain_da/da.proto b/proto/types/interchain_da/da.proto index f647b9129..a41f5b35b 100644 --- a/proto/types/interchain_da/da.proto +++ b/proto/types/interchain_da/da.proto @@ -1,3 +1,6 @@ +// This file is a modified copy of the interchain-da module proto contract. Source: +// https://github.com/dymensionxyz/interchain-da/blob/main/proto/dymension/interchain_da/da.proto. + syntax = "proto3"; package dymension.interchain_da; diff --git a/proto/types/interchain_da/query.proto b/proto/types/interchain_da/query.proto index 433c12e28..3c32723c0 100644 --- a/proto/types/interchain_da/query.proto +++ b/proto/types/interchain_da/query.proto @@ -1,3 +1,6 @@ +// This file is a modified copy of the interchain-da module proto contract. Source: +// https://github.com/dymensionxyz/interchain-da/blob/main/proto/dymension/interchain_da/query.proto. + syntax = "proto3"; package dymension.interchain_da; diff --git a/proto/types/interchain_da/tx.proto b/proto/types/interchain_da/tx.proto index b72214edb..c5649a50e 100644 --- a/proto/types/interchain_da/tx.proto +++ b/proto/types/interchain_da/tx.proto @@ -1,3 +1,7 @@ +// This file is a modified copy of the interchain-da module proto contract. Source: +// https://github.com/dymensionxyz/interchain-da/blob/main/proto/dymension/interchain_da/tx.proto. +// It contains only message definitions but without the Msg service. + syntax = "proto3"; package dymension.interchain_da; From 867fbbcefcc8cc45b970b2bc7860d4385b6e0151 Mon Sep 17 00:00:00 2001 From: keruch Date: Wed, 3 Jul 2024 17:21:44 +0200 Subject: [PATCH 03/12] feat(da): added commitment type and additional comments --- proto/gen.sh | 6 +- proto/types/interchain_da/da.proto | 20 +- types/pb/dalc/dalc.pb.go | 7 +- types/pb/interchain_da/da.pb.go | 414 +++++++++++++++++++++++++++-- types/pb/interchain_da/query.pb.go | 7 +- 5 files changed, 423 insertions(+), 31 deletions(-) diff --git a/proto/gen.sh b/proto/gen.sh index f4501b5e6..15446efd5 100755 --- a/proto/gen.sh +++ b/proto/gen.sh @@ -29,7 +29,11 @@ done cd $SCRIPT_DIR mkdir -p ./proto/pb rm -rf $TARGET_DIR/* -docker run -v $PWD:/workspace --workdir /workspace tendermintdev/docker-build-proto sh ./proto/protoc.sh + +protoVer=v0.7 +protoImageName=tendermintdev/sdk-proto-gen:$protoVer + +docker run -v $PWD:/workspace --workdir /workspace $protoImageName sh ./proto/protoc.sh # Copy the generated files to the target directories for TARGET_DIR in $TARGETS; do diff --git a/proto/types/interchain_da/da.proto b/proto/types/interchain_da/da.proto index a41f5b35b..c235064bb 100644 --- a/proto/types/interchain_da/da.proto +++ b/proto/types/interchain_da/da.proto @@ -6,6 +6,7 @@ package dymension.interchain_da; import "gogoproto/gogo.proto"; import "types/cosmos/base/v1beta1/coin.proto"; +import "types/tendermint/crypto/proof.proto"; option go_package = "github.com/dymensionxyz/dymint/types/pb/interchain_da"; @@ -16,7 +17,10 @@ message Params { cosmos.base.v1beta1.Coin cost_per_byte = 1 [ (gogoproto.nullable) = false ]; // MaxBlobSize is the hard cap of how many bytes a blob can be. uint32 max_blob_size = 2; - // DisputePeriod is the number of blocks the blob is stored for. + // DisputePeriod is the number of blocks the blob is stored for. In the + // current implementation, the dispute period equals the store time. Meaning, + // a dispute can't be submitted after the dispute period is over because both + // the blob and the metadata are pruned. uint64 dispute_period = 3; } @@ -25,3 +29,17 @@ message BlobMetadata { // BlobHash is the hash of the submitted blob. string blob_hash = 1; } + +// Commitment defines the commitment type used by the InterchainDALayer. +message Commitment { + // ClientID identifies the client_id of the DA chain where the blob was posted. + string client_id = 1; + // BlobHeight identifies the height at which the blob was posted. + uint64 blob_height = 2; + // BlobHash is the hash of the submitted blob. + string blob_hash = 3; + // BlobID is the unique ID of the blob. + uint64 blob_id = 4; + // MerkleProof is a merkle inclusion proof of the blob. + tendermint.crypto.ProofOps merkle_proof = 5; +} diff --git a/types/pb/dalc/dalc.pb.go b/types/pb/dalc/dalc.pb.go index d1ba2a1cf..29fc9377d 100644 --- a/types/pb/dalc/dalc.pb.go +++ b/types/pb/dalc/dalc.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" dymint "github.com/dymensionxyz/dymint/types/pb/dymint" + grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -466,10 +467,10 @@ type DALCServiceClient interface { } type dALCServiceClient struct { - cc *grpc.ClientConn + cc grpc1.ClientConn } -func NewDALCServiceClient(cc *grpc.ClientConn) DALCServiceClient { +func NewDALCServiceClient(cc grpc1.ClientConn) DALCServiceClient { return &dALCServiceClient{cc} } @@ -521,7 +522,7 @@ func (*UnimplementedDALCServiceServer) RetrieveBatches(ctx context.Context, req return nil, status.Errorf(codes.Unimplemented, "method RetrieveBatches not implemented") } -func RegisterDALCServiceServer(s *grpc.Server, srv DALCServiceServer) { +func RegisterDALCServiceServer(s grpc1.Server, srv DALCServiceServer) { s.RegisterService(&_DALCService_serviceDesc, srv) } diff --git a/types/pb/interchain_da/da.pb.go b/types/pb/interchain_da/da.pb.go index 0f7829bca..0efb3d577 100644 --- a/types/pb/interchain_da/da.pb.go +++ b/types/pb/interchain_da/da.pb.go @@ -8,6 +8,7 @@ import ( types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" io "io" math "math" math_bits "math/bits" @@ -31,7 +32,10 @@ type Params struct { CostPerByte types.Coin `protobuf:"bytes,1,opt,name=cost_per_byte,json=costPerByte,proto3" json:"cost_per_byte"` // MaxBlobSize is the hard cap of how many bytes a blob can be. MaxBlobSize uint32 `protobuf:"varint,2,opt,name=max_blob_size,json=maxBlobSize,proto3" json:"max_blob_size,omitempty"` - // DisputePeriod is the number of blocks the blob is stored for. + // DisputePeriod is the number of blocks the blob is stored for. In the + // current implementation, the dispute period equals the store time. Meaning, + // a dispute can't be submitted after the dispute period is over because both + // the blob and the metadata are pruned. DisputePeriod uint64 `protobuf:"varint,3,opt,name=dispute_period,json=disputePeriod,proto3" json:"dispute_period,omitempty"` } @@ -135,36 +139,126 @@ func (m *BlobMetadata) GetBlobHash() string { return "" } +// Commitment defines the commitment type used by the InterchainDALayer. +type Commitment struct { + // ClientID identifies the client_id of the DA chain where the blob was posted. + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + // BlobHeight identifies the height at which the blob was posted. + BlobHeight uint64 `protobuf:"varint,2,opt,name=blob_height,json=blobHeight,proto3" json:"blob_height,omitempty"` + // BlobHash is the hash of the submitted blob. + BlobHash string `protobuf:"bytes,3,opt,name=blob_hash,json=blobHash,proto3" json:"blob_hash,omitempty"` + // BlobID is the unique ID of the blob. + BlobId uint64 `protobuf:"varint,4,opt,name=blob_id,json=blobId,proto3" json:"blob_id,omitempty"` + // MerkleProof is a merkle inclusion proof of the blob. + MerkleProof *crypto.ProofOps `protobuf:"bytes,5,opt,name=merkle_proof,json=merkleProof,proto3" json:"merkle_proof,omitempty"` +} + +func (m *Commitment) Reset() { *m = Commitment{} } +func (m *Commitment) String() string { return proto.CompactTextString(m) } +func (*Commitment) ProtoMessage() {} +func (*Commitment) Descriptor() ([]byte, []int) { + return fileDescriptor_c9a26af1837c1a56, []int{2} +} +func (m *Commitment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Commitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Commitment.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 *Commitment) XXX_Merge(src proto.Message) { + xxx_messageInfo_Commitment.Merge(m, src) +} +func (m *Commitment) XXX_Size() int { + return m.Size() +} +func (m *Commitment) XXX_DiscardUnknown() { + xxx_messageInfo_Commitment.DiscardUnknown(m) +} + +var xxx_messageInfo_Commitment proto.InternalMessageInfo + +func (m *Commitment) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *Commitment) GetBlobHeight() uint64 { + if m != nil { + return m.BlobHeight + } + return 0 +} + +func (m *Commitment) GetBlobHash() string { + if m != nil { + return m.BlobHash + } + return "" +} + +func (m *Commitment) GetBlobId() uint64 { + if m != nil { + return m.BlobId + } + return 0 +} + +func (m *Commitment) GetMerkleProof() *crypto.ProofOps { + if m != nil { + return m.MerkleProof + } + return nil +} + func init() { proto.RegisterType((*Params)(nil), "dymension.interchain_da.Params") proto.RegisterType((*BlobMetadata)(nil), "dymension.interchain_da.BlobMetadata") + proto.RegisterType((*Commitment)(nil), "dymension.interchain_da.Commitment") } func init() { proto.RegisterFile("types/interchain_da/da.proto", fileDescriptor_c9a26af1837c1a56) } var fileDescriptor_c9a26af1837c1a56 = []byte{ - // 325 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xc1, 0x4a, 0xc3, 0x30, - 0x1c, 0xc6, 0x1b, 0x1d, 0xc3, 0x75, 0xd6, 0x43, 0x11, 0x9c, 0x53, 0xea, 0x18, 0x0a, 0x03, 0x21, - 0x61, 0x8a, 0x2f, 0xd0, 0x5d, 0xbc, 0x88, 0xa3, 0xde, 0xbc, 0x94, 0x7f, 0xda, 0xb0, 0x06, 0xd6, - 0xfc, 0x4b, 0x93, 0xc9, 0xba, 0xa7, 0xf0, 0xe8, 0x23, 0xed, 0xb8, 0xa3, 0x27, 0x91, 0xed, 0x45, - 0x24, 0xed, 0x10, 0x76, 0x4b, 0x3e, 0xbe, 0xef, 0x97, 0xf0, 0x73, 0xaf, 0x4d, 0x55, 0x08, 0xcd, - 0xa4, 0x32, 0xa2, 0x4c, 0x32, 0x90, 0x2a, 0x4e, 0x81, 0xa5, 0x40, 0x8b, 0x12, 0x0d, 0xfa, 0x17, - 0x69, 0x95, 0x0b, 0xa5, 0x25, 0x2a, 0x7a, 0xd0, 0xe8, 0x9f, 0xcf, 0x70, 0x86, 0x75, 0x87, 0xd9, - 0x53, 0x53, 0xef, 0xdf, 0x36, 0xb0, 0x04, 0x75, 0x8e, 0x9a, 0x71, 0xd0, 0x82, 0x7d, 0x8c, 0xb9, - 0x30, 0x30, 0x66, 0x09, 0x4a, 0xd5, 0xb4, 0x86, 0x5f, 0xc4, 0x6d, 0x4f, 0xa1, 0x84, 0x5c, 0xfb, - 0x13, 0xd7, 0x4b, 0x50, 0x9b, 0xb8, 0x10, 0x65, 0xcc, 0x2b, 0x23, 0x7a, 0x64, 0x40, 0x46, 0xdd, - 0x87, 0x4b, 0xda, 0x20, 0xa8, 0x45, 0xd0, 0x3d, 0x82, 0x4e, 0x50, 0xaa, 0xb0, 0xb5, 0xfe, 0xb9, - 0x71, 0xa2, 0xae, 0x5d, 0x4d, 0x45, 0x19, 0x56, 0x46, 0xf8, 0x43, 0xd7, 0xcb, 0x61, 0x19, 0xf3, - 0x39, 0xf2, 0x58, 0xcb, 0x95, 0xe8, 0x1d, 0x0d, 0xc8, 0xc8, 0x8b, 0xba, 0x39, 0x2c, 0xc3, 0x39, - 0xf2, 0x37, 0xb9, 0x12, 0xfe, 0x9d, 0x7b, 0x96, 0x4a, 0x5d, 0x2c, 0x8c, 0xb0, 0x6f, 0x49, 0x4c, - 0x7b, 0xc7, 0x03, 0x32, 0x6a, 0x45, 0xde, 0x3e, 0x9d, 0xd6, 0xe1, 0xf0, 0xde, 0x3d, 0xb5, 0x93, - 0x17, 0x61, 0x20, 0x05, 0x03, 0xfe, 0x95, 0xdb, 0xa9, 0xb1, 0x19, 0xe8, 0xac, 0xfe, 0x5b, 0x27, - 0x3a, 0xb1, 0xc1, 0x33, 0xe8, 0x2c, 0x7c, 0x5d, 0x6f, 0x03, 0xb2, 0xd9, 0x06, 0xe4, 0x77, 0x1b, - 0x90, 0xcf, 0x5d, 0xe0, 0x6c, 0x76, 0x81, 0xf3, 0xbd, 0x0b, 0x9c, 0xf7, 0xa7, 0x99, 0x34, 0xd9, - 0x82, 0xd3, 0x04, 0x73, 0xf6, 0x6f, 0x70, 0x59, 0xad, 0xec, 0x45, 0x2a, 0xc3, 0x1a, 0x4d, 0x05, - 0x3f, 0xd4, 0xce, 0xdb, 0xb5, 0x9f, 0xc7, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0xa2, 0x93, - 0xfe, 0x94, 0x01, 0x00, 0x00, + // 443 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0xc1, 0x6e, 0x13, 0x31, + 0x10, 0x86, 0xb3, 0x34, 0x04, 0xea, 0x34, 0x1c, 0x56, 0x48, 0x5d, 0x5a, 0xb4, 0x8d, 0x02, 0x48, + 0x91, 0x90, 0xbc, 0x2a, 0x88, 0x2b, 0x87, 0xe4, 0x42, 0x0f, 0xa8, 0xd1, 0x72, 0xe3, 0xb2, 0xf2, + 0xae, 0x87, 0xac, 0x45, 0xec, 0x59, 0xad, 0xa7, 0x28, 0x9b, 0xa7, 0xe0, 0xc8, 0xe3, 0x70, 0xec, + 0xb1, 0x47, 0x4e, 0x08, 0x25, 0x2f, 0x82, 0x6c, 0x07, 0xaa, 0xdc, 0x3c, 0xbf, 0xbf, 0x99, 0xdf, + 0xf2, 0x3f, 0xec, 0x39, 0x75, 0x0d, 0xd8, 0x4c, 0x19, 0x82, 0xb6, 0xaa, 0x85, 0x32, 0x85, 0x14, + 0x99, 0x14, 0xbc, 0x69, 0x91, 0x30, 0x3e, 0x95, 0x9d, 0x06, 0x63, 0x15, 0x1a, 0x7e, 0x40, 0x9c, + 0x3d, 0x5d, 0xe2, 0x12, 0x3d, 0x93, 0xb9, 0x53, 0xc0, 0xcf, 0x5e, 0x86, 0x61, 0x15, 0x5a, 0x8d, + 0x36, 0x2b, 0x85, 0x85, 0xec, 0xdb, 0x65, 0x09, 0x24, 0x2e, 0xb3, 0x0a, 0x95, 0xd9, 0x53, 0x2f, + 0x02, 0x45, 0x60, 0x24, 0xb4, 0x5a, 0x19, 0xca, 0xaa, 0xb6, 0x6b, 0x08, 0xb3, 0xa6, 0x45, 0xfc, + 0x12, 0xa0, 0xc9, 0x8f, 0x88, 0x0d, 0x16, 0xa2, 0x15, 0xda, 0xc6, 0x73, 0x36, 0xaa, 0xd0, 0x52, + 0xd1, 0x40, 0x5b, 0x94, 0x1d, 0x41, 0x12, 0x8d, 0xa3, 0xe9, 0xf0, 0xcd, 0x33, 0x1e, 0x7c, 0xb8, + 0xf3, 0xe1, 0x7b, 0x1f, 0x3e, 0x47, 0x65, 0x66, 0xfd, 0xdb, 0xdf, 0x17, 0xbd, 0x7c, 0xe8, 0xba, + 0x16, 0xd0, 0xce, 0x3a, 0x82, 0x78, 0xc2, 0x46, 0x5a, 0xac, 0x8b, 0x72, 0x85, 0x65, 0x61, 0xd5, + 0x06, 0x92, 0x07, 0xe3, 0x68, 0x3a, 0xca, 0x87, 0x5a, 0xac, 0x67, 0x2b, 0x2c, 0x3f, 0xa9, 0x0d, + 0xc4, 0xaf, 0xd8, 0x13, 0xa9, 0x6c, 0x73, 0x43, 0xe0, 0xbc, 0x14, 0xca, 0xe4, 0x68, 0x1c, 0x4d, + 0xfb, 0xf9, 0x68, 0xaf, 0x2e, 0xbc, 0x38, 0x79, 0xcd, 0x4e, 0x5c, 0xcb, 0x47, 0x20, 0x21, 0x05, + 0x89, 0xf8, 0x9c, 0x1d, 0xfb, 0xb1, 0xb5, 0xb0, 0xb5, 0x7f, 0xdb, 0x71, 0xfe, 0xd8, 0x09, 0x1f, + 0x84, 0xad, 0x27, 0x3f, 0x23, 0xc6, 0xe6, 0xa8, 0xb5, 0x22, 0x0d, 0x86, 0x1c, 0x5b, 0xad, 0x14, + 0x18, 0x2a, 0x94, 0xfc, 0xc7, 0x06, 0xe1, 0x4a, 0xc6, 0x17, 0x6c, 0x18, 0x06, 0x81, 0x5a, 0xd6, + 0xe4, 0x5f, 0xd8, 0xcf, 0x99, 0x1f, 0xe5, 0x95, 0x43, 0xa7, 0xa3, 0x43, 0xa7, 0xf8, 0x94, 0x3d, + 0xf2, 0x97, 0x4a, 0x26, 0x7d, 0xdf, 0x39, 0x70, 0xe5, 0x95, 0x8c, 0xdf, 0xb3, 0x13, 0x0d, 0xed, + 0xd7, 0x15, 0x14, 0xfe, 0x83, 0x93, 0x87, 0xfe, 0xfb, 0xce, 0xf9, 0x7d, 0x00, 0x3c, 0x04, 0xc0, + 0x17, 0xee, 0xfe, 0xba, 0xb1, 0xf9, 0x30, 0x34, 0xf8, 0x7a, 0x76, 0x7d, 0xbb, 0x4d, 0xa3, 0xbb, + 0x6d, 0x1a, 0xfd, 0xd9, 0xa6, 0xd1, 0xf7, 0x5d, 0xda, 0xbb, 0xdb, 0xa5, 0xbd, 0x5f, 0xbb, 0xb4, + 0xf7, 0xf9, 0xdd, 0x52, 0x51, 0x7d, 0x53, 0xf2, 0x0a, 0x75, 0xf6, 0x7f, 0x53, 0xd6, 0xdd, 0xc6, + 0x15, 0x2e, 0xd7, 0x10, 0x74, 0x53, 0x1e, 0xae, 0x57, 0x39, 0xf0, 0x11, 0xbf, 0xfd, 0x1b, 0x00, + 0x00, 0xff, 0xff, 0xa6, 0x3a, 0x37, 0x27, 0x7c, 0x02, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -240,6 +334,65 @@ func (m *BlobMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Commitment) 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 *Commitment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Commitment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MerkleProof != nil { + { + size, err := m.MerkleProof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDa(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.BlobId != 0 { + i = encodeVarintDa(dAtA, i, uint64(m.BlobId)) + i-- + dAtA[i] = 0x20 + } + if len(m.BlobHash) > 0 { + i -= len(m.BlobHash) + copy(dAtA[i:], m.BlobHash) + i = encodeVarintDa(dAtA, i, uint64(len(m.BlobHash))) + i-- + dAtA[i] = 0x1a + } + if m.BlobHeight != 0 { + i = encodeVarintDa(dAtA, i, uint64(m.BlobHeight)) + i-- + dAtA[i] = 0x10 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintDa(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintDa(dAtA []byte, offset int, v uint64) int { offset -= sovDa(v) base := offset @@ -281,6 +434,33 @@ func (m *BlobMetadata) Size() (n int) { return n } +func (m *Commitment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovDa(uint64(l)) + } + if m.BlobHeight != 0 { + n += 1 + sovDa(uint64(m.BlobHeight)) + } + l = len(m.BlobHash) + if l > 0 { + n += 1 + l + sovDa(uint64(l)) + } + if m.BlobId != 0 { + n += 1 + sovDa(uint64(m.BlobId)) + } + if m.MerkleProof != nil { + l = m.MerkleProof.Size() + n += 1 + l + sovDa(uint64(l)) + } + return n +} + func sovDa(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -490,6 +670,194 @@ func (m *BlobMetadata) Unmarshal(dAtA []byte) error { } return nil } +func (m *Commitment) 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 ErrIntOverflowDa + } + 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: Commitment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Commitment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDa + } + 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 ErrInvalidLengthDa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlobHeight", wireType) + } + m.BlobHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlobHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlobHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDa + } + 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 ErrInvalidLengthDa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlobHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlobId", wireType) + } + m.BlobId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlobId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MerkleProof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDa + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MerkleProof == nil { + m.MerkleProof = &crypto.ProofOps{} + } + if err := m.MerkleProof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipDa(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/types/pb/interchain_da/query.pb.go b/types/pb/interchain_da/query.pb.go index f53fb5aab..31587ee8a 100644 --- a/types/pb/interchain_da/query.pb.go +++ b/types/pb/interchain_da/query.pb.go @@ -8,6 +8,7 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -266,10 +267,10 @@ type QueryClient interface { } type queryClient struct { - cc *grpc.ClientConn + cc grpc1.ClientConn } -func NewQueryClient(cc *grpc.ClientConn) QueryClient { +func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } @@ -310,7 +311,7 @@ func (*UnimplementedQueryServer) Blob(ctx context.Context, req *QueryBlobRequest return nil, status.Errorf(codes.Unimplemented, "method Blob not implemented") } -func RegisterQueryServer(s *grpc.Server, srv QueryServer) { +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } From c8a600fe349228c075da1d52b8c4fa8baf403e7f Mon Sep 17 00:00:00 2001 From: keruch Date: Tue, 25 Jun 2024 10:24:09 +0200 Subject: [PATCH 04/12] feat(da): scaffolding intechain DA provider --- da/da.go | 12 +++++--- da/interchain/config.go | 20 ++++++++++++ da/interchain/interchain.go | 61 +++++++++++++++++++++++++++++++++++++ da/registry/registry.go | 9 +++--- 4 files changed, 93 insertions(+), 9 deletions(-) create mode 100644 da/interchain/config.go create mode 100644 da/interchain/interchain.go diff --git a/da/da.go b/da/da.go index 2f3d7e0ae..7e5545c42 100644 --- a/da/da.go +++ b/da/da.go @@ -8,9 +8,10 @@ import ( "github.com/celestiaorg/celestia-openrpc/types/blob" "github.com/cometbft/cometbft/crypto/merkle" + "github.com/tendermint/tendermint/libs/pubsub" + "github.com/dymensionxyz/dymint/store" "github.com/dymensionxyz/dymint/types" - "github.com/tendermint/tendermint/libs/pubsub" ) // StatusCode is a type for DA layer return status. @@ -37,10 +38,11 @@ type Client string // Data availability clients const ( - Mock Client = "mock" - Grpc Client = "grpc" - Celestia Client = "celestia" - Avail Client = "avail" + Mock Client = "mock" + Grpc Client = "grpc" + Celestia Client = "celestia" + Avail Client = "avail" + Interchain Client = "interchain" ) // Option is a function that sets a parameter on the da layer. diff --git a/da/interchain/config.go b/da/interchain/config.go new file mode 100644 index 000000000..70a27c5ca --- /dev/null +++ b/da/interchain/config.go @@ -0,0 +1,20 @@ +package interchain + +import "github.com/celestiaorg/celestia-openrpc/types/sdk" + +type ChainConfig struct { + ChainID string // The chain ID of the DA chain + ClientID string // This is the IBC client ID on Dymension hub for the DA chain + ChainParams ChainParams // The params of the DA chain +} + +type ChainParams struct { + CostPerByte sdk.Coin // Calculate the fees needed to pay to submit the blob + MaxBlobSize uint32 // Max size of blobs accepted by the chain +} + +// DefaultChainConfig returns the default config of the test chain implemented in the interchain-da repo: +// https://github.com/dymensionxyz/interchain-da +func DefaultChainConfig() ChainConfig { + return ChainConfig{} +} diff --git a/da/interchain/interchain.go b/da/interchain/interchain.go new file mode 100644 index 000000000..48e75c302 --- /dev/null +++ b/da/interchain/interchain.go @@ -0,0 +1,61 @@ +package interchain + +import ( + "github.com/tendermint/tendermint/libs/pubsub" + "google.golang.org/grpc" + + "github.com/dymensionxyz/dymint/da" + "github.com/dymensionxyz/dymint/store" + "github.com/dymensionxyz/dymint/types" +) + +// DataAvailabilityLayerClient is a client for DA-provider blockchains supporting the interchain-da module. +type DataAvailabilityLayerClient struct { + logger types.Logger + + pubsubServer *pubsub.Server + + chainConfig ChainConfig + grpc grpc.ClientConn // grpc connection to the DA chain + encodingConfig interface{} // The DA chain's encoding config TODO: come up with the proper type + + synced chan struct{} +} + +var ( + _ da.DataAvailabilityLayerClient = &DataAvailabilityLayerClient{} + _ da.BatchRetriever = &DataAvailabilityLayerClient{} +) + +func (c *DataAvailabilityLayerClient) Init(config []byte, _ *pubsub.Server, _ store.KV, logger types.Logger, options ...da.Option) error { + panic("implement me") +} + +func (c *DataAvailabilityLayerClient) Start() error { + panic("implement me") +} + +func (c *DataAvailabilityLayerClient) Stop() error { + panic("implement me") +} + +// Synced returns channel for on sync event +func (c *DataAvailabilityLayerClient) Synced() <-chan struct{} { + return c.synced +} + +func (c *DataAvailabilityLayerClient) GetClientType() da.Client { + return da.Interchain +} + +func (c *DataAvailabilityLayerClient) SubmitBatch(batch *types.Batch) da.ResultSubmitBatch { + panic("implement me") +} + +func (c *DataAvailabilityLayerClient) CheckBatchAvailability(daMetaData *da.DASubmitMetaData) da.ResultCheckBatch { + panic("implement me") +} + +func (c *DataAvailabilityLayerClient) RetrieveBatches(daMetaData *da.DASubmitMetaData) da.ResultRetrieveBatch { + panic("implement me") +} diff --git a/da/registry/registry.go b/da/registry/registry.go index b520c41c9..1006b103b 100644 --- a/da/registry/registry.go +++ b/da/registry/registry.go @@ -10,10 +10,11 @@ import ( // this is a central registry for all Data Availability Layer Clients var clients = map[string]func() da.DataAvailabilityLayerClient{ - "mock": func() da.DataAvailabilityLayerClient { return &local.DataAvailabilityLayerClient{} }, - "grpc": func() da.DataAvailabilityLayerClient { return &grpc.DataAvailabilityLayerClient{} }, - "celestia": func() da.DataAvailabilityLayerClient { return &celestia.DataAvailabilityLayerClient{} }, - "avail": func() da.DataAvailabilityLayerClient { return &avail.DataAvailabilityLayerClient{} }, + "mock": func() da.DataAvailabilityLayerClient { return &local.DataAvailabilityLayerClient{} }, + "grpc": func() da.DataAvailabilityLayerClient { return &grpc.DataAvailabilityLayerClient{} }, + "celestia": func() da.DataAvailabilityLayerClient { return &celestia.DataAvailabilityLayerClient{} }, + "avail": func() da.DataAvailabilityLayerClient { return &avail.DataAvailabilityLayerClient{} }, + "interchain": func() da.DataAvailabilityLayerClient { return &avail.DataAvailabilityLayerClient{} }, } // GetClient returns client identified by name. From 5a888cf862918325f8b2947b6b59cf35b4e8b34a Mon Sep 17 00:00:00 2001 From: keruch Date: Wed, 26 Jun 2024 20:07:05 +0200 Subject: [PATCH 05/12] feat(da): scaffolding intechain DA provider 2 --- da/interchain/chain_client.go | 28 ++++++ da/interchain/config.go | 34 ++++--- da/interchain/interchain.go | 170 ++++++++++++++++++++++++++++++---- go.mod | 117 +++++++++++------------ go.sum | 67 ++++++++++++++ 5 files changed, 328 insertions(+), 88 deletions(-) create mode 100644 da/interchain/chain_client.go diff --git a/da/interchain/chain_client.go b/da/interchain/chain_client.go new file mode 100644 index 000000000..e63e743bc --- /dev/null +++ b/da/interchain/chain_client.go @@ -0,0 +1,28 @@ +package interchain + +import ( + sdkclient "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + sdktypes "github.com/cosmos/cosmos-sdk/types" + "github.com/dymensionxyz/cosmosclient/cosmosclient" + "github.com/ignite/cli/ignite/pkg/cosmosaccount" +) + +type DAClient interface { + Context() sdkclient.Context + BroadcastTx(accountName string, msgs ...sdktypes.Msg) (cosmosclient.Response, error) +} + +func getCosmosClientOptions(config DAConfig) []cosmosclient.Option { + options := []cosmosclient.Option{ + cosmosclient.WithAddressPrefix(config.AddressPrefix), + cosmosclient.WithBroadcastMode(flags.BroadcastSync), + cosmosclient.WithNodeAddress(config.NodeAddress), + cosmosclient.WithFees(config.GasFees), + cosmosclient.WithGasLimit(config.GasLimit), + cosmosclient.WithGasPrices(config.GasPrices), + cosmosclient.WithKeyringBackend(cosmosaccount.KeyringBackend(config.KeyringBackend)), + cosmosclient.WithHome(config.KeyringHomeDir), + } + return options +} diff --git a/da/interchain/config.go b/da/interchain/config.go index 70a27c5ca..89a21b3b5 100644 --- a/da/interchain/config.go +++ b/da/interchain/config.go @@ -1,20 +1,26 @@ package interchain -import "github.com/celestiaorg/celestia-openrpc/types/sdk" +import ( + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + interchaindatypes "github.com/dymensionxyz/interchain-da/x/interchain_da/types" +) -type ChainConfig struct { - ChainID string // The chain ID of the DA chain - ClientID string // This is the IBC client ID on Dymension hub for the DA chain - ChainParams ChainParams // The params of the DA chain +type DAConfig struct { + ChainID string `mapstructure:"chain_id"` // The chain ID of the DA chain + ClientID string `mapstructure:"client_id"` // This is the IBC client ID on Dymension hub for the DA chain + KeyringBackend string `mapstructure:"keyring_backend"` + KeyringHomeDir string `mapstructure:"keyring_home_dir"` + AddressPrefix string `mapstructure:"da_address_prefix"` + AccountName string `mapstructure:"da_account_name"` + NodeAddress string `mapstructure:"da_node_address"` + GasLimit uint64 `mapstructure:"da_gas_limit"` + GasPrices string `mapstructure:"da_gas_prices"` + GasFees string `mapstructure:"da_gas_fees"` + ChainParams interchaindatypes.Params `mapstructure:"chain_params"` // The params of the DA chain } -type ChainParams struct { - CostPerByte sdk.Coin // Calculate the fees needed to pay to submit the blob - MaxBlobSize uint32 // Max size of blobs accepted by the chain -} - -// DefaultChainConfig returns the default config of the test chain implemented in the interchain-da repo: -// https://github.com/dymensionxyz/interchain-da -func DefaultChainConfig() ChainConfig { - return ChainConfig{} +type EncodingConfig interface { + TxConfig() client.TxConfig + Codec() codec.Codec } diff --git a/da/interchain/interchain.go b/da/interchain/interchain.go index 48e75c302..018b35743 100644 --- a/da/interchain/interchain.go +++ b/da/interchain/interchain.go @@ -1,42 +1,106 @@ package interchain import ( + "context" + "encoding/json" + "fmt" + + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/dymensionxyz/cosmosclient/cosmosclient" + interchaindatypes "github.com/dymensionxyz/interchain-da/x/interchain_da/types" "github.com/tendermint/tendermint/libs/pubsub" - "google.golang.org/grpc" "github.com/dymensionxyz/dymint/da" + "github.com/dymensionxyz/dymint/settlement/dymension" "github.com/dymensionxyz/dymint/store" "github.com/dymensionxyz/dymint/types" ) +var ( + _ da.DataAvailabilityLayerClient = &DataAvailabilityLayerClient{} + _ da.BatchRetriever = &DataAvailabilityLayerClient{} +) + // DataAvailabilityLayerClient is a client for DA-provider blockchains supporting the interchain-da module. type DataAvailabilityLayerClient struct { logger types.Logger + ctx context.Context + cancel context.CancelFunc + cdc codec.Codec + synced chan struct{} - pubsubServer *pubsub.Server - - chainConfig ChainConfig - grpc grpc.ClientConn // grpc connection to the DA chain - encodingConfig interface{} // The DA chain's encoding config TODO: come up with the proper type + pubsubServer *pubsub.Server - synced chan struct{} + daClient DAClient + daConfig DAConfig + encodingConfig EncodingConfig // The DA chain's encoding config } -var ( - _ da.DataAvailabilityLayerClient = &DataAvailabilityLayerClient{} - _ da.BatchRetriever = &DataAvailabilityLayerClient{} -) +// Init is called once. It reads the DA client configuration and initializes resources for the interchain DA provider. +func (c *DataAvailabilityLayerClient) Init(rawConfig []byte, server *pubsub.Server, _ store.KV, logger types.Logger, options ...da.Option) error { + var config DAConfig + err := json.Unmarshal(rawConfig, &config) + if err != nil { + return fmt.Errorf("invalid config: %w", err) + } -func (c *DataAvailabilityLayerClient) Init(config []byte, _ *pubsub.Server, _ store.KV, logger types.Logger, options ...da.Option) error { - panic("implement me") + interfaceRegistry := cdctypes.NewInterfaceRegistry() + cryptocodec.RegisterInterfaces(interfaceRegistry) + interchaindatypes.RegisterInterfaces(interfaceRegistry) + cdc := codec.NewProtoCodec(interfaceRegistry) + + ctx, cancel := context.WithCancel(context.Background()) + + c.logger = logger + c.ctx = ctx + c.cancel = cancel + c.cdc = cdc + c.synced = make(chan struct{}) + c.pubsubServer = server + c.daConfig = config + + client, err := cosmosclient.New(ctx, getCosmosClientOptions(config)..., ) + if err != nil { + return fmt.Errorf("can't create DA layer client: %w", err) + } + c.daClient = client + + for _, apply := range options { + apply(c) + } + + return nil } +// Start is called once, after Init. It starts the operation of DataAvailabilityLayerClient, and Dymint will start submitting batches to the provider. +// It fetches the latest interchain module parameters and sets up a subscription to receive updates when the provider updates these parameters. +// This ensures that the client is always up-to-date. func (c *DataAvailabilityLayerClient) Start() error { - panic("implement me") + // Get the module parameters from the chain + c.daConfig.ChainParams = c.grpc.GetModuleParams() + + // Get the connectionID from the dymension hub for the da chain + c.daConfig.ClientID = dymension.(c.chainConfig.ChainID) + + // Setup a subscription to event EventUpdateParams + c.grpc.Subscribe(func() { + // This event is thrown at the end of the block when the module params are updated + if block.event == EventUpdateParams { + // when the chain params are updated, update the client config to reflect the same + da.chainConfig.chainParams = block.event.new_params + } + }) } +// Stop is called once, when DataAvailabilityLayerClient is no longer needed. func (c *DataAvailabilityLayerClient) Stop() error { - panic("implement me") + c.daClient.Close() + c.pubsubServer.Stop() + c.cancel() } // Synced returns channel for on sync event @@ -49,7 +113,81 @@ func (c *DataAvailabilityLayerClient) GetClientType() da.Client { } func (c *DataAvailabilityLayerClient) SubmitBatch(batch *types.Batch) da.ResultSubmitBatch { - panic("implement me") + blob, err := batch.MarshalBinary() + if err != nil { + return da.ResultSubmitBatch{ + BaseResult: da.BaseResult{Code: da.StatusError, Message: err.Error(), Error: err}, + } + } + + if len(blob) > int(c.daConfig.ChainParams.MaxBlobSize) { + return da.ResultSubmitBatch{ + BaseResult: da.BaseResult{Code: da.StatusError, Message: err.Error(), Error: err}, + } + } + + // submit the blob to da chain + + // calculate the da fees to pay + // feesToPay = params.CostPerByte * len(blob) + feesToPay := sdk.NewCoin(c.daConfig.ChainParams.CostPerByte.Denom, c.daConfig.ChainParams.CostPerByte.Amount.MulRaw(int64(len(blob)))) + + // generate the submit blob msg + + msg := interchaindatypes.MsgSubmitBlob{ + Creator: "", + Blob: blob, + Fees: feesToPay, + } + // use msg placeholder for now not to import the interchain-da module directly + msgP := new(sdk.Msg) + msg := *msgP + + // wrap the msg into a tx + txBuilder := c.encodingConfig.NewTxBuilder() + err := txBuilder.SetMsgs(msg) + if err != nil { + return da.ResultSubmitBatch{ + BaseResult: da.BaseResult{Code: da.StatusError, Message: err.Error(), Error: err}, + } + } + + ctx := context.Background() + // sign and broadcast the tx + txBytes, err := c.encodingConfig.TxEncoder()(txBuilder.GetTx()) + if err != nil { + return da.ResultSubmitBatch{ + BaseResult: da.BaseResult{Code: da.StatusError, Message: err.Error(), Error: err}, + } + } + + txHash, err := c.txClient.BroadcastTx(ctx, &tx.BroadcastTxRequest{ + TxBytes: txBytes, + Mode: tx.BroadcastMode_BROADCAST_MODE_SYNC, + }) + if err != nil { + return da.ResultSubmitBatch{ + BaseResult: da.BaseResult{Code: da.StatusError, Message: err.Error(), Error: err}, + } + } + + c.txClient.GetTx(ctx, &tx.GetTxRequest{ + Hash: txHash, + }) + + // get the tx details + txRes, err = c.grpc.GetTxResponse(txhash) + blobId, blobHash, height = parse(txRes) + + // trigger ibc stateupdate - optional (?) + // other ibc interactions would trigger this anyway. But until then, inclusion cannot be verified. + // better to trigger a stateupdate now imo + dymension.tx.ibc.client.updatestate(c.daConfig.clientID) // could import the go relayer and execute their funcs + + return ResultSubmitBatch{ + BaseResult: BaseResult("success"), + SubmitMetaData: ("interchain", height, blobId, blobHash, c.daConfig.clientID, ) + } } func (c *DataAvailabilityLayerClient) CheckBatchAvailability(daMetaData *da.DASubmitMetaData) da.ResultCheckBatch { diff --git a/go.mod b/go.mod index 798fefc67..dddcb60b4 100644 --- a/go.mod +++ b/go.mod @@ -9,13 +9,13 @@ require ( github.com/celestiaorg/celestia-openrpc v0.4.0-rc.1 github.com/celestiaorg/go-cnc v0.4.2 github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.12 - github.com/cosmos/cosmos-sdk v0.46.16 + github.com/cosmos/cosmos-sdk v0.50.6 github.com/dgraph-io/badger/v3 v3.2103.3 github.com/dymensionxyz/cosmosclient v0.4.2-beta github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240411195658-f7cd96f53b56 github.com/dymensionxyz/gerr-cosmos v0.1.2 - github.com/go-kit/kit v0.12.0 - github.com/gofrs/uuid v4.3.0+incompatible + github.com/go-kit/kit v0.13.0 + github.com/gofrs/uuid v4.4.0+incompatible github.com/gogo/protobuf v1.3.3 github.com/google/orderedcode v0.0.1 github.com/google/uuid v1.6.0 @@ -29,21 +29,21 @@ require ( github.com/libp2p/go-libp2p-kad-dht v0.25.2 github.com/libp2p/go-libp2p-pubsub v0.9.3 github.com/multiformats/go-multiaddr v0.12.2 - github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/client_golang v1.19.1 github.com/rs/cors v1.9.0 github.com/spf13/cobra v1.8.0 - github.com/spf13/viper v1.15.0 + github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 github.com/tendermint/tendermint v0.34.29 go.uber.org/multierr v1.11.0 - golang.org/x/net v0.24.0 + golang.org/x/net v0.25.0 gonum.org/v1/gonum v0.13.0 google.golang.org/grpc v1.64.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 ) require ( - filippo.io/edwards25519 v1.0.0-rc.1 // indirect + filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect @@ -53,26 +53,26 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd v0.23.4 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect github.com/celestiaorg/go-fraud v0.2.0 // indirect github.com/celestiaorg/go-header v0.4.1 // indirect github.com/celestiaorg/merkletree v0.0.0-20210714075610-a84dc3ddbbe4 // indirect github.com/celestiaorg/nmt v0.20.0 github.com/celestiaorg/rsmt2d v0.11.0 // indirect - github.com/cometbft/cometbft v0.37.2 - github.com/cometbft/cometbft-db v0.11.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect - github.com/cosmos/gogoproto v1.4.11 // indirect + github.com/cometbft/cometbft v0.38.7 + github.com/cometbft/cometbft-db v0.12.0 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect + github.com/cosmos/gogoproto v1.4.12 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect github.com/deckarep/golang-set v1.8.0 // indirect github.com/decred/base58 v1.0.4 // indirect github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/ethereum/go-ethereum v1.12.0 // indirect github.com/filecoin-project/go-jsonrpc v0.3.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -91,7 +91,7 @@ require ( github.com/quic-go/webtransport-go v0.6.0 // indirect github.com/satori/go.uuid v1.2.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/tidwall/btree v1.5.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/tidwall/gjson v1.14.4 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect @@ -99,66 +99,66 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/vedhavyas/go-subkey v1.0.3 // indirect github.com/zondax/ledger-go v0.14.3 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/dig v1.17.1 // indirect go.uber.org/fx v1.20.1 // indirect - golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) require ( github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/containerd/cgroups v1.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cosmos/iavl v0.19.6 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect + github.com/cosmos/iavl v1.1.2 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/elastic/gosigar v0.14.2 // indirect github.com/flynn/noise v1.1.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/flatbuffers v2.0.8+incompatible // indirect + github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/gopacket v1.1.19 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect + github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect @@ -169,7 +169,7 @@ require ( github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.17.6 // indirect + github.com/klauspost/compress v1.17.8 // indirect github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/koron/go-ssdp v0.0.4 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect @@ -205,37 +205,37 @@ require ( github.com/opencontainers/runtime-spec v1.2.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect - github.com/pelletier/go-toml/v2 v2.0.7 // indirect - github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/petermattis/goid v0.0.0-20240503122002-4b96552b8156 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/polydawn/refmt v0.89.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/procfs v0.15.0 // indirect github.com/raulk/go-watchdog v1.3.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.9.3 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b // indirect github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect github.com/zondax/hid v0.9.2 // indirect - go.etcd.io/bbolt v1.3.8 // indirect + go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto v0.0.0-20240521202816-d264139d666e // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -244,7 +244,7 @@ require ( require ( cosmossdk.io/math v1.3.0 // indirect - github.com/DataDog/zstd v1.5.2 // indirect + github.com/DataDog/zstd v1.5.5 // indirect github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/btcsuite/btcd/btcutil v1.1.3 // indirect @@ -257,21 +257,22 @@ require ( github.com/cosmos/ibc-go/v6 v6.2.1 // indirect github.com/danwt/gerr v0.1.5 // indirect github.com/decred/dcrd/dcrec/edwards v1.0.0 // indirect + github.com/dymensionxyz/interchain-da v0.0.1 // indirect github.com/evmos/evmos/v12 v12.1.6 // indirect - github.com/getsentry/sentry-go v0.18.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f // indirect github.com/holiman/uint256 v1.2.2 // indirect github.com/ipfs/boxo v0.10.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/libp2p/go-libp2p-routing-helpers v0.7.2 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/common v0.47.0 // indirect + github.com/prometheus/common v0.53.0 // indirect github.com/regen-network/cosmos-proto v0.3.1 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/tools v0.18.0 // indirect + golang.org/x/tools v0.21.0 // indirect ) replace ( diff --git a/go.sum b/go.sum index 7f6079248..4848b1fe6 100644 --- a/go.sum +++ b/go.sum @@ -60,6 +60,7 @@ dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1 dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= @@ -74,6 +75,7 @@ github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= @@ -132,6 +134,7 @@ github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v5 github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcec/v2 v2.3.3/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= @@ -175,6 +178,7 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= @@ -207,8 +211,10 @@ github.com/cometbft/cometbft v0.34.28 h1:gwryf55P1SWMUP4nOXpRVI2D0yPoYEzN+IBqmRB github.com/cometbft/cometbft v0.34.28/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft v0.38.7/go.mod h1:HIyf811dFMI73IE0F7RrnY/Fr+d1+HuJAgtkEpQjCMY= github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= +github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= @@ -227,21 +233,26 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/cosmos-sdk v0.46.16 h1:RVGv1+RulLZeNyfCaPZrZtv0kY7ZZNAI6JGpub0Uh6o= github.com/cosmos/cosmos-sdk v0.46.16/go.mod h1:05U50tAsOzQ8JOAePshJCbJQw5ib1YJR6IXcqyVI1Xg= +github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.6 h1:XY78yEeNPrEYyNCKlqr9chrwoeSDJ0bV2VjocTk//OU= github.com/cosmos/iavl v0.19.6/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= +github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ibc-go/v6 v6.2.1 h1:NiaDXTRhKwf3n9kELD4VRIe5zby1yk1jBvaz9tXTQ6k= github.com/cosmos/ibc-go/v6 v6.2.1/go.mod h1:XLsARy4Y7+GtAqzMcxNdlQf6lx+ti1e8KcMGv5NIK7A= github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -257,6 +268,7 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= @@ -273,6 +285,7 @@ github.com/decred/dcrd/dcrec/edwards v1.0.0/go.mod h1:HblVh1OfMt7xSxUL1ufjToaEvp github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= @@ -302,8 +315,10 @@ github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7/go.mod h1:yRkwfj0CBpOG github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac h1:opbrjaN/L8gg6Xh5D04Tem+8xVcz6ajZlGCs49mQgyg= github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/dymensionxyz/cosmosclient v0.4.2-beta h1:sokBefcN1tIOlUKmB8Q2E9XMJ93LueqtFThiM/kA4DI= github.com/dymensionxyz/cosmosclient v0.4.2-beta/go.mod h1:GQQu3ITEjWfi5ULR2B6X2i2YZNennY1yzcT5qdL4MGI= github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240411195658-f7cd96f53b56 h1:cmpJYdRviuUfmlJdHrcAND8Jd6JIY4rp63bWAQzPr54= @@ -314,6 +329,8 @@ github.com/dymensionxyz/gerr-cosmos v0.1.2 h1:4NiB9psF6swnWTCDYnHgHKtVEaRHuuNRuq github.com/dymensionxyz/gerr-cosmos v0.1.2/go.mod h1:tXIhx3WdryAnYRISC3Weh+2xeXwaf1l4Yb1zjDUsT7k= github.com/dymensionxyz/go-libp2p-pubsub v0.0.0-20240513081713-3ecd83c19ea2 h1:5FMEOpX5OuoRfwwjjA+LxRJXoDT0fFvg8/rlat7z8bE= github.com/dymensionxyz/go-libp2p-pubsub v0.0.0-20240513081713-3ecd83c19ea2/go.mod h1:1OxbaT/pFRO5h+Dpze8hdHQ63R0ke55XTs6b6NwLLkw= +github.com/dymensionxyz/interchain-da v0.0.1 h1:ipxG193G31bQu1bGBnjvemjaA+vQ5alVcVGSHsd/rZM= +github.com/dymensionxyz/interchain-da v0.0.1/go.mod h1:tbFfWeU8bFvzCFXEwicCjOWO0xwr6ChKbbW+yOHt+4s= github.com/dymensionxyz/rpc v1.3.1 h1:7EXWIobaBes5zldRvTIg7TmNsEKjicrWA/OjCc0NaGs= github.com/dymensionxyz/rpc v1.3.1/go.mod h1:f+WpX8ysy8wt95iGc6auYlHcnHj2bUkhiRVkkKNys8c= github.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= @@ -351,10 +368,12 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -368,15 +387,20 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -402,11 +426,13 @@ github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gofrs/uuid v4.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -452,6 +478,7 @@ github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl76 github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -522,6 +549,7 @@ github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZH github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -557,12 +585,14 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvHgwfx2Vm4= github.com/hashicorp/golang-lru/v2 v2.0.5/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 h1:aSVUgRRRtOrZOC1fYmY9gV0e9z/Iu+xNVSASWjsuyGU= github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3/go.mod h1:5PC6ZNPde8bBqU/ewGZig35+UIZtw9Ytxez8/q5ZyFE= +github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.2 h1:TXKcSGc2WaxPD2+bmzAsVthL4+pEN0YwXcL5qED83vk= @@ -628,6 +658,7 @@ github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6 github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/klauspost/reedsolomon v1.11.8 h1:s8RpUW5TK4hjr+djiOpbZJB4ksx+TdYbRH7vHQpwPOY= @@ -682,6 +713,7 @@ github.com/libp2p/go-yamux/v4 v4.0.1 h1:FfDR4S1wj6Bw2Pqbc8Uz7pCxeRBPbwsBbEdfwiCy github.com/libp2p/go-yamux/v4 v4.0.1/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4= github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.9.1/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -811,9 +843,11 @@ github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhM github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20240503122002-4b96552b8156/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= @@ -827,6 +861,7 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4= github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -835,23 +870,27 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= github.com/quic-go/quic-go v0.42.0 h1:uSfdap0eveIl8KXnipv9K7nlwZ5IqLlYOpJ58u5utpM= @@ -875,6 +914,7 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= @@ -929,9 +969,11 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2 github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= @@ -944,6 +986,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -962,10 +1005,12 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= @@ -976,6 +1021,7 @@ github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b h1:Y3ZPG6gdDCAV github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b/go.mod h1:ADqbS9NOSnBRK9R2RtYC61CdsHmVMD/yXAzcMuPexbU= github.com/tidwall/btree v1.5.0 h1:iV0yVY/frd7r6qGBXfEYs7DH0gTDgrKTrDjS7xt/IyQ= github.com/tidwall/btree v1.5.0/go.mod h1:LGm8L/DZjPLmeWGjv5kFrY8dL4uVhMmzmmLYmsObdKE= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -1031,6 +1077,7 @@ gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40 h1:dizWJqTWj gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40/go.mod h1:rOnSnoRyxMI3fe/7KIbVcsHRGxe30OONv8dEgo+vCfA= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.4.0-alpha.1/go.mod h1:S/Z/Nm3iuOnyO1W4XuFfPci51Gj6F1Hv0z8hisyYYOw= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -1042,10 +1089,13 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -1055,6 +1105,7 @@ go.uber.org/dig v1.17.1 h1:Tga8Lz8PcYNsWsyHMZ1Vm0OQOUaJNDyvPImgbAu9YSc= go.uber.org/dig v1.17.1/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= go.uber.org/fx v1.20.1 h1:zVwVQGS8zYvhh9Xxcu4w1M6ESyeMzebzj2NbSayZ4Mk= go.uber.org/fx v1.20.1/go.mod h1:iSYNbHf2y55acNCwCXKx7LbWb5WG1Bnue5RDXz1OREg= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -1068,6 +1119,7 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= @@ -1093,6 +1145,7 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1105,6 +1158,7 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1132,6 +1186,7 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1181,6 +1236,7 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1208,6 +1264,7 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1267,6 +1324,7 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1277,10 +1335,12 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1291,6 +1351,7 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1318,6 +1379,7 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1356,6 +1418,7 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1445,10 +1508,13 @@ google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= +google.golang.org/genproto v0.0.0-20240521202816-d264139d666e/go.mod h1:gOvX/2dWTqh+u3+IHjFeCxinlz5AZ5qhOufbQPub/dE= google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e/go.mod h1:LweJcLbyVij6rCex8YunD8DYR5VDonap/jYl3ZRxcIU= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1485,6 +1551,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 1a37f92b09bea4b6905fafd0a6bff06c6ad537ab Mon Sep 17 00:00:00 2001 From: keruch Date: Thu, 27 Jun 2024 10:44:43 +0200 Subject: [PATCH 06/12] reverted go.mod update --- da/interchain/config.go | 1 - da/interchain/interchain.go | 1 - go.mod | 117 ++++++++++++++++++------------------ go.sum | 67 --------------------- 4 files changed, 58 insertions(+), 128 deletions(-) diff --git a/da/interchain/config.go b/da/interchain/config.go index 89a21b3b5..e2a27f2e0 100644 --- a/da/interchain/config.go +++ b/da/interchain/config.go @@ -3,7 +3,6 @@ package interchain import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" - interchaindatypes "github.com/dymensionxyz/interchain-da/x/interchain_da/types" ) type DAConfig struct { diff --git a/da/interchain/interchain.go b/da/interchain/interchain.go index 018b35743..ebc6a7521 100644 --- a/da/interchain/interchain.go +++ b/da/interchain/interchain.go @@ -11,7 +11,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/dymensionxyz/cosmosclient/cosmosclient" - interchaindatypes "github.com/dymensionxyz/interchain-da/x/interchain_da/types" "github.com/tendermint/tendermint/libs/pubsub" "github.com/dymensionxyz/dymint/da" diff --git a/go.mod b/go.mod index dddcb60b4..798fefc67 100644 --- a/go.mod +++ b/go.mod @@ -9,13 +9,13 @@ require ( github.com/celestiaorg/celestia-openrpc v0.4.0-rc.1 github.com/celestiaorg/go-cnc v0.4.2 github.com/centrifuge/go-substrate-rpc-client/v4 v4.0.12 - github.com/cosmos/cosmos-sdk v0.50.6 + github.com/cosmos/cosmos-sdk v0.46.16 github.com/dgraph-io/badger/v3 v3.2103.3 github.com/dymensionxyz/cosmosclient v0.4.2-beta github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240411195658-f7cd96f53b56 github.com/dymensionxyz/gerr-cosmos v0.1.2 - github.com/go-kit/kit v0.13.0 - github.com/gofrs/uuid v4.4.0+incompatible + github.com/go-kit/kit v0.12.0 + github.com/gofrs/uuid v4.3.0+incompatible github.com/gogo/protobuf v1.3.3 github.com/google/orderedcode v0.0.1 github.com/google/uuid v1.6.0 @@ -29,21 +29,21 @@ require ( github.com/libp2p/go-libp2p-kad-dht v0.25.2 github.com/libp2p/go-libp2p-pubsub v0.9.3 github.com/multiformats/go-multiaddr v0.12.2 - github.com/prometheus/client_golang v1.19.1 + github.com/prometheus/client_golang v1.18.0 github.com/rs/cors v1.9.0 github.com/spf13/cobra v1.8.0 - github.com/spf13/viper v1.18.2 + github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.9.0 github.com/tendermint/tendermint v0.34.29 go.uber.org/multierr v1.11.0 - golang.org/x/net v0.25.0 + golang.org/x/net v0.24.0 gonum.org/v1/gonum v0.13.0 google.golang.org/grpc v1.64.0 - google.golang.org/protobuf v1.34.1 + google.golang.org/protobuf v1.33.0 ) require ( - filippo.io/edwards25519 v1.0.0 // indirect + filippo.io/edwards25519 v1.0.0-rc.1 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect @@ -53,26 +53,26 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd v0.23.4 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect github.com/celestiaorg/go-fraud v0.2.0 // indirect github.com/celestiaorg/go-header v0.4.1 // indirect github.com/celestiaorg/merkletree v0.0.0-20210714075610-a84dc3ddbbe4 // indirect github.com/celestiaorg/nmt v0.20.0 github.com/celestiaorg/rsmt2d v0.11.0 // indirect - github.com/cometbft/cometbft v0.38.7 - github.com/cometbft/cometbft-db v0.12.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect - github.com/cosmos/gogoproto v1.4.12 // indirect + github.com/cometbft/cometbft v0.37.2 + github.com/cometbft/cometbft-db v0.11.0 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + github.com/cosmos/gogoproto v1.4.11 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect github.com/deckarep/golang-set v1.8.0 // indirect github.com/decred/base58 v1.0.4 // indirect github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/ethereum/go-ethereum v1.12.0 // indirect github.com/filecoin-project/go-jsonrpc v0.3.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -91,7 +91,7 @@ require ( github.com/quic-go/webtransport-go v0.6.0 // indirect github.com/satori/go.uuid v1.2.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/tidwall/btree v1.7.0 // indirect + github.com/tidwall/btree v1.5.0 // indirect github.com/tidwall/gjson v1.14.4 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect @@ -99,66 +99,66 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/vedhavyas/go-subkey v1.0.3 // indirect github.com/zondax/ledger-go v0.14.3 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect go.uber.org/dig v1.17.1 // indirect go.uber.org/fx v1.20.1 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect + golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) require ( github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/containerd/cgroups v1.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cosmos/iavl v1.1.2 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect + github.com/cosmos/iavl v0.19.6 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac // indirect + github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/elastic/gosigar v0.14.2 // indirect github.com/flynn/noise v1.1.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect - github.com/golang/glog v1.2.1 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/flatbuffers v24.3.25+incompatible // indirect + github.com/google/flatbuffers v2.0.8+incompatible // indirect github.com/google/gopacket v1.1.19 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect @@ -169,7 +169,7 @@ require ( github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.6 // indirect github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/koron/go-ssdp v0.0.4 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect @@ -205,37 +205,37 @@ require ( github.com/opencontainers/runtime-spec v1.2.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20240503122002-4b96552b8156 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/pelletier/go-toml/v2 v2.0.7 // indirect + github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/polydawn/refmt v0.89.0 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/procfs v0.15.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/raulk/go-watchdog v1.3.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/afero v1.9.3 // indirect + github.com/spf13/cast v1.5.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect - github.com/subosito/gotenv v1.6.0 // indirect + github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b // indirect github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect github.com/zondax/hid v0.9.2 // indirect - go.etcd.io/bbolt v1.4.0-alpha.1 // indirect + go.etcd.io/bbolt v1.3.8 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - google.golang.org/genproto v0.0.0-20240521202816-d264139d666e // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/mod v0.15.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -244,7 +244,7 @@ require ( require ( cosmossdk.io/math v1.3.0 // indirect - github.com/DataDog/zstd v1.5.5 // indirect + github.com/DataDog/zstd v1.5.2 // indirect github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/btcsuite/btcd/btcutil v1.1.3 // indirect @@ -257,22 +257,21 @@ require ( github.com/cosmos/ibc-go/v6 v6.2.1 // indirect github.com/danwt/gerr v0.1.5 // indirect github.com/decred/dcrd/dcrec/edwards v1.0.0 // indirect - github.com/dymensionxyz/interchain-da v0.0.1 // indirect github.com/evmos/evmos/v12 v12.1.6 // indirect - github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/getsentry/sentry-go v0.18.0 // indirect github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f // indirect github.com/holiman/uint256 v1.2.2 // indirect github.com/ipfs/boxo v0.10.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/libp2p/go-libp2p-routing-helpers v0.7.2 // indirect - github.com/linxGnu/grocksdb v1.9.1 // indirect + github.com/linxGnu/grocksdb v1.8.12 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/common v0.53.0 // indirect + github.com/prometheus/common v0.47.0 // indirect github.com/regen-network/cosmos-proto v0.3.1 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/tools v0.21.0 // indirect + golang.org/x/tools v0.18.0 // indirect ) replace ( diff --git a/go.sum b/go.sum index 4848b1fe6..7f6079248 100644 --- a/go.sum +++ b/go.sum @@ -60,7 +60,6 @@ dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1 dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= @@ -75,7 +74,6 @@ github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= @@ -134,7 +132,6 @@ github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v5 github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcec/v2 v2.3.3/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= @@ -178,7 +175,6 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= @@ -211,10 +207,8 @@ github.com/cometbft/cometbft v0.34.28 h1:gwryf55P1SWMUP4nOXpRVI2D0yPoYEzN+IBqmRB github.com/cometbft/cometbft v0.34.28/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= -github.com/cometbft/cometbft v0.38.7/go.mod h1:HIyf811dFMI73IE0F7RrnY/Fr+d1+HuJAgtkEpQjCMY= github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= -github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= @@ -233,26 +227,21 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/cosmos-sdk v0.46.16 h1:RVGv1+RulLZeNyfCaPZrZtv0kY7ZZNAI6JGpub0Uh6o= github.com/cosmos/cosmos-sdk v0.46.16/go.mod h1:05U50tAsOzQ8JOAePshJCbJQw5ib1YJR6IXcqyVI1Xg= -github.com/cosmos/cosmos-sdk v0.50.6/go.mod h1:lVkRY6cdMJ0fG3gp8y4hFrsKZqF4z7y0M2UXFb9Yt40= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.6 h1:XY78yEeNPrEYyNCKlqr9chrwoeSDJ0bV2VjocTk//OU= github.com/cosmos/iavl v0.19.6/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ibc-go/v6 v6.2.1 h1:NiaDXTRhKwf3n9kELD4VRIe5zby1yk1jBvaz9tXTQ6k= github.com/cosmos/ibc-go/v6 v6.2.1/go.mod h1:XLsARy4Y7+GtAqzMcxNdlQf6lx+ti1e8KcMGv5NIK7A= github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= -github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -268,7 +257,6 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= @@ -285,7 +273,6 @@ github.com/decred/dcrd/dcrec/edwards v1.0.0/go.mod h1:HblVh1OfMt7xSxUL1ufjToaEvp github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= @@ -315,10 +302,8 @@ github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7/go.mod h1:yRkwfj0CBpOG github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac h1:opbrjaN/L8gg6Xh5D04Tem+8xVcz6ajZlGCs49mQgyg= github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/dymensionxyz/cosmosclient v0.4.2-beta h1:sokBefcN1tIOlUKmB8Q2E9XMJ93LueqtFThiM/kA4DI= github.com/dymensionxyz/cosmosclient v0.4.2-beta/go.mod h1:GQQu3ITEjWfi5ULR2B6X2i2YZNennY1yzcT5qdL4MGI= github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240411195658-f7cd96f53b56 h1:cmpJYdRviuUfmlJdHrcAND8Jd6JIY4rp63bWAQzPr54= @@ -329,8 +314,6 @@ github.com/dymensionxyz/gerr-cosmos v0.1.2 h1:4NiB9psF6swnWTCDYnHgHKtVEaRHuuNRuq github.com/dymensionxyz/gerr-cosmos v0.1.2/go.mod h1:tXIhx3WdryAnYRISC3Weh+2xeXwaf1l4Yb1zjDUsT7k= github.com/dymensionxyz/go-libp2p-pubsub v0.0.0-20240513081713-3ecd83c19ea2 h1:5FMEOpX5OuoRfwwjjA+LxRJXoDT0fFvg8/rlat7z8bE= github.com/dymensionxyz/go-libp2p-pubsub v0.0.0-20240513081713-3ecd83c19ea2/go.mod h1:1OxbaT/pFRO5h+Dpze8hdHQ63R0ke55XTs6b6NwLLkw= -github.com/dymensionxyz/interchain-da v0.0.1 h1:ipxG193G31bQu1bGBnjvemjaA+vQ5alVcVGSHsd/rZM= -github.com/dymensionxyz/interchain-da v0.0.1/go.mod h1:tbFfWeU8bFvzCFXEwicCjOWO0xwr6ChKbbW+yOHt+4s= github.com/dymensionxyz/rpc v1.3.1 h1:7EXWIobaBes5zldRvTIg7TmNsEKjicrWA/OjCc0NaGs= github.com/dymensionxyz/rpc v1.3.1/go.mod h1:f+WpX8ysy8wt95iGc6auYlHcnHj2bUkhiRVkkKNys8c= github.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= @@ -368,12 +351,10 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= -github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -387,20 +368,15 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -426,13 +402,11 @@ github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gofrs/uuid v4.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= -github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -478,7 +452,6 @@ github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl76 github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -549,7 +522,6 @@ github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZH github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -585,14 +557,12 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvHgwfx2Vm4= github.com/hashicorp/golang-lru/v2 v2.0.5/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 h1:aSVUgRRRtOrZOC1fYmY9gV0e9z/Iu+xNVSASWjsuyGU= github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3/go.mod h1:5PC6ZNPde8bBqU/ewGZig35+UIZtw9Ytxez8/q5ZyFE= -github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.2 h1:TXKcSGc2WaxPD2+bmzAsVthL4+pEN0YwXcL5qED83vk= @@ -658,7 +628,6 @@ github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6 github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/klauspost/reedsolomon v1.11.8 h1:s8RpUW5TK4hjr+djiOpbZJB4ksx+TdYbRH7vHQpwPOY= @@ -713,7 +682,6 @@ github.com/libp2p/go-yamux/v4 v4.0.1 h1:FfDR4S1wj6Bw2Pqbc8Uz7pCxeRBPbwsBbEdfwiCy github.com/libp2p/go-yamux/v4 v4.0.1/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4= github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= -github.com/linxGnu/grocksdb v1.9.1/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -843,11 +811,9 @@ github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhM github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= -github.com/petermattis/goid v0.0.0-20240503122002-4b96552b8156/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= @@ -861,7 +827,6 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4= github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -870,27 +835,23 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= -github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= github.com/quic-go/quic-go v0.42.0 h1:uSfdap0eveIl8KXnipv9K7nlwZ5IqLlYOpJ58u5utpM= @@ -914,7 +875,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= @@ -969,11 +929,9 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2 github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= @@ -986,7 +944,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= -github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -1005,12 +962,10 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= @@ -1021,7 +976,6 @@ github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b h1:Y3ZPG6gdDCAV github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b/go.mod h1:ADqbS9NOSnBRK9R2RtYC61CdsHmVMD/yXAzcMuPexbU= github.com/tidwall/btree v1.5.0 h1:iV0yVY/frd7r6qGBXfEYs7DH0gTDgrKTrDjS7xt/IyQ= github.com/tidwall/btree v1.5.0/go.mod h1:LGm8L/DZjPLmeWGjv5kFrY8dL4uVhMmzmmLYmsObdKE= -github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -1077,7 +1031,6 @@ gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40 h1:dizWJqTWj gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40/go.mod h1:rOnSnoRyxMI3fe/7KIbVcsHRGxe30OONv8dEgo+vCfA= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/bbolt v1.4.0-alpha.1/go.mod h1:S/Z/Nm3iuOnyO1W4XuFfPci51Gj6F1Hv0z8hisyYYOw= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -1089,13 +1042,10 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -1105,7 +1055,6 @@ go.uber.org/dig v1.17.1 h1:Tga8Lz8PcYNsWsyHMZ1Vm0OQOUaJNDyvPImgbAu9YSc= go.uber.org/dig v1.17.1/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= go.uber.org/fx v1.20.1 h1:zVwVQGS8zYvhh9Xxcu4w1M6ESyeMzebzj2NbSayZ4Mk= go.uber.org/fx v1.20.1/go.mod h1:iSYNbHf2y55acNCwCXKx7LbWb5WG1Bnue5RDXz1OREg= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -1119,7 +1068,6 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= @@ -1145,7 +1093,6 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1158,7 +1105,6 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1186,7 +1132,6 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1236,7 +1181,6 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1264,7 +1208,6 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1324,7 +1267,6 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1335,12 +1277,10 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1351,7 +1291,6 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1379,7 +1318,6 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1418,7 +1356,6 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1508,13 +1445,10 @@ google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= -google.golang.org/genproto v0.0.0-20240521202816-d264139d666e/go.mod h1:gOvX/2dWTqh+u3+IHjFeCxinlz5AZ5qhOufbQPub/dE= google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= -google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e/go.mod h1:LweJcLbyVij6rCex8YunD8DYR5VDonap/jYl3ZRxcIU= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1551,7 +1485,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 6c75b6db6e6933552fab9f2ca872ce6d07ecdb54 Mon Sep 17 00:00:00 2001 From: keruch Date: Thu, 27 Jun 2024 21:03:10 +0200 Subject: [PATCH 07/12] feat(da): SubmitBatch method --- da/interchain/chain_client.go | 33 ++++++-- da/interchain/config.go | 30 +++---- da/interchain/interchain.go | 153 +++++++++++++++++++--------------- types/pb/interchain_da/da.go | 13 +++ 4 files changed, 135 insertions(+), 94 deletions(-) create mode 100644 types/pb/interchain_da/da.go diff --git a/da/interchain/chain_client.go b/da/interchain/chain_client.go index e63e743bc..a2814342c 100644 --- a/da/interchain/chain_client.go +++ b/da/interchain/chain_client.go @@ -1,20 +1,23 @@ package interchain import ( - sdkclient "github.com/cosmos/cosmos-sdk/client" + "context" + "fmt" + "github.com/cosmos/cosmos-sdk/client/flags" - sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/dymensionxyz/cosmosclient/cosmosclient" "github.com/ignite/cli/ignite/pkg/cosmosaccount" + + interchainda "github.com/dymensionxyz/dymint/types/pb/interchain_da" ) -type DAClient interface { - Context() sdkclient.Context - BroadcastTx(accountName string, msgs ...sdktypes.Msg) (cosmosclient.Response, error) +type daClient struct { + cosmosclient.Client + queryClient interchainda.QueryClient } -func getCosmosClientOptions(config DAConfig) []cosmosclient.Option { - options := []cosmosclient.Option{ +func newDAClient(ctx context.Context, config DAConfig) (*daClient, error) { + c, err := cosmosclient.New(ctx, []cosmosclient.Option{ cosmosclient.WithAddressPrefix(config.AddressPrefix), cosmosclient.WithBroadcastMode(flags.BroadcastSync), cosmosclient.WithNodeAddress(config.NodeAddress), @@ -23,6 +26,20 @@ func getCosmosClientOptions(config DAConfig) []cosmosclient.Option { cosmosclient.WithGasPrices(config.GasPrices), cosmosclient.WithKeyringBackend(cosmosaccount.KeyringBackend(config.KeyringBackend)), cosmosclient.WithHome(config.KeyringHomeDir), + }...) + if err != nil { + return nil, fmt.Errorf("can't create DA layer cosmos client: %w", err) + } + return &daClient{ + Client: c, + queryClient: interchainda.NewQueryClient(c.Context().GRPCClient), + }, nil +} + +func (c *daClient) Params(ctx context.Context) (interchainda.Params, error) { + resp, err := c.queryClient.Params(ctx, &interchainda.QueryParamsRequest{}) + if err != nil { + return interchainda.Params{}, fmt.Errorf("can't query DA layer params: %w", err) } - return options + return resp.GetParams(), nil } diff --git a/da/interchain/config.go b/da/interchain/config.go index e2a27f2e0..cf8f982c6 100644 --- a/da/interchain/config.go +++ b/da/interchain/config.go @@ -1,25 +1,19 @@ package interchain import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" + interchainda "github.com/dymensionxyz/dymint/types/pb/interchain_da" ) type DAConfig struct { - ChainID string `mapstructure:"chain_id"` // The chain ID of the DA chain - ClientID string `mapstructure:"client_id"` // This is the IBC client ID on Dymension hub for the DA chain - KeyringBackend string `mapstructure:"keyring_backend"` - KeyringHomeDir string `mapstructure:"keyring_home_dir"` - AddressPrefix string `mapstructure:"da_address_prefix"` - AccountName string `mapstructure:"da_account_name"` - NodeAddress string `mapstructure:"da_node_address"` - GasLimit uint64 `mapstructure:"da_gas_limit"` - GasPrices string `mapstructure:"da_gas_prices"` - GasFees string `mapstructure:"da_gas_fees"` - ChainParams interchaindatypes.Params `mapstructure:"chain_params"` // The params of the DA chain -} - -type EncodingConfig interface { - TxConfig() client.TxConfig - Codec() codec.Codec + ClientID string `mapstructure:"client_id"` // This is the IBC client ID on Dymension hub for the DA chain + ChainID string `mapstructure:"chain_id"` // The chain ID of the DA chain + KeyringBackend string `mapstructure:"keyring_backend"` + KeyringHomeDir string `mapstructure:"keyring_home_dir"` + AddressPrefix string `mapstructure:"address_prefix"` + AccountName string `mapstructure:"account_name"` + NodeAddress string `mapstructure:"node_address"` + GasLimit uint64 `mapstructure:"gas_limit"` + GasPrices string `mapstructure:"gas_prices"` + GasFees string `mapstructure:"gas_fees"` + DAParams interchainda.Params `mapstructure:"da_params"` } diff --git a/da/interchain/interchain.go b/da/interchain/interchain.go index ebc6a7521..b56e3b814 100644 --- a/da/interchain/interchain.go +++ b/da/interchain/interchain.go @@ -5,11 +5,11 @@ import ( "encoding/json" "fmt" + sdkclient "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx" "github.com/dymensionxyz/cosmosclient/cosmosclient" "github.com/tendermint/tendermint/libs/pubsub" @@ -17,6 +17,7 @@ import ( "github.com/dymensionxyz/dymint/settlement/dymension" "github.com/dymensionxyz/dymint/store" "github.com/dymensionxyz/dymint/types" + interchainda "github.com/dymensionxyz/dymint/types/pb/interchain_da" ) var ( @@ -24,6 +25,12 @@ var ( _ da.BatchRetriever = &DataAvailabilityLayerClient{} ) +type DAClient interface { + Context() sdkclient.Context + BroadcastTx(accountName string, msgs ...sdk.Msg) (cosmosclient.Response, error) + Params(ctx context.Context) (interchainda.Params, error) +} + // DataAvailabilityLayerClient is a client for DA-provider blockchains supporting the interchain-da module. type DataAvailabilityLayerClient struct { logger types.Logger @@ -32,42 +39,56 @@ type DataAvailabilityLayerClient struct { cdc codec.Codec synced chan struct{} - pubsubServer *pubsub.Server + pubsubServer *pubsub.Server - daClient DAClient - daConfig DAConfig - encodingConfig EncodingConfig // The DA chain's encoding config + daClient DAClient + daConfig DAConfig } // Init is called once. It reads the DA client configuration and initializes resources for the interchain DA provider. func (c *DataAvailabilityLayerClient) Init(rawConfig []byte, server *pubsub.Server, _ store.KV, logger types.Logger, options ...da.Option) error { + ctx := context.Background() + + // Read DA layer config var config DAConfig err := json.Unmarshal(rawConfig, &config) if err != nil { return fmt.Errorf("invalid config: %w", err) } + // Create cosmos client with DA layer + client, err := newDAClient(ctx, config) + if err != nil { + return fmt.Errorf("can't create DA layer client: %w", err) + } + + // Query DA layer interchain-da module params + daParams, err := client.Params(ctx) + if err != nil { + return fmt.Errorf("can't query DA layer interchain-da module params: %w", err) + } + config.DAParams = daParams + + // Create cancellable context + ctx, cancel := context.WithCancel(ctx) + + // Create codec interfaceRegistry := cdctypes.NewInterfaceRegistry() cryptocodec.RegisterInterfaces(interfaceRegistry) - interchaindatypes.RegisterInterfaces(interfaceRegistry) + interfaceRegistry.RegisterImplementations(&interchainda.MsgSubmitBlob{}) cdc := codec.NewProtoCodec(interfaceRegistry) - ctx, cancel := context.WithCancel(context.Background()) - + // Fill client fields c.logger = logger c.ctx = ctx c.cancel = cancel c.cdc = cdc c.synced = make(chan struct{}) c.pubsubServer = server - c.daConfig = config - - client, err := cosmosclient.New(ctx, getCosmosClientOptions(config)..., ) - if err != nil { - return fmt.Errorf("can't create DA layer client: %w", err) - } c.daClient = client + c.daConfig = config + // Apply client options for _, apply := range options { apply(c) } @@ -79,9 +100,6 @@ func (c *DataAvailabilityLayerClient) Init(rawConfig []byte, server *pubsub.Serv // It fetches the latest interchain module parameters and sets up a subscription to receive updates when the provider updates these parameters. // This ensures that the client is always up-to-date. func (c *DataAvailabilityLayerClient) Start() error { - // Get the module parameters from the chain - c.daConfig.ChainParams = c.grpc.GetModuleParams() - // Get the connectionID from the dymension hub for the da chain c.daConfig.ClientID = dymension.(c.chainConfig.ChainID) @@ -97,9 +115,9 @@ func (c *DataAvailabilityLayerClient) Start() error { // Stop is called once, when DataAvailabilityLayerClient is no longer needed. func (c *DataAvailabilityLayerClient) Stop() error { - c.daClient.Close() c.pubsubServer.Stop() c.cancel() + return nil } // Synced returns channel for on sync event @@ -112,81 +130,80 @@ func (c *DataAvailabilityLayerClient) GetClientType() da.Client { } func (c *DataAvailabilityLayerClient) SubmitBatch(batch *types.Batch) da.ResultSubmitBatch { - blob, err := batch.MarshalBinary() + result, err := c.submitBatch(batch) if err != nil { return da.ResultSubmitBatch{ - BaseResult: da.BaseResult{Code: da.StatusError, Message: err.Error(), Error: err}, + BaseResult: da.BaseResult{ + Code: da.StatusError, + Message: err.Error(), + Error: err, + }, + SubmitMetaData: nil, } } - - if len(blob) > int(c.daConfig.ChainParams.MaxBlobSize) { - return da.ResultSubmitBatch{ - BaseResult: da.BaseResult{Code: da.StatusError, Message: err.Error(), Error: err}, - } + return da.ResultSubmitBatch{ + BaseResult: da.BaseResult{ + Code: da.StatusSuccess, + Message: "Submission successful", + }, + SubmitMetaData: &da.DASubmitMetaData{ + Height: height, + Namespace: c.config.NamespaceID.Bytes(), + Client: da.Celestia, + Commitment: commitment, + Index: 0, + Length: 0, + Root: nil, + }, } +} - // submit the blob to da chain +type submitBatchResult struct { + BlobID uint64 + BlobHash string +} + +func (c *DataAvailabilityLayerClient) submitBatch(batch *types.Batch) (submitBatchResult, error) { + blob, err := batch.MarshalBinary() + if err != nil { + return submitBatchResult{}, fmt.Errorf("can't marshal batch: %w", err) + } - // calculate the da fees to pay - // feesToPay = params.CostPerByte * len(blob) - feesToPay := sdk.NewCoin(c.daConfig.ChainParams.CostPerByte.Denom, c.daConfig.ChainParams.CostPerByte.Amount.MulRaw(int64(len(blob)))) + if len(blob) > int(c.daConfig.DAParams.MaxBlobSize) { + return submitBatchResult{}, fmt.Errorf("blob size %d exceeds the maximum allowed size %d", len(blob), c.daConfig.DAParams.MaxBlobSize) + } - // generate the submit blob msg + feesToPay := sdk.NewCoin(c.daConfig.DAParams.CostPerByte.Denom, c.daConfig.DAParams.CostPerByte.Amount.MulRaw(int64(len(blob)))) - msg := interchaindatypes.MsgSubmitBlob{ - Creator: "", + msg := interchainda.MsgSubmitBlob{ + Creator: c.daConfig.AccountName, Blob: blob, Fees: feesToPay, } - // use msg placeholder for now not to import the interchain-da module directly - msgP := new(sdk.Msg) - msg := *msgP - // wrap the msg into a tx - txBuilder := c.encodingConfig.NewTxBuilder() - err := txBuilder.SetMsgs(msg) + txResp, err := c.daClient.BroadcastTx(c.daConfig.AccountName, &msg) if err != nil { - return da.ResultSubmitBatch{ - BaseResult: da.BaseResult{Code: da.StatusError, Message: err.Error(), Error: err}, - } + return submitBatchResult{}, fmt.Errorf("can't broadcast MsgSubmitBlob to the DA layer: %w", err) } - - ctx := context.Background() - // sign and broadcast the tx - txBytes, err := c.encodingConfig.TxEncoder()(txBuilder.GetTx()) - if err != nil { - return da.ResultSubmitBatch{ - BaseResult: da.BaseResult{Code: da.StatusError, Message: err.Error(), Error: err}, - } + if txResp.Code != 0 { + return submitBatchResult{}, fmt.Errorf("MsgSubmitBlob broadcast tx status code is not 0: code %d", txResp.Code) } - txHash, err := c.txClient.BroadcastTx(ctx, &tx.BroadcastTxRequest{ - TxBytes: txBytes, - Mode: tx.BroadcastMode_BROADCAST_MODE_SYNC, - }) + var resp interchainda.MsgSubmitBlobResponse + err = txResp.Decode(&resp) if err != nil { - return da.ResultSubmitBatch{ - BaseResult: da.BaseResult{Code: da.StatusError, Message: err.Error(), Error: err}, - } + return submitBatchResult{}, fmt.Errorf("can't decode MsgSubmitBlob response: %w", err) } - c.txClient.GetTx(ctx, &tx.GetTxRequest{ - Hash: txHash, - }) - - // get the tx details - txRes, err = c.grpc.GetTxResponse(txhash) - blobId, blobHash, height = parse(txRes) - // trigger ibc stateupdate - optional (?) // other ibc interactions would trigger this anyway. But until then, inclusion cannot be verified. // better to trigger a stateupdate now imo dymension.tx.ibc.client.updatestate(c.daConfig.clientID) // could import the go relayer and execute their funcs - return ResultSubmitBatch{ - BaseResult: BaseResult("success"), - SubmitMetaData: ("interchain", height, blobId, blobHash, c.daConfig.clientID, ) - } + return submitBatchResult{ + BlobID: resp.BlobId, + BlobHash: resp.BlobHash, + }, nil } func (c *DataAvailabilityLayerClient) CheckBatchAvailability(daMetaData *da.DASubmitMetaData) da.ResultCheckBatch { diff --git a/types/pb/interchain_da/da.go b/types/pb/interchain_da/da.go new file mode 100644 index 000000000..c1bdb3dfc --- /dev/null +++ b/types/pb/interchain_da/da.go @@ -0,0 +1,13 @@ +package interchain_da + +import sdk "github.com/cosmos/cosmos-sdk/types" + +func (m MsgSubmitBlob) ValidateBasic() error { + // Validation is done on the DA layer side + return nil +} + +func (m MsgSubmitBlob) GetSigners() []sdk.AccAddress { + signer, _ := sdk.AccAddressFromBech32(m.Creator) + return []sdk.AccAddress{signer} +} From 0290f32631765378940cb7ed9b74fc02b4c30a38 Mon Sep 17 00:00:00 2001 From: keruch Date: Mon, 1 Jul 2024 21:01:57 +0200 Subject: [PATCH 08/12] feat(da): SubmitBatchV2 method --- da/da.go | 29 ++++++ da/interchain/chain_client.go | 20 ++++ da/interchain/config.go | 30 +++++- da/interchain/interchain.go | 124 ++++-------------------- da/interchain/ioutils/gzip.go | 62 ++++++++++++ da/interchain/ioutils/gzip_test.go | 61 ++++++++++++ da/interchain/retrieve_batches.go | 11 +++ da/interchain/submit_batch.go | 150 +++++++++++++++++++++++++++++ go.mod | 11 ++- go.sum | 23 ++++- types/pb/interchain_da/da.go | 13 --- types/pb/interchain_da/keys.go | 51 ++++++++++ 12 files changed, 457 insertions(+), 128 deletions(-) create mode 100644 da/interchain/ioutils/gzip.go create mode 100644 da/interchain/ioutils/gzip_test.go create mode 100644 da/interchain/retrieve_batches.go create mode 100644 da/interchain/submit_batch.go delete mode 100644 types/pb/interchain_da/da.go create mode 100644 types/pb/interchain_da/keys.go diff --git a/da/da.go b/da/da.go index 7e5545c42..940164d6b 100644 --- a/da/da.go +++ b/da/da.go @@ -8,6 +8,7 @@ import ( "github.com/celestiaorg/celestia-openrpc/types/blob" "github.com/cometbft/cometbft/crypto/merkle" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/tendermint/tendermint/libs/pubsub" "github.com/dymensionxyz/dymint/store" @@ -179,6 +180,13 @@ type ResultSubmitBatch struct { SubmitMetaData *DASubmitMetaData } +// ResultSubmitBatchV2 contains information returned from DA layer after block submission. +type ResultSubmitBatchV2 struct { + BaseResult + // DAPath instructs how to retrieve the submitted batch from the DA layer. + DAPath Path +} + // ResultCheckBatch contains information about block availability, returned from DA layer client. type ResultCheckBatch struct { BaseResult @@ -196,6 +204,22 @@ type ResultRetrieveBatch struct { CheckMetaData *DACheckMetaData } +// ResultRetrieveBatchV2 contains a batch of blocks returned from the DA layer client. +type ResultRetrieveBatchV2 struct { + BaseResult + // Batches is the full block retrieved from the DA layer. + // If BaseResult.Code is not StatusSuccess, this field is nil. + Batches []*types.Batch +} + +// Path TODO: move to the Dymension proto file +type Path struct { + // DAType identifies the DA type being used by the sequencer to post the blob. + DaType string + // Commitment is a generic commitment interpreted by the DA Layer. + Commitment *cdctypes.Any +} + // DataAvailabilityLayerClient defines generic interface for DA layer block submission. // It also contains life-cycle methods. type DataAvailabilityLayerClient interface { @@ -213,6 +237,9 @@ type DataAvailabilityLayerClient interface { // triggers a state transition in the DA layer. SubmitBatch(batch *types.Batch) ResultSubmitBatch + // SubmitBatchV2 is a method that supports MsgUpdateStateV2. + SubmitBatchV2(*types.Batch) ResultSubmitBatchV2 + GetClientType() Client // CheckBatchAvailability checks the availability of the blob submitted getting proofs and validating them @@ -226,6 +253,8 @@ type DataAvailabilityLayerClient interface { type BatchRetriever interface { // RetrieveBatches returns blocks at given data layer height from data availability layer. RetrieveBatches(daMetaData *DASubmitMetaData) ResultRetrieveBatch + // RetrieveBatchesV2 is a method that supports MsgUpdateStateV2. + RetrieveBatchesV2(ResultSubmitBatchV2) ResultRetrieveBatchV2 // CheckBatchAvailability checks the availability of the blob received getting proofs and validating them CheckBatchAvailability(daMetaData *DASubmitMetaData) ResultCheckBatch } diff --git a/da/interchain/chain_client.go b/da/interchain/chain_client.go index a2814342c..3fef37c66 100644 --- a/da/interchain/chain_client.go +++ b/da/interchain/chain_client.go @@ -7,6 +7,9 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/dymensionxyz/cosmosclient/cosmosclient" "github.com/ignite/cli/ignite/pkg/cosmosaccount" + "github.com/tendermint/tendermint/libs/bytes" + rpcclient "github.com/tendermint/tendermint/rpc/client" + ctypes "github.com/tendermint/tendermint/rpc/core/types" interchainda "github.com/dymensionxyz/dymint/types/pb/interchain_da" ) @@ -43,3 +46,20 @@ func (c *daClient) Params(ctx context.Context) (interchainda.Params, error) { } return resp.GetParams(), nil } + +func (c *daClient) Tx(ctx context.Context, txHash []byte) (*ctypes.ResultTx, error) { + return c.RPC.Tx(ctx, txHash, false) +} + +func (c *daClient) ABCIQueryWithProof( + ctx context.Context, + path string, + data bytes.HexBytes, + height int64, +) (*ctypes.ResultABCIQuery, error) { + opts := rpcclient.ABCIQueryOptions{ + Height: height, + Prove: true, + } + return c.RPC.ABCIQueryWithOptions(ctx, path, data, opts) +} diff --git a/da/interchain/config.go b/da/interchain/config.go index cf8f982c6..adb12b592 100644 --- a/da/interchain/config.go +++ b/da/interchain/config.go @@ -1,12 +1,15 @@ package interchain import ( + "time" + interchainda "github.com/dymensionxyz/dymint/types/pb/interchain_da" ) type DAConfig struct { - ClientID string `mapstructure:"client_id"` // This is the IBC client ID on Dymension hub for the DA chain - ChainID string `mapstructure:"chain_id"` // The chain ID of the DA chain + ClientID string `mapstructure:"client_id"` // IBC client ID between the Hub and DA layer + ChainID string `mapstructure:"chain_id"` // Chain ID of the DA layer + KeyringBackend string `mapstructure:"keyring_backend"` KeyringHomeDir string `mapstructure:"keyring_home_dir"` AddressPrefix string `mapstructure:"address_prefix"` @@ -16,4 +19,27 @@ type DAConfig struct { GasPrices string `mapstructure:"gas_prices"` GasFees string `mapstructure:"gas_fees"` DAParams interchainda.Params `mapstructure:"da_params"` + + RetryMinDelay time.Duration `mapstructure:"retry_min_delay"` + RetryMaxDelay time.Duration `mapstructure:"retry_min_delay"` + RetryAttempts uint `mapstructure:"retry_attempts"` +} + +func DefaultDAConfig() DAConfig { + return DAConfig{ + ClientID: "", + ChainID: "", + KeyringBackend: "", + KeyringHomeDir: "", + AddressPrefix: "", + AccountName: "", + NodeAddress: "", + GasLimit: 0, + GasPrices: "", + GasFees: "", + DAParams: interchainda.Params{}, + RetryMinDelay: 100 * time.Millisecond, + RetryMaxDelay: 2 * time.Second, + RetryAttempts: 10, + } } diff --git a/da/interchain/interchain.go b/da/interchain/interchain.go index b56e3b814..df507b4a4 100644 --- a/da/interchain/interchain.go +++ b/da/interchain/interchain.go @@ -11,28 +11,31 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/dymensionxyz/cosmosclient/cosmosclient" + "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/libs/pubsub" + ctypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/dymensionxyz/dymint/da" - "github.com/dymensionxyz/dymint/settlement/dymension" "github.com/dymensionxyz/dymint/store" "github.com/dymensionxyz/dymint/types" interchainda "github.com/dymensionxyz/dymint/types/pb/interchain_da" ) var ( - _ da.DataAvailabilityLayerClient = &DataAvailabilityLayerClient{} - _ da.BatchRetriever = &DataAvailabilityLayerClient{} + _ da.DataAvailabilityLayerClient = &DALayerClient{} + _ da.BatchRetriever = &DALayerClient{} ) type DAClient interface { Context() sdkclient.Context BroadcastTx(accountName string, msgs ...sdk.Msg) (cosmosclient.Response, error) Params(ctx context.Context) (interchainda.Params, error) + Tx(ctx context.Context, txHash []byte) (*ctypes.ResultTx, error) + ABCIQueryWithProof(ctx context.Context, path string, data bytes.HexBytes, height int64) (*ctypes.ResultABCIQuery, error) } -// DataAvailabilityLayerClient is a client for DA-provider blockchains supporting the interchain-da module. -type DataAvailabilityLayerClient struct { +// DALayerClient is a client for DA-provider blockchains supporting the interchain-da module. +type DALayerClient struct { logger types.Logger ctx context.Context cancel context.CancelFunc @@ -46,7 +49,7 @@ type DataAvailabilityLayerClient struct { } // Init is called once. It reads the DA client configuration and initializes resources for the interchain DA provider. -func (c *DataAvailabilityLayerClient) Init(rawConfig []byte, server *pubsub.Server, _ store.KV, logger types.Logger, options ...da.Option) error { +func (c *DALayerClient) Init(rawConfig []byte, _ *pubsub.Server, _ store.KV, logger types.Logger, options ...da.Option) error { ctx := context.Background() // Read DA layer config @@ -84,7 +87,6 @@ func (c *DataAvailabilityLayerClient) Init(rawConfig []byte, server *pubsub.Serv c.cancel = cancel c.cdc = cdc c.synced = make(chan struct{}) - c.pubsubServer = server c.daClient = client c.daConfig = config @@ -96,120 +98,30 @@ func (c *DataAvailabilityLayerClient) Init(rawConfig []byte, server *pubsub.Serv return nil } -// Start is called once, after Init. It starts the operation of DataAvailabilityLayerClient, and Dymint will start submitting batches to the provider. +// Start is called once, after Init. It starts the operation of DALayerClient, and Dymint will start submitting batches to the provider. // It fetches the latest interchain module parameters and sets up a subscription to receive updates when the provider updates these parameters. // This ensures that the client is always up-to-date. -func (c *DataAvailabilityLayerClient) Start() error { - // Get the connectionID from the dymension hub for the da chain - c.daConfig.ClientID = dymension.(c.chainConfig.ChainID) - - // Setup a subscription to event EventUpdateParams - c.grpc.Subscribe(func() { - // This event is thrown at the end of the block when the module params are updated - if block.event == EventUpdateParams { - // when the chain params are updated, update the client config to reflect the same - da.chainConfig.chainParams = block.event.new_params - } - }) +func (c *DALayerClient) Start() error { + // TODO: Setup a subscription to event EventUpdateParams + return nil } -// Stop is called once, when DataAvailabilityLayerClient is no longer needed. -func (c *DataAvailabilityLayerClient) Stop() error { +// Stop is called once, when DALayerClient is no longer needed. +func (c *DALayerClient) Stop() error { c.pubsubServer.Stop() c.cancel() return nil } // Synced returns channel for on sync event -func (c *DataAvailabilityLayerClient) Synced() <-chan struct{} { +func (c *DALayerClient) Synced() <-chan struct{} { return c.synced } -func (c *DataAvailabilityLayerClient) GetClientType() da.Client { +func (c *DALayerClient) GetClientType() da.Client { return da.Interchain } -func (c *DataAvailabilityLayerClient) SubmitBatch(batch *types.Batch) da.ResultSubmitBatch { - result, err := c.submitBatch(batch) - if err != nil { - return da.ResultSubmitBatch{ - BaseResult: da.BaseResult{ - Code: da.StatusError, - Message: err.Error(), - Error: err, - }, - SubmitMetaData: nil, - } - } - return da.ResultSubmitBatch{ - BaseResult: da.BaseResult{ - Code: da.StatusSuccess, - Message: "Submission successful", - }, - SubmitMetaData: &da.DASubmitMetaData{ - Height: height, - Namespace: c.config.NamespaceID.Bytes(), - Client: da.Celestia, - Commitment: commitment, - Index: 0, - Length: 0, - Root: nil, - }, - } -} - -type submitBatchResult struct { - BlobID uint64 - BlobHash string -} - -func (c *DataAvailabilityLayerClient) submitBatch(batch *types.Batch) (submitBatchResult, error) { - blob, err := batch.MarshalBinary() - if err != nil { - return submitBatchResult{}, fmt.Errorf("can't marshal batch: %w", err) - } - - if len(blob) > int(c.daConfig.DAParams.MaxBlobSize) { - return submitBatchResult{}, fmt.Errorf("blob size %d exceeds the maximum allowed size %d", len(blob), c.daConfig.DAParams.MaxBlobSize) - } - - feesToPay := sdk.NewCoin(c.daConfig.DAParams.CostPerByte.Denom, c.daConfig.DAParams.CostPerByte.Amount.MulRaw(int64(len(blob)))) - - msg := interchainda.MsgSubmitBlob{ - Creator: c.daConfig.AccountName, - Blob: blob, - Fees: feesToPay, - } - - txResp, err := c.daClient.BroadcastTx(c.daConfig.AccountName, &msg) - if err != nil { - return submitBatchResult{}, fmt.Errorf("can't broadcast MsgSubmitBlob to the DA layer: %w", err) - } - if txResp.Code != 0 { - return submitBatchResult{}, fmt.Errorf("MsgSubmitBlob broadcast tx status code is not 0: code %d", txResp.Code) - } - - var resp interchainda.MsgSubmitBlobResponse - err = txResp.Decode(&resp) - if err != nil { - return submitBatchResult{}, fmt.Errorf("can't decode MsgSubmitBlob response: %w", err) - } - - // trigger ibc stateupdate - optional (?) - // other ibc interactions would trigger this anyway. But until then, inclusion cannot be verified. - // better to trigger a stateupdate now imo - dymension.tx.ibc.client.updatestate(c.daConfig.clientID) // could import the go relayer and execute their funcs - - return submitBatchResult{ - BlobID: resp.BlobId, - BlobHash: resp.BlobHash, - }, nil -} - -func (c *DataAvailabilityLayerClient) CheckBatchAvailability(daMetaData *da.DASubmitMetaData) da.ResultCheckBatch { - panic("implement me") -} - -func (c *DataAvailabilityLayerClient) RetrieveBatches(daMetaData *da.DASubmitMetaData) da.ResultRetrieveBatch { +func (c *DALayerClient) CheckBatchAvailability(daMetaData *da.DASubmitMetaData) da.ResultCheckBatch { panic("implement me") } diff --git a/da/interchain/ioutils/gzip.go b/da/interchain/ioutils/gzip.go new file mode 100644 index 000000000..713ec799e --- /dev/null +++ b/da/interchain/ioutils/gzip.go @@ -0,0 +1,62 @@ +package ioutils + +import ( + "bytes" + "compress/gzip" + "io" +) + +// Note: []byte can never be const as they are inherently mutable +var ( + // magic bytes to identify gzip. + // See https://www.ietf.org/rfc/rfc1952.txt + // and https://github.com/golang/go/blob/master/src/net/http/sniff.go#L186 + gzipIdent = []byte("\x1F\x8B\x08") +) + +// IsGzip returns checks if the file contents are gzip compressed +func IsGzip(input []byte) bool { + return len(input) >= 3 && bytes.Equal(gzipIdent, input[0:3]) +} + +// Gzip compresses the input ([]byte) +func Gzip(input []byte) ([]byte, error) { + // Create gzip writer + var b bytes.Buffer + w := gzip.NewWriter(&b) + + _, err := w.Write(input) + if err != nil { + return nil, err + } + + // You must close this first to flush the bytes to the buffer + err = w.Close() + if err != nil { + return nil, err + } + + return b.Bytes(), nil +} + +// Gunzip decompresses the input ([]byte) +func Gunzip(input []byte) ([]byte, error) { + // Create gzip reader + b := bytes.NewReader(input) + r, err := gzip.NewReader(b) + if err != nil { + return nil, err + } + + output, err := io.ReadAll(r) + if err != nil { + return nil, err + } + + err = r.Close() + if err != nil { + return nil, err + } + + return output, nil +} diff --git a/da/interchain/ioutils/gzip_test.go b/da/interchain/ioutils/gzip_test.go new file mode 100644 index 000000000..8c9c916d8 --- /dev/null +++ b/da/interchain/ioutils/gzip_test.go @@ -0,0 +1,61 @@ +package ioutils_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/dymensionxyz/dymint/da/interchain/ioutils" +) + +func FuzzGzipGunzip(f *testing.F) { + f.Add([]byte("YW5vdGhlciBlbmNvZGUgc3RyaW5n")) // base64 string + f.Add([]byte("Different String!")) // plain string + f.Add([]byte("1234567890")) // numbers + f.Add([]byte{}) // empty slice + + f.Fuzz(func(t *testing.T, data []byte) { + // Encode to gzip + encoded, err := ioutils.Gzip(data) + require.NoError(t, err) + + // Verify if it's a gzip + ok := ioutils.IsGzip(encoded) + require.True(t, ok) + + // Decode from gzip + decoded, err := ioutils.Gunzip(encoded) + require.NoError(t, err) + + // Check if the resulted output is not a gzip + ok = ioutils.IsGzip(decoded) + require.False(t, ok) + + // Compare the original data against the output + require.Equal(t, data, decoded) + }) +} + +func TestGzipGunzip(t *testing.T) { + // Prepare the input + var expected = []byte("Hello world!") + + // Encode to gzip + encoded, err := ioutils.Gzip(expected) + require.NoError(t, err) + + // Check the output is correct + ok := ioutils.IsGzip(encoded) + require.True(t, ok) + + // Decode from gzip + decoded, err := ioutils.Gunzip(encoded) + require.NoError(t, err) + + // The output is not gzip anymore + ok = ioutils.IsGzip(decoded) + require.False(t, ok) + + // Compare the input against the output + require.Equal(t, expected, decoded) +} diff --git a/da/interchain/retrieve_batches.go b/da/interchain/retrieve_batches.go new file mode 100644 index 000000000..e965b7fd4 --- /dev/null +++ b/da/interchain/retrieve_batches.go @@ -0,0 +1,11 @@ +package interchain + +import "github.com/dymensionxyz/dymint/da" + +func (c *DALayerClient) RetrieveBatches(daMetaData *da.DASubmitMetaData) da.ResultRetrieveBatch { + panic("implement me") +} + +func (c *DALayerClient) RetrieveBatchesV2(da.ResultSubmitBatchV2) da.ResultRetrieveBatchV2 { + panic("implement me") +} diff --git a/da/interchain/submit_batch.go b/da/interchain/submit_batch.go new file mode 100644 index 000000000..0b97bc035 --- /dev/null +++ b/da/interchain/submit_batch.go @@ -0,0 +1,150 @@ +package interchain + +import ( + "fmt" + + "cosmossdk.io/collections" + collcodec "cosmossdk.io/collections/codec" + "github.com/avast/retry-go/v4" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/dymensionxyz/cosmosclient/cosmosclient" + + "github.com/dymensionxyz/dymint/da" + "github.com/dymensionxyz/dymint/da/interchain/ioutils" + "github.com/dymensionxyz/dymint/types" + interchainda "github.com/dymensionxyz/dymint/types/pb/interchain_da" +) + +func (c *DALayerClient) SubmitBatch(*types.Batch) da.ResultSubmitBatch { + panic("SubmitBatch method is not supported by the interchain DA clint") +} + +func (c *DALayerClient) SubmitBatchV2(batch *types.Batch) da.ResultSubmitBatchV2 { + commitment, err := c.submitBatch(batch) + if err != nil { + return da.ResultSubmitBatchV2{ + BaseResult: da.BaseResult{ + Code: da.StatusError, + Message: fmt.Sprintf("can't submit batch to the interchain DA layer: %s", err.Error()), + Error: err, + }, + DAPath: da.Path{}, // empty in the error resp + } + } + + rawCommitment, err := cdctypes.NewAnyWithValue(commitment) + if err != nil { + return da.ResultSubmitBatchV2{ + BaseResult: da.BaseResult{ + Code: da.StatusError, + Message: fmt.Sprintf("can't submit batch to the interchain DA layer: %s", err.Error()), + Error: err, + }, + DAPath: da.Path{}, // empty in the error resp + } + } + + // TODO: add MsgUpdateClint for DA<->Hub IBC client. + + return da.ResultSubmitBatchV2{ + BaseResult: da.BaseResult{ + Code: da.StatusSuccess, + Message: "Submission successful", + }, + DAPath: da.Path{ + DaType: string(c.GetClientType()), + Commitment: rawCommitment, + }, + } +} + +type submitBatchResult struct { + BlobID uint64 + BlobHash string +} + +func (c *DALayerClient) submitBatch(batch *types.Batch) (*interchainda.Commitment, error) { + blob, err := batch.MarshalBinary() + if err != nil { + return nil, fmt.Errorf("can't marshal batch: %w", err) + } + + gzipped, err := ioutils.Gzip(blob) + if err != nil { + return nil, fmt.Errorf("can't gzip batch: %w", err) + } + + if len(blob) > int(c.daConfig.DAParams.MaxBlobSize) { + return nil, fmt.Errorf("blob size %d exceeds the maximum allowed size %d", len(blob), c.daConfig.DAParams.MaxBlobSize) + } + + feesToPay := sdk.NewCoin(c.daConfig.DAParams.CostPerByte.Denom, c.daConfig.DAParams.CostPerByte.Amount.MulRaw(int64(len(blob)))) + + msg := interchainda.MsgSubmitBlob{ + Creator: c.daConfig.AccountName, + Blob: gzipped, + Fees: feesToPay, + } + + var txResp cosmosclient.Response + err = c.runWithRetry(func() error { + txResp, err = c.broadcastTx(&msg) + return err + }) + if err != nil { + return nil, fmt.Errorf("can't broadcast MsgSubmitBlob to DA layer: %w", err) + } + + var resp interchainda.MsgSubmitBlobResponse + err = txResp.Decode(&resp) + if err != nil { + return nil, fmt.Errorf("can't decode MsgSubmitBlob response: %w", err) + } + + key, err := collections.EncodeKeyWithPrefix( + interchainda.BlobMetadataPrefix(), + collcodec.NewUint64Key[interchainda.BlobID](), + interchainda.BlobID(resp.BlobId), + ) + if err != nil { + return nil, fmt.Errorf("can't encode DA lakey store key: %w", err) + } + const keyPath = "/key" + abciResp, err := c.daClient.ABCIQueryWithProof(c.ctx, keyPath, key, txResp.Height) + if err != nil { + return nil, fmt.Errorf("can't call ABCI query with proof for the BlobID %d: %w", resp.BlobId, err) + } + + return &interchainda.Commitment{ + ClientId: c.daConfig.ClientID, + BlobHeight: uint64(txResp.Height), + BlobHash: resp.BlobHash, + BlobId: resp.BlobId, + MerkleProof: abciResp.Response.ProofOps, + }, nil +} + +func (c *DALayerClient) broadcastTx(msgs ...sdk.Msg) (cosmosclient.Response, error) { + txResp, err := c.daClient.BroadcastTx(c.daConfig.AccountName, msgs...) + if err != nil { + return cosmosclient.Response{}, fmt.Errorf("can't broadcast MsgSubmitBlob to the DA layer: %w", err) + } + if txResp.Code != 0 { + return cosmosclient.Response{}, fmt.Errorf("MsgSubmitBlob broadcast tx status code is not 0: code %d", txResp.Code) + } + return txResp, nil +} + +// runWithRetry runs the given operation with retry, doing a number of attempts, and taking the last error only. +func (c *DALayerClient) runWithRetry(operation func() error) error { + return retry.Do( + operation, + retry.Context(c.ctx), + retry.LastErrorOnly(true), + retry.Delay(c.daConfig.RetryMinDelay), + retry.Attempts(c.daConfig.RetryAttempts), + retry.MaxDelay(c.daConfig.RetryMaxDelay), + retry.DelayType(retry.BackOffDelay), + ) +} diff --git a/go.mod b/go.mod index 798fefc67..5c2a8207c 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.22.4 require ( code.cloudfoundry.org/go-diodes v0.0.0-20220725190411-383eb6634c40 + cosmossdk.io/collections v0.4.0 cosmossdk.io/errors v1.0.1 github.com/avast/retry-go/v4 v4.5.0 github.com/celestiaorg/celestia-openrpc v0.4.0-rc.1 @@ -62,7 +63,7 @@ require ( github.com/celestiaorg/rsmt2d v0.11.0 // indirect github.com/cometbft/cometbft v0.37.2 github.com/cometbft/cometbft-db v0.11.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.3 github.com/cosmos/gogoproto v1.4.11 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect github.com/deckarep/golang-set v1.8.0 // indirect @@ -243,8 +244,11 @@ require ( ) require ( + cosmossdk.io/api v0.7.0 // indirect + cosmossdk.io/core v0.10.0 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/math v1.3.0 // indirect - github.com/DataDog/zstd v1.5.2 // indirect + github.com/DataDog/zstd v1.5.5 // indirect github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/btcsuite/btcd/btcutil v1.1.3 // indirect @@ -254,11 +258,12 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cosmos/cosmos-db v1.0.0 // indirect github.com/cosmos/ibc-go/v6 v6.2.1 // indirect github.com/danwt/gerr v0.1.5 // indirect github.com/decred/dcrd/dcrec/edwards v1.0.0 // indirect github.com/evmos/evmos/v12 v12.1.6 // indirect - github.com/getsentry/sentry-go v0.18.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f // indirect github.com/holiman/uint256 v1.2.2 // indirect github.com/ipfs/boxo v0.10.0 // indirect diff --git a/go.sum b/go.sum index 7f6079248..317732f9e 100644 --- a/go.sum +++ b/go.sum @@ -49,6 +49,14 @@ cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/o cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= code.cloudfoundry.org/go-diodes v0.0.0-20220725190411-383eb6634c40 h1:wzkYwwcf4uMGcDpn48WAbq8GtoqDny49tdQ4zJVAsmo= code.cloudfoundry.org/go-diodes v0.0.0-20220725190411-383eb6634c40/go.mod h1:Nx9ASXN4nIlRDEXv+qXE3dpuhnTnO28Lxl/bMUd6BMc= +cosmossdk.io/api v0.7.0 h1:QsEMIWuv9xWDbF2HZnW4Lpu1/SejCztPu0LQx7t6MN4= +cosmossdk.io/api v0.7.0/go.mod h1:kJFAEMLN57y0viszHDPLMmieF0471o5QAwwApa+270M= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.10.0 h1:NP28Ol9YyRODmZLJg2ko/mUl40hMegeMzhJnG+XPkcY= +cosmossdk.io/core v0.10.0/go.mod h1:MygXNld9DvMgYY4yE76DM/mdZpgfeyRjy6FPjEEehlY= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= @@ -72,8 +80,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= @@ -225,6 +233,8 @@ github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8 github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= +github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= github.com/cosmos/cosmos-sdk v0.46.16 h1:RVGv1+RulLZeNyfCaPZrZtv0kY7ZZNAI6JGpub0Uh6o= @@ -353,8 +363,8 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -1514,6 +1524,9 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1527,6 +1540,8 @@ lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/types/pb/interchain_da/da.go b/types/pb/interchain_da/da.go deleted file mode 100644 index c1bdb3dfc..000000000 --- a/types/pb/interchain_da/da.go +++ /dev/null @@ -1,13 +0,0 @@ -package interchain_da - -import sdk "github.com/cosmos/cosmos-sdk/types" - -func (m MsgSubmitBlob) ValidateBasic() error { - // Validation is done on the DA layer side - return nil -} - -func (m MsgSubmitBlob) GetSigners() []sdk.AccAddress { - signer, _ := sdk.AccAddressFromBech32(m.Creator) - return []sdk.AccAddress{signer} -} diff --git a/types/pb/interchain_da/keys.go b/types/pb/interchain_da/keys.go new file mode 100644 index 000000000..bb98215fa --- /dev/null +++ b/types/pb/interchain_da/keys.go @@ -0,0 +1,51 @@ +package interchain_da + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (m *MsgSubmitBlob) ValidateBasic() error { + // Tha validation occurs on the client side. + return nil +} + +func (m *MsgSubmitBlob) GetSigners() []sdk.AccAddress { + signer, _ := sdk.AccAddressFromBech32(m.Creator) + return []sdk.AccAddress{signer} +} + +type BlobID uint64 + +// Module name and store keys. +const ( + // ModuleName defines the module name + ModuleName = "interchain_da" + + ModuleNameCLI = "interchain-da" + + // StoreKey defines the primary module store key + StoreKey = ModuleName +) + +const ( + ParamsByte uint8 = iota + BlobIDByte + BlobMetadataByte + PruningHeightByte +) + +func ParamsPrefix() []byte { + return []byte{ParamsByte} +} + +func BlobIDPrefix() []byte { + return []byte{BlobIDByte} +} + +func BlobMetadataPrefix() []byte { + return []byte{BlobMetadataByte} +} + +func PruningHeightPrefix() []byte { + return []byte{PruningHeightByte} +} From 6f27a2bf110d114e8ae56f096125f0be68b8cd3e Mon Sep 17 00:00:00 2001 From: keruch Date: Tue, 2 Jul 2024 10:22:21 +0200 Subject: [PATCH 09/12] feat(da): added default config and config verification --- da/da.go | 37 ++++++++++++-- da/interchain/config.go | 80 ++++++++++++++++++++++++++++--- da/interchain/interchain.go | 14 +++--- da/interchain/retrieve_batches.go | 2 +- da/interchain/submit_batch.go | 14 ++++-- 5 files changed, 123 insertions(+), 24 deletions(-) diff --git a/da/da.go b/da/da.go index 940164d6b..3b65a385f 100644 --- a/da/da.go +++ b/da/da.go @@ -237,9 +237,6 @@ type DataAvailabilityLayerClient interface { // triggers a state transition in the DA layer. SubmitBatch(batch *types.Batch) ResultSubmitBatch - // SubmitBatchV2 is a method that supports MsgUpdateStateV2. - SubmitBatchV2(*types.Batch) ResultSubmitBatchV2 - GetClientType() Client // CheckBatchAvailability checks the availability of the blob submitted getting proofs and validating them @@ -248,13 +245,43 @@ type DataAvailabilityLayerClient interface { Synced() <-chan struct{} } +// ClientV2 defines generic interface for DA layer block submission. +type ClientV2 interface { + // DataAvailabilityLayerClient closure for backward compatibility + DataAvailabilityLayerClient + + // Init is called once to allow DA client to read configuration and initialize resources. + Init([]byte, *pubsub.Server, store.KV, types.Logger, ...Option) error + + // Start is called once, after Init. It starts the operation of ClientV2. + Start() error + + // Stop is called once, when DAClientV2 is no longer needed. + Stop() error + + // SubmitBatchV2 submits the passed in block to the DA layer. + SubmitBatchV2(*types.Batch) ResultSubmitBatchV2 + + GetClientType() Client + + Synced() <-chan struct{} +} + // BatchRetriever is additional interface that can be implemented by Data Availability Layer Client that is able to retrieve // block data from DA layer. This gives the ability to use it for block synchronization. type BatchRetriever interface { // RetrieveBatches returns blocks at given data layer height from data availability layer. RetrieveBatches(daMetaData *DASubmitMetaData) ResultRetrieveBatch - // RetrieveBatchesV2 is a method that supports MsgUpdateStateV2. - RetrieveBatchesV2(ResultSubmitBatchV2) ResultRetrieveBatchV2 // CheckBatchAvailability checks the availability of the blob received getting proofs and validating them CheckBatchAvailability(daMetaData *DASubmitMetaData) ResultCheckBatch } + +// BatchRetrieverV2 is an additional interface implemented by the DA layer client. It allows to retrieve +// block data from the DA layer and use this interface for block synchronization. +type BatchRetrieverV2 interface { + // BatchRetriever closure for backward compatibility + BatchRetriever + + // RetrieveBatchesV2 returns blocks by the given da.Path. + RetrieveBatchesV2(ResultSubmitBatchV2) ResultRetrieveBatchV2 +} diff --git a/da/interchain/config.go b/da/interchain/config.go index adb12b592..9294b4487 100644 --- a/da/interchain/config.go +++ b/da/interchain/config.go @@ -1,8 +1,14 @@ package interchain import ( + "errors" + "os" + "path/filepath" "time" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + sdk "github.com/cosmos/cosmos-sdk/types" + interchainda "github.com/dymensionxyz/dymint/types/pb/interchain_da" ) @@ -25,17 +31,77 @@ type DAConfig struct { RetryAttempts uint `mapstructure:"retry_attempts"` } +func (c *DAConfig) Verify() error { + if c.ClientID == "" { + return errors.New("missing IBC client ID") + } + + if c.ChainID == "" { + return errors.New("missing Chain ID of the DA layer") + } + + if c.KeyringBackend == "" { + return errors.New("missing Keyring Backend") + } + + if c.KeyringHomeDir == "" { + return errors.New("missing Keyring HomeDir") + } + + if c.AddressPrefix == "" { + return errors.New("missing Address Prefix") + } + + if c.AccountName == "" { + return errors.New("missing Account Name") + } + + if c.NodeAddress == "" { + return errors.New("missing Node Address") + } + + if c.GasLimit == 0 { + return errors.New("missing Gas Limit") + } + + if c.GasPrices == "" && c.GasFees == "" { + return errors.New("either gas prices or gas_prices are required") + } + + if c.GasPrices != "" && c.GasFees != "" { + return errors.New("cannot provide both fees and gas prices") + } + + // DAParams are set during Init + + if c.RetryMinDelay.Nanoseconds() == 0 { + return errors.New("missing Retry MinDelay") + } + + if c.RetryMaxDelay.Nanoseconds() == 0 { + return errors.New("missing Retry MaxDelay") + } + + if c.RetryAttempts == 0 { + return errors.New("missing Retry Attempts") + } + + return nil +} + func DefaultDAConfig() DAConfig { + home, _ := os.UserHomeDir() + keyringHomeDir := filepath.Join(home, ".simapp") return DAConfig{ ClientID: "", - ChainID: "", - KeyringBackend: "", - KeyringHomeDir: "", - AddressPrefix: "", - AccountName: "", - NodeAddress: "", + ChainID: "interchain-da-test", + KeyringBackend: keyring.BackendTest, + KeyringHomeDir: keyringHomeDir, + AddressPrefix: sdk.Bech32MainPrefix, + AccountName: "sequencer", + NodeAddress: "http://127.0.0.1:36657", GasLimit: 0, - GasPrices: "", + GasPrices: "10stake", GasFees: "", DAParams: interchainda.Params{}, RetryMinDelay: 100 * time.Millisecond, diff --git a/da/interchain/interchain.go b/da/interchain/interchain.go index df507b4a4..4823ed57f 100644 --- a/da/interchain/interchain.go +++ b/da/interchain/interchain.go @@ -22,8 +22,8 @@ import ( ) var ( - _ da.DataAvailabilityLayerClient = &DALayerClient{} - _ da.BatchRetriever = &DALayerClient{} + _ da.ClientV2 = &DALayerClient{} + _ da.BatchRetrieverV2 = &DALayerClient{} ) type DAClient interface { @@ -42,8 +42,6 @@ type DALayerClient struct { cdc codec.Codec synced chan struct{} - pubsubServer *pubsub.Server - daClient DAClient daConfig DAConfig } @@ -59,6 +57,11 @@ func (c *DALayerClient) Init(rawConfig []byte, _ *pubsub.Server, _ store.KV, log return fmt.Errorf("invalid config: %w", err) } + err = config.Verify() + if err != nil { + return fmt.Errorf("intechain DA config verification failed: %w", err) + } + // Create cosmos client with DA layer client, err := newDAClient(ctx, config) if err != nil { @@ -108,7 +111,6 @@ func (c *DALayerClient) Start() error { // Stop is called once, when DALayerClient is no longer needed. func (c *DALayerClient) Stop() error { - c.pubsubServer.Stop() c.cancel() return nil } @@ -123,5 +125,5 @@ func (c *DALayerClient) GetClientType() da.Client { } func (c *DALayerClient) CheckBatchAvailability(daMetaData *da.DASubmitMetaData) da.ResultCheckBatch { - panic("implement me") + panic("CheckBatchAvailability method is not supported by the interchain DA clint") } diff --git a/da/interchain/retrieve_batches.go b/da/interchain/retrieve_batches.go index e965b7fd4..5dd2616dc 100644 --- a/da/interchain/retrieve_batches.go +++ b/da/interchain/retrieve_batches.go @@ -3,7 +3,7 @@ package interchain import "github.com/dymensionxyz/dymint/da" func (c *DALayerClient) RetrieveBatches(daMetaData *da.DASubmitMetaData) da.ResultRetrieveBatch { - panic("implement me") + panic("RetrieveBatches method is not supported by the interchain DA clint") } func (c *DALayerClient) RetrieveBatchesV2(da.ResultSubmitBatchV2) da.ResultRetrieveBatchV2 { diff --git a/da/interchain/submit_batch.go b/da/interchain/submit_batch.go index 0b97bc035..a84eb25fa 100644 --- a/da/interchain/submit_batch.go +++ b/da/interchain/submit_batch.go @@ -59,34 +59,36 @@ func (c *DALayerClient) SubmitBatchV2(batch *types.Batch) da.ResultSubmitBatchV2 } } -type submitBatchResult struct { - BlobID uint64 - BlobHash string -} - +// submitBatch is used to process and transmit batches to the interchain DA. func (c *DALayerClient) submitBatch(batch *types.Batch) (*interchainda.Commitment, error) { + // Prepare the blob data blob, err := batch.MarshalBinary() if err != nil { return nil, fmt.Errorf("can't marshal batch: %w", err) } + // Gzip the blob gzipped, err := ioutils.Gzip(blob) if err != nil { return nil, fmt.Errorf("can't gzip batch: %w", err) } + // Verify the size of the blob is within the limit if len(blob) > int(c.daConfig.DAParams.MaxBlobSize) { return nil, fmt.Errorf("blob size %d exceeds the maximum allowed size %d", len(blob), c.daConfig.DAParams.MaxBlobSize) } + // Calculate the fees of submitting this blob feesToPay := sdk.NewCoin(c.daConfig.DAParams.CostPerByte.Denom, c.daConfig.DAParams.CostPerByte.Amount.MulRaw(int64(len(blob)))) + // Prepare the message to be sent to the DA layer msg := interchainda.MsgSubmitBlob{ Creator: c.daConfig.AccountName, Blob: gzipped, Fees: feesToPay, } + // Broadcast the message to the DA layer applying retries in case of failure var txResp cosmosclient.Response err = c.runWithRetry(func() error { txResp, err = c.broadcastTx(&msg) @@ -96,12 +98,14 @@ func (c *DALayerClient) submitBatch(batch *types.Batch) (*interchainda.Commitmen return nil, fmt.Errorf("can't broadcast MsgSubmitBlob to DA layer: %w", err) } + // Decode the response var resp interchainda.MsgSubmitBlobResponse err = txResp.Decode(&resp) if err != nil { return nil, fmt.Errorf("can't decode MsgSubmitBlob response: %w", err) } + // Get Merkle proof of the blob ID inclusion key, err := collections.EncodeKeyWithPrefix( interchainda.BlobMetadataPrefix(), collcodec.NewUint64Key[interchainda.BlobID](), From ec5ff7433b2a4c9bd178853a089c7c21e4ab3f20 Mon Sep 17 00:00:00 2001 From: keruch Date: Tue, 2 Jul 2024 10:54:37 +0200 Subject: [PATCH 10/12] feat(da): config tests --- config/toml.go | 2 + da/interchain/config.go | 56 ++++++------ da/interchain/config_test.go | 159 +++++++++++++++++++++++++++++++++++ da/registry/registry_test.go | 5 +- 4 files changed, 191 insertions(+), 31 deletions(-) create mode 100644 da/interchain/config_test.go diff --git a/config/toml.go b/config/toml.go index 1fa4d779b..05dfea4da 100644 --- a/config/toml.go +++ b/config/toml.go @@ -89,6 +89,8 @@ da_config = "{{ .DAConfig }}" # da_config = "{\"base_url\":\"http:\/\/127.0.0.1:26658\",\"timeout\":30000000000,\"gas_prices\":0.1,\"auth_token\":\"TOKEN\",\"backoff\":{\"initial_delay\":6000000000,\"max_delay\":6000000000,\"growth_factor\":2},\"retry_attempts\":4,\"retry_delay\":3000000000}" # Avail config example: # da_config = "{\"seed\": \"MNEMONIC\", \"api_url\": \"wss://kate.avail.tools/ws\", \"app_id\": 0, \"tip\":10}" +# Interchain DA config example: +# da_config = "{\"client_id\":\"dym-interchain\",\"chain_id\":\"interchain-da-test\",\"keyring_backend\":\"test\",\"keyring_home_dir\":\"/Users/keruch/.simapp\",\"address_prefix\":\"cosmos\",\"account_name\":\"sequencer\",\"node_address\":\"http://127.0.0.1:36657\",\"gas_prices\":\"10stake\",\"da_params\":{\"cost_per_byte\":{\"amount\":\"0\"}},\"retry_min_delay\":100000000,\"retry_max_delay\":2000000000,\"retry_attempts\":10}" ### p2p config ### diff --git a/da/interchain/config.go b/da/interchain/config.go index 9294b4487..0d5d8a137 100644 --- a/da/interchain/config.go +++ b/da/interchain/config.go @@ -13,22 +13,22 @@ import ( ) type DAConfig struct { - ClientID string `mapstructure:"client_id"` // IBC client ID between the Hub and DA layer - ChainID string `mapstructure:"chain_id"` // Chain ID of the DA layer - - KeyringBackend string `mapstructure:"keyring_backend"` - KeyringHomeDir string `mapstructure:"keyring_home_dir"` - AddressPrefix string `mapstructure:"address_prefix"` - AccountName string `mapstructure:"account_name"` - NodeAddress string `mapstructure:"node_address"` - GasLimit uint64 `mapstructure:"gas_limit"` - GasPrices string `mapstructure:"gas_prices"` - GasFees string `mapstructure:"gas_fees"` - DAParams interchainda.Params `mapstructure:"da_params"` - - RetryMinDelay time.Duration `mapstructure:"retry_min_delay"` - RetryMaxDelay time.Duration `mapstructure:"retry_min_delay"` - RetryAttempts uint `mapstructure:"retry_attempts"` + ClientID string `mapstructure:"client_id" json:"client_id,omitempty"` // IBC client ID between the Hub and DA layer + ChainID string `mapstructure:"chain_id" json:"chain_id,omitempty"` // Chain ID of the DA layer + + KeyringBackend string `mapstructure:"keyring_backend" json:"keyring_backend,omitempty"` + KeyringHomeDir string `mapstructure:"keyring_home_dir" json:"keyring_home_dir,omitempty"` + AddressPrefix string `mapstructure:"address_prefix" json:"address_prefix,omitempty"` + AccountName string `mapstructure:"account_name" json:"account_name,omitempty"` + NodeAddress string `mapstructure:"node_address" json:"node_address,omitempty"` + GasLimit uint64 `mapstructure:"gas_limit" json:"gas_limit,omitempty"` + GasPrices string `mapstructure:"gas_prices" json:"gas_prices,omitempty"` + GasFees string `mapstructure:"gas_fees" json:"gas_fees,omitempty"` + DAParams interchainda.Params `mapstructure:"da_params" json:"da_params"` + + RetryMinDelay time.Duration `mapstructure:"retry_min_delay" json:"retry_min_delay,omitempty"` + RetryMaxDelay time.Duration `mapstructure:"retry_min_delay" json:"retry_max_delay,omitempty"` + RetryAttempts uint `mapstructure:"retry_attempts" json:"retry_attempts,omitempty"` } func (c *DAConfig) Verify() error { @@ -37,32 +37,30 @@ func (c *DAConfig) Verify() error { } if c.ChainID == "" { - return errors.New("missing Chain ID of the DA layer") + return errors.New("missing chain ID of the DA layer") } if c.KeyringBackend == "" { - return errors.New("missing Keyring Backend") + return errors.New("missing keyring backend") } if c.KeyringHomeDir == "" { - return errors.New("missing Keyring HomeDir") + return errors.New("missing keyring home dir") } if c.AddressPrefix == "" { - return errors.New("missing Address Prefix") + return errors.New("missing address prefix") } if c.AccountName == "" { - return errors.New("missing Account Name") + return errors.New("missing account name") } if c.NodeAddress == "" { - return errors.New("missing Node Address") + return errors.New("missing node address") } - if c.GasLimit == 0 { - return errors.New("missing Gas Limit") - } + // GasLimit may be 0 if c.GasPrices == "" && c.GasFees == "" { return errors.New("either gas prices or gas_prices are required") @@ -75,15 +73,15 @@ func (c *DAConfig) Verify() error { // DAParams are set during Init if c.RetryMinDelay.Nanoseconds() == 0 { - return errors.New("missing Retry MinDelay") + return errors.New("missing retry min delay") } if c.RetryMaxDelay.Nanoseconds() == 0 { - return errors.New("missing Retry MaxDelay") + return errors.New("missing retry max delay") } if c.RetryAttempts == 0 { - return errors.New("missing Retry Attempts") + return errors.New("missing retry attempts") } return nil @@ -93,7 +91,7 @@ func DefaultDAConfig() DAConfig { home, _ := os.UserHomeDir() keyringHomeDir := filepath.Join(home, ".simapp") return DAConfig{ - ClientID: "", + ClientID: "dym-interchain", ChainID: "interchain-da-test", KeyringBackend: keyring.BackendTest, KeyringHomeDir: keyringHomeDir, diff --git a/da/interchain/config_test.go b/da/interchain/config_test.go new file mode 100644 index 000000000..79ffd01c4 --- /dev/null +++ b/da/interchain/config_test.go @@ -0,0 +1,159 @@ +package interchain_test + +import ( + "encoding/json" + "errors" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/dymensionxyz/dymint/da/interchain" + interchainda "github.com/dymensionxyz/dymint/types/pb/interchain_da" +) + +func TestDAConfig_Verify(t *testing.T) { + defaultConfig := interchain.DefaultDAConfig() + + tests := map[string]struct { + DaConfig func(interchain.DAConfig) interchain.DAConfig + expectedError error + }{ + "valid configuration": { + DaConfig: func(interchain.DAConfig) interchain.DAConfig { + return interchain.DAConfig{ + ClientID: "test client id", + ChainID: "test chain id", + KeyringBackend: "test keyring backend", + KeyringHomeDir: "test keyring home dir", + AddressPrefix: "/", + AccountName: "test account name", + NodeAddress: "test node address", + GasLimit: 1, + GasPrices: "1.00", + GasFees: "", + DAParams: interchainda.Params{}, + RetryMaxDelay: time.Second * 1, + RetryMinDelay: time.Second * 1, + RetryAttempts: 1, + } + }, + expectedError: nil, + }, + + "default is valid": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + return d + }, + expectedError: nil, + }, + "missing client ID": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.ClientID = "" + return d + }, + expectedError: errors.New("missing IBC client ID"), + }, + "missing chain ID": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.ChainID = "" + return d + }, + expectedError: errors.New("missing chain ID of the DA layer"), + }, + "missing keyring backend": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.KeyringBackend = "" + return d + }, + expectedError: errors.New("missing keyring backend"), + }, + "missing keyring home dir": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.KeyringHomeDir = "" + return d + }, + expectedError: errors.New("missing keyring home dir"), + }, + "missing address prefix": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.AddressPrefix = "" + return d + }, + expectedError: errors.New("missing address prefix"), + }, + "missing account name": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.AccountName = "" + return d + }, + expectedError: errors.New("missing account name"), + }, + "missing node address": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.NodeAddress = "" + return d + }, + expectedError: errors.New("missing node address"), + }, + "both gas prices and gas fees are missing": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.GasPrices = "" + d.GasFees = "" + return d + }, + expectedError: errors.New("either gas prices or gas_prices are required"), + }, + "both gas prices and gas fees are specified": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.GasPrices = "10stake" + d.GasFees = "10stake" + return d + }, + expectedError: errors.New("cannot provide both fees and gas prices"), + }, + "missing retry min delay": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.RetryMinDelay = 0 + return d + }, + expectedError: errors.New("missing retry min delay"), + }, + "missing retry max delay": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.RetryMaxDelay = 0 + return d + }, + expectedError: errors.New("missing retry max delay"), + }, + "missing retry attempts": { + DaConfig: func(d interchain.DAConfig) interchain.DAConfig { + d.RetryAttempts = 0 + return d + }, + expectedError: errors.New("missing retry attempts"), + }, + } + + for name, tc := range tests { + t.Run(name, func(t *testing.T) { + // Generate test case config + tcConf := tc.DaConfig(defaultConfig) + + err := tcConf.Verify() + + if tc.expectedError != nil { + require.ErrorContains(t, err, tc.expectedError.Error()) + } else { + require.NoError(t, err) + } + }) + } +} + +func Test(t *testing.T) { + conf := interchain.DefaultDAConfig() + data, err := json.Marshal(conf) + require.NoError(t, err) + t.Log(string(data)) +} diff --git a/da/registry/registry_test.go b/da/registry/registry_test.go index 507dfb2a2..1fb1040b0 100644 --- a/da/registry/registry_test.go +++ b/da/registry/registry_test.go @@ -3,14 +3,15 @@ package registry_test import ( "testing" - "github.com/dymensionxyz/dymint/da/registry" "github.com/stretchr/testify/assert" + + "github.com/dymensionxyz/dymint/da/registry" ) func TestRegistery(t *testing.T) { assert := assert.New(t) - expected := []string{"mock", "grpc", "celestia", "avail"} + expected := []string{"mock", "grpc", "celestia", "avail", "interchain"} actual := registry.RegisteredClients() assert.ElementsMatch(expected, actual) From 0770e35971866b5246b0c1274b82357ab2e13e2f Mon Sep 17 00:00:00 2001 From: keruch Date: Tue, 2 Jul 2024 18:51:20 +0200 Subject: [PATCH 11/12] feat(da): adjustments after manual testing --- da/interchain/chain_client.go | 16 +++++++- da/interchain/config.go | 35 ++++++++++------- da/interchain/interchain.go | 24 ++++++++---- da/interchain/interchain_test.go | 34 ++++++++++++++++ da/interchain/submit_batch.go | 66 +++++++++++++++++++++++++++++--- da/registry/registry.go | 3 +- 6 files changed, 148 insertions(+), 30 deletions(-) create mode 100644 da/interchain/interchain_test.go diff --git a/da/interchain/chain_client.go b/da/interchain/chain_client.go index 3fef37c66..3f4b371bb 100644 --- a/da/interchain/chain_client.go +++ b/da/interchain/chain_client.go @@ -5,6 +5,8 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/client/flags" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" "github.com/dymensionxyz/cosmosclient/cosmosclient" "github.com/ignite/cli/ignite/pkg/cosmosaccount" "github.com/tendermint/tendermint/libs/bytes" @@ -17,6 +19,7 @@ import ( type daClient struct { cosmosclient.Client queryClient interchainda.QueryClient + txService tx.ServiceClient } func newDAClient(ctx context.Context, config DAConfig) (*daClient, error) { @@ -27,6 +30,7 @@ func newDAClient(ctx context.Context, config DAConfig) (*daClient, error) { cosmosclient.WithFees(config.GasFees), cosmosclient.WithGasLimit(config.GasLimit), cosmosclient.WithGasPrices(config.GasPrices), + cosmosclient.WithGasAdjustment(config.GasAdjustment), cosmosclient.WithKeyringBackend(cosmosaccount.KeyringBackend(config.KeyringBackend)), cosmosclient.WithHome(config.KeyringHomeDir), }...) @@ -36,10 +40,18 @@ func newDAClient(ctx context.Context, config DAConfig) (*daClient, error) { return &daClient{ Client: c, queryClient: interchainda.NewQueryClient(c.Context().GRPCClient), + txService: tx.NewServiceClient(c.Context()), }, nil } func (c *daClient) Params(ctx context.Context) (interchainda.Params, error) { + return interchainda.Params{ + CostPerByte: sdk.NewInt64Coin(sdk.DefaultBondDenom, 1), + MaxBlobSize: 999999999, + DisputePeriod: 200, + }, nil + + // TODO: uncomment when we find a workaround on how to initialize the interchain da query client resp, err := c.queryClient.Params(ctx, &interchainda.QueryParamsRequest{}) if err != nil { return interchainda.Params{}, fmt.Errorf("can't query DA layer params: %w", err) @@ -47,8 +59,8 @@ func (c *daClient) Params(ctx context.Context) (interchainda.Params, error) { return resp.GetParams(), nil } -func (c *daClient) Tx(ctx context.Context, txHash []byte) (*ctypes.ResultTx, error) { - return c.RPC.Tx(ctx, txHash, false) +func (c *daClient) GetTx(ctx context.Context, txHash string) (*tx.GetTxResponse, error) { + return c.txService.GetTx(ctx, &tx.GetTxRequest{Hash: txHash}) } func (c *daClient) ABCIQueryWithProof( diff --git a/da/interchain/config.go b/da/interchain/config.go index 0d5d8a137..38da94c03 100644 --- a/da/interchain/config.go +++ b/da/interchain/config.go @@ -23,9 +23,13 @@ type DAConfig struct { NodeAddress string `mapstructure:"node_address" json:"node_address,omitempty"` GasLimit uint64 `mapstructure:"gas_limit" json:"gas_limit,omitempty"` GasPrices string `mapstructure:"gas_prices" json:"gas_prices,omitempty"` + GasAdjustment float64 `mapstructure:"gas_adjustment" json:"gas_adjustment,omitempty"` GasFees string `mapstructure:"gas_fees" json:"gas_fees,omitempty"` DAParams interchainda.Params `mapstructure:"da_params" json:"da_params"` + BatchAcceptanceTimeout time.Duration `mapstructure:"batch_acceptance_timeout" json:"batch_acceptance_timeout"` + BatchAcceptanceAttempts uint `mapstructure:"batch_acceptance_attempts" json:"batch_acceptance_attempts"` + RetryMinDelay time.Duration `mapstructure:"retry_min_delay" json:"retry_min_delay,omitempty"` RetryMaxDelay time.Duration `mapstructure:"retry_min_delay" json:"retry_max_delay,omitempty"` RetryAttempts uint `mapstructure:"retry_attempts" json:"retry_attempts,omitempty"` @@ -91,19 +95,22 @@ func DefaultDAConfig() DAConfig { home, _ := os.UserHomeDir() keyringHomeDir := filepath.Join(home, ".simapp") return DAConfig{ - ClientID: "dym-interchain", - ChainID: "interchain-da-test", - KeyringBackend: keyring.BackendTest, - KeyringHomeDir: keyringHomeDir, - AddressPrefix: sdk.Bech32MainPrefix, - AccountName: "sequencer", - NodeAddress: "http://127.0.0.1:36657", - GasLimit: 0, - GasPrices: "10stake", - GasFees: "", - DAParams: interchainda.Params{}, - RetryMinDelay: 100 * time.Millisecond, - RetryMaxDelay: 2 * time.Second, - RetryAttempts: 10, + ClientID: "dym-interchain", + ChainID: "my-test-chain", + KeyringBackend: keyring.BackendTest, + KeyringHomeDir: keyringHomeDir, + AddressPrefix: sdk.Bech32MainPrefix, + AccountName: "sequencer", + NodeAddress: "http://127.0.0.1:26657", + GasLimit: 0, + GasPrices: "10stake", + GasAdjustment: 1.1, + GasFees: "", + DAParams: interchainda.Params{}, + BatchAcceptanceTimeout: 5 * time.Second, + BatchAcceptanceAttempts: 10, + RetryMinDelay: 100 * time.Millisecond, + RetryMaxDelay: 2 * time.Second, + RetryAttempts: 10, } } diff --git a/da/interchain/interchain.go b/da/interchain/interchain.go index 4823ed57f..3573760b7 100644 --- a/da/interchain/interchain.go +++ b/da/interchain/interchain.go @@ -10,6 +10,7 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" "github.com/dymensionxyz/cosmosclient/cosmosclient" "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/libs/pubsub" @@ -28,9 +29,9 @@ var ( type DAClient interface { Context() sdkclient.Context - BroadcastTx(accountName string, msgs ...sdk.Msg) (cosmosclient.Response, error) - Params(ctx context.Context) (interchainda.Params, error) - Tx(ctx context.Context, txHash []byte) (*ctypes.ResultTx, error) + BroadcastTx(string, ...sdk.Msg) (cosmosclient.Response, error) + Params(context.Context) (interchainda.Params, error) + GetTx(context.Context, string) (*tx.GetTxResponse, error) ABCIQueryWithProof(ctx context.Context, path string, data bytes.HexBytes, height int64) (*ctypes.ResultABCIQuery, error) } @@ -42,8 +43,9 @@ type DALayerClient struct { cdc codec.Codec synced chan struct{} - daClient DAClient - daConfig DAConfig + accountAddress string // address of the sequencer in the DA layer + daClient DAClient + daConfig DAConfig } // Init is called once. It reads the DA client configuration and initializes resources for the interchain DA provider. @@ -75,21 +77,27 @@ func (c *DALayerClient) Init(rawConfig []byte, _ *pubsub.Server, _ store.KV, log } config.DAParams = daParams - // Create cancellable context - ctx, cancel := context.WithCancel(ctx) - // Create codec interfaceRegistry := cdctypes.NewInterfaceRegistry() cryptocodec.RegisterInterfaces(interfaceRegistry) interfaceRegistry.RegisterImplementations(&interchainda.MsgSubmitBlob{}) cdc := codec.NewProtoCodec(interfaceRegistry) + addr, err := client.Address(config.AccountName) + if err != nil { + return fmt.Errorf("cannot get '%s' account address from the provided keyring: %w", config.AccountName, err) + } + + // Create cancellable context + ctx, cancel := context.WithCancel(ctx) + // Fill client fields c.logger = logger c.ctx = ctx c.cancel = cancel c.cdc = cdc c.synced = make(chan struct{}) + c.accountAddress = addr.String() c.daClient = client c.daConfig = config diff --git a/da/interchain/interchain_test.go b/da/interchain/interchain_test.go new file mode 100644 index 000000000..f4ff0c54e --- /dev/null +++ b/da/interchain/interchain_test.go @@ -0,0 +1,34 @@ +package interchain_test + +import ( + "encoding/json" + "os" + "testing" + + "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" + + "github.com/dymensionxyz/dymint/da/interchain" + "github.com/dymensionxyz/dymint/types" +) + +// TODO: add interchain DA chain mock +func TestDALayerClient_Init(t *testing.T) { + client := new(interchain.DALayerClient) + config := interchain.DefaultDAConfig() + rawConfig, err := json.Marshal(config) + require.NoError(t, err) + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) + + err = client.Init(rawConfig, nil, nil, logger) + require.NoError(t, err) + + result := client.SubmitBatchV2(&types.Batch{ + StartHeight: 1, + EndHeight: 3, + Blocks: []*types.Block{{Header: types.Header{Height: 1}}}, + Commits: []*types.Commit{{Height: 1}}, + }) + require.NoError(t, result.Error) + t.Logf("result: %#v", result) +} diff --git a/da/interchain/submit_batch.go b/da/interchain/submit_batch.go index a84eb25fa..9dfea9d99 100644 --- a/da/interchain/submit_batch.go +++ b/da/interchain/submit_batch.go @@ -2,12 +2,14 @@ package interchain import ( "fmt" + "time" "cosmossdk.io/collections" collcodec "cosmossdk.io/collections/codec" "github.com/avast/retry-go/v4" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" "github.com/dymensionxyz/cosmosclient/cosmosclient" "github.com/dymensionxyz/dymint/da" @@ -83,7 +85,7 @@ func (c *DALayerClient) submitBatch(batch *types.Batch) (*interchainda.Commitmen // Prepare the message to be sent to the DA layer msg := interchainda.MsgSubmitBlob{ - Creator: c.daConfig.AccountName, + Creator: c.accountAddress, Blob: gzipped, Fees: feesToPay, } @@ -98,8 +100,18 @@ func (c *DALayerClient) submitBatch(batch *types.Batch) (*interchainda.Commitmen return nil, fmt.Errorf("can't broadcast MsgSubmitBlob to DA layer: %w", err) } - // Decode the response + // Wait until the tx in included into the DA layer + rawResp, err := c.waitResponse(txResp.TxHash) + if err != nil { + return nil, fmt.Errorf("can't check acceptance of the blob to DA layer: %w", err) + } + if rawResp.TxResponse.Code != 0 { + return nil, fmt.Errorf("MsgSubmitBlob is not executed in DA layer (code %d): %s", rawResp.TxResponse.Code, rawResp.TxResponse.RawLog) + } + + // cosmosclient.Response has convenient Decode method, so we reuse txResp to reuse it var resp interchainda.MsgSubmitBlobResponse + txResp.TxResponse = rawResp.TxResponse err = txResp.Decode(&resp) if err != nil { return nil, fmt.Errorf("can't decode MsgSubmitBlob response: %w", err) @@ -114,11 +126,18 @@ func (c *DALayerClient) submitBatch(batch *types.Batch) (*interchainda.Commitmen if err != nil { return nil, fmt.Errorf("can't encode DA lakey store key: %w", err) } - const keyPath = "/key" - abciResp, err := c.daClient.ABCIQueryWithProof(c.ctx, keyPath, key, txResp.Height) + abciPath := fmt.Sprintf("/store/%s/key", interchainda.StoreKey) + abciResp, err := c.daClient.ABCIQueryWithProof(c.ctx, abciPath, key, txResp.Height) if err != nil { return nil, fmt.Errorf("can't call ABCI query with proof for the BlobID %d: %w", resp.BlobId, err) } + if abciResp.Response.IsErr() { + return nil, fmt.Errorf("can't call ABCI query with proof for blob ID %d (code %d): %s", + resp.BlobId, abciResp.Response.Code, abciResp.Response.Log) + } + if abciResp.Response.Value == nil { + return nil, fmt.Errorf("ABCI query with proof for blob ID %d returned nil value", resp.BlobId) + } return &interchainda.Commitment{ ClientId: c.daConfig.ClientID, @@ -135,7 +154,7 @@ func (c *DALayerClient) broadcastTx(msgs ...sdk.Msg) (cosmosclient.Response, err return cosmosclient.Response{}, fmt.Errorf("can't broadcast MsgSubmitBlob to the DA layer: %w", err) } if txResp.Code != 0 { - return cosmosclient.Response{}, fmt.Errorf("MsgSubmitBlob broadcast tx status code is not 0: code %d", txResp.Code) + return cosmosclient.Response{}, fmt.Errorf("MsgSubmitBlob broadcast tx status code is not 0 (code %d): %s", txResp.Code, txResp.RawLog) } return txResp, nil } @@ -152,3 +171,40 @@ func (c *DALayerClient) runWithRetry(operation func() error) error { retry.DelayType(retry.BackOffDelay), ) } + +func (c *DALayerClient) waitResponse(txHash string) (*tx.GetTxResponse, error) { + timer := time.NewTicker(c.daConfig.BatchAcceptanceTimeout) + defer timer.Stop() + + var txResp *tx.GetTxResponse + attempt := uint(0) + + // First try then wait for the BatchAcceptanceTimeout + for { + err := c.runWithRetry(func() error { + var errX error + txResp, errX = c.daClient.GetTx(c.ctx, txHash) + return errX + }) + if err == nil { + return txResp, nil + } + + c.logger.Error("Can't check batch acceptance", + "attempt", attempt, "max_attempts", c.daConfig.BatchAcceptanceAttempts, "error", err) + + attempt++ + if attempt > c.daConfig.BatchAcceptanceAttempts { + return nil, fmt.Errorf("can't check batch acceptance after all attempts") + } + + // Wait for the timeout + select { + case <-c.ctx.Done(): + return nil, c.ctx.Err() + + case <-timer.C: + continue + } + } +} diff --git a/da/registry/registry.go b/da/registry/registry.go index 1006b103b..fbffd26de 100644 --- a/da/registry/registry.go +++ b/da/registry/registry.go @@ -5,6 +5,7 @@ import ( "github.com/dymensionxyz/dymint/da/avail" "github.com/dymensionxyz/dymint/da/celestia" "github.com/dymensionxyz/dymint/da/grpc" + "github.com/dymensionxyz/dymint/da/interchain" "github.com/dymensionxyz/dymint/da/local" ) @@ -14,7 +15,7 @@ var clients = map[string]func() da.DataAvailabilityLayerClient{ "grpc": func() da.DataAvailabilityLayerClient { return &grpc.DataAvailabilityLayerClient{} }, "celestia": func() da.DataAvailabilityLayerClient { return &celestia.DataAvailabilityLayerClient{} }, "avail": func() da.DataAvailabilityLayerClient { return &avail.DataAvailabilityLayerClient{} }, - "interchain": func() da.DataAvailabilityLayerClient { return &avail.DataAvailabilityLayerClient{} }, + "interchain": func() da.DataAvailabilityLayerClient { return &interchain.DALayerClient{} }, } // GetClient returns client identified by name. From 1e96c1b3e9c53953b70d10b67eaf752cbeac7fda Mon Sep 17 00:00:00 2001 From: keruch Date: Wed, 3 Jul 2024 17:48:37 +0200 Subject: [PATCH 12/12] fix checks --- da/interchain/chain_client.go | 10 +--------- da/interchain/interchain_test.go | 2 ++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/da/interchain/chain_client.go b/da/interchain/chain_client.go index 3f4b371bb..8db866fde 100644 --- a/da/interchain/chain_client.go +++ b/da/interchain/chain_client.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/client/flags" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/dymensionxyz/cosmosclient/cosmosclient" "github.com/ignite/cli/ignite/pkg/cosmosaccount" @@ -39,19 +38,12 @@ func newDAClient(ctx context.Context, config DAConfig) (*daClient, error) { } return &daClient{ Client: c, - queryClient: interchainda.NewQueryClient(c.Context().GRPCClient), + queryClient: interchainda.NewQueryClient(c.Context()), txService: tx.NewServiceClient(c.Context()), }, nil } func (c *daClient) Params(ctx context.Context) (interchainda.Params, error) { - return interchainda.Params{ - CostPerByte: sdk.NewInt64Coin(sdk.DefaultBondDenom, 1), - MaxBlobSize: 999999999, - DisputePeriod: 200, - }, nil - - // TODO: uncomment when we find a workaround on how to initialize the interchain da query client resp, err := c.queryClient.Params(ctx, &interchainda.QueryParamsRequest{}) if err != nil { return interchainda.Params{}, fmt.Errorf("can't query DA layer params: %w", err) diff --git a/da/interchain/interchain_test.go b/da/interchain/interchain_test.go index f4ff0c54e..97c2c38b0 100644 --- a/da/interchain/interchain_test.go +++ b/da/interchain/interchain_test.go @@ -14,6 +14,8 @@ import ( // TODO: add interchain DA chain mock func TestDALayerClient_Init(t *testing.T) { + t.Skip() // Test is not finished yet + client := new(interchain.DALayerClient) config := interchain.DefaultDAConfig() rawConfig, err := json.Marshal(config)