diff --git a/proto/sedachain/randomness/v1/genesis.proto b/proto/sedachain/randomness/v1/genesis.proto index 06393829..8d350fa2 100644 --- a/proto/sedachain/randomness/v1/genesis.proto +++ b/proto/sedachain/randomness/v1/genesis.proto @@ -1,10 +1,7 @@ syntax = "proto3"; package sedachain.randomness.v1; -import "gogoproto/gogo.proto"; - option go_package = "github.com/sedaprotocol/seda-chain/x/randomness/types"; -message GenesisState { - string seed = 1; -} +// GenesisState defines the randomness module's genesis state with a seed. +message GenesisState { string seed = 1; } diff --git a/proto/sedachain/randomness/v1/query.proto b/proto/sedachain/randomness/v1/query.proto index 5c2216fa..93ca131a 100644 --- a/proto/sedachain/randomness/v1/query.proto +++ b/proto/sedachain/randomness/v1/query.proto @@ -1,19 +1,22 @@ syntax = "proto3"; package sedachain.randomness.v1; -import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; option go_package = "github.com/sedaprotocol/seda-chain/x/randomness/types"; +// Query Serivce is the definition for the random modules gRPC query methods. service Query { + // For getting the random modules seed. rpc Seed(QuerySeedRequest) returns (QuerySeedResponse) { option (google.api.http).get = "/seda-chain/randomness/seed"; } } +// The message for getting the random modules seed. message QuerySeedRequest {} +// The message for returning the random modules seed. message QuerySeedResponse { string seed = 1; int64 block_height = 2; diff --git a/proto/sedachain/randomness/v1/randomness.proto b/proto/sedachain/randomness/v1/randomness.proto index 49387f90..59362940 100644 --- a/proto/sedachain/randomness/v1/randomness.proto +++ b/proto/sedachain/randomness/v1/randomness.proto @@ -2,14 +2,17 @@ syntax = "proto3"; package sedachain.randomness.v1; import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; option go_package = "github.com/sedaprotocol/seda-chain/x/randomness/types"; +// ValidatorVRF is the randomness validator's VRF key information message ValidatorVRF { - // operator_address defines the address of the validator's operator; bech encoded in JSON. - string operator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // vrf_pubkey is the public key of the validator's VRF key pair - google.protobuf.Any vrf_pubkey = 2 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; + // operator_address defines the address of the validator's operator; bech + // encoded in JSON. + string operator_address = 1 + [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // vrf_pubkey is the public key of the validator's VRF key pair + google.protobuf.Any vrf_pubkey = 2 + [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey" ]; } diff --git a/proto/sedachain/randomness/v1/tx.proto b/proto/sedachain/randomness/v1/tx.proto index 7a317ca0..ddc43f4b 100644 --- a/proto/sedachain/randomness/v1/tx.proto +++ b/proto/sedachain/randomness/v1/tx.proto @@ -5,17 +5,20 @@ import "cosmos/msg/v1/msg.proto"; option go_package = "github.com/sedaprotocol/seda-chain/x/randomness/types"; +// Msg service defines the gRPC tx methods. service Msg { - rpc NewSeed(MsgNewSeed) - returns (MsgNewSeedResponse); + // NewSeed defines a method for submitting a new seed to the chain. + rpc NewSeed(MsgNewSeed) returns (MsgNewSeedResponse); } +// The message for submitting a new seed to the chain. message MsgNewSeed { option (cosmos.msg.v1.signer) = "prover"; - + string prover = 1; // address of VRF key used to produce proof - string pi = 2; // VRF proof - string beta = 3; // VRF hash + string pi = 2; // VRF proof + string beta = 3; // VRF hash } +// The response message for submitting a new seed to the chain. message MsgNewSeedResponse {} diff --git a/proto/sedachain/staking/v1/tx.proto b/proto/sedachain/staking/v1/tx.proto index 403699ad..ec361f46 100644 --- a/proto/sedachain/staking/v1/tx.proto +++ b/proto/sedachain/staking/v1/tx.proto @@ -2,13 +2,11 @@ syntax = "proto3"; package sedachain.staking.v1; import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/staking/v1beta1/staking.proto"; -import "cosmos/staking/v1beta1/tx.proto"; import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; @@ -19,7 +17,8 @@ service Msg { // option (cosmos.msg.v1.service) = true; // CreateValidatorWithVRF defines a method for creating a new validator. - rpc CreateValidatorWithVRF(MsgCreateValidatorWithVRF) returns (MsgCreateValidatorWithVRFResponse); + rpc CreateValidatorWithVRF(MsgCreateValidatorWithVRF) + returns (MsgCreateValidatorWithVRFResponse); } // MsgCreateValidator defines a SDK message for creating a new validator. @@ -27,26 +26,32 @@ message MsgCreateValidatorWithVRF { option (cosmos.msg.v1.signer) = "validator_address"; // option (amino.name) = "cosmos-sdk/MsgCreateValidator"; - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - cosmos.staking.v1beta1.Description description = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - cosmos.staking.v1beta1.CommissionRates commission = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - string min_self_delegation = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", + cosmos.staking.v1beta1.Description description = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + cosmos.staking.v1beta1.CommissionRates commission = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + string min_self_delegation = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false, + (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. - // The validator address bytes and delegator address bytes refer to the same account while creating validator (defer - // only in bech32 notation). - string delegator_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString", deprecated = true]; - string validator_address = 5 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - google.protobuf.Any pubkey = 6 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; - cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - google.protobuf.Any vrf_pubkey = 8 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; - + // The validator address bytes and delegator address bytes refer to the same + // account while creating validator (defer only in bech32 notation). + string delegator_address = 4 + [ (cosmos_proto.scalar) = "cosmos.AddressString", deprecated = true ]; + string validator_address = 5 + [ (cosmos_proto.scalar) = "cosmos.ValidatorAddressString" ]; + google.protobuf.Any pubkey = 6 + [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey" ]; + cosmos.base.v1beta1.Coin value = 7 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + google.protobuf.Any vrf_pubkey = 8 + [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey" ]; } // MsgCreateValidatorResponse defines the Msg/CreateValidator response type. diff --git a/proto/sedachain/wasm_storage/v1/events.proto b/proto/sedachain/wasm_storage/v1/events.proto index 6c1411e8..502ebf0d 100644 --- a/proto/sedachain/wasm_storage/v1/events.proto +++ b/proto/sedachain/wasm_storage/v1/events.proto @@ -1,19 +1,18 @@ syntax = "proto3"; package sedachain.wasm_storage.v1; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - import "sedachain/wasm_storage/v1/wasm_storage.proto"; option go_package = "github.com/sedaprotocol/seda-chain/x/wasm-storage/types"; +// The msg for storing a data request wasm. message EventStoreDataRequestWasm { string hash = 1; WasmType wasm_type = 2; bytes bytecode = 3; } +// The msg for storing a overlay wasm(i.e. relayer or executor) message EventStoreOverlayWasm { string hash = 1; WasmType wasm_type = 2; diff --git a/proto/sedachain/wasm_storage/v1/genesis.proto b/proto/sedachain/wasm_storage/v1/genesis.proto index 3b131b7c..02c01243 100644 --- a/proto/sedachain/wasm_storage/v1/genesis.proto +++ b/proto/sedachain/wasm_storage/v1/genesis.proto @@ -6,6 +6,8 @@ import "sedachain/wasm_storage/v1/wasm_storage.proto"; option go_package = "github.com/sedaprotocol/seda-chain/x/wasm-storage/types"; +// GenesisState defines the wasm module's genesis state(i.e wasms stored at +// genesis.) message GenesisState { repeated Wasm wasms = 1 [ (gogoproto.nullable) = false ]; string proxy_contract_registry = 2; diff --git a/proto/sedachain/wasm_storage/v1/query.proto b/proto/sedachain/wasm_storage/v1/query.proto index 7a8b70d4..db130a0c 100644 --- a/proto/sedachain/wasm_storage/v1/query.proto +++ b/proto/sedachain/wasm_storage/v1/query.proto @@ -1,7 +1,6 @@ syntax = "proto3"; package sedachain.wasm_storage.v1; -import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "sedachain/wasm_storage/v1/wasm_storage.proto"; @@ -16,6 +15,7 @@ service Query { "/seda-chain/wasm-storage/data_request_wasm/{hash}"; } + // DataRequestWasms returns all Data Request Wasms. rpc DataRequestWasms(QueryDataRequestWasmsRequest) returns (QueryDataRequestWasmsResponse) { option (google.api.http).get = @@ -28,11 +28,13 @@ service Query { "/seda-chain/wasm-storage/overlay_wasm/{hash}"; } + // OverlayWasms returns all Overlay Wasms. rpc OverlayWasms(QueryOverlayWasmsRequest) returns (QueryOverlayWasmsResponse) { option (google.api.http).get = "/seda-chain/wasm-storage/overlay_wasms"; } + // ProxyContractRegistry returns the Proxy Contract Registry address. rpc ProxyContractRegistry(QueryProxyContractRegistryRequest) returns (QueryProxyContractRegistryResponse) { option (google.api.http).get = @@ -40,22 +42,32 @@ service Query { } } +// The request message for QueryDataRequestWasm RPC. message QueryDataRequestWasmRequest { string hash = 1; } +// The response message for QueryDataRequestWasm RPC. message QueryDataRequestWasmResponse { Wasm wasm = 1; } +// The request message for QueryDataRequestWasms RPC. message QueryDataRequestWasmsRequest {} +// The response message for QueryDataRequestWasms RPC. message QueryDataRequestWasmsResponse { repeated string hash_type_pairs = 1; } +// The request message for QueryOverlayWasm RPC. message QueryOverlayWasmRequest { string hash = 1; } +// The response message for QueryOverlayWasm RPC. message QueryOverlayWasmResponse { Wasm wasm = 1; } +// The request message for QueryOverlayWasms RPC. message QueryOverlayWasmsRequest {} +// The response message for QueryOverlayWasms RPC. message QueryOverlayWasmsResponse { repeated string hash_type_pairs = 1; } +// The request message for QueryProxyContractRegistry RPC. message QueryProxyContractRegistryRequest {} +// The response message for QueryProxyContractRegistry RPC. message QueryProxyContractRegistryResponse { string address = 1; } diff --git a/proto/sedachain/wasm_storage/v1/tx.proto b/proto/sedachain/wasm_storage/v1/tx.proto index d869e51d..e1b51835 100644 --- a/proto/sedachain/wasm_storage/v1/tx.proto +++ b/proto/sedachain/wasm_storage/v1/tx.proto @@ -9,36 +9,48 @@ import "sedachain/wasm_storage/v1/wasm_storage.proto"; option go_package = "github.com/sedaprotocol/seda-chain/x/wasm-storage/types"; +// Msg service defines the wasm-storage tx gRPC methods. service Msg { + // The StoreDataRequestWasm method stores a dr wasm in the wasm-storage + // module. rpc StoreDataRequestWasm(MsgStoreDataRequestWasm) returns (MsgStoreDataRequestWasmResponse); + // The StoreOverlayWasm method stores an overlay wasm in the wasm-storage + // module. rpc StoreOverlayWasm(MsgStoreOverlayWasm) returns (MsgStoreOverlayWasmResponse); + // The InstantiateAndRegisterProxyContract method instantiates the proxy + // contract and registers it's address. rpc InstantiateAndRegisterProxyContract( MsgInstantiateAndRegisterProxyContract) returns (MsgInstantiateAndRegisterProxyContractResponse); } +// The request message for the StoreDataRequestWasm method. message MsgStoreDataRequestWasm { option (cosmos.msg.v1.signer) = "sender"; string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; bytes wasm = 2; - WasmType wasmType = 3; + WasmType wasm_type = 3; } +// The response message for the StoreDataRequestWasm method. message MsgStoreDataRequestWasmResponse { string hash = 1; } +// The request message for the StoreOverlayWasm method. message MsgStoreOverlayWasm { option (cosmos.msg.v1.signer) = "sender"; string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; bytes wasm = 2; - WasmType wasmType = 3; + WasmType wasm_type = 3; } +// The response message for the StoreOverlayWasm method. message MsgStoreOverlayWasmResponse { string hash = 1; } +// The request message for the InstantiateAndRegisterProxyContract method. message MsgInstantiateAndRegisterProxyContract { option (cosmos.msg.v1.signer) = "sender"; @@ -57,6 +69,7 @@ message MsgInstantiateAndRegisterProxyContract { bool fix_msg = 8; } +// The response message for the InstantiateAndRegisterProxyContract method. message MsgInstantiateAndRegisterProxyContractResponse { string contract_address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; diff --git a/proto/sedachain/wasm_storage/v1/wasm_storage.proto b/proto/sedachain/wasm_storage/v1/wasm_storage.proto index cf0786fe..4e771232 100644 --- a/proto/sedachain/wasm_storage/v1/wasm_storage.proto +++ b/proto/sedachain/wasm_storage/v1/wasm_storage.proto @@ -6,26 +6,34 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/sedaprotocol/seda-chain/x/wasm-storage/types"; +// A Wasm msg. message Wasm { bytes hash = 1; bytes bytecode = 2; - WasmType wasmType = 3; + WasmType wasm_type = 3; google.protobuf.Timestamp added_at = 4 [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; } +// WasmType is an enum for the type of wasm. enum WasmType { option (gogoproto.goproto_enum_prefix) = false; + // An unspecified kind of wasm. WASM_TYPE_UNSPECIFIED = 0 [ (gogoproto.enumvalue_customname) = "WasmTypeNil" ]; + // A wasm that is a data request. WASM_TYPE_DATA_REQUEST = 1 [ (gogoproto.enumvalue_customname) = "WasmTypeDataRequest" ]; + // A wasm that is a DR tally. WASM_TYPE_TALLY = 2 [ (gogoproto.enumvalue_customname) = "WasmTypeTally" ]; + // A wasm that is an overlay executor. WASM_TYPE_DATA_REQUEST_EXECUTOR = 3 [ (gogoproto.enumvalue_customname) = "WasmTypeDataRequestExecutor" ]; + // A wasm that is an overlay relayer. WASM_TYPE_RELAYER = 4 [ (gogoproto.enumvalue_customname) = "WasmTypeRelayer" ]; } +// Params to define the max wasm size allowed. message Params { uint64 max_wasm_size = 1; }