From debcadfba38507df7168142302951892d3319d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Zwoli=C5=84ski?= Date: Wed, 13 Nov 2024 14:06:53 +0100 Subject: [PATCH] feat(proto)!: update celestia-app and node proto definitios (#459) --- proto/build.rs | 8 +-- proto/vendor/celestia/blob/v1/query.proto | 1 - proto/vendor/celestia/blob/v1/tx.proto | 5 +- proto/vendor/celestia/core/v1/blob/blob.proto | 24 +++++++++ .../v1}/da/data_availability_header.proto | 6 +-- .../vendor/celestia/core/v1/proof/proof.proto | 54 +++++++++++++++++++ proto/vendor/celestia/core/v1/tx/tx.proto | 40 ++++++++++++++ proto/vendor/celestia/minfee/v1/genesis.proto | 16 ++++++ proto/vendor/celestia/minfee/v1/query.proto | 28 ++++++++++ proto/vendor/celestia/qgb/v1/genesis.proto | 6 +-- proto/vendor/celestia/qgb/v1/query.proto | 5 +- proto/vendor/celestia/qgb/v1/tx.proto | 4 +- proto/vendor/celestia/qgb/v1/types.proto | 4 +- proto/vendor/celestia/signal/v1/query.proto | 42 +++++++++++++++ proto/vendor/celestia/signal/v1/tx.proto | 35 ++++++++++++ proto/vendor/celestia/signal/v1/upgrade.proto | 15 ++++++ proto/vendor/header/pb/extended_header.proto | 4 +- proto/vendor/nmt/pb/proof.proto | 10 ++-- proto/vendor/tendermint/abci/types.proto | 15 +++++- proto/vendor/tendermint/state/types.proto | 3 ++ proto/vendor/tendermint/store/types.proto | 8 +-- tools/update-proto-vendor.sh | 10 ++-- types/src/data_availability_header.rs | 2 +- 23 files changed, 307 insertions(+), 38 deletions(-) create mode 100644 proto/vendor/celestia/core/v1/blob/blob.proto rename proto/vendor/celestia/{ => core/v1}/da/data_availability_header.proto (89%) create mode 100644 proto/vendor/celestia/core/v1/proof/proof.proto create mode 100644 proto/vendor/celestia/core/v1/tx/tx.proto create mode 100644 proto/vendor/celestia/minfee/v1/genesis.proto create mode 100644 proto/vendor/celestia/minfee/v1/query.proto create mode 100644 proto/vendor/celestia/signal/v1/query.proto create mode 100644 proto/vendor/celestia/signal/v1/tx.proto create mode 100644 proto/vendor/celestia/signal/v1/upgrade.proto diff --git a/proto/build.rs b/proto/build.rs index 9dc979f4..40c61e55 100644 --- a/proto/build.rs +++ b/proto/build.rs @@ -15,7 +15,7 @@ const NULL_DEFAULT: &str = r#"#[serde(with = "crate::serializers::null_default") #[rustfmt::skip] static CUSTOM_TYPE_ATTRIBUTES: &[(&str, &str)] = &[ - (".celestia.da.DataAvailabilityHeader", SERIALIZED_DEFAULT), + (".celestia.core.v1.da.DataAvailabilityHeader", SERIALIZED_DEFAULT), (".celestia.blob.v1.MsgPayForBlobs", SERIALIZED_DEFAULT), (".cosmos.base.abci.v1beta1.ABCIMessageLog", SERIALIZED_DEFAULT), (".cosmos.base.abci.v1beta1.Attribute", SERIALIZED_DEFAULT), @@ -48,8 +48,8 @@ static CUSTOM_TYPE_ATTRIBUTES: &[(&str, &str)] = &[ #[rustfmt::skip] static CUSTOM_FIELD_ATTRIBUTES: &[(&str, &str)] = &[ - (".celestia.da.DataAvailabilityHeader.row_roots", VEC_BASE64STRING), - (".celestia.da.DataAvailabilityHeader.column_roots", VEC_BASE64STRING), + (".celestia.core.v1.da.DataAvailabilityHeader.row_roots", VEC_BASE64STRING), + (".celestia.core.v1.da.DataAvailabilityHeader.column_roots", VEC_BASE64STRING), (".cosmos.base.abci.v1beta1.TxResponse.tx", OPTION_ANY), (".cosmos.base.abci.v1beta1.TxResponse.logs", NULL_DEFAULT), (".cosmos.base.abci.v1beta1.TxResponse.events", NULL_DEFAULT), @@ -66,7 +66,7 @@ static CUSTOM_FIELD_ATTRIBUTES: &[(&str, &str)] = &[ fn main() { let fds = protox::compile( [ - "vendor/celestia/da/data_availability_header.proto", + "vendor/celestia/core/v1/da/data_availability_header.proto", "vendor/celestia/blob/v1/tx.proto", "vendor/header/pb/extended_header.proto", "vendor/share/eds/byzantine/pb/share.proto", diff --git a/proto/vendor/celestia/blob/v1/query.proto b/proto/vendor/celestia/blob/v1/query.proto index 8c6c49e9..47d484b3 100644 --- a/proto/vendor/celestia/blob/v1/query.proto +++ b/proto/vendor/celestia/blob/v1/query.proto @@ -3,7 +3,6 @@ package celestia.blob.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; import "celestia/blob/v1/params.proto"; option go_package = "github.com/celestiaorg/celestia-app/x/blob/types"; diff --git a/proto/vendor/celestia/blob/v1/tx.proto b/proto/vendor/celestia/blob/v1/tx.proto index 287dc73e..552424c3 100644 --- a/proto/vendor/celestia/blob/v1/tx.proto +++ b/proto/vendor/celestia/blob/v1/tx.proto @@ -9,17 +9,20 @@ option go_package = "github.com/celestiaorg/celestia-app/x/blob/types"; service Msg { // PayForBlobs allows the user to pay for the inclusion of one or more blobs rpc PayForBlobs(MsgPayForBlobs) returns (MsgPayForBlobsResponse) { - option (google.api.http).get = "/blob/v1/payforblobs"; + option (google.api.http) = { post: "/blob/v1/payforblobs", body: "*" }; } } // MsgPayForBlobs pays for the inclusion of a blob in the block. message MsgPayForBlobs { + // signer is the bech32 encoded signer address. See + // https://en.bitcoin.it/wiki/Bech32. string signer = 1; // namespaces is a list of namespaces that the blobs are associated with. A // namespace is a byte slice of length 29 where the first byte is the // namespaceVersion and the subsequent 28 bytes are the namespaceId. repeated bytes namespaces = 2; + // blob_sizes is a list of blob sizes (one per blob). Each size is in bytes. repeated uint32 blob_sizes = 3; // share_commitments is a list of share commitments (one per blob). repeated bytes share_commitments = 4; diff --git a/proto/vendor/celestia/core/v1/blob/blob.proto b/proto/vendor/celestia/core/v1/blob/blob.proto new file mode 100644 index 00000000..45ece976 --- /dev/null +++ b/proto/vendor/celestia/core/v1/blob/blob.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package celestia.core.v1.blob; + +option go_package = "github.com/celestiaorg/go-square/blob"; + +// Blob (named after binary large object) is a chunk of data submitted by a user +// to be published to the Celestia blockchain. The data of a Blob is published +// to a namespace and is encoded into shares based on the format specified by +// share_version. +message Blob { + bytes namespace_id = 1; + bytes data = 2; + uint32 share_version = 3; + uint32 namespace_version = 4; +} + +// BlobTx wraps an encoded sdk.Tx with a second field to contain blobs of data. +// The raw bytes of the blobs are not signed over, instead we verify each blob +// using the relevant MsgPayForBlobs that is signed over in the encoded sdk.Tx. +message BlobTx { + bytes tx = 1; + repeated Blob blobs = 2; + string type_id = 3; +} \ No newline at end of file diff --git a/proto/vendor/celestia/da/data_availability_header.proto b/proto/vendor/celestia/core/v1/da/data_availability_header.proto similarity index 89% rename from proto/vendor/celestia/da/data_availability_header.proto rename to proto/vendor/celestia/core/v1/da/data_availability_header.proto index 87f93469..19a4b7d3 100644 --- a/proto/vendor/celestia/da/data_availability_header.proto +++ b/proto/vendor/celestia/core/v1/da/data_availability_header.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package celestia.da; +package celestia.core.v1.da; -option go_package = "github.com/celestiaorg/celestia-app/proto/celestia/da"; +option go_package = "github.com/celestiaorg/celestia-app/proto/celestia/core/v1/da"; // DataAvailabilityHeader contains the row and column roots of the erasure // coded version of the data in Block.Data. -// Therefor the original Block.Data is arranged in a +// Therefore the original Block.Data is arranged in a // k × k matrix, which is then "extended" to a // 2k × 2k matrix applying multiple times Reed-Solomon encoding. // For details see Section 5.2: https://arxiv.org/abs/1809.09044 diff --git a/proto/vendor/celestia/core/v1/proof/proof.proto b/proto/vendor/celestia/core/v1/proof/proof.proto new file mode 100644 index 00000000..816cf871 --- /dev/null +++ b/proto/vendor/celestia/core/v1/proof/proof.proto @@ -0,0 +1,54 @@ +syntax = "proto3"; +package celestia.core.v1.proof; + +option go_package = "github.com/celestiaorg/celestia-app/pkg/proof"; + +// ShareProof is an NMT proof that a set of shares exist in a set of rows and a +// Merkle proof that those rows exist in a Merkle tree with a given data root. +message ShareProof { + repeated bytes data = 1; + repeated NMTProof share_proofs = 2; + bytes namespace_id = 3; + RowProof row_proof = 4; + uint32 namespace_version = 5; +} + +// RowProof is a Merkle proof that a set of rows exist in a Merkle tree with a +// given data root. +message RowProof { + repeated bytes row_roots = 1; + repeated Proof proofs = 2; + bytes root = 3; + uint32 start_row = 4; + uint32 end_row = 5; +} + +// NMTProof is a proof of a namespace.ID in an NMT. +// In case this proof proves the absence of a namespace.ID +// in a tree it also contains the leaf hashes of the range +// where that namespace would be. +message NMTProof { + // Start index of this proof. + int32 start = 1; + // End index of this proof. + int32 end = 2; + // Nodes that together with the corresponding leaf values can be used to + // recompute the root and verify this proof. Nodes should consist of the max + // and min namespaces along with the actual hash, resulting in each being 48 + // bytes each + repeated bytes nodes = 3; + // leafHash are nil if the namespace is present in the NMT. In case the + // namespace to be proved is in the min/max range of the tree but absent, this + // will contain the leaf hash necessary to verify the proof of absence. Leaf + // hashes should consist of the namespace along with the actual hash, + // resulting 40 bytes total. + bytes leaf_hash = 4; +} + +// Proof is taken from the merkle package +message Proof { + int64 total = 1; + int64 index = 2; + bytes leaf_hash = 3; + repeated bytes aunts = 4; +} \ No newline at end of file diff --git a/proto/vendor/celestia/core/v1/tx/tx.proto b/proto/vendor/celestia/core/v1/tx/tx.proto new file mode 100644 index 00000000..0da698ad --- /dev/null +++ b/proto/vendor/celestia/core/v1/tx/tx.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package celestia.core.v1.tx; + +import "google/api/annotations.proto"; + +option go_package = "github.com/celestiaorg/celestia-app/app/grpc/tx"; + +// Service defines a gRPC service for interacting with transactions. +service Tx { + // TxStatus returns the status of a transaction. There are four possible states: + // - Committed + // - Pending + // - Evicted + // - Unknown + rpc TxStatus(TxStatusRequest) returns (TxStatusResponse) { + option (google.api.http) = { + get: "/celestia/core/v1/tx/{tx_id}" + }; + } +} + +// TxStatusRequest is the request type for the TxStatus gRPC method. +message TxStatusRequest { + // this is the hex encoded transaction hash (should be 64 bytes long) + string tx_id = 1; +} + +// TxStatusResponse is the response type for the TxStatus gRPC method. +message TxStatusResponse { + int64 height = 1; + uint32 index = 2; + // execution_code is returned when the transaction has been committed + // and returns whether it was successful or errored. A non zero + // execution code indicated an error. + uint32 execution_code = 3; + // error log for failed transactions. + string error = 4; + // status is the status of the transaction. + string status = 5; +} \ No newline at end of file diff --git a/proto/vendor/celestia/minfee/v1/genesis.proto b/proto/vendor/celestia/minfee/v1/genesis.proto new file mode 100644 index 00000000..203d70f3 --- /dev/null +++ b/proto/vendor/celestia/minfee/v1/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package celestia.minfee.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/celestiaorg/celestia-app/x/minfee"; + +// GenesisState defines the minfee module's genesis state. +message GenesisState { + string network_min_gas_price = 1 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/vendor/celestia/minfee/v1/query.proto b/proto/vendor/celestia/minfee/v1/query.proto new file mode 100644 index 00000000..83f830e5 --- /dev/null +++ b/proto/vendor/celestia/minfee/v1/query.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package celestia.minfee.v1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/celestiaorg/celestia-app/x/minfee"; + +// Query defines the gRPC querier service. +service Query { + // NetworkMinGasPrice queries the network wide minimum gas price. + rpc NetworkMinGasPrice(QueryNetworkMinGasPrice) returns (QueryNetworkMinGasPriceResponse) { + option (google.api.http).get = "/celestia/minfee/v1/min_gas_price"; + } +} + +// QueryNetworkMinGasPrice is the request type for the Query/NetworkMinGasPrice RPC method. +message QueryNetworkMinGasPrice {} + +// QueryNetworkMinGasPriceResponse is the response type for Query/NetworkMinGasPrice RPC method. +message QueryNetworkMinGasPriceResponse { + string network_min_gas_price = 1 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} \ No newline at end of file diff --git a/proto/vendor/celestia/qgb/v1/genesis.proto b/proto/vendor/celestia/qgb/v1/genesis.proto index 623c5e71..f574d88e 100644 --- a/proto/vendor/celestia/qgb/v1/genesis.proto +++ b/proto/vendor/celestia/qgb/v1/genesis.proto @@ -4,15 +4,15 @@ package celestia.qgb.v1; import "gogoproto/gogo.proto"; import "celestia/qgb/v1/types.proto"; -option go_package = "github.com/celestiaorg/celestia-app/x/qgb/types"; +option go_package = "github.com/celestiaorg/celestia-app/x/blobstream/types"; -// Params represent the Quantum Gravity Bridge genesis and store parameters. +// Params represent Blobstream genesis and store parameters. message Params { option (gogoproto.stringer) = false; uint64 data_commitment_window = 1; } -// GenesisState struct, containing all persistent data required by the QGB +// GenesisState struct, containing all persistent data required by Blobstream // module message GenesisState { Params params = 1; } diff --git a/proto/vendor/celestia/qgb/v1/query.proto b/proto/vendor/celestia/qgb/v1/query.proto index f28547b1..83cc4451 100644 --- a/proto/vendor/celestia/qgb/v1/query.proto +++ b/proto/vendor/celestia/qgb/v1/query.proto @@ -4,16 +4,15 @@ package celestia.qgb.v1; import "celestia/qgb/v1/genesis.proto"; import "celestia/qgb/v1/types.proto"; import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "google/protobuf/any.proto"; -option go_package = "github.com/celestiaorg/celestia-app/x/qgb/types"; +option go_package = "github.com/celestiaorg/celestia-app/x/blobstream/types"; // Query defines the gRPC querier service. service Query { - // Params queries the current parameters for the qgb module + // Params queries the current parameters for the blobstream module rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/qgb/v1/params"; } diff --git a/proto/vendor/celestia/qgb/v1/tx.proto b/proto/vendor/celestia/qgb/v1/tx.proto index 62c808ba..b9c4fe1e 100644 --- a/proto/vendor/celestia/qgb/v1/tx.proto +++ b/proto/vendor/celestia/qgb/v1/tx.proto @@ -5,9 +5,9 @@ import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/celestiaorg/celestia-app/x/qgb/types"; +option go_package = "github.com/celestiaorg/celestia-app/x/blobstream/types"; -// Msg is the message server for receiving qgb transactions +// Msg is the message server for receiving Blobstream transactions service Msg { // RegisterEVMAddress records an evm address for the validator which is used // by the relayer to aggregate signatures. A validator can only register a diff --git a/proto/vendor/celestia/qgb/v1/types.proto b/proto/vendor/celestia/qgb/v1/types.proto index 386c278e..266788e2 100644 --- a/proto/vendor/celestia/qgb/v1/types.proto +++ b/proto/vendor/celestia/qgb/v1/types.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/celestiaorg/celestia-app/x/qgb/types"; +option go_package = "github.com/celestiaorg/celestia-app/x/blobstream/types"; // BridgeValidator represents a validator's ETH address and its power message BridgeValidator { @@ -15,7 +15,7 @@ message BridgeValidator { string evm_address = 2; } -// Valset is the EVM Bridge Multsig Set, each qgb validator also +// Valset is the EVM Bridge Multsig Set, each Blobstream validator also // maintains an ETH key to sign messages, these are used to check signatures on // ETH because of the significant gas savings message Valset { diff --git a/proto/vendor/celestia/signal/v1/query.proto b/proto/vendor/celestia/signal/v1/query.proto new file mode 100644 index 00000000..1d1b04f5 --- /dev/null +++ b/proto/vendor/celestia/signal/v1/query.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; +package celestia.signal.v1; + +import "google/api/annotations.proto"; +import "celestia/signal/v1/upgrade.proto"; + +option go_package = "github.com/celestiaorg/celestia-app/x/signal/types"; + +// Query defines the signal Query service. +service Query { + // VersionTally enables a client to query for the tally of voting power that + // has signalled for a particular version. + rpc VersionTally(QueryVersionTallyRequest) + returns (QueryVersionTallyResponse) { + option (google.api.http).get = "/signal/v1/tally/{version}"; + } + + // GetUpgrade enables a client to query for upgrade information if an upgrade is pending. + // The response will be empty if no upgrade is pending. + rpc GetUpgrade(QueryGetUpgradeRequest) + returns (QueryGetUpgradeResponse) { + option (google.api.http).get = "/signal/v1/upgrade"; + } +} + +// QueryVersionTallyRequest is the request type for the VersionTally query. +message QueryVersionTallyRequest { uint64 version = 1; } + +// QueryVersionTallyResponse is the response type for the VersionTally query. +message QueryVersionTallyResponse { + uint64 voting_power = 1; + uint64 threshold_power = 2; + uint64 total_voting_power = 3; +} + +// QueryGetUpgradeRequest is the request type for the GetUpgrade query. +message QueryGetUpgradeRequest {} + +// QueryGetUpgradeResponse is the response type for the GetUpgrade query. +message QueryGetUpgradeResponse { + Upgrade upgrade = 1; +} diff --git a/proto/vendor/celestia/signal/v1/tx.proto b/proto/vendor/celestia/signal/v1/tx.proto new file mode 100644 index 00000000..42634cea --- /dev/null +++ b/proto/vendor/celestia/signal/v1/tx.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; +package celestia.signal.v1; + +import "google/api/annotations.proto"; + +option go_package = "github.com/celestiaorg/celestia-app/x/signal/types"; + +// Msg defines the signal Msg service. +service Msg { + // SignalVersion allows a validator to signal for a version. + rpc SignalVersion(MsgSignalVersion) returns (MsgSignalVersionResponse) { + option (google.api.http).post = "/signal/v1/signal"; + } + + // TryUpgrade tallies all the votes for all the versions to determine if a + // quorum has been reached for a version. + rpc TryUpgrade(MsgTryUpgrade) returns (MsgTryUpgradeResponse) { + option (google.api.http).post = "/signal/v1/upgrade"; + } +} + +// MsgSignalVersion signals for an upgrade. +message MsgSignalVersion { + string validator_address = 1; + uint64 version = 2; +} + +// MsgSignalVersionResponse is the response type for the SignalVersion method. +message MsgSignalVersionResponse {} + +// MsgTryUpgrade tries to upgrade the chain. +message MsgTryUpgrade { string signer = 1; } + +// MsgTryUpgradeResponse is the response type for the TryUpgrade method. +message MsgTryUpgradeResponse {} diff --git a/proto/vendor/celestia/signal/v1/upgrade.proto b/proto/vendor/celestia/signal/v1/upgrade.proto new file mode 100644 index 00000000..6d5ac4e0 --- /dev/null +++ b/proto/vendor/celestia/signal/v1/upgrade.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package celestia.signal.v1; + +option go_package = "github.com/celestiaorg/celestia-app/x/signal/types"; + +// Upgrade is a type that represents a network upgrade. +message Upgrade { + // AppVersion is the app version that has received a quorum of validators to + // signal for it. + uint64 app_version = 1; + + // UpgradeHeight is the height at which the network should upgrade to the + // AppVersion. + int64 upgrade_height = 2; +} diff --git a/proto/vendor/header/pb/extended_header.proto b/proto/vendor/header/pb/extended_header.proto index aafb5753..e93b64d8 100644 --- a/proto/vendor/header/pb/extended_header.proto +++ b/proto/vendor/header/pb/extended_header.proto @@ -4,13 +4,13 @@ package header.pb; import "tendermint/types/types.proto"; import "tendermint/types/validator.proto"; -import "celestia/da/data_availability_header.proto"; +import "celestia/core/v1/da/data_availability_header.proto"; message ExtendedHeader { tendermint.types.Header header = 1; tendermint.types.Commit commit = 2; tendermint.types.ValidatorSet validator_set = 3; - celestia.da.DataAvailabilityHeader dah = 4; + celestia.core.v1.da.DataAvailabilityHeader dah = 4; } // Generated with: diff --git a/proto/vendor/nmt/pb/proof.proto b/proto/vendor/nmt/pb/proof.proto index 431685a6..9b48d392 100644 --- a/proto/vendor/nmt/pb/proof.proto +++ b/proto/vendor/nmt/pb/proof.proto @@ -1,4 +1,4 @@ -syntax="proto3"; +syntax = "proto3"; package proof.pb; @@ -6,10 +6,10 @@ option go_package = "github.com/celestiaorg/nmt/pb"; message Proof { // Start index of the leaves that match the queried namespace.ID. - int64 start = 1; + int64 start = 1; // End index (non-inclusive) of the leaves that match the queried // namespace.ID. - int64 end = 2; + int64 end = 2; // Nodes hold the tree nodes necessary for the Merkle range proof. repeated bytes nodes = 3; // leaf_hash contains the namespace.ID if NMT does not have it and @@ -18,5 +18,5 @@ message Proof { bytes leaf_hash = 4; // The is_max_namespace_ignored flag influences the calculation of the // namespace ID range for intermediate nodes in the tree. - bool is_max_namespace_ignored=5; -} \ No newline at end of file + bool is_max_namespace_ignored = 5; +} diff --git a/proto/vendor/tendermint/abci/types.proto b/proto/vendor/tendermint/abci/types.proto index deb43974..2adc2ba7 100644 --- a/proto/vendor/tendermint/abci/types.proto +++ b/proto/vendor/tendermint/abci/types.proto @@ -11,6 +11,7 @@ import "tendermint/crypto/keys.proto"; import "tendermint/types/params.proto"; import "google/protobuf/timestamp.proto"; import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; // This file is copied from http://github.com/tendermint/abci // NOTE: When using custom types, mind the warnings. @@ -47,6 +48,11 @@ message RequestEcho { message RequestFlush {} +message TimeoutsInfo { + google.protobuf.Duration timeout_propose = 1 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; + google.protobuf.Duration timeout_commit = 2 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; +} + message RequestInfo { string version = 1; uint64 block_version = 2; @@ -108,8 +114,9 @@ message RequestListSnapshots {} // offers a snapshot to the application message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height + Snapshot snapshot = 1; // snapshot offered by peers + bytes app_hash = 2; // light client-verified app hash for snapshot height + uint64 app_version = 3; // The application version at which the snapshot was taken } // loads a snapshot chunk @@ -193,6 +200,8 @@ message ResponseInfo { int64 last_block_height = 4; bytes last_block_app_hash = 5; + + TimeoutsInfo timeouts = 6 [(gogoproto.nullable) = false]; } // nondeterministic @@ -207,6 +216,7 @@ message ResponseInitChain { ConsensusParams consensus_params = 1; repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; bytes app_hash = 3; + TimeoutsInfo timeouts = 4 [(gogoproto.nullable) = false]; } message ResponseQuery { @@ -264,6 +274,7 @@ message ResponseEndBlock { ConsensusParams consensus_param_updates = 2; repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + TimeoutsInfo timeouts = 4 [(gogoproto.nullable) = false]; } message ResponseCommit { diff --git a/proto/vendor/tendermint/state/types.proto b/proto/vendor/tendermint/state/types.proto index f3fdc0ef..9796a8fc 100644 --- a/proto/vendor/tendermint/state/types.proto +++ b/proto/vendor/tendermint/state/types.proto @@ -77,4 +77,7 @@ message State { // the latest AppHash we've received from calling abci.Commit() bytes app_hash = 13; + + // timeouts to be used for the next block height + tendermint.abci.TimeoutsInfo timeouts = 15 [(gogoproto.nullable) = false]; } diff --git a/proto/vendor/tendermint/store/types.proto b/proto/vendor/tendermint/store/types.proto index e1d994b4..64a32d1f 100644 --- a/proto/vendor/tendermint/store/types.proto +++ b/proto/vendor/tendermint/store/types.proto @@ -11,11 +11,11 @@ message BlockStoreState { // TxInfo describes the location of a tx inside a committed block // as well as the result of executing the transaction and the error log output. message TxInfo { - int64 height = 1; - uint32 index = 2; + int64 height = 1; + uint32 index = 2; // The response code of executing the tx. 0 means // successfully executed, all others are error codes. - uint32 code = 3; + uint32 code = 3; // The error log output generated if the transaction execution fails. - string error = 4; + string error = 4; } diff --git a/tools/update-proto-vendor.sh b/tools/update-proto-vendor.sh index 3a374e66..5aa1b29e 100755 --- a/tools/update-proto-vendor.sh +++ b/tools/update-proto-vendor.sh @@ -23,9 +23,9 @@ rm -rf ../target/proto-vendor-src mkdir -p ../target/proto-vendor-src extract_urls ../target/proto-vendor-src \ - https://github.com/celestiaorg/celestia-app/archive/refs/tags/v1.12.0.tar.gz \ + https://github.com/celestiaorg/celestia-app/archive/refs/tags/v2.3.0.tar.gz \ https://github.com/celestiaorg/celestia-core/archive/refs/heads/v0.34.x-celestia.tar.gz \ - https://github.com/celestiaorg/celestia-node/archive/refs/heads/shwap.tar.gz \ + https://github.com/celestiaorg/celestia-node/archive/refs/heads/main.tar.gz \ https://github.com/celestiaorg/cosmos-sdk/archive/refs/heads/release/v0.46.x-celestia.tar.gz \ https://github.com/celestiaorg/nmt/archive/refs/heads/main.tar.gz \ https://github.com/cosmos/cosmos-proto/archive/refs/tags/v1.0.0-alpha7.tar.gz \ @@ -36,7 +36,7 @@ extract_urls ../target/proto-vendor-src \ mkdir -p vendor rm -rf vendor/celestia -cp -r ../target/proto-vendor-src/celestia-app-1.12.0/proto/celestia vendor +cp -r ../target/proto-vendor-src/celestia-app-2.3.0/proto/celestia vendor rm -rf vendor/go-header mkdir -p vendor/go-header/p2p @@ -59,11 +59,11 @@ cp ../target/proto-vendor-src/googleapis-master/google/api/{annotations.proto,ht rm -rf vendor/header mkdir -p vendor/header -cp -r ../target/proto-vendor-src/celestia-node-shwap/header/pb vendor/header +cp -r ../target/proto-vendor-src/celestia-node-main/header/pb vendor/header rm -rf vendor/share mkdir -p vendor/share -shwap_dir=../target/proto-vendor-src/celestia-node-shwap/share +shwap_dir=../target/proto-vendor-src/celestia-node-main/share find "$shwap_dir" -name pb -type d -print0 | while read -r -d '' pb_dir; do # remove prefix out_dir="${pb_dir#"$shwap_dir"}" diff --git a/types/src/data_availability_header.rs b/types/src/data_availability_header.rs index 92b6b386..a552edbb 100644 --- a/types/src/data_availability_header.rs +++ b/types/src/data_availability_header.rs @@ -1,6 +1,6 @@ use std::ops::RangeInclusive; -use celestia_proto::celestia::da::DataAvailabilityHeader as RawDataAvailabilityHeader; +use celestia_proto::celestia::core::v1::da::DataAvailabilityHeader as RawDataAvailabilityHeader; use celestia_tendermint::merkle::simple_hash_from_byte_vectors; use celestia_tendermint_proto::v0_34::types::RowProof as RawRowProof; use celestia_tendermint_proto::Protobuf;