-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update protobuf definitions (#40)
* chore: Update protobuf definitions * fix json in tests * fetch go-header protos * vendor google protos * update proto readme * Update tools/update-proto-vendor.sh Co-authored-by: Maciej Zwoliński <mac.zwolinski@gmail.com> * fix shellcheck * remove serde(default) on the fields because it is now used on the whole container * update proto readme --------- Co-authored-by: Maciej Zwoliński <mac.zwolinski@gmail.com>
- Loading branch information
Showing
24 changed files
with
242 additions
and
116 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 |
---|---|---|
@@ -1,7 +1,18 @@ | ||
## Update | ||
|
||
To update protobuf definitions run: | ||
|
||
```bash | ||
./tools/update-proto-vendor.sh | ||
``` | ||
|
||
## Sources | ||
|
||
* `tendermint` directory is vendored from [celestia-core](https://github.com/celestiaorg/celestia-core/tree/v0.34.x-celestia/proto) | ||
* `gogoproto` directory is vendored from [gogoproto](https://github.com/cosmos/gogoproto/tree/v1.4.10/gogoproto) | ||
* `celestia` directory is vendored from [celestia-app](https://github.com/celestiaorg/celestia-app/tree/main/proto) | ||
* `share` and `header` directories are vendored from [celestia-node](https://github.com/celestiaorg/celestia-node) | ||
* `cosmos` subdirectories are vendored from [cosmos-sdk](https://github.com/celestiaorg/cosmos-sdk/tree/release/v0.46.x-celestia/proto/cosmos) | ||
* `cosmos_proto` directory is vendored from [cosmos-proto](https://github.com/cosmos/cosmos-proto/tree/v1.0.0-alpha4/proto/cosmos_proto) | ||
* `go-header` directory is vendored from [go-header](https://github.com/celestiaorg/go-header/tree/main) | ||
* `google` directory is vendored from [googleapis](https://github.com/googleapis/googleapis/tree/master/google/api) |
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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
syntax = "proto3"; | ||
package celestia.mint.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "celestia/mint/v1/mint.proto"; | ||
|
||
option go_package = "github.com/celestiaorg/celestia-app/x/mint/types"; | ||
|
||
// GenesisState defines the mint module's genesis state. | ||
message GenesisState { | ||
// minter is a space for holding current inflation information. | ||
Minter minter = 1 [ (gogoproto.nullable) = false ]; | ||
reserved 1; // 1 was previously used for the `Minter` field. | ||
|
||
// BondDenom is the denomination of the token that should be minted. | ||
string bond_denom = 2; | ||
} |
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,34 @@ | ||
syntax = "proto3"; | ||
package celestia.qgb.v1; | ||
|
||
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"; | ||
|
||
// Msg is the message server for receiving qgb 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 | ||
// single EVM address. The EVM address can be overridden by a later message. | ||
// There are no validity checks of the EVM addresses existence on the Ethereum | ||
// state machine. | ||
rpc RegisterEVMAddress(MsgRegisterEVMAddress) | ||
returns (MsgRegisterEVMAddressResponse) { | ||
option (google.api.http).get = "/qgb/v1/register_evm_address"; | ||
} | ||
} | ||
|
||
// MsgRegisterEVMAddress registers an evm address to a validator. | ||
message MsgRegisterEVMAddress { | ||
// The operating address of the validator. | ||
string validator_address = 1 | ||
[ (cosmos_proto.scalar) = "cosmos.AddressString" ]; | ||
|
||
// The matching HEX encoded EVM address. | ||
string evm_address = 2; | ||
} | ||
|
||
// MsgRegisterEVMAddressResponse is the response to registering an EVM address. | ||
message MsgRegisterEVMAddressResponse {} |
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,22 @@ | ||
syntax="proto3"; | ||
|
||
package proof.pb; | ||
|
||
option go_package = "github.com/celestiaorg/nmt/pb"; | ||
|
||
message Proof { | ||
// Start index of the leaves that match the queried namespace.ID. | ||
int64 start = 1; | ||
// End index (non-inclusive) of the leaves that match the queried | ||
// namespace.ID. | ||
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 | ||
// it should be proven. leaf_hash is necessary to prove the Absence Proof. | ||
// This field will be empty in case of Inclusion 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; | ||
} |
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 |
---|---|---|
@@ -1,33 +1,25 @@ | ||
syntax = "proto3"; | ||
|
||
package share.p2p.shrex.nd; | ||
import "pb/proof.proto"; | ||
|
||
message GetSharesByNamespaceRequest{ | ||
bytes root_hash = 1; | ||
bytes namespace_id = 2; | ||
bytes namespace = 2; | ||
} | ||
|
||
message GetSharesByNamespaceResponse{ | ||
message GetSharesByNamespaceStatusResponse{ | ||
StatusCode status = 1; | ||
repeated Row rows = 2; | ||
} | ||
|
||
enum StatusCode { | ||
INVALID = 0; | ||
OK = 1; | ||
NOT_FOUND = 2; | ||
INTERNAL = 3; | ||
NAMESPACE_NOT_FOUND = 4; | ||
}; | ||
|
||
message Row { | ||
message NamespaceRowResponse { | ||
repeated bytes shares = 1; | ||
Proof proof = 2; | ||
} | ||
|
||
message Proof { | ||
int64 start = 1; | ||
int64 end = 2; | ||
repeated bytes nodes = 3; | ||
bytes hashleaf = 4; | ||
proof.pb.Proof proof = 2; | ||
} |
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
Oops, something went wrong.