-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(proto)!: update celestia-app and node proto definitios (#459)
- Loading branch information
Showing
23 changed files
with
307 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
6 changes: 3 additions & 3 deletions
6
...elestia/da/data_availability_header.proto → ...core/v1/da/data_availability_header.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 {} |
Oops, something went wrong.