From 2dfc5df7301415440a33158a8c327cae282d6ce0 Mon Sep 17 00:00:00 2001 From: gluax <16431709+gluax@users.noreply.github.com> Date: Thu, 24 Oct 2024 12:37:24 -0700 Subject: [PATCH 1/2] feat: new protobuf files and match latest version of chain --- Cargo.toml | 6 +- crates/proto-common/Cargo.toml | 18 +- .../sedachain/batching/v1/batching.proto | 84 +++++ .../proto/sedachain/batching/v1/genesis.proto | 27 ++ .../proto/sedachain/batching/v1/query.proto | 114 +++++++ .../proto/sedachain/pubkey/v1/genesis.proto | 22 ++ .../proto/sedachain/pubkey/v1/pubkey.proto | 14 + .../proto/sedachain/pubkey/v1/query.proto | 32 ++ .../proto/sedachain/pubkey/v1/tx.proto | 29 ++ .../sedachain/randomness/v1/genesis.proto | 7 - .../proto/sedachain/randomness/v1/query.proto | 23 -- .../sedachain/randomness/v1/randomness.proto | 18 - .../proto/sedachain/randomness/v1/tx.proto | 24 -- .../sedachain/wasm_storage/v1/genesis.proto | 6 +- .../sedachain/wasm_storage/v1/query.proto | 40 ++- .../proto/sedachain/wasm_storage/v1/tx.proto | 14 +- .../wasm_storage/v1/wasm_storage.proto | 10 +- crates/proto-common/src/gen/mod.rs | 20 +- .../src/gen/sedachain.batching.v1.rs | 319 ++++++++++++++++++ .../src/gen/sedachain.pubkey.v1.rs | 87 +++++ .../src/gen/sedachain.wasm_storage.v1.rs | 90 ++--- 21 files changed, 844 insertions(+), 160 deletions(-) create mode 100644 crates/proto-common/proto/sedachain/batching/v1/batching.proto create mode 100644 crates/proto-common/proto/sedachain/batching/v1/genesis.proto create mode 100644 crates/proto-common/proto/sedachain/batching/v1/query.proto create mode 100644 crates/proto-common/proto/sedachain/pubkey/v1/genesis.proto create mode 100644 crates/proto-common/proto/sedachain/pubkey/v1/pubkey.proto create mode 100644 crates/proto-common/proto/sedachain/pubkey/v1/query.proto create mode 100644 crates/proto-common/proto/sedachain/pubkey/v1/tx.proto delete mode 100644 crates/proto-common/proto/sedachain/randomness/v1/genesis.proto delete mode 100644 crates/proto-common/proto/sedachain/randomness/v1/query.proto delete mode 100644 crates/proto-common/proto/sedachain/randomness/v1/randomness.proto delete mode 100644 crates/proto-common/proto/sedachain/randomness/v1/tx.proto create mode 100644 crates/proto-common/src/gen/sedachain.batching.v1.rs create mode 100644 crates/proto-common/src/gen/sedachain.pubkey.v1.rs diff --git a/Cargo.toml b/Cargo.toml index 6481e52..1559b7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,15 +4,15 @@ members = ["crates/common", "crates/proto-common"] [workspace.dependencies] base64 = "0.22.1" -cosmos-sdk-proto = "0.25" +cosmos-sdk-proto = { version = "0.26", default-features = false } cosmwasm-schema = "1.5" cosmwasm-std = "1.5" cw-storage-plus = "1.2.0" hex = "0.4.3" k256 = "0.13" lazy_static = "1.5.0" -prost = "0.13" -prost-types = "0.13" +prost = { version = "0.13", default-features = false } +prost-types = { version = "0.13", default-features = false } schemars = { version = "0.8", features = ["semver"] } sha3 = "0.10" semver = { version = "1.0", features = ["serde"] } diff --git a/crates/proto-common/Cargo.toml b/crates/proto-common/Cargo.toml index bbd2391..b847f51 100644 --- a/crates/proto-common/Cargo.toml +++ b/crates/proto-common/Cargo.toml @@ -4,16 +4,26 @@ version = "0.4.0-dev.0" edition = "2021" [dependencies] -prost = { workspace = true, default-features = false } -prost-types = { workspace = true, default-features = false, optional = true } -cosmos-sdk-proto = { version = "0.25", default-features = false, optional = true } +prost = { workspace = true } +prost-types = { workspace = true, optional = true } +cosmos-sdk-proto = { workspace = true, optional = true } [features] default = [] -all = ["data_proxy", "randomness", "staking", "vesting", "wasm_storage"] +all = [ + "batching", + "data_proxy", + "pubkey", + "randomness", + "staking", + "vesting", + "wasm_storage", +] +batching = ["cosmos"] cosmos = ["dep:cosmos-sdk-proto"] cosmwasm = ["cosmos", "cosmos-sdk-proto/cosmwasm"] data_proxy = [] +pubkey = ["dep:prost-types"] randomness = ["dep:prost-types"] staking = ["dep:prost-types"] vesting = [] diff --git a/crates/proto-common/proto/sedachain/batching/v1/batching.proto b/crates/proto-common/proto/sedachain/batching/v1/batching.proto new file mode 100644 index 0000000..75b5c9d --- /dev/null +++ b/crates/proto-common/proto/sedachain/batching/v1/batching.proto @@ -0,0 +1,84 @@ +syntax = "proto3"; +package sedachain.batching.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/sedaprotocol/seda-chain/x/batching/types"; + +// Batch is an aggregation of data request results along with validator +// signatures used to prove these results on destination chains. +message Batch { + // batch_number is a unique identifier of the batch incremented + // every time a batch is created. + uint64 batch_number = 1; + // block_height is the height at which the batch was created. + int64 block_height = 2; + // data_result_root is the hex-encoded root of the data result + // merkle tree. + string data_result_root = 3; + // validator_root is the hex-encoded root of the validator merkle + // tree. + string validator_root = 4; + // batch_id is the Keccack-256 hash of the batch content. + bytes batch_id = 5; + // proving_medatada is a field for additional proving data. + bytes proving_medatada = 6; +} + +// TreeEntries are the given batch's data result tree entries and +// validator tree entries. +message TreeEntries { + // batch_number is the identifier of the batch the tree entries from. + uint64 batch_number = 1; + // data_result_entries are the entries (unhashed leaf contents) of + // the data result tree. + repeated bytes data_result_entries = 2; + // validator_entries are the entries (unhashed leaf contents) of + // the validator tree. + repeated bytes validator_entries = 3; +} + +// BatchSignatures contains basic validator data and its batch signatures +// under various cryptographic schemes. +message BatchSignatures { + string validator_addr = 1 + [ (cosmos_proto.scalar) = "cosmos.ValidatorAddressString" ]; + int64 voting_power = 2; + bytes signatures = 3; +} + +// Params is a list of parameters which can be changed through governance. +message Params { + option (gogoproto.equal) = true; + + // validator_set_trim_percent is the percentage of the validator + // set to store in the validator merkle tree in the batch. + uint32 validator_set_trim_percent = 1; +} + +// DataResult represents the result of a resolved data request. +message DataResult { + // id is the Keccack-256 hash of the data result. + string id = 1; + // dr_id is the data request identifier. + string dr_id = 2; + // version is a semantic version string. + string version = 3; + // block_height is the height at which the data request was tallied. + uint64 block_height = 4; + // exit_code is the exit code of the tally wasm binary execution. + uint32 exit_code = 5; + // gas_used is the gas used by the data request execution. + uint64 gas_used = 6; + // result is the result of the tally wasm binary execution. + bytes result = 7; + // payback_address is the payback address set by the relayer. + string payback_address = 8; + // seda_payload is the payload set by SEDA Protocol (e.g. OEV-enabled + // data requests) + string seda_payload = 9; + // consensus indicates whether consensus was reached in the tally + // process. + bool consensus = 10; +} diff --git a/crates/proto-common/proto/sedachain/batching/v1/genesis.proto b/crates/proto-common/proto/sedachain/batching/v1/genesis.proto new file mode 100644 index 0000000..200136c --- /dev/null +++ b/crates/proto-common/proto/sedachain/batching/v1/genesis.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; +package sedachain.batching.v1; + +import "gogoproto/gogo.proto"; +import "sedachain/batching/v1/batching.proto"; + +option go_package = "github.com/sedaprotocol/seda-chain/x/batching/types"; + +// GenesisState defines the batching module's genesis state. +message GenesisState { + // current_batch_number is the batch number of the most recently- + // created batch. + uint64 current_batch_number = 1; + repeated Batch batches = 2 [ (gogoproto.nullable) = false ]; + repeated TreeEntries tree_entries = 3 [ (gogoproto.nullable) = false ]; + repeated DataResult data_results = 4 [ (gogoproto.nullable) = false ]; + repeated BatchAssignment batch_assignments = 5 + [ (gogoproto.nullable) = false ]; + Params params = 6 [ (gogoproto.nullable) = false ]; +} + +// BatchAssignment represents a batch assignment for genesis export +// and import. +message BatchAssignment { + uint64 batch_number = 1; + string data_request_id = 2; +} diff --git a/crates/proto-common/proto/sedachain/batching/v1/query.proto b/crates/proto-common/proto/sedachain/batching/v1/query.proto new file mode 100644 index 0000000..ffa806d --- /dev/null +++ b/crates/proto-common/proto/sedachain/batching/v1/query.proto @@ -0,0 +1,114 @@ +syntax = "proto3"; +package sedachain.batching.v1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "sedachain/batching/v1/batching.proto"; + +option go_package = "github.com/sedaprotocol/seda-chain/x/batching/types"; + +// Query defines the gRPC querier service. +service Query { + // Batch returns a batch given the batch number. + rpc Batch(QueryBatchRequest) returns (QueryBatchResponse) { + option (google.api.http).get = "/seda-chain/batching/batch/{batch_number}"; + } + + // BatchForHeight returns a batch created at a given block height. + rpc BatchForHeight(QueryBatchForHeightRequest) + returns (QueryBatchForHeightResponse) { + option (google.api.http).get = + "/seda-chain/batching/batch_for_height/{block_height}"; + } + + // Batch returns all batches in the store. + rpc Batches(QueryBatchesRequest) returns (QueryBatchesResponse) { + option (google.api.http).get = "/seda-chain/batching/batches"; + } + + // TreeEntries returns the tree entries from the given batch number. + rpc TreeEntries(QueryTreeEntriesRequest) returns (QueryTreeEntriesResponse) { + option (google.api.http).get = + "/seda-chain/batching/tree_entries/{batch_number}"; + } + + // BatchSignatures returns the batch signatures for the given batch + // and the + rpc BatchSignatures(QueryBatchSignaturesRequest) + returns (QueryBatchSignaturesResponse) { + option (google.api.http).get = + "/seda-chain/batching/batch_signatures/{batch_number}"; + } + + // DataResult returns a data result given its associated data request's + // ID. + rpc DataResult(QueryDataResultRequest) returns (QueryDataResultResponse) { + option (google.api.http).get = + "/seda-chain/batching/data_result/{data_request_id}"; + } + + // BatchAssignment returns the batch number that a given data request + // has been assigned to. + rpc BatchAssignment(QueryBatchAssignmentRequest) + returns (QueryBatchAssignmentResponse) { + option (google.api.http).get = + "/seda-chain/batching/batch_assignment/{data_request_id}"; + } +} + +// The request message for QueryBatch RPC. +message QueryBatchRequest { uint64 batch_number = 1; } + +// The response message for QueryBatch RPC. +message QueryBatchResponse { Batch batch = 1 [ (gogoproto.nullable) = false ]; } + +// The request message for BatchForHeight RPC. +message QueryBatchForHeightRequest { int64 block_height = 1; } + +// The response message for BatchForHeight RPC. +message QueryBatchForHeightResponse { + Batch batch = 1 [ (gogoproto.nullable) = false ]; +} + +// The request message for QueryBatches RPC. +message QueryBatchesRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// The response message for QueryBatches RPC. +message QueryBatchesResponse { + repeated Batch batches = 1 [ (gogoproto.nullable) = false ]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// The request message for QueryTreeEntries RPC. +message QueryTreeEntriesRequest { uint64 batch_number = 1; } + +// The response message for QueryTreeEntries RPC. +message QueryTreeEntriesResponse { + TreeEntries entries = 1 [ (gogoproto.nullable) = false ]; +} + +// The request message for QueryBatchSignaturesRequest RPC. +message QueryBatchSignaturesRequest { uint64 batch_number = 1; } + +// The response message for QueryQueryBatchSignatures RPC. +message QueryBatchSignaturesResponse { + repeated BatchSignatures batch_sigs = 1 [ (gogoproto.nullable) = false ]; +} + +// The request message for QueryDataResult RPC. +message QueryDataResultRequest { string data_request_id = 1; } + +// The response message for QueryDataResult RPC. +message QueryDataResultResponse { + DataResult data_result = 1 [ (gogoproto.nullable) = false ]; +} + +// The request message for QueryBatchAssignment RPC. +message QueryBatchAssignmentRequest { string data_request_id = 1; } + +// The response message for QueryBatchAssignment RPC. +message QueryBatchAssignmentResponse { uint64 batch_number = 1; } diff --git a/crates/proto-common/proto/sedachain/pubkey/v1/genesis.proto b/crates/proto-common/proto/sedachain/pubkey/v1/genesis.proto new file mode 100644 index 0000000..19224ad --- /dev/null +++ b/crates/proto-common/proto/sedachain/pubkey/v1/genesis.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package sedachain.pubkey.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "sedachain/pubkey/v1/pubkey.proto"; + +option go_package = "github.com/sedaprotocol/seda-chain/x/pubkey/types"; + +// GenesisState defines pubkey module's genesis state. +message GenesisState { + repeated ValidatorPubKeys validator_pub_keys = 1 + [ (gogoproto.nullable) = false ]; +} + +// ValidatorPubKeys defines a validator's list of registered public keys +// primarily used in the x/pubkey genesis state. +message ValidatorPubKeys { + string validator_addr = 1 + [ (cosmos_proto.scalar) = "cosmos.ValidatorAddressString" ]; + repeated IndexedPubKey indexed_pub_keys = 2 [ (gogoproto.nullable) = false ]; +} diff --git a/crates/proto-common/proto/sedachain/pubkey/v1/pubkey.proto b/crates/proto-common/proto/sedachain/pubkey/v1/pubkey.proto new file mode 100644 index 0000000..8f57451 --- /dev/null +++ b/crates/proto-common/proto/sedachain/pubkey/v1/pubkey.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package sedachain.pubkey.v1; + +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/sedaprotocol/seda-chain/x/pubkey/types"; + +// IndexPubKeyPair defines an index - public key pair. +message IndexedPubKey { + uint32 index = 1; + google.protobuf.Any pub_key = 2 + [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey" ]; +} diff --git a/crates/proto-common/proto/sedachain/pubkey/v1/query.proto b/crates/proto-common/proto/sedachain/pubkey/v1/query.proto new file mode 100644 index 0000000..84f822b --- /dev/null +++ b/crates/proto-common/proto/sedachain/pubkey/v1/query.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; +package sedachain.pubkey.v1; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "sedachain/pubkey/v1/genesis.proto"; + +option go_package = "github.com/sedaprotocol/seda-chain/x/pubkey/types"; + +// Query defines the gRPC querier service. +service Query { + // ValidatorKeys returns a given validator's registered keys. + rpc ValidatorKeys(QueryValidatorKeysRequest) + returns (QueryValidatorKeysResponse) { + option (google.api.http).get = + "/seda-chain/pubkey/validator_keys/{validator_addr}"; + } +} + +// QueryValidatorKeysRequest is request type for the Query/ValidatorKeys RPC +// method. +message QueryValidatorKeysRequest { + string validator_addr = 1 + [ (cosmos_proto.scalar) = "cosmos.ValidatorAddressString" ]; +} + +// QueryValidatorKeysResponse is response type for the Query/ValidatorKeys RPC +// method. +message QueryValidatorKeysResponse { + ValidatorPubKeys validator_pub_keys = 1 [ (gogoproto.nullable) = false ]; +} diff --git a/crates/proto-common/proto/sedachain/pubkey/v1/tx.proto b/crates/proto-common/proto/sedachain/pubkey/v1/tx.proto new file mode 100644 index 0000000..d8a0cf3 --- /dev/null +++ b/crates/proto-common/proto/sedachain/pubkey/v1/tx.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; +package sedachain.pubkey.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; +import "sedachain/pubkey/v1/pubkey.proto"; + +option go_package = "github.com/sedaprotocol/seda-chain/x/pubkey/types"; + +// Msg defines the pubkey Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // AddKey defines a method for registering a new public key. + rpc AddKey(MsgAddKey) returns (MsgAddKeyResponse); +} + +// MsgAddKey defines a message for registering a new public key. +message MsgAddKey { + option (cosmos.msg.v1.signer) = "validator_addr"; + + string validator_addr = 1 + [ (cosmos_proto.scalar) = "cosmos.ValidatorAddressString" ]; + repeated IndexedPubKey indexed_pub_keys = 2 [ (gogoproto.nullable) = false ]; +} + +// MsgAddKeyResponse defines the Msg/MsgAddKey response type. +message MsgAddKeyResponse {} diff --git a/crates/proto-common/proto/sedachain/randomness/v1/genesis.proto b/crates/proto-common/proto/sedachain/randomness/v1/genesis.proto deleted file mode 100644 index 8d350fa..0000000 --- a/crates/proto-common/proto/sedachain/randomness/v1/genesis.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; -package sedachain.randomness.v1; - -option go_package = "github.com/sedaprotocol/seda-chain/x/randomness/types"; - -// GenesisState defines the randomness module's genesis state with a seed. -message GenesisState { string seed = 1; } diff --git a/crates/proto-common/proto/sedachain/randomness/v1/query.proto b/crates/proto-common/proto/sedachain/randomness/v1/query.proto deleted file mode 100644 index aa04912..0000000 --- a/crates/proto-common/proto/sedachain/randomness/v1/query.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; -package sedachain.randomness.v1; - -import "google/api/annotations.proto"; - -option go_package = "github.com/sedaprotocol/seda-chain/x/randomness/types"; - -// Query Service 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/crates/proto-common/proto/sedachain/randomness/v1/randomness.proto b/crates/proto-common/proto/sedachain/randomness/v1/randomness.proto deleted file mode 100644 index 5936294..0000000 --- a/crates/proto-common/proto/sedachain/randomness/v1/randomness.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; -package sedachain.randomness.v1; - -import "google/protobuf/any.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" ]; -} diff --git a/crates/proto-common/proto/sedachain/randomness/v1/tx.proto b/crates/proto-common/proto/sedachain/randomness/v1/tx.proto deleted file mode 100644 index ddc43f4..0000000 --- a/crates/proto-common/proto/sedachain/randomness/v1/tx.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package sedachain.randomness.v1; - -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 { - // 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 -} - -// The response message for submitting a new seed to the chain. -message MsgNewSeedResponse {} diff --git a/crates/proto-common/proto/sedachain/wasm_storage/v1/genesis.proto b/crates/proto-common/proto/sedachain/wasm_storage/v1/genesis.proto index a1143ea..7962b0e 100644 --- a/crates/proto-common/proto/sedachain/wasm_storage/v1/genesis.proto +++ b/crates/proto-common/proto/sedachain/wasm_storage/v1/genesis.proto @@ -6,12 +6,10 @@ 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.) +// GenesisState defines wasm-storage module's genesis state. message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; - repeated DataRequestWasm data_request_wasms = 2 - [ (gogoproto.nullable) = false ]; + repeated OracleProgram oracle_programs = 2 [ (gogoproto.nullable) = false ]; repeated ExecutorWasm executor_wasms = 3 [ (gogoproto.nullable) = false ]; string core_contract_registry = 4; } diff --git a/crates/proto-common/proto/sedachain/wasm_storage/v1/query.proto b/crates/proto-common/proto/sedachain/wasm_storage/v1/query.proto index 7bec0cd..7a08467 100644 --- a/crates/proto-common/proto/sedachain/wasm_storage/v1/query.proto +++ b/crates/proto-common/proto/sedachain/wasm_storage/v1/query.proto @@ -2,24 +2,24 @@ syntax = "proto3"; package sedachain.wasm_storage.v1; import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; import "sedachain/wasm_storage/v1/wasm_storage.proto"; option go_package = "github.com/sedaprotocol/seda-chain/x/wasm-storage/types"; // Query defines the gRPC querier service. service Query { - // DataRequestWasm returns a data request wasm given its hash. - rpc DataRequestWasm(QueryDataRequestWasmRequest) - returns (QueryDataRequestWasmResponse) { + // OracleProgram returns an oracle program given its hash. + rpc OracleProgram(QueryOracleProgramRequest) + returns (QueryOracleProgramResponse) { option (google.api.http).get = - "/seda-chain/wasm-storage/data_request_wasm/{hash}"; + "/seda-chain/wasm-storage/oracle_program/{hash}"; } - // DataRequestWasms returns all data request wasms. - rpc DataRequestWasms(QueryDataRequestWasmsRequest) - returns (QueryDataRequestWasmsResponse) { - option (google.api.http).get = - "/seda-chain/wasm-storage/data_request_wasms"; + // OraclePrograms returns all oracle programs. + rpc OraclePrograms(QueryOracleProgramsRequest) + returns (QueryOracleProgramsResponse) { + option (google.api.http).get = "/seda-chain/wasm-storage/oracle_programs"; } // ExecutorWasm returns an executor wasm given its hash. @@ -43,17 +43,23 @@ service Query { } } -// The request message for QueryDataRequestWasm RPC. -message QueryDataRequestWasmRequest { string hash = 1; } +// The request message for QueryOracleProgram RPC. +message QueryOracleProgramRequest { string hash = 1; } -// The response message for QueryDataRequestWasm RPC. -message QueryDataRequestWasmResponse { DataRequestWasm wasm = 1; } +// The response message for QueryOracleProgram RPC. +message QueryOracleProgramResponse { OracleProgram oracle_program = 1; } -// The request message for QueryDataRequestWasms RPC. -message QueryDataRequestWasmsRequest {} +// The request message for QueryOraclePrograms RPC. +message QueryOracleProgramsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} -// The response message for QueryDataRequestWasms RPC. -message QueryDataRequestWasmsResponse { repeated string list = 1; } +// The response message for QueryOraclePrograms RPC. +message QueryOracleProgramsResponse { + repeated string list = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} // The request message for QueryExecutorWasm RPC. message QueryExecutorWasmRequest { string hash = 1; } diff --git a/crates/proto-common/proto/sedachain/wasm_storage/v1/tx.proto b/crates/proto-common/proto/sedachain/wasm_storage/v1/tx.proto index 31fb622..6493aa3 100644 --- a/crates/proto-common/proto/sedachain/wasm_storage/v1/tx.proto +++ b/crates/proto-common/proto/sedachain/wasm_storage/v1/tx.proto @@ -11,9 +11,9 @@ option go_package = "github.com/sedaprotocol/seda-chain/x/wasm-storage/types"; // Msg service defines the wasm-storage tx gRPC methods. service Msg { - // StoreDataRequestWasm stores a data request wasm. - rpc StoreDataRequestWasm(MsgStoreDataRequestWasm) - returns (MsgStoreDataRequestWasmResponse); + // StoreOracleProgram stores an oracle program. + rpc StoreOracleProgram(MsgStoreOracleProgram) + returns (MsgStoreOracleProgramResponse); // StoreExecutorWasm stores an executor wasm. rpc StoreExecutorWasm(MsgStoreExecutorWasm) returns (MsgStoreExecutorWasmResponse); @@ -25,16 +25,16 @@ service Msg { rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } -// The request message for the StoreDataRequestWasm method. -message MsgStoreDataRequestWasm { +// The request message for the StoreOracleProgram method. +message MsgStoreOracleProgram { option (cosmos.msg.v1.signer) = "sender"; string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; bytes wasm = 2; } -// The response message for the StoreDataRequestWasm method. -message MsgStoreDataRequestWasmResponse { string hash = 1; } +// The response message for the StoreOracleProgram method. +message MsgStoreOracleProgramResponse { string hash = 1; } // The request message for the StoreExecutorWasm method. message MsgStoreExecutorWasm { diff --git a/crates/proto-common/proto/sedachain/wasm_storage/v1/wasm_storage.proto b/crates/proto-common/proto/sedachain/wasm_storage/v1/wasm_storage.proto index 42322c2..a3c2646 100644 --- a/crates/proto-common/proto/sedachain/wasm_storage/v1/wasm_storage.proto +++ b/crates/proto-common/proto/sedachain/wasm_storage/v1/wasm_storage.proto @@ -6,18 +6,18 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/sedaprotocol/seda-chain/x/wasm-storage/types"; -// DataRequestWasm represents a wasm used for data requests. -message DataRequestWasm { +// OracleProgram is a wasm used for data request. +message OracleProgram { bytes hash = 1; bytes bytecode = 2; google.protobuf.Timestamp added_at = 3 [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; - // ExpirationHeight represents the block height at which the data request - // wasm will be pruned. The value of zero means no expiration. + // ExpirationHeight represents the block height at which the oracle + // program will be pruned. The value of zero means no expiration. int64 expiration_height = 4; } -// ExecutorWasm represents a wasm used for some execution in the protocol. +// ExecutorWasm is a wasm used by some component in the protocol. message ExecutorWasm { bytes hash = 1; bytes bytecode = 2; diff --git a/crates/proto-common/src/gen/mod.rs b/crates/proto-common/src/gen/mod.rs index 8af36fa..7427955 100644 --- a/crates/proto-common/src/gen/mod.rs +++ b/crates/proto-common/src/gen/mod.rs @@ -1,27 +1,37 @@ +#[cfg(feature = "batching")] +#[path = "sedachain.batching.v1.rs"] +#[rustfmt::skip] +pub mod batching; + #[cfg(feature = "data_proxy")] #[path = "sedachain.data_proxy.v1.rs"] #[rustfmt::skip] -pub mod sedachain_data_proxy; +pub mod data_proxy; + +#[cfg(feature = "pubkey")] +#[path = "sedachain.pubkey.v1.rs"] +#[rustfmt::skip] +pub mod pubkey; #[cfg(feature = "randomness")] #[path = "sedachain.randomness.v1.rs"] #[rustfmt::skip] -pub mod sedachain_randomness; +pub mod randomness; #[cfg(feature = "staking")] #[path = "sedachain.staking.v1.rs"] #[rustfmt::skip] -pub mod sedachain_staking; +pub mod staking; #[cfg(feature = "vesting")] #[path = "sedachain.vesting.v1.rs"] #[rustfmt::skip] -pub mod sedachain_vesting; +pub mod vesting; #[cfg(feature = "wasm_storage")] #[path = "sedachain.wasm_storage.v1.rs"] #[rustfmt::skip] -pub mod sedachain_wasm_storage; +pub mod wasm_storage; // re-export prost #[cfg(feature = "cosmos")] diff --git a/crates/proto-common/src/gen/sedachain.batching.v1.rs b/crates/proto-common/src/gen/sedachain.batching.v1.rs new file mode 100644 index 0000000..31a88b6 --- /dev/null +++ b/crates/proto-common/src/gen/sedachain.batching.v1.rs @@ -0,0 +1,319 @@ +// @generated +// This file is @generated by prost-build. +/// Batch is an aggregation of data request results along with validator +/// signatures used to prove these results on destination chains. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Batch { + /// batch_number is a unique identifier of the batch incremented + /// every time a batch is created. + #[prost(uint64, tag="1")] + pub batch_number: u64, + /// block_height is the height at which the batch was created. + #[prost(int64, tag="2")] + pub block_height: i64, + /// data_result_root is the hex-encoded root of the data result + /// merkle tree. + #[prost(string, tag="3")] + pub data_result_root: ::prost::alloc::string::String, + /// validator_root is the hex-encoded root of the validator merkle + /// tree. + #[prost(string, tag="4")] + pub validator_root: ::prost::alloc::string::String, + /// batch_id is the Keccack-256 hash of the batch content. + #[prost(bytes="bytes", tag="5")] + pub batch_id: ::prost::bytes::Bytes, + /// proving_medatada is a field for additional proving data. + #[prost(bytes="bytes", tag="6")] + pub proving_medatada: ::prost::bytes::Bytes, +} +impl ::prost::Name for Batch { +const NAME: &'static str = "Batch"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.Batch".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.Batch".into() }} +/// TreeEntries are the given batch's data result tree entries and +/// validator tree entries. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TreeEntries { + /// batch_number is the identifier of the batch the tree entries from. + #[prost(uint64, tag="1")] + pub batch_number: u64, + /// data_result_entries are the entries (unhashed leaf contents) of + /// the data result tree. + #[prost(bytes="bytes", repeated, tag="2")] + pub data_result_entries: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, + /// validator_entries are the entries (unhashed leaf contents) of + /// the validator tree. + #[prost(bytes="bytes", repeated, tag="3")] + pub validator_entries: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, +} +impl ::prost::Name for TreeEntries { +const NAME: &'static str = "TreeEntries"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.TreeEntries".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.TreeEntries".into() }} +/// BatchSignatures contains basic validator data and its batch signatures +/// under various cryptographic schemes. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BatchSignatures { + #[prost(string, tag="1")] + pub validator_addr: ::prost::alloc::string::String, + #[prost(int64, tag="2")] + pub voting_power: i64, + #[prost(bytes="bytes", tag="3")] + pub signatures: ::prost::bytes::Bytes, +} +impl ::prost::Name for BatchSignatures { +const NAME: &'static str = "BatchSignatures"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.BatchSignatures".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.BatchSignatures".into() }} +/// Params is a list of parameters which can be changed through governance. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Params { + /// validator_set_trim_percent is the percentage of the validator + /// set to store in the validator merkle tree in the batch. + #[prost(uint32, tag="1")] + pub validator_set_trim_percent: u32, +} +impl ::prost::Name for Params { +const NAME: &'static str = "Params"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.Params".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.Params".into() }} +/// DataResult represents the result of a resolved data request. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataResult { + /// id is the Keccack-256 hash of the data result. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// dr_id is the data request identifier. + #[prost(string, tag="2")] + pub dr_id: ::prost::alloc::string::String, + /// version is a semantic version string. + #[prost(string, tag="3")] + pub version: ::prost::alloc::string::String, + /// block_height is the height at which the data request was tallied. + #[prost(uint64, tag="4")] + pub block_height: u64, + /// exit_code is the exit code of the tally wasm binary execution. + #[prost(uint32, tag="5")] + pub exit_code: u32, + /// gas_used is the gas used by the data request execution. + #[prost(uint64, tag="6")] + pub gas_used: u64, + /// result is the result of the tally wasm binary execution. + #[prost(bytes="bytes", tag="7")] + pub result: ::prost::bytes::Bytes, + /// payback_address is the payback address set by the relayer. + #[prost(string, tag="8")] + pub payback_address: ::prost::alloc::string::String, + /// seda_payload is the payload set by SEDA Protocol (e.g. OEV-enabled + /// data requests) + #[prost(string, tag="9")] + pub seda_payload: ::prost::alloc::string::String, + /// consensus indicates whether consensus was reached in the tally + /// process. + #[prost(bool, tag="10")] + pub consensus: bool, +} +impl ::prost::Name for DataResult { +const NAME: &'static str = "DataResult"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.DataResult".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.DataResult".into() }} +/// GenesisState defines the batching module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenesisState { + /// current_batch_number is the batch number of the most recently- + /// created batch. + #[prost(uint64, tag="1")] + pub current_batch_number: u64, + #[prost(message, repeated, tag="2")] + pub batches: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="3")] + pub tree_entries: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="4")] + pub data_results: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="5")] + pub batch_assignments: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="6")] + pub params: ::core::option::Option, +} +impl ::prost::Name for GenesisState { +const NAME: &'static str = "GenesisState"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.GenesisState".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.GenesisState".into() }} +/// BatchAssignment represents a batch assignment for genesis export +/// and import. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BatchAssignment { + #[prost(uint64, tag="1")] + pub batch_number: u64, + #[prost(string, tag="2")] + pub data_request_id: ::prost::alloc::string::String, +} +impl ::prost::Name for BatchAssignment { +const NAME: &'static str = "BatchAssignment"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.BatchAssignment".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.BatchAssignment".into() }} +/// The request message for QueryBatch RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct QueryBatchRequest { + #[prost(uint64, tag="1")] + pub batch_number: u64, +} +impl ::prost::Name for QueryBatchRequest { +const NAME: &'static str = "QueryBatchRequest"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryBatchRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryBatchRequest".into() }} +/// The response message for QueryBatch RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryBatchResponse { + #[prost(message, optional, tag="1")] + pub batch: ::core::option::Option, +} +impl ::prost::Name for QueryBatchResponse { +const NAME: &'static str = "QueryBatchResponse"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryBatchResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryBatchResponse".into() }} +/// The request message for BatchForHeight RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct QueryBatchForHeightRequest { + #[prost(int64, tag="1")] + pub block_height: i64, +} +impl ::prost::Name for QueryBatchForHeightRequest { +const NAME: &'static str = "QueryBatchForHeightRequest"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryBatchForHeightRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryBatchForHeightRequest".into() }} +/// The response message for BatchForHeight RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryBatchForHeightResponse { + #[prost(message, optional, tag="1")] + pub batch: ::core::option::Option, +} +impl ::prost::Name for QueryBatchForHeightResponse { +const NAME: &'static str = "QueryBatchForHeightResponse"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryBatchForHeightResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryBatchForHeightResponse".into() }} +/// The request message for QueryBatches RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryBatchesRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option<::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest>, +} +impl ::prost::Name for QueryBatchesRequest { +const NAME: &'static str = "QueryBatchesRequest"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryBatchesRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryBatchesRequest".into() }} +/// The response message for QueryBatches RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryBatchesResponse { + #[prost(message, repeated, tag="1")] + pub batches: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="2")] + pub pagination: ::core::option::Option<::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse>, +} +impl ::prost::Name for QueryBatchesResponse { +const NAME: &'static str = "QueryBatchesResponse"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryBatchesResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryBatchesResponse".into() }} +/// The request message for QueryTreeEntries RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct QueryTreeEntriesRequest { + #[prost(uint64, tag="1")] + pub batch_number: u64, +} +impl ::prost::Name for QueryTreeEntriesRequest { +const NAME: &'static str = "QueryTreeEntriesRequest"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryTreeEntriesRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryTreeEntriesRequest".into() }} +/// The response message for QueryTreeEntries RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTreeEntriesResponse { + #[prost(message, optional, tag="1")] + pub entries: ::core::option::Option, +} +impl ::prost::Name for QueryTreeEntriesResponse { +const NAME: &'static str = "QueryTreeEntriesResponse"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryTreeEntriesResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryTreeEntriesResponse".into() }} +/// The request message for QueryBatchSignaturesRequest RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct QueryBatchSignaturesRequest { + #[prost(uint64, tag="1")] + pub batch_number: u64, +} +impl ::prost::Name for QueryBatchSignaturesRequest { +const NAME: &'static str = "QueryBatchSignaturesRequest"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryBatchSignaturesRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryBatchSignaturesRequest".into() }} +/// The response message for QueryQueryBatchSignatures RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryBatchSignaturesResponse { + #[prost(message, repeated, tag="1")] + pub batch_sigs: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for QueryBatchSignaturesResponse { +const NAME: &'static str = "QueryBatchSignaturesResponse"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryBatchSignaturesResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryBatchSignaturesResponse".into() }} +/// The request message for QueryDataResult RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDataResultRequest { + #[prost(string, tag="1")] + pub data_request_id: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryDataResultRequest { +const NAME: &'static str = "QueryDataResultRequest"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryDataResultRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryDataResultRequest".into() }} +/// The response message for QueryDataResult RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDataResultResponse { + #[prost(message, optional, tag="1")] + pub data_result: ::core::option::Option, +} +impl ::prost::Name for QueryDataResultResponse { +const NAME: &'static str = "QueryDataResultResponse"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryDataResultResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryDataResultResponse".into() }} +/// The request message for QueryBatchAssignment RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryBatchAssignmentRequest { + #[prost(string, tag="1")] + pub data_request_id: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryBatchAssignmentRequest { +const NAME: &'static str = "QueryBatchAssignmentRequest"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryBatchAssignmentRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryBatchAssignmentRequest".into() }} +/// The response message for QueryBatchAssignment RPC. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct QueryBatchAssignmentResponse { + #[prost(uint64, tag="1")] + pub batch_number: u64, +} +impl ::prost::Name for QueryBatchAssignmentResponse { +const NAME: &'static str = "QueryBatchAssignmentResponse"; +const PACKAGE: &'static str = "sedachain.batching.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.QueryBatchAssignmentResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.batching.v1.QueryBatchAssignmentResponse".into() }} +// @@protoc_insertion_point(module) diff --git a/crates/proto-common/src/gen/sedachain.pubkey.v1.rs b/crates/proto-common/src/gen/sedachain.pubkey.v1.rs new file mode 100644 index 0000000..ab8d100 --- /dev/null +++ b/crates/proto-common/src/gen/sedachain.pubkey.v1.rs @@ -0,0 +1,87 @@ +// @generated +// This file is @generated by prost-build. +/// IndexPubKeyPair defines an index - public key pair. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IndexedPubKey { + #[prost(uint32, tag="1")] + pub index: u32, + #[prost(message, optional, tag="2")] + pub pub_key: ::core::option::Option<::prost_types::Any>, +} +impl ::prost::Name for IndexedPubKey { +const NAME: &'static str = "IndexedPubKey"; +const PACKAGE: &'static str = "sedachain.pubkey.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.pubkey.v1.IndexedPubKey".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.pubkey.v1.IndexedPubKey".into() }} +/// GenesisState defines pubkey module's genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenesisState { + #[prost(message, repeated, tag="1")] + pub validator_pub_keys: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for GenesisState { +const NAME: &'static str = "GenesisState"; +const PACKAGE: &'static str = "sedachain.pubkey.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.pubkey.v1.GenesisState".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.pubkey.v1.GenesisState".into() }} +/// ValidatorPubKeys defines a validator's list of registered public keys +/// primarily used in the x/pubkey genesis state. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidatorPubKeys { + #[prost(string, tag="1")] + pub validator_addr: ::prost::alloc::string::String, + #[prost(message, repeated, tag="2")] + pub indexed_pub_keys: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ValidatorPubKeys { +const NAME: &'static str = "ValidatorPubKeys"; +const PACKAGE: &'static str = "sedachain.pubkey.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.pubkey.v1.ValidatorPubKeys".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.pubkey.v1.ValidatorPubKeys".into() }} +/// QueryValidatorKeysRequest is request type for the Query/ValidatorKeys RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryValidatorKeysRequest { + #[prost(string, tag="1")] + pub validator_addr: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryValidatorKeysRequest { +const NAME: &'static str = "QueryValidatorKeysRequest"; +const PACKAGE: &'static str = "sedachain.pubkey.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.pubkey.v1.QueryValidatorKeysRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.pubkey.v1.QueryValidatorKeysRequest".into() }} +/// QueryValidatorKeysResponse is response type for the Query/ValidatorKeys RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryValidatorKeysResponse { + #[prost(message, optional, tag="1")] + pub validator_pub_keys: ::core::option::Option, +} +impl ::prost::Name for QueryValidatorKeysResponse { +const NAME: &'static str = "QueryValidatorKeysResponse"; +const PACKAGE: &'static str = "sedachain.pubkey.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.pubkey.v1.QueryValidatorKeysResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.pubkey.v1.QueryValidatorKeysResponse".into() }} +/// MsgAddKey defines a message for registering a new public key. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgAddKey { + #[prost(string, tag="1")] + pub validator_addr: ::prost::alloc::string::String, + #[prost(message, repeated, tag="2")] + pub indexed_pub_keys: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgAddKey { +const NAME: &'static str = "MsgAddKey"; +const PACKAGE: &'static str = "sedachain.pubkey.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.pubkey.v1.MsgAddKey".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.pubkey.v1.MsgAddKey".into() }} +/// MsgAddKeyResponse defines the Msg/MsgAddKey response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct MsgAddKeyResponse { +} +impl ::prost::Name for MsgAddKeyResponse { +const NAME: &'static str = "MsgAddKeyResponse"; +const PACKAGE: &'static str = "sedachain.pubkey.v1"; +fn full_name() -> ::prost::alloc::string::String { "sedachain.pubkey.v1.MsgAddKeyResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.pubkey.v1.MsgAddKeyResponse".into() }} +// @@protoc_insertion_point(module) diff --git a/crates/proto-common/src/gen/sedachain.wasm_storage.v1.rs b/crates/proto-common/src/gen/sedachain.wasm_storage.v1.rs index fb092c1..5cb108a 100644 --- a/crates/proto-common/src/gen/sedachain.wasm_storage.v1.rs +++ b/crates/proto-common/src/gen/sedachain.wasm_storage.v1.rs @@ -1,25 +1,25 @@ // @generated // This file is @generated by prost-build. -/// DataRequestWasm represents a wasm used for data requests. +/// OracleProgram is a wasm used for data request. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct DataRequestWasm { +pub struct OracleProgram { #[prost(bytes="bytes", tag="1")] pub hash: ::prost::bytes::Bytes, #[prost(bytes="bytes", tag="2")] pub bytecode: ::prost::bytes::Bytes, #[prost(message, optional, tag="3")] pub added_at: ::core::option::Option<::prost_types::Timestamp>, - /// ExpirationHeight represents the block height at which the data request - /// wasm will be pruned. The value of zero means no expiration. + /// ExpirationHeight represents the block height at which the oracle + /// program will be pruned. The value of zero means no expiration. #[prost(int64, tag="4")] pub expiration_height: i64, } -impl ::prost::Name for DataRequestWasm { -const NAME: &'static str = "DataRequestWasm"; +impl ::prost::Name for OracleProgram { +const NAME: &'static str = "OracleProgram"; const PACKAGE: &'static str = "sedachain.wasm_storage.v1"; -fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.DataRequestWasm".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.DataRequestWasm".into() }} -/// ExecutorWasm represents a wasm used for some execution in the protocol. +fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.OracleProgram".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.OracleProgram".into() }} +/// ExecutorWasm is a wasm used by some component in the protocol. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExecutorWasm { @@ -49,15 +49,14 @@ impl ::prost::Name for Params { const NAME: &'static str = "Params"; const PACKAGE: &'static str = "sedachain.wasm_storage.v1"; fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.Params".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.Params".into() }} -/// GenesisState defines the wasm module's genesis state(i.e wasms stored at -/// genesis.) +/// GenesisState defines wasm-storage module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { #[prost(message, optional, tag="1")] pub params: ::core::option::Option, #[prost(message, repeated, tag="2")] - pub data_request_wasms: ::prost::alloc::vec::Vec, + pub oracle_programs: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag="3")] pub executor_wasms: ::prost::alloc::vec::Vec, #[prost(string, tag="4")] @@ -67,48 +66,53 @@ impl ::prost::Name for GenesisState { const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "sedachain.wasm_storage.v1"; fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.GenesisState".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.GenesisState".into() }} -/// The request message for QueryDataRequestWasm RPC. +/// The request message for QueryOracleProgram RPC. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDataRequestWasmRequest { +pub struct QueryOracleProgramRequest { #[prost(string, tag="1")] pub hash: ::prost::alloc::string::String, } -impl ::prost::Name for QueryDataRequestWasmRequest { -const NAME: &'static str = "QueryDataRequestWasmRequest"; +impl ::prost::Name for QueryOracleProgramRequest { +const NAME: &'static str = "QueryOracleProgramRequest"; const PACKAGE: &'static str = "sedachain.wasm_storage.v1"; -fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.QueryDataRequestWasmRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.QueryDataRequestWasmRequest".into() }} -/// The response message for QueryDataRequestWasm RPC. +fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.QueryOracleProgramRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.QueryOracleProgramRequest".into() }} +/// The response message for QueryOracleProgram RPC. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDataRequestWasmResponse { +pub struct QueryOracleProgramResponse { #[prost(message, optional, tag="1")] - pub wasm: ::core::option::Option, + pub oracle_program: ::core::option::Option, } -impl ::prost::Name for QueryDataRequestWasmResponse { -const NAME: &'static str = "QueryDataRequestWasmResponse"; +impl ::prost::Name for QueryOracleProgramResponse { +const NAME: &'static str = "QueryOracleProgramResponse"; const PACKAGE: &'static str = "sedachain.wasm_storage.v1"; -fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.QueryDataRequestWasmResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.QueryDataRequestWasmResponse".into() }} -/// The request message for QueryDataRequestWasms RPC. +fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.QueryOracleProgramResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.QueryOracleProgramResponse".into() }} +/// The request message for QueryOraclePrograms RPC. #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct QueryDataRequestWasmsRequest { +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryOracleProgramsRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag="1")] + pub pagination: ::core::option::Option<::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageRequest>, } -impl ::prost::Name for QueryDataRequestWasmsRequest { -const NAME: &'static str = "QueryDataRequestWasmsRequest"; +impl ::prost::Name for QueryOracleProgramsRequest { +const NAME: &'static str = "QueryOracleProgramsRequest"; const PACKAGE: &'static str = "sedachain.wasm_storage.v1"; -fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.QueryDataRequestWasmsRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.QueryDataRequestWasmsRequest".into() }} -/// The response message for QueryDataRequestWasms RPC. +fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.QueryOracleProgramsRequest".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.QueryOracleProgramsRequest".into() }} +/// The response message for QueryOraclePrograms RPC. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDataRequestWasmsResponse { +pub struct QueryOracleProgramsResponse { #[prost(string, repeated, tag="1")] pub list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="2")] + pub pagination: ::core::option::Option<::cosmos_sdk_proto::cosmos::base::query::v1beta1::PageResponse>, } -impl ::prost::Name for QueryDataRequestWasmsResponse { -const NAME: &'static str = "QueryDataRequestWasmsResponse"; +impl ::prost::Name for QueryOracleProgramsResponse { +const NAME: &'static str = "QueryOracleProgramsResponse"; const PACKAGE: &'static str = "sedachain.wasm_storage.v1"; -fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.QueryDataRequestWasmsResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.QueryDataRequestWasmsResponse".into() }} +fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.QueryOracleProgramsResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.QueryOracleProgramsResponse".into() }} /// The request message for QueryExecutorWasm RPC. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -171,30 +175,30 @@ impl ::prost::Name for QueryCoreContractRegistryResponse { const NAME: &'static str = "QueryCoreContractRegistryResponse"; const PACKAGE: &'static str = "sedachain.wasm_storage.v1"; fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.QueryCoreContractRegistryResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.QueryCoreContractRegistryResponse".into() }} -/// The request message for the StoreDataRequestWasm method. +/// The request message for the StoreOracleProgram method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreDataRequestWasm { +pub struct MsgStoreOracleProgram { #[prost(string, tag="1")] pub sender: ::prost::alloc::string::String, #[prost(bytes="bytes", tag="2")] pub wasm: ::prost::bytes::Bytes, } -impl ::prost::Name for MsgStoreDataRequestWasm { -const NAME: &'static str = "MsgStoreDataRequestWasm"; +impl ::prost::Name for MsgStoreOracleProgram { +const NAME: &'static str = "MsgStoreOracleProgram"; const PACKAGE: &'static str = "sedachain.wasm_storage.v1"; -fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.MsgStoreDataRequestWasm".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.MsgStoreDataRequestWasm".into() }} -/// The response message for the StoreDataRequestWasm method. +fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.MsgStoreOracleProgram".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.MsgStoreOracleProgram".into() }} +/// The response message for the StoreOracleProgram method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreDataRequestWasmResponse { +pub struct MsgStoreOracleProgramResponse { #[prost(string, tag="1")] pub hash: ::prost::alloc::string::String, } -impl ::prost::Name for MsgStoreDataRequestWasmResponse { -const NAME: &'static str = "MsgStoreDataRequestWasmResponse"; +impl ::prost::Name for MsgStoreOracleProgramResponse { +const NAME: &'static str = "MsgStoreOracleProgramResponse"; const PACKAGE: &'static str = "sedachain.wasm_storage.v1"; -fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.MsgStoreDataRequestWasmResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.MsgStoreDataRequestWasmResponse".into() }} +fn full_name() -> ::prost::alloc::string::String { "sedachain.wasm_storage.v1.MsgStoreOracleProgramResponse".into() }fn type_url() -> ::prost::alloc::string::String { "/sedachain.wasm_storage.v1.MsgStoreOracleProgramResponse".into() }} /// The request message for the StoreExecutorWasm method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] From 1baab3702e2018d3e6f37044ba73512a33e16332 Mon Sep 17 00:00:00 2001 From: gluax <16431709+gluax@users.noreply.github.com> Date: Fri, 1 Nov 2024 05:44:27 -0700 Subject: [PATCH 2/2] feat: update batch proto --- crates/proto-common/generate.sh | 3 +- .../sedachain/batching/v1/batching.proto | 36 ++++++++++--------- .../proto/sedachain/batching/v1/query.proto | 2 +- .../src/gen/sedachain.batching.v1.rs | 16 +++++---- 4 files changed, 30 insertions(+), 27 deletions(-) diff --git a/crates/proto-common/generate.sh b/crates/proto-common/generate.sh index b3cf9f5..c0416e9 100755 --- a/crates/proto-common/generate.sh +++ b/crates/proto-common/generate.sh @@ -5,5 +5,4 @@ PROTO_FOLDER=$(dirname "$0") echo $PROTO_FOLDER echo "Generating Rust proto code" -(cd $PROTO_FOLDER && buf mod update) -(cd $PROTO_FOLDER && buf generate --template buf.gen.rust.yaml) \ No newline at end of file +buf generate --template buf.gen.rust.yaml \ No newline at end of file diff --git a/crates/proto-common/proto/sedachain/batching/v1/batching.proto b/crates/proto-common/proto/sedachain/batching/v1/batching.proto index 75b5c9d..7c46fec 100644 --- a/crates/proto-common/proto/sedachain/batching/v1/batching.proto +++ b/crates/proto-common/proto/sedachain/batching/v1/batching.proto @@ -14,16 +14,19 @@ message Batch { uint64 batch_number = 1; // block_height is the height at which the batch was created. int64 block_height = 2; - // data_result_root is the hex-encoded root of the data result + // current_data_result_root is the hex-encoded root of the data result // merkle tree. - string data_result_root = 3; + string current_data_result_root = 3; + // data_result_root is the hex-encoded "super root" of the previous + // data result and current data result roots. + string data_result_root = 4; // validator_root is the hex-encoded root of the validator merkle // tree. - string validator_root = 4; + string validator_root = 5; // batch_id is the Keccack-256 hash of the batch content. - bytes batch_id = 5; + bytes batch_id = 6; // proving_medatada is a field for additional proving data. - bytes proving_medatada = 6; + bytes proving_medatada = 7; } // TreeEntries are the given batch's data result tree entries and @@ -44,8 +47,7 @@ message TreeEntries { message BatchSignatures { string validator_addr = 1 [ (cosmos_proto.scalar) = "cosmos.ValidatorAddressString" ]; - int64 voting_power = 2; - bytes signatures = 3; + bytes signatures = 2; } // Params is a list of parameters which can be changed through governance. @@ -60,25 +62,25 @@ message Params { // DataResult represents the result of a resolved data request. message DataResult { // id is the Keccack-256 hash of the data result. - string id = 1; + string id = 1 [ (gogoproto.jsontag) = "id" ]; // dr_id is the data request identifier. - string dr_id = 2; + string dr_id = 2 [ (gogoproto.jsontag) = "dr_id" ]; // version is a semantic version string. - string version = 3; + string version = 3 [ (gogoproto.jsontag) = "version" ]; // block_height is the height at which the data request was tallied. - uint64 block_height = 4; + uint64 block_height = 4 [ (gogoproto.jsontag) = "block_height" ]; // exit_code is the exit code of the tally wasm binary execution. - uint32 exit_code = 5; + uint32 exit_code = 5 [ (gogoproto.jsontag) = "exit_code" ]; // gas_used is the gas used by the data request execution. - uint64 gas_used = 6; + uint64 gas_used = 6 [ (gogoproto.jsontag) = "gas_used" ]; // result is the result of the tally wasm binary execution. - bytes result = 7; + bytes result = 7 [ (gogoproto.jsontag) = "result" ]; // payback_address is the payback address set by the relayer. - string payback_address = 8; + string payback_address = 8 [ (gogoproto.jsontag) = "payback_address" ]; // seda_payload is the payload set by SEDA Protocol (e.g. OEV-enabled // data requests) - string seda_payload = 9; + string seda_payload = 9 [ (gogoproto.jsontag) = "seda_payload" ]; // consensus indicates whether consensus was reached in the tally // process. - bool consensus = 10; + bool consensus = 10 [ (gogoproto.jsontag) = "consensus" ]; } diff --git a/crates/proto-common/proto/sedachain/batching/v1/query.proto b/crates/proto-common/proto/sedachain/batching/v1/query.proto index ffa806d..333500d 100644 --- a/crates/proto-common/proto/sedachain/batching/v1/query.proto +++ b/crates/proto-common/proto/sedachain/batching/v1/query.proto @@ -104,7 +104,7 @@ message QueryDataResultRequest { string data_request_id = 1; } // The response message for QueryDataResult RPC. message QueryDataResultResponse { - DataResult data_result = 1 [ (gogoproto.nullable) = false ]; + DataResult data_result = 1 [ (gogoproto.nullable) = true ]; } // The request message for QueryBatchAssignment RPC. diff --git a/crates/proto-common/src/gen/sedachain.batching.v1.rs b/crates/proto-common/src/gen/sedachain.batching.v1.rs index 31a88b6..4cb87df 100644 --- a/crates/proto-common/src/gen/sedachain.batching.v1.rs +++ b/crates/proto-common/src/gen/sedachain.batching.v1.rs @@ -12,19 +12,23 @@ pub struct Batch { /// block_height is the height at which the batch was created. #[prost(int64, tag="2")] pub block_height: i64, - /// data_result_root is the hex-encoded root of the data result + /// current_data_result_root is the hex-encoded root of the data result /// merkle tree. #[prost(string, tag="3")] + pub current_data_result_root: ::prost::alloc::string::String, + /// data_result_root is the hex-encoded "super root" of the previous + /// data result and current data result roots. + #[prost(string, tag="4")] pub data_result_root: ::prost::alloc::string::String, /// validator_root is the hex-encoded root of the validator merkle /// tree. - #[prost(string, tag="4")] + #[prost(string, tag="5")] pub validator_root: ::prost::alloc::string::String, /// batch_id is the Keccack-256 hash of the batch content. - #[prost(bytes="bytes", tag="5")] + #[prost(bytes="bytes", tag="6")] pub batch_id: ::prost::bytes::Bytes, /// proving_medatada is a field for additional proving data. - #[prost(bytes="bytes", tag="6")] + #[prost(bytes="bytes", tag="7")] pub proving_medatada: ::prost::bytes::Bytes, } impl ::prost::Name for Batch { @@ -59,9 +63,7 @@ fn full_name() -> ::prost::alloc::string::String { "sedachain.batching.v1.TreeEn pub struct BatchSignatures { #[prost(string, tag="1")] pub validator_addr: ::prost::alloc::string::String, - #[prost(int64, tag="2")] - pub voting_power: i64, - #[prost(bytes="bytes", tag="3")] + #[prost(bytes="bytes", tag="2")] pub signatures: ::prost::bytes::Bytes, } impl ::prost::Name for BatchSignatures {