parent
486e0130fd
commit
ea18cae9aa
4
Makefile
4
Makefile
@ -447,9 +447,9 @@ proto-check-breaking:
|
|||||||
@$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=main
|
@$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=main
|
||||||
|
|
||||||
|
|
||||||
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.1/proto/tendermint
|
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.12/proto/tendermint
|
||||||
GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
|
GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
|
||||||
COSMOS_SDK_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/v0.42.5
|
COSMOS_SDK_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/v0.43.0
|
||||||
COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master
|
COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master
|
||||||
|
|
||||||
TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto
|
TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
2597
client/docs/swagger_legacy.yaml
Normal file
2597
client/docs/swagger_legacy.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@ proto_dirs=$(find ./proto ./third_party/proto -path -prune -o -name '*.proto' -p
|
|||||||
for dir in $proto_dirs; do
|
for dir in $proto_dirs; do
|
||||||
|
|
||||||
# generate swagger files (filter query files)
|
# generate swagger files (filter query files)
|
||||||
query_file=$(find "${dir}" -maxdepth 1 -name 'query.proto')
|
query_file=$(find "${dir}" -maxdepth 1 \( -name 'query.proto' -o -name 'service.proto' \))
|
||||||
if [[ ! -z "$query_file" ]]; then
|
if [[ ! -z "$query_file" ]]; then
|
||||||
protoc \
|
protoc \
|
||||||
-I "proto" \
|
-I "proto" \
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package cosmos.auth.v1beta1;
|
package cosmos.auth.v1beta1;
|
||||||
|
|
||||||
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||||
import "gogoproto/gogo.proto";
|
import "gogoproto/gogo.proto";
|
||||||
import "google/protobuf/any.proto";
|
import "google/protobuf/any.proto";
|
||||||
import "google/api/annotations.proto";
|
import "google/api/annotations.proto";
|
||||||
@ -11,6 +12,11 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";
|
|||||||
|
|
||||||
// Query defines the gRPC querier service.
|
// Query defines the gRPC querier service.
|
||||||
service Query {
|
service Query {
|
||||||
|
// Accounts returns all the existing accounts
|
||||||
|
rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) {
|
||||||
|
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts";
|
||||||
|
}
|
||||||
|
|
||||||
// Account returns account details based on address.
|
// Account returns account details based on address.
|
||||||
rpc Account(QueryAccountRequest) returns (QueryAccountResponse) {
|
rpc Account(QueryAccountRequest) returns (QueryAccountResponse) {
|
||||||
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}";
|
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}";
|
||||||
@ -22,6 +28,21 @@ service Query {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// QueryAccountsRequest is the request type for the Query/Accounts RPC method.
|
||||||
|
message QueryAccountsRequest {
|
||||||
|
// pagination defines an optional pagination for the request.
|
||||||
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryAccountsResponse is the response type for the Query/Accounts RPC method.
|
||||||
|
message QueryAccountsResponse {
|
||||||
|
// accounts are the existing accounts
|
||||||
|
repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "AccountI"];
|
||||||
|
|
||||||
|
// pagination defines the pagination in the response.
|
||||||
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// QueryAccountRequest is the request type for the Query/Account RPC method.
|
// QueryAccountRequest is the request type for the Query/Account RPC method.
|
||||||
message QueryAccountRequest {
|
message QueryAccountRequest {
|
||||||
option (gogoproto.equal) = false;
|
option (gogoproto.equal) = false;
|
||||||
|
@ -1,37 +1,26 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package cosmos.authz.v1beta1;
|
package cosmos.authz.v1beta1;
|
||||||
|
|
||||||
import "cosmos/base/v1beta1/coin.proto";
|
|
||||||
import "cosmos_proto/cosmos.proto";
|
import "cosmos_proto/cosmos.proto";
|
||||||
import "google/protobuf/timestamp.proto";
|
import "google/protobuf/timestamp.proto";
|
||||||
import "gogoproto/gogo.proto";
|
import "gogoproto/gogo.proto";
|
||||||
import "google/protobuf/any.proto";
|
import "google/protobuf/any.proto";
|
||||||
|
|
||||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz/types";
|
option go_package = "github.com/cosmos/cosmos-sdk/x/authz";
|
||||||
|
option (gogoproto.goproto_getters_all) = false;
|
||||||
// SendAuthorization allows the grantee to spend up to spend_limit coins from
|
|
||||||
// the granter's account.
|
|
||||||
message SendAuthorization {
|
|
||||||
option (cosmos_proto.implements_interface) = "Authorization";
|
|
||||||
|
|
||||||
repeated cosmos.base.v1beta1.Coin spend_limit = 1
|
|
||||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
|
||||||
}
|
|
||||||
|
|
||||||
// GenericAuthorization gives the grantee unrestricted permissions to execute
|
// GenericAuthorization gives the grantee unrestricted permissions to execute
|
||||||
// the provided method on behalf of the granter's account.
|
// the provided method on behalf of the granter's account.
|
||||||
message GenericAuthorization {
|
message GenericAuthorization {
|
||||||
option (cosmos_proto.implements_interface) = "Authorization";
|
option (cosmos_proto.implements_interface) = "Authorization";
|
||||||
|
|
||||||
// method name to grant unrestricted permissions to execute
|
// Msg, identified by it's type URL, to grant unrestricted permissions to execute
|
||||||
// Note: MethodName() is already a method on `GenericAuthorization` type,
|
string msg = 1;
|
||||||
// we need some custom naming here so using `MessageName`
|
|
||||||
string method_name = 1 [(gogoproto.customname) = "MessageName"];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthorizationGrant gives permissions to execute
|
// Grant gives permissions to execute
|
||||||
// the provide method with expiration time.
|
// the provide method with expiration time.
|
||||||
message AuthorizationGrant {
|
message Grant {
|
||||||
google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"];
|
google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"];
|
||||||
google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
24
third_party/proto/cosmos/authz/v1beta1/event.proto
vendored
Normal file
24
third_party/proto/cosmos/authz/v1beta1/event.proto
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
package cosmos.authz.v1beta1;
|
||||||
|
|
||||||
|
option go_package = "github.com/cosmos/cosmos-sdk/x/authz";
|
||||||
|
|
||||||
|
// EventGrant is emitted on Msg/Grant
|
||||||
|
message EventGrant {
|
||||||
|
// Msg type URL for which an autorization is granted
|
||||||
|
string msg_type_url = 2;
|
||||||
|
// Granter account address
|
||||||
|
string granter = 3;
|
||||||
|
// Grantee account address
|
||||||
|
string grantee = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// EventRevoke is emitted on Msg/Revoke
|
||||||
|
message EventRevoke {
|
||||||
|
// Msg type URL for which an autorization is revoked
|
||||||
|
string msg_type_url = 2;
|
||||||
|
// Granter account address
|
||||||
|
string granter = 3;
|
||||||
|
// Grantee account address
|
||||||
|
string grantee = 4;
|
||||||
|
}
|
@ -5,9 +5,8 @@ import "google/protobuf/timestamp.proto";
|
|||||||
import "google/protobuf/any.proto";
|
import "google/protobuf/any.proto";
|
||||||
import "gogoproto/gogo.proto";
|
import "gogoproto/gogo.proto";
|
||||||
import "cosmos_proto/cosmos.proto";
|
import "cosmos_proto/cosmos.proto";
|
||||||
import "cosmos/authz/v1beta1/tx.proto";
|
|
||||||
|
|
||||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz/types";
|
option go_package = "github.com/cosmos/cosmos-sdk/x/authz";
|
||||||
|
|
||||||
// GenesisState defines the authz module's genesis state.
|
// GenesisState defines the authz module's genesis state.
|
||||||
message GenesisState {
|
message GenesisState {
|
||||||
|
@ -5,47 +5,30 @@ import "google/api/annotations.proto";
|
|||||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||||
import "cosmos/authz/v1beta1/authz.proto";
|
import "cosmos/authz/v1beta1/authz.proto";
|
||||||
|
|
||||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz/types";
|
option go_package = "github.com/cosmos/cosmos-sdk/x/authz";
|
||||||
|
|
||||||
// Query defines the gRPC querier service.
|
// Query defines the gRPC querier service.
|
||||||
service Query {
|
service Query {
|
||||||
// Returns any `Authorization` (or `nil`), with the expiration time, granted to the grantee by the granter for the
|
|
||||||
// provided msg type.
|
|
||||||
rpc Authorization(QueryAuthorizationRequest) returns (QueryAuthorizationResponse) {
|
|
||||||
option (google.api.http).get = "/cosmos/authz/v1beta1/granters/{granter}/grantees/{grantee}/grant";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns list of `Authorization`, granted to the grantee by the granter.
|
// Returns list of `Authorization`, granted to the grantee by the granter.
|
||||||
rpc Authorizations(QueryAuthorizationsRequest) returns (QueryAuthorizationsResponse) {
|
rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) {
|
||||||
option (google.api.http).get = "/cosmos/authz/v1beta1/granters/{granter}/grantees/{grantee}/grants";
|
option (google.api.http).get = "/cosmos/authz/v1beta1/grants";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryAuthorizationRequest is the request type for the Query/Authorization RPC method.
|
// QueryGrantsRequest is the request type for the Query/Grants RPC method.
|
||||||
message QueryAuthorizationRequest {
|
message QueryGrantsRequest {
|
||||||
string granter = 1;
|
|
||||||
string grantee = 2;
|
|
||||||
string method_name = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
// QueryAuthorizationResponse is the response type for the Query/Authorization RPC method.
|
|
||||||
message QueryAuthorizationResponse {
|
|
||||||
// authorization is a authorization granted for grantee by granter.
|
|
||||||
cosmos.authz.v1beta1.AuthorizationGrant authorization = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// QueryAuthorizationsRequest is the request type for the Query/Authorizations RPC method.
|
|
||||||
message QueryAuthorizationsRequest {
|
|
||||||
string granter = 1;
|
string granter = 1;
|
||||||
string grantee = 2;
|
string grantee = 2;
|
||||||
|
// Optional, msg_type_url, when set, will query only grants matching given msg type.
|
||||||
|
string msg_type_url = 3;
|
||||||
// pagination defines an pagination for the request.
|
// pagination defines an pagination for the request.
|
||||||
cosmos.base.query.v1beta1.PageRequest pagination = 3;
|
cosmos.base.query.v1beta1.PageRequest pagination = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryAuthorizationsResponse is the response type for the Query/Authorizations RPC method.
|
// QueryGrantsResponse is the response type for the Query/Authorizations RPC method.
|
||||||
message QueryAuthorizationsResponse {
|
message QueryGrantsResponse {
|
||||||
// authorizations is a list of grants granted for grantee by granter.
|
// authorizations is a list of grants granted for grantee by granter.
|
||||||
repeated cosmos.authz.v1beta1.AuthorizationGrant authorizations = 1;
|
repeated cosmos.authz.v1beta1.Grant grants = 1;
|
||||||
// pagination defines an pagination for the response.
|
// pagination defines an pagination for the response.
|
||||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||||
}
|
}
|
||||||
|
65
third_party/proto/cosmos/authz/v1beta1/tx.proto
vendored
65
third_party/proto/cosmos/authz/v1beta1/tx.proto
vendored
@ -6,57 +6,64 @@ import "gogoproto/gogo.proto";
|
|||||||
import "google/protobuf/timestamp.proto";
|
import "google/protobuf/timestamp.proto";
|
||||||
import "google/protobuf/any.proto";
|
import "google/protobuf/any.proto";
|
||||||
import "cosmos/base/abci/v1beta1/abci.proto";
|
import "cosmos/base/abci/v1beta1/abci.proto";
|
||||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz/types";
|
import "cosmos/authz/v1beta1/authz.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/cosmos/cosmos-sdk/x/authz";
|
||||||
|
option (gogoproto.goproto_getters_all) = false;
|
||||||
|
|
||||||
// Msg defines the authz Msg service.
|
// Msg defines the authz Msg service.
|
||||||
service Msg {
|
service Msg {
|
||||||
// GrantAuthorization grants the provided authorization to the grantee on the granter's
|
// Grant grants the provided authorization to the grantee on the granter's
|
||||||
// account with the provided expiration time.
|
// account with the provided expiration time. If there is already a grant
|
||||||
rpc GrantAuthorization(MsgGrantAuthorizationRequest) returns (MsgGrantAuthorizationResponse);
|
// for the given (granter, grantee, Authorization) triple, then the grant
|
||||||
|
// will be overwritten.
|
||||||
|
rpc Grant(MsgGrant) returns (MsgGrantResponse);
|
||||||
|
|
||||||
// ExecAuthorized attempts to execute the provided messages using
|
// Exec attempts to execute the provided messages using
|
||||||
// authorizations granted to the grantee. Each message should have only
|
// authorizations granted to the grantee. Each message should have only
|
||||||
// one signer corresponding to the granter of the authorization.
|
// one signer corresponding to the granter of the authorization.
|
||||||
rpc ExecAuthorized(MsgExecAuthorizedRequest) returns (MsgExecAuthorizedResponse);
|
rpc Exec(MsgExec) returns (MsgExecResponse);
|
||||||
|
|
||||||
// RevokeAuthorization revokes any authorization corresponding to the provided method name on the
|
// Revoke revokes any authorization corresponding to the provided method name on the
|
||||||
// granter's account that has been granted to the grantee.
|
// granter's account that has been granted to the grantee.
|
||||||
rpc RevokeAuthorization(MsgRevokeAuthorizationRequest) returns (MsgRevokeAuthorizationResponse);
|
rpc Revoke(MsgRevoke) returns (MsgRevokeResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgGrantAuthorizationRequest grants the provided authorization to the grantee on the granter's
|
// MsgGrant is a request type for Grant method. It declares authorization to the grantee
|
||||||
// account with the provided expiration time.
|
// on behalf of the granter with the provided expiration time.
|
||||||
message MsgGrantAuthorizationRequest {
|
message MsgGrant {
|
||||||
string granter = 1;
|
string granter = 1;
|
||||||
string grantee = 2;
|
string grantee = 2;
|
||||||
|
|
||||||
google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"];
|
cosmos.authz.v1beta1.Grant grant = 3 [(gogoproto.nullable) = false];
|
||||||
google.protobuf.Timestamp expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgExecAuthorizedResponse defines the Msg/MsgExecAuthorizedResponse response type.
|
// MsgExecResponse defines the Msg/MsgExecResponse response type.
|
||||||
message MsgExecAuthorizedResponse {
|
message MsgExecResponse {
|
||||||
cosmos.base.abci.v1beta1.Result result = 1;
|
repeated bytes results = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgExecAuthorizedRequest attempts to execute the provided messages using
|
// MsgExec attempts to execute the provided messages using
|
||||||
// authorizations granted to the grantee. Each message should have only
|
// authorizations granted to the grantee. Each message should have only
|
||||||
// one signer corresponding to the granter of the authorization.
|
// one signer corresponding to the granter of the authorization.
|
||||||
message MsgExecAuthorizedRequest {
|
message MsgExec {
|
||||||
string grantee = 1;
|
string grantee = 1;
|
||||||
repeated google.protobuf.Any msgs = 2;
|
// Authorization Msg requests to execute. Each msg must implement Authorization interface
|
||||||
|
// The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
|
||||||
|
// triple and validate it.
|
||||||
|
repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "sdk.Msg, authz.Authorization"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgGrantAuthorizationResponse defines the Msg/MsgGrantAuthorization response type.
|
// MsgGrantResponse defines the Msg/MsgGrant response type.
|
||||||
message MsgGrantAuthorizationResponse {}
|
message MsgGrantResponse {}
|
||||||
|
|
||||||
// MsgRevokeAuthorizationRequest revokes any authorization with the provided sdk.Msg type on the
|
// MsgRevoke revokes any authorization with the provided sdk.Msg type on the
|
||||||
// granter's account with that has been granted to the grantee.
|
// granter's account with that has been granted to the grantee.
|
||||||
message MsgRevokeAuthorizationRequest {
|
message MsgRevoke {
|
||||||
string granter = 1;
|
string granter = 1;
|
||||||
string grantee = 2;
|
string grantee = 2;
|
||||||
string method_name = 3;
|
string msg_type_url = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgRevokeAuthorizationResponse defines the Msg/MsgRevokeAuthorizationResponse response type.
|
// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type.
|
||||||
message MsgRevokeAuthorizationResponse {}
|
message MsgRevokeResponse {}
|
||||||
|
17
third_party/proto/cosmos/bank/v1beta1/authz.proto
vendored
Normal file
17
third_party/proto/cosmos/bank/v1beta1/authz.proto
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
package cosmos.bank.v1beta1;
|
||||||
|
|
||||||
|
import "gogoproto/gogo.proto";
|
||||||
|
import "cosmos_proto/cosmos.proto";
|
||||||
|
import "cosmos/base/v1beta1/coin.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";
|
||||||
|
|
||||||
|
// SendAuthorization allows the grantee to spend up to spend_limit coins from
|
||||||
|
// the granter's account.
|
||||||
|
message SendAuthorization {
|
||||||
|
option (cosmos_proto.implements_interface) = "Authorization";
|
||||||
|
|
||||||
|
repeated cosmos.base.v1beta1.Coin spend_limit = 1
|
||||||
|
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||||
|
}
|
15
third_party/proto/cosmos/bank/v1beta1/bank.proto
vendored
15
third_party/proto/cosmos/bank/v1beta1/bank.proto
vendored
@ -45,12 +45,14 @@ message Output {
|
|||||||
|
|
||||||
// Supply represents a struct that passively keeps track of the total supply
|
// Supply represents a struct that passively keeps track of the total supply
|
||||||
// amounts in the network.
|
// amounts in the network.
|
||||||
|
// This message is deprecated now that supply is indexed by denom.
|
||||||
message Supply {
|
message Supply {
|
||||||
option (gogoproto.equal) = true;
|
option deprecated = true;
|
||||||
option (gogoproto.goproto_getters) = false;
|
|
||||||
option (gogoproto.goproto_stringer) = false;
|
|
||||||
|
|
||||||
option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI";
|
option (gogoproto.equal) = true;
|
||||||
|
option (gogoproto.goproto_getters) = false;
|
||||||
|
|
||||||
|
option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/legacy/v040.SupplyI";
|
||||||
|
|
||||||
repeated cosmos.base.v1beta1.Coin total = 1
|
repeated cosmos.base.v1beta1.Coin total = 1
|
||||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||||
@ -82,4 +84,9 @@ message Metadata {
|
|||||||
// display indicates the suggested denom that should be
|
// display indicates the suggested denom that should be
|
||||||
// displayed in clients.
|
// displayed in clients.
|
||||||
string display = 4;
|
string display = 4;
|
||||||
|
// name defines the name of the token (eg: Cosmos Atom)
|
||||||
|
string name = 5;
|
||||||
|
// symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
|
||||||
|
// be the same as the display.
|
||||||
|
string symbol = 6;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,8 @@ message GenesisState {
|
|||||||
// balances is an array containing the balances of all the accounts.
|
// balances is an array containing the balances of all the accounts.
|
||||||
repeated Balance balances = 2 [(gogoproto.nullable) = false];
|
repeated Balance balances = 2 [(gogoproto.nullable) = false];
|
||||||
|
|
||||||
// supply represents the total supply.
|
// supply represents the total supply. If it is left empty, then supply will be calculated based on the provided
|
||||||
|
// balances. Otherwise, it will be used to validate that the sum of the balances equals this amount.
|
||||||
repeated cosmos.base.v1beta1.Coin supply = 3
|
repeated cosmos.base.v1beta1.Coin supply = 3
|
||||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
|
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
|
||||||
|
|
||||||
|
@ -90,7 +90,13 @@ message QueryAllBalancesResponse {
|
|||||||
|
|
||||||
// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC
|
// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC
|
||||||
// method.
|
// method.
|
||||||
message QueryTotalSupplyRequest {}
|
message QueryTotalSupplyRequest {
|
||||||
|
option (gogoproto.equal) = false;
|
||||||
|
option (gogoproto.goproto_getters) = false;
|
||||||
|
|
||||||
|
// pagination defines an optional pagination for the request.
|
||||||
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||||
|
}
|
||||||
|
|
||||||
// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC
|
// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC
|
||||||
// method
|
// method
|
||||||
@ -98,6 +104,9 @@ message QueryTotalSupplyResponse {
|
|||||||
// supply is the supply of the coins
|
// supply is the supply of the coins
|
||||||
repeated cosmos.base.v1beta1.Coin supply = 1
|
repeated cosmos.base.v1beta1.Coin supply = 1
|
||||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||||
|
|
||||||
|
// pagination defines the pagination in the response.
|
||||||
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method.
|
// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method.
|
||||||
|
@ -30,6 +30,9 @@ message PageRequest {
|
|||||||
// count_total is only respected when offset is used. It is ignored when key
|
// count_total is only respected when offset is used. It is ignored when key
|
||||||
// is set.
|
// is set.
|
||||||
bool count_total = 4;
|
bool count_total = 4;
|
||||||
|
|
||||||
|
// reverse is set to true if results are to be returned in the descending order.
|
||||||
|
bool reverse = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PageResponse is to be embedded in gRPC response messages where the
|
// PageResponse is to be embedded in gRPC response messages where the
|
||||||
|
217
third_party/proto/cosmos/base/reflection/v2alpha1/reflection.proto
vendored
Normal file
217
third_party/proto/cosmos/base/reflection/v2alpha1/reflection.proto
vendored
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
package cosmos.base.reflection.v2alpha1;
|
||||||
|
|
||||||
|
import "google/api/annotations.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1";
|
||||||
|
|
||||||
|
// AppDescriptor describes a cosmos-sdk based application
|
||||||
|
message AppDescriptor {
|
||||||
|
// AuthnDescriptor provides information on how to authenticate transactions on the application
|
||||||
|
// NOTE: experimental and subject to change in future releases.
|
||||||
|
AuthnDescriptor authn = 1;
|
||||||
|
// chain provides the chain descriptor
|
||||||
|
ChainDescriptor chain = 2;
|
||||||
|
// codec provides metadata information regarding codec related types
|
||||||
|
CodecDescriptor codec = 3;
|
||||||
|
// configuration provides metadata information regarding the sdk.Config type
|
||||||
|
ConfigurationDescriptor configuration = 4;
|
||||||
|
// query_services provides metadata information regarding the available queriable endpoints
|
||||||
|
QueryServicesDescriptor query_services = 5;
|
||||||
|
// tx provides metadata information regarding how to send transactions to the given application
|
||||||
|
TxDescriptor tx = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TxDescriptor describes the accepted transaction type
|
||||||
|
message TxDescriptor {
|
||||||
|
// fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type)
|
||||||
|
// it is not meant to support polymorphism of transaction types, it is supposed to be used by
|
||||||
|
// reflection clients to understand if they can handle a specific transaction type in an application.
|
||||||
|
string fullname = 1;
|
||||||
|
// msgs lists the accepted application messages (sdk.Msg)
|
||||||
|
repeated MsgDescriptor msgs = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// AuthnDescriptor provides information on how to sign transactions without relying
|
||||||
|
// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures
|
||||||
|
message AuthnDescriptor {
|
||||||
|
// sign_modes defines the supported signature algorithm
|
||||||
|
repeated SigningModeDescriptor sign_modes = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// SigningModeDescriptor provides information on a signing flow of the application
|
||||||
|
// NOTE(fdymylja): here we could go as far as providing an entire flow on how
|
||||||
|
// to sign a message given a SigningModeDescriptor, but it's better to think about
|
||||||
|
// this another time
|
||||||
|
message SigningModeDescriptor {
|
||||||
|
// name defines the unique name of the signing mode
|
||||||
|
string name = 1;
|
||||||
|
// number is the unique int32 identifier for the sign_mode enum
|
||||||
|
int32 number = 2;
|
||||||
|
// authn_info_provider_method_fullname defines the fullname of the method to call to get
|
||||||
|
// the metadata required to authenticate using the provided sign_modes
|
||||||
|
string authn_info_provider_method_fullname = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ChainDescriptor describes chain information of the application
|
||||||
|
message ChainDescriptor {
|
||||||
|
// id is the chain id
|
||||||
|
string id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// CodecDescriptor describes the registered interfaces and provides metadata information on the types
|
||||||
|
message CodecDescriptor {
|
||||||
|
// interfaces is a list of the registerted interfaces descriptors
|
||||||
|
repeated InterfaceDescriptor interfaces = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// InterfaceDescriptor describes the implementation of an interface
|
||||||
|
message InterfaceDescriptor {
|
||||||
|
// fullname is the name of the interface
|
||||||
|
string fullname = 1;
|
||||||
|
// interface_accepting_messages contains information regarding the proto messages which contain the interface as
|
||||||
|
// google.protobuf.Any field
|
||||||
|
repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2;
|
||||||
|
// interface_implementers is a list of the descriptors of the interface implementers
|
||||||
|
repeated InterfaceImplementerDescriptor interface_implementers = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// InterfaceImplementerDescriptor describes an interface implementer
|
||||||
|
message InterfaceImplementerDescriptor {
|
||||||
|
// fullname is the protobuf queryable name of the interface implementer
|
||||||
|
string fullname = 1;
|
||||||
|
// type_url defines the type URL used when marshalling the type as any
|
||||||
|
// this is required so we can provide type safe google.protobuf.Any marshalling and
|
||||||
|
// unmarshalling, making sure that we don't accept just 'any' type
|
||||||
|
// in our interface fields
|
||||||
|
string type_url = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains
|
||||||
|
// an interface represented as a google.protobuf.Any
|
||||||
|
message InterfaceAcceptingMessageDescriptor {
|
||||||
|
// fullname is the protobuf fullname of the type containing the interface
|
||||||
|
string fullname = 1;
|
||||||
|
// field_descriptor_names is a list of the protobuf name (not fullname) of the field
|
||||||
|
// which contains the interface as google.protobuf.Any (the interface is the same, but
|
||||||
|
// it can be in multiple fields of the same proto message)
|
||||||
|
repeated string field_descriptor_names = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ConfigurationDescriptor contains metadata information on the sdk.Config
|
||||||
|
message ConfigurationDescriptor {
|
||||||
|
// bech32_account_address_prefix is the account address prefix
|
||||||
|
string bech32_account_address_prefix = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction
|
||||||
|
message MsgDescriptor {
|
||||||
|
// msg_type_url contains the TypeURL of a sdk.Msg.
|
||||||
|
string msg_type_url = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReflectionService defines a service for application reflection.
|
||||||
|
service ReflectionService {
|
||||||
|
// GetAuthnDescriptor returns information on how to authenticate transactions in the application
|
||||||
|
// NOTE: this RPC is still experimental and might be subject to breaking changes or removal in
|
||||||
|
// future releases of the cosmos-sdk.
|
||||||
|
rpc GetAuthnDescriptor(GetAuthnDescriptorRequest) returns (GetAuthnDescriptorResponse) {
|
||||||
|
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/authn";
|
||||||
|
}
|
||||||
|
// GetChainDescriptor returns the description of the chain
|
||||||
|
rpc GetChainDescriptor(GetChainDescriptorRequest) returns (GetChainDescriptorResponse) {
|
||||||
|
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/chain";
|
||||||
|
};
|
||||||
|
// GetCodecDescriptor returns the descriptor of the codec of the application
|
||||||
|
rpc GetCodecDescriptor(GetCodecDescriptorRequest) returns (GetCodecDescriptorResponse) {
|
||||||
|
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/codec";
|
||||||
|
}
|
||||||
|
// GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application
|
||||||
|
rpc GetConfigurationDescriptor(GetConfigurationDescriptorRequest) returns (GetConfigurationDescriptorResponse) {
|
||||||
|
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/configuration";
|
||||||
|
}
|
||||||
|
// GetQueryServicesDescriptor returns the available gRPC queryable services of the application
|
||||||
|
rpc GetQueryServicesDescriptor(GetQueryServicesDescriptorRequest) returns (GetQueryServicesDescriptorResponse) {
|
||||||
|
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/query_services";
|
||||||
|
}
|
||||||
|
// GetTxDescriptor returns information on the used transaction object and available msgs that can be used
|
||||||
|
rpc GetTxDescriptor(GetTxDescriptorRequest) returns (GetTxDescriptorResponse) {
|
||||||
|
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC
|
||||||
|
message GetAuthnDescriptorRequest {}
|
||||||
|
// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC
|
||||||
|
message GetAuthnDescriptorResponse {
|
||||||
|
// authn describes how to authenticate to the application when sending transactions
|
||||||
|
AuthnDescriptor authn = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC
|
||||||
|
message GetChainDescriptorRequest {}
|
||||||
|
// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC
|
||||||
|
message GetChainDescriptorResponse {
|
||||||
|
// chain describes application chain information
|
||||||
|
ChainDescriptor chain = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC
|
||||||
|
message GetCodecDescriptorRequest {}
|
||||||
|
// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC
|
||||||
|
message GetCodecDescriptorResponse {
|
||||||
|
// codec describes the application codec such as registered interfaces and implementations
|
||||||
|
CodecDescriptor codec = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC
|
||||||
|
message GetConfigurationDescriptorRequest {}
|
||||||
|
// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC
|
||||||
|
message GetConfigurationDescriptorResponse {
|
||||||
|
// config describes the application's sdk.Config
|
||||||
|
ConfigurationDescriptor config = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC
|
||||||
|
message GetQueryServicesDescriptorRequest {}
|
||||||
|
// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC
|
||||||
|
message GetQueryServicesDescriptorResponse {
|
||||||
|
// queries provides information on the available queryable services
|
||||||
|
QueryServicesDescriptor queries = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC
|
||||||
|
message GetTxDescriptorRequest {}
|
||||||
|
// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC
|
||||||
|
message GetTxDescriptorResponse {
|
||||||
|
// tx provides information on msgs that can be forwarded to the application
|
||||||
|
// alongside the accepted transaction protobuf type
|
||||||
|
TxDescriptor tx = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryServicesDescriptor contains the list of cosmos-sdk queriable services
|
||||||
|
message QueryServicesDescriptor {
|
||||||
|
// query_services is a list of cosmos-sdk QueryServiceDescriptor
|
||||||
|
repeated QueryServiceDescriptor query_services = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryServiceDescriptor describes a cosmos-sdk queryable service
|
||||||
|
message QueryServiceDescriptor {
|
||||||
|
// fullname is the protobuf fullname of the service descriptor
|
||||||
|
string fullname = 1;
|
||||||
|
// is_module describes if this service is actually exposed by an application's module
|
||||||
|
bool is_module = 2;
|
||||||
|
// methods provides a list of query service methods
|
||||||
|
repeated QueryMethodDescriptor methods = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryMethodDescriptor describes a queryable method of a query service
|
||||||
|
// no other info is provided beside method name and tendermint queryable path
|
||||||
|
// because it would be redundant with the grpc reflection service
|
||||||
|
message QueryMethodDescriptor {
|
||||||
|
// name is the protobuf name (not fullname) of the method
|
||||||
|
string name = 1;
|
||||||
|
// full_query_path is the path that can be used to query
|
||||||
|
// this method via tendermint abci.Query
|
||||||
|
string full_query_path = 2;
|
||||||
|
}
|
14
third_party/proto/cosmos/base/store/v1beta1/listening.proto
vendored
Normal file
14
third_party/proto/cosmos/base/store/v1beta1/listening.proto
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
package cosmos.base.store.v1beta1;
|
||||||
|
|
||||||
|
option go_package = "github.com/cosmos/cosmos-sdk/store/types";
|
||||||
|
|
||||||
|
// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
|
||||||
|
// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
|
||||||
|
// Deletes
|
||||||
|
message StoreKVPair {
|
||||||
|
string store_key = 1; // the store key for the KVStore this pair originates from
|
||||||
|
bool delete = 2; // true indicates a delete operation, false indicates a set operation
|
||||||
|
bytes key = 3;
|
||||||
|
bytes value = 4;
|
||||||
|
}
|
@ -115,13 +115,14 @@ message GetNodeInfoResponse {
|
|||||||
|
|
||||||
// VersionInfo is the type for the GetNodeInfoResponse message.
|
// VersionInfo is the type for the GetNodeInfoResponse message.
|
||||||
message VersionInfo {
|
message VersionInfo {
|
||||||
string name = 1;
|
string name = 1;
|
||||||
string app_name = 2;
|
string app_name = 2;
|
||||||
string version = 3;
|
string version = 3;
|
||||||
string git_commit = 4;
|
string git_commit = 4;
|
||||||
string build_tags = 5;
|
string build_tags = 5;
|
||||||
string go_version = 6;
|
string go_version = 6;
|
||||||
repeated Module build_deps = 7;
|
repeated Module build_deps = 7;
|
||||||
|
string cosmos_sdk_version = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module is the type for VersionInfo
|
// Module is the type for VersionInfo
|
||||||
|
@ -5,18 +5,19 @@ import "gogoproto/gogo.proto";
|
|||||||
|
|
||||||
option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519";
|
option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519";
|
||||||
|
|
||||||
// PubKey defines a ed25519 public key
|
// PubKey is an ed25519 public key for handling Tendermint keys in SDK.
|
||||||
// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte
|
// It's needed for Any serialization and SDK compatibility.
|
||||||
// if the y-coordinate is the lexicographically largest of the two associated with
|
// It must not be used in a non Tendermint key context because it doesn't implement
|
||||||
// the x-coordinate. Otherwise the first byte is a 0x03.
|
// ADR-28. Nevertheless, you will like to use ed25519 in app user level
|
||||||
// This prefix is followed with the x-coordinate.
|
// then you must create a new proto message and follow ADR-28 for Address construction.
|
||||||
message PubKey {
|
message PubKey {
|
||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"];
|
bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// PrivKey defines a ed25519 private key.
|
// Deprecated: PrivKey defines a ed25519 private key.
|
||||||
|
// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context.
|
||||||
message PrivKey {
|
message PrivKey {
|
||||||
bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"];
|
bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"];
|
||||||
}
|
}
|
||||||
|
22
third_party/proto/cosmos/crypto/secp256r1/keys.proto
vendored
Normal file
22
third_party/proto/cosmos/crypto/secp256r1/keys.proto
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
package cosmos.crypto.secp256r1;
|
||||||
|
|
||||||
|
import "gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1";
|
||||||
|
option (gogoproto.messagename_all) = true;
|
||||||
|
option (gogoproto.goproto_stringer_all) = false;
|
||||||
|
option (gogoproto.goproto_getters_all) = false;
|
||||||
|
|
||||||
|
// PubKey defines a secp256r1 ECDSA public key.
|
||||||
|
message PubKey {
|
||||||
|
// Point on secp256r1 curve in a compressed representation as specified in section
|
||||||
|
// 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998
|
||||||
|
bytes key = 1 [(gogoproto.customtype) = "ecdsaPK"];
|
||||||
|
}
|
||||||
|
|
||||||
|
// PrivKey defines a secp256r1 ECDSA private key.
|
||||||
|
message PrivKey {
|
||||||
|
// secret number serialized using big-endian encoding
|
||||||
|
bytes secret = 1 [(gogoproto.customtype) = "ecdsaSK"];
|
||||||
|
}
|
@ -8,11 +8,11 @@ import "cosmos/base/v1beta1/coin.proto";
|
|||||||
import "google/protobuf/timestamp.proto";
|
import "google/protobuf/timestamp.proto";
|
||||||
import "google/protobuf/duration.proto";
|
import "google/protobuf/duration.proto";
|
||||||
|
|
||||||
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types";
|
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant";
|
||||||
|
|
||||||
// BasicFeeAllowance implements FeeAllowance with a one-time grant of tokens
|
// BasicAllowance implements Allowance with a one-time grant of tokens
|
||||||
// that optionally expires. The delegatee can use up to SpendLimit to cover fees.
|
// that optionally expires. The grantee can use up to SpendLimit to cover fees.
|
||||||
message BasicFeeAllowance {
|
message BasicAllowance {
|
||||||
option (cosmos_proto.implements_interface) = "FeeAllowanceI";
|
option (cosmos_proto.implements_interface) = "FeeAllowanceI";
|
||||||
|
|
||||||
// spend_limit specifies the maximum amount of tokens that can be spent
|
// spend_limit specifies the maximum amount of tokens that can be spent
|
||||||
@ -22,20 +22,20 @@ message BasicFeeAllowance {
|
|||||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||||
|
|
||||||
// expiration specifies an optional time when this allowance expires
|
// expiration specifies an optional time when this allowance expires
|
||||||
ExpiresAt expiration = 2 [(gogoproto.nullable) = false];
|
google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true];
|
||||||
}
|
}
|
||||||
|
|
||||||
// PeriodicFeeAllowance extends FeeAllowance to allow for both a maximum cap,
|
// PeriodicAllowance extends Allowance to allow for both a maximum cap,
|
||||||
// as well as a limit per time period.
|
// as well as a limit per time period.
|
||||||
message PeriodicFeeAllowance {
|
message PeriodicAllowance {
|
||||||
option (cosmos_proto.implements_interface) = "FeeAllowanceI";
|
option (cosmos_proto.implements_interface) = "FeeAllowanceI";
|
||||||
|
|
||||||
// basic specifies a struct of `BasicFeeAllowance`
|
// basic specifies a struct of `BasicAllowance`
|
||||||
BasicFeeAllowance basic = 1 [(gogoproto.nullable) = false];
|
BasicAllowance basic = 1 [(gogoproto.nullable) = false];
|
||||||
|
|
||||||
// period specifies the time duration in which period_spend_limit coins can
|
// period specifies the time duration in which period_spend_limit coins can
|
||||||
// be spent before that allowance is reset
|
// be spent before that allowance is reset
|
||||||
Duration period = 2 [(gogoproto.nullable) = false];
|
google.protobuf.Duration period = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false];
|
||||||
|
|
||||||
// period_spend_limit specifies the maximum number of coins that can be spent
|
// period_spend_limit specifies the maximum number of coins that can be spent
|
||||||
// in the period
|
// in the period
|
||||||
@ -49,33 +49,29 @@ message PeriodicFeeAllowance {
|
|||||||
// period_reset is the time at which this period resets and a new one begins,
|
// period_reset is the time at which this period resets and a new one begins,
|
||||||
// it is calculated from the start time of the first transaction after the
|
// it is calculated from the start time of the first transaction after the
|
||||||
// last period ended
|
// last period ended
|
||||||
ExpiresAt period_reset = 5 [(gogoproto.nullable) = false];
|
google.protobuf.Timestamp period_reset = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Duration is a span of a clock time or number of blocks.
|
// AllowedMsgAllowance creates allowance only for specified message types.
|
||||||
// This is designed to be added to an ExpiresAt struct.
|
message AllowedMsgAllowance {
|
||||||
message Duration {
|
option (gogoproto.goproto_getters) = false;
|
||||||
// sum is the oneof that represents either duration or block
|
option (cosmos_proto.implements_interface) = "FeeAllowanceI";
|
||||||
oneof sum {
|
|
||||||
google.protobuf.Duration duration = 1 [(gogoproto.stdduration) = true];
|
// allowance can be any of basic and filtered fee allowance.
|
||||||
uint64 blocks = 2;
|
google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
||||||
}
|
|
||||||
|
// allowed_messages are the messages for which the grantee has the access.
|
||||||
|
repeated string allowed_messages = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExpiresAt is a point in time where something expires.
|
// Grant is stored in the KVStore to record a grant with full context
|
||||||
// It may be *either* block time or block height
|
message Grant {
|
||||||
message ExpiresAt {
|
// granter is the address of the user granting an allowance of their funds.
|
||||||
// sum is the oneof that represents either time or height
|
string granter = 1;
|
||||||
oneof sum {
|
|
||||||
google.protobuf.Timestamp time = 1 [(gogoproto.stdtime) = true];
|
|
||||||
int64 height = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FeeAllowanceGrant is stored in the KVStore to record a grant with full context
|
// grantee is the address of the user being granted an allowance of another user's funds.
|
||||||
message FeeAllowanceGrant {
|
string grantee = 2;
|
||||||
|
|
||||||
string granter = 1;
|
// allowance can be any of basic and filtered fee allowance.
|
||||||
string grantee = 2;
|
|
||||||
google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@ package cosmos.feegrant.v1beta1;
|
|||||||
import "gogoproto/gogo.proto";
|
import "gogoproto/gogo.proto";
|
||||||
import "cosmos/feegrant/v1beta1/feegrant.proto";
|
import "cosmos/feegrant/v1beta1/feegrant.proto";
|
||||||
|
|
||||||
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types";
|
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant";
|
||||||
|
|
||||||
// GenesisState contains a set of fee allowances, persisted from the store
|
// GenesisState contains a set of fee allowances, persisted from the store
|
||||||
message GenesisState {
|
message GenesisState {
|
||||||
repeated FeeAllowanceGrant fee_allowances = 1 [(gogoproto.nullable) = false];
|
repeated Grant allowances = 1 [(gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
@ -5,46 +5,49 @@ import "cosmos/feegrant/v1beta1/feegrant.proto";
|
|||||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||||
import "google/api/annotations.proto";
|
import "google/api/annotations.proto";
|
||||||
|
|
||||||
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types";
|
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant";
|
||||||
|
|
||||||
// Query defines the gRPC querier service.
|
// Query defines the gRPC querier service.
|
||||||
service Query {
|
service Query {
|
||||||
|
|
||||||
// FeeAllowance returns fee granted to the grantee by the granter.
|
// Allowance returns fee granted to the grantee by the granter.
|
||||||
rpc FeeAllowance(QueryFeeAllowanceRequest) returns (QueryFeeAllowanceResponse) {
|
rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) {
|
||||||
option (google.api.http).get = "/cosmos/feegrant/v1beta1/fee_allowance/{granter}/{grantee}";
|
option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}";
|
||||||
}
|
}
|
||||||
|
|
||||||
// FeeAllowances returns all the grants for address.
|
// Allowances returns all the grants for address.
|
||||||
rpc FeeAllowances(QueryFeeAllowancesRequest) returns (QueryFeeAllowancesResponse) {
|
rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) {
|
||||||
option (google.api.http).get = "/cosmos/feegrant/v1beta1/fee_allowances/{grantee}";
|
option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowances/{grantee}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryFeeAllowanceRequest is the request type for the Query/FeeAllowance RPC method.
|
// QueryAllowanceRequest is the request type for the Query/Allowance RPC method.
|
||||||
message QueryFeeAllowanceRequest {
|
message QueryAllowanceRequest {
|
||||||
|
// granter is the address of the user granting an allowance of their funds.
|
||||||
string granter = 1;
|
string granter = 1;
|
||||||
|
|
||||||
|
// grantee is the address of the user being granted an allowance of another user's funds.
|
||||||
string grantee = 2;
|
string grantee = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryFeeAllowanceResponse is the response type for the Query/FeeAllowance RPC method.
|
// QueryAllowanceResponse is the response type for the Query/Allowance RPC method.
|
||||||
message QueryFeeAllowanceResponse {
|
message QueryAllowanceResponse {
|
||||||
// fee_allowance is a fee_allowance granted for grantee by granter.
|
// allowance is a allowance granted for grantee by granter.
|
||||||
cosmos.feegrant.v1beta1.FeeAllowanceGrant fee_allowance = 1;
|
cosmos.feegrant.v1beta1.Grant allowance = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryFeeAllowancesRequest is the request type for the Query/FeeAllowances RPC method.
|
// QueryAllowancesRequest is the request type for the Query/Allowances RPC method.
|
||||||
message QueryFeeAllowancesRequest {
|
message QueryAllowancesRequest {
|
||||||
string grantee = 1;
|
string grantee = 1;
|
||||||
|
|
||||||
// pagination defines an pagination for the request.
|
// pagination defines an pagination for the request.
|
||||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryFeeAllowancesResponse is the response type for the Query/FeeAllowances RPC method.
|
// QueryAllowancesResponse is the response type for the Query/Allowances RPC method.
|
||||||
message QueryFeeAllowancesResponse {
|
message QueryAllowancesResponse {
|
||||||
// fee_allowances are fee_allowance's granted for grantee by granter.
|
// allowances are allowance's granted for grantee by granter.
|
||||||
repeated cosmos.feegrant.v1beta1.FeeAllowanceGrant fee_allowances = 1;
|
repeated cosmos.feegrant.v1beta1.Grant allowances = 1;
|
||||||
|
|
||||||
// pagination defines an pagination for the response.
|
// pagination defines an pagination for the response.
|
||||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||||
|
@ -5,36 +5,44 @@ import "gogoproto/gogo.proto";
|
|||||||
import "google/protobuf/any.proto";
|
import "google/protobuf/any.proto";
|
||||||
import "cosmos_proto/cosmos.proto";
|
import "cosmos_proto/cosmos.proto";
|
||||||
|
|
||||||
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types";
|
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant";
|
||||||
|
|
||||||
// Msg defines the feegrant msg service.
|
// Msg defines the feegrant msg service.
|
||||||
service Msg {
|
service Msg {
|
||||||
|
|
||||||
// GrantFeeAllowance grants fee allowance to the grantee on the granter's
|
// GrantAllowance grants fee allowance to the grantee on the granter's
|
||||||
// account with the provided expiration time.
|
// account with the provided expiration time.
|
||||||
rpc GrantFeeAllowance(MsgGrantFeeAllowance) returns (MsgGrantFeeAllowanceResponse);
|
rpc GrantAllowance(MsgGrantAllowance) returns (MsgGrantAllowanceResponse);
|
||||||
|
|
||||||
// RevokeFeeAllowance revokes any fee allowance of granter's account that
|
// RevokeAllowance revokes any fee allowance of granter's account that
|
||||||
// has been granted to the grantee.
|
// has been granted to the grantee.
|
||||||
rpc RevokeFeeAllowance(MsgRevokeFeeAllowance) returns (MsgRevokeFeeAllowanceResponse);
|
rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgGrantFeeAllowance adds permission for Grantee to spend up to Allowance
|
// MsgGrantAllowance adds permission for Grantee to spend up to Allowance
|
||||||
// of fees from the account of Granter.
|
// of fees from the account of Granter.
|
||||||
message MsgGrantFeeAllowance {
|
message MsgGrantAllowance {
|
||||||
string granter = 1;
|
// granter is the address of the user granting an allowance of their funds.
|
||||||
string grantee = 2;
|
string granter = 1;
|
||||||
|
|
||||||
|
// grantee is the address of the user being granted an allowance of another user's funds.
|
||||||
|
string grantee = 2;
|
||||||
|
|
||||||
|
// allowance can be any of basic and filtered fee allowance.
|
||||||
google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgGrantFeeAllowanceResponse defines the Msg/GrantFeeAllowanceResponse response type.
|
// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type.
|
||||||
message MsgGrantFeeAllowanceResponse {}
|
message MsgGrantAllowanceResponse {}
|
||||||
|
|
||||||
// MsgRevokeFeeAllowance removes any existing FeeAllowance from Granter to Grantee.
|
// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee.
|
||||||
message MsgRevokeFeeAllowance {
|
message MsgRevokeAllowance {
|
||||||
|
// granter is the address of the user granting an allowance of their funds.
|
||||||
string granter = 1;
|
string granter = 1;
|
||||||
|
|
||||||
|
// grantee is the address of the user being granted an allowance of another user's funds.
|
||||||
string grantee = 2;
|
string grantee = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgRevokeFeeAllowanceResponse defines the Msg/RevokeFeeAllowanceResponse response type.
|
// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type.
|
||||||
message MsgRevokeFeeAllowanceResponse {}
|
message MsgRevokeAllowanceResponse {}
|
||||||
|
20
third_party/proto/cosmos/gov/v1beta1/gov.proto
vendored
20
third_party/proto/cosmos/gov/v1beta1/gov.proto
vendored
@ -29,6 +29,16 @@ enum VoteOption {
|
|||||||
VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"];
|
VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WeightedVoteOption defines a unit of vote for vote split.
|
||||||
|
message WeightedVoteOption {
|
||||||
|
VoteOption option = 1;
|
||||||
|
string weight = 2 [
|
||||||
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||||
|
(gogoproto.nullable) = false,
|
||||||
|
(gogoproto.moretags) = "yaml:\"weight\""
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// TextProposal defines a standard text proposal whose changes need to be
|
// TextProposal defines a standard text proposal whose changes need to be
|
||||||
// manually updated in case of approval.
|
// manually updated in case of approval.
|
||||||
message TextProposal {
|
message TextProposal {
|
||||||
@ -119,9 +129,13 @@ message Vote {
|
|||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
option (gogoproto.equal) = false;
|
option (gogoproto.equal) = false;
|
||||||
|
|
||||||
uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""];
|
uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""];
|
||||||
string voter = 2;
|
string voter = 2;
|
||||||
VoteOption option = 3;
|
// Deprecated: Prefer to use `options` instead. This field is set in queries
|
||||||
|
// if and only if `len(options) == 1` and that option has weight 1. In all
|
||||||
|
// other cases, this field will default to VOTE_OPTION_UNSPECIFIED.
|
||||||
|
VoteOption option = 3 [deprecated = true];
|
||||||
|
repeated WeightedVoteOption options = 4 [(gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
// DepositParams defines the params for deposits on governance proposals.
|
// DepositParams defines the params for deposits on governance proposals.
|
||||||
|
18
third_party/proto/cosmos/gov/v1beta1/tx.proto
vendored
18
third_party/proto/cosmos/gov/v1beta1/tx.proto
vendored
@ -17,6 +17,9 @@ service Msg {
|
|||||||
// Vote defines a method to add a vote on a specific proposal.
|
// Vote defines a method to add a vote on a specific proposal.
|
||||||
rpc Vote(MsgVote) returns (MsgVoteResponse);
|
rpc Vote(MsgVote) returns (MsgVoteResponse);
|
||||||
|
|
||||||
|
// VoteWeighted defines a method to add a weighted vote on a specific proposal.
|
||||||
|
rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse);
|
||||||
|
|
||||||
// Deposit defines a method to add deposit on a specific proposal.
|
// Deposit defines a method to add deposit on a specific proposal.
|
||||||
rpc Deposit(MsgDeposit) returns (MsgDepositResponse);
|
rpc Deposit(MsgDeposit) returns (MsgDepositResponse);
|
||||||
}
|
}
|
||||||
@ -58,6 +61,21 @@ message MsgVote {
|
|||||||
// MsgVoteResponse defines the Msg/Vote response type.
|
// MsgVoteResponse defines the Msg/Vote response type.
|
||||||
message MsgVoteResponse {}
|
message MsgVoteResponse {}
|
||||||
|
|
||||||
|
// MsgVoteWeighted defines a message to cast a vote.
|
||||||
|
message MsgVoteWeighted {
|
||||||
|
option (gogoproto.equal) = false;
|
||||||
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
option (gogoproto.stringer) = false;
|
||||||
|
option (gogoproto.goproto_getters) = false;
|
||||||
|
|
||||||
|
uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""];
|
||||||
|
string voter = 2;
|
||||||
|
repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false];
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type.
|
||||||
|
message MsgVoteWeightedResponse {}
|
||||||
|
|
||||||
// MsgDeposit defines a message to submit a deposit to an existing proposal.
|
// MsgDeposit defines a message to submit a deposit to an existing proposal.
|
||||||
message MsgDeposit {
|
message MsgDeposit {
|
||||||
option (gogoproto.equal) = false;
|
option (gogoproto.equal) = false;
|
||||||
|
@ -16,7 +16,7 @@ message GenesisState {
|
|||||||
repeated SigningInfo signing_infos = 2
|
repeated SigningInfo signing_infos = 2
|
||||||
[(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false];
|
[(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false];
|
||||||
|
|
||||||
// signing_infos represents a map between validator addresses and their
|
// missed_blocks represents a map between validator addresses and their
|
||||||
// missed blocks.
|
// missed blocks.
|
||||||
repeated ValidatorMissedBlocks missed_blocks = 3
|
repeated ValidatorMissedBlocks missed_blocks = 3
|
||||||
[(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false];
|
[(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false];
|
||||||
|
43
third_party/proto/cosmos/staking/v1beta1/authz.proto
vendored
Normal file
43
third_party/proto/cosmos/staking/v1beta1/authz.proto
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
package cosmos.staking.v1beta1;
|
||||||
|
|
||||||
|
import "gogoproto/gogo.proto";
|
||||||
|
import "cosmos_proto/cosmos.proto";
|
||||||
|
import "cosmos/base/v1beta1/coin.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";
|
||||||
|
|
||||||
|
// StakeAuthorization defines authorization for delegate/undelegate/redelegate.
|
||||||
|
message StakeAuthorization {
|
||||||
|
option (cosmos_proto.implements_interface) = "Authorization";
|
||||||
|
|
||||||
|
// max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
|
||||||
|
// empty, there is no spend limit and any amount of coins can be delegated.
|
||||||
|
cosmos.base.v1beta1.Coin max_tokens = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"];
|
||||||
|
// validators is the oneof that represents either allow_list or deny_list
|
||||||
|
oneof validators {
|
||||||
|
// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
|
||||||
|
// account.
|
||||||
|
Validators allow_list = 2;
|
||||||
|
// deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
|
||||||
|
Validators deny_list = 3;
|
||||||
|
}
|
||||||
|
// Validators defines list of validator addresses.
|
||||||
|
message Validators {
|
||||||
|
repeated string address = 1;
|
||||||
|
}
|
||||||
|
// authorization_type defines one of AuthorizationType.
|
||||||
|
AuthorizationType authorization_type = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// AuthorizationType defines the type of staking module authorization type
|
||||||
|
enum AuthorizationType {
|
||||||
|
// AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type
|
||||||
|
AUTHORIZATION_TYPE_UNSPECIFIED = 0;
|
||||||
|
// AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate
|
||||||
|
AUTHORIZATION_TYPE_DELEGATE = 1;
|
||||||
|
// AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate
|
||||||
|
AUTHORIZATION_TYPE_UNDELEGATE = 2;
|
||||||
|
// AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate
|
||||||
|
AUTHORIZATION_TYPE_REDELEGATE = 3;
|
||||||
|
}
|
@ -27,12 +27,15 @@ message CommissionRates {
|
|||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
// rate is the commission rate charged to delegators, as a fraction.
|
||||||
|
string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||||
|
// max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
|
||||||
string max_rate = 2 [
|
string max_rate = 2 [
|
||||||
(gogoproto.moretags) = "yaml:\"max_rate\"",
|
(gogoproto.moretags) = "yaml:\"max_rate\"",
|
||||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||||
(gogoproto.nullable) = false
|
(gogoproto.nullable) = false
|
||||||
];
|
];
|
||||||
|
// max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
|
||||||
string max_change_rate = 3 [
|
string max_change_rate = 3 [
|
||||||
(gogoproto.moretags) = "yaml:\"max_change_rate\"",
|
(gogoproto.moretags) = "yaml:\"max_change_rate\"",
|
||||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||||
@ -45,8 +48,10 @@ message Commission {
|
|||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
// commission_rates defines the initial commission rates to be used for creating a validator.
|
||||||
google.protobuf.Timestamp update_time = 2
|
CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
|
// update_time is the last time the commission rate was changed.
|
||||||
|
google.protobuf.Timestamp update_time = 2
|
||||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""];
|
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,11 +60,16 @@ message Description {
|
|||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
string moniker = 1;
|
// moniker defines a human-readable name for the validator.
|
||||||
string identity = 2;
|
string moniker = 1;
|
||||||
string website = 3;
|
// identity defines an optional identity signature (ex. UPort or Keybase).
|
||||||
|
string identity = 2;
|
||||||
|
// website defines an optional website link.
|
||||||
|
string website = 3;
|
||||||
|
// security_contact defines an optional email for security contact.
|
||||||
string security_contact = 4 [(gogoproto.moretags) = "yaml:\"security_contact\""];
|
string security_contact = 4 [(gogoproto.moretags) = "yaml:\"security_contact\""];
|
||||||
string details = 5;
|
// details define other optional details.
|
||||||
|
string details = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validator defines a validator, together with the total amount of the
|
// Validator defines a validator, together with the total amount of the
|
||||||
@ -75,23 +85,34 @@ message Validator {
|
|||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
option (gogoproto.goproto_getters) = false;
|
option (gogoproto.goproto_getters) = false;
|
||||||
|
|
||||||
string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""];
|
// operator_address defines the address of the validator's operator; bech encoded in JSON.
|
||||||
|
string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""];
|
||||||
|
// consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
|
||||||
google.protobuf.Any consensus_pubkey = 2
|
google.protobuf.Any consensus_pubkey = 2
|
||||||
[(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""];
|
[(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""];
|
||||||
bool jailed = 3;
|
// jailed defined whether the validator has been jailed from bonded status or not.
|
||||||
|
bool jailed = 3;
|
||||||
|
// status is the validator status (bonded/unbonding/unbonded).
|
||||||
BondStatus status = 4;
|
BondStatus status = 4;
|
||||||
|
// tokens define the delegated tokens (incl. self-delegation).
|
||||||
string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||||
|
// delegator_shares defines total shares issued to a validator's delegators.
|
||||||
string delegator_shares = 6 [
|
string delegator_shares = 6 [
|
||||||
(gogoproto.moretags) = "yaml:\"delegator_shares\"",
|
(gogoproto.moretags) = "yaml:\"delegator_shares\"",
|
||||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||||
(gogoproto.nullable) = false
|
(gogoproto.nullable) = false
|
||||||
];
|
];
|
||||||
Description description = 7 [(gogoproto.nullable) = false];
|
// description defines the description terms for the validator.
|
||||||
int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""];
|
Description description = 7 [(gogoproto.nullable) = false];
|
||||||
google.protobuf.Timestamp unbonding_time = 9
|
// unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.
|
||||||
|
int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""];
|
||||||
|
// unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.
|
||||||
|
google.protobuf.Timestamp unbonding_time = 9
|
||||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""];
|
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""];
|
||||||
Commission commission = 10 [(gogoproto.nullable) = false];
|
// commission defines the commission parameters.
|
||||||
string min_self_delegation = 11 [
|
Commission commission = 10 [(gogoproto.nullable) = false];
|
||||||
|
// min_self_delegation is the validator's self declared minimum self delegation.
|
||||||
|
string min_self_delegation = 11 [
|
||||||
(gogoproto.moretags) = "yaml:\"min_self_delegation\"",
|
(gogoproto.moretags) = "yaml:\"min_self_delegation\"",
|
||||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||||
(gogoproto.nullable) = false
|
(gogoproto.nullable) = false
|
||||||
@ -164,8 +185,11 @@ message Delegation {
|
|||||||
option (gogoproto.goproto_getters) = false;
|
option (gogoproto.goproto_getters) = false;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
|
// delegator_address is the bech32-encoded address of the delegator.
|
||||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||||
|
// validator_address is the bech32-encoded address of the validator.
|
||||||
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||||
|
// shares define the delegation shares received.
|
||||||
string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,8 +200,11 @@ message UnbondingDelegation {
|
|||||||
option (gogoproto.goproto_getters) = false;
|
option (gogoproto.goproto_getters) = false;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
// delegator_address is the bech32-encoded address of the delegator.
|
||||||
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||||
|
// validator_address is the bech32-encoded address of the validator.
|
||||||
|
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||||
|
// entries are the unbonding delegation entries.
|
||||||
repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries
|
repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,14 +213,18 @@ message UnbondingDelegationEntry {
|
|||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""];
|
// creation_height is the height which the unbonding took place.
|
||||||
|
int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""];
|
||||||
|
// completion_time is the unix time for unbonding completion.
|
||||||
google.protobuf.Timestamp completion_time = 2
|
google.protobuf.Timestamp completion_time = 2
|
||||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""];
|
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""];
|
||||||
|
// initial_balance defines the tokens initially scheduled to receive at completion.
|
||||||
string initial_balance = 3 [
|
string initial_balance = 3 [
|
||||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||||
(gogoproto.nullable) = false,
|
(gogoproto.nullable) = false,
|
||||||
(gogoproto.moretags) = "yaml:\"initial_balance\""
|
(gogoproto.moretags) = "yaml:\"initial_balance\""
|
||||||
];
|
];
|
||||||
|
// balance defines the tokens to receive at completion.
|
||||||
string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,14 +233,18 @@ message RedelegationEntry {
|
|||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""];
|
// creation_height defines the height which the redelegation took place.
|
||||||
|
int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""];
|
||||||
|
// completion_time defines the unix time for redelegation completion.
|
||||||
google.protobuf.Timestamp completion_time = 2
|
google.protobuf.Timestamp completion_time = 2
|
||||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""];
|
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""];
|
||||||
|
// initial_balance defines the initial balance when redelegation started.
|
||||||
string initial_balance = 3 [
|
string initial_balance = 3 [
|
||||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||||
(gogoproto.nullable) = false,
|
(gogoproto.nullable) = false,
|
||||||
(gogoproto.moretags) = "yaml:\"initial_balance\""
|
(gogoproto.moretags) = "yaml:\"initial_balance\""
|
||||||
];
|
];
|
||||||
|
// shares_dst is the amount of destination-validator shares created by redelegation.
|
||||||
string shares_dst = 4
|
string shares_dst = 4
|
||||||
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
@ -221,10 +256,14 @@ message Redelegation {
|
|||||||
option (gogoproto.goproto_getters) = false;
|
option (gogoproto.goproto_getters) = false;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
// delegator_address is the bech32-encoded address of the delegator.
|
||||||
string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""];
|
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||||
string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""];
|
// validator_src_address is the validator redelegation source operator address.
|
||||||
repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries
|
string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""];
|
||||||
|
// validator_dst_address is the validator redelegation destination operator address.
|
||||||
|
string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""];
|
||||||
|
// entries are the redelegation entries.
|
||||||
|
repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries
|
||||||
}
|
}
|
||||||
|
|
||||||
// Params defines the parameters for the staking module.
|
// Params defines the parameters for the staking module.
|
||||||
@ -232,12 +271,17 @@ message Params {
|
|||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
|
// unbonding_time is the time duration of unbonding.
|
||||||
google.protobuf.Duration unbonding_time = 1
|
google.protobuf.Duration unbonding_time = 1
|
||||||
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""];
|
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""];
|
||||||
uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""];
|
// max_validators is the maximum number of validators.
|
||||||
uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""];
|
uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""];
|
||||||
|
// max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio).
|
||||||
|
uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""];
|
||||||
|
// historical_entries is the number of historical entries to persist.
|
||||||
uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""];
|
uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""];
|
||||||
string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""];
|
// bond_denom defines the bondable coin denomination.
|
||||||
|
string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""];
|
||||||
}
|
}
|
||||||
|
|
||||||
// DelegationResponse is equivalent to Delegation except that it contains a
|
// DelegationResponse is equivalent to Delegation except that it contains a
|
||||||
|
@ -7,7 +7,8 @@ import "cosmos/tx/v1beta1/tx.proto";
|
|||||||
import "gogoproto/gogo.proto";
|
import "gogoproto/gogo.proto";
|
||||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||||
|
|
||||||
option go_package = "github.com/cosmos/cosmos-sdk/types/tx";
|
option (gogoproto.goproto_registration) = true;
|
||||||
|
option go_package = "github.com/cosmos/cosmos-sdk/types/tx";
|
||||||
|
|
||||||
// Service defines a gRPC service for interacting with transactions.
|
// Service defines a gRPC service for interacting with transactions.
|
||||||
service Service {
|
service Service {
|
||||||
@ -42,6 +43,17 @@ message GetTxsEventRequest {
|
|||||||
repeated string events = 1;
|
repeated string events = 1;
|
||||||
// pagination defines an pagination for the request.
|
// pagination defines an pagination for the request.
|
||||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||||
|
OrderBy order_by = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OrderBy defines the sorting order
|
||||||
|
enum OrderBy {
|
||||||
|
// ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case.
|
||||||
|
ORDER_BY_UNSPECIFIED = 0;
|
||||||
|
// ORDER_BY_ASC defines ascending order
|
||||||
|
ORDER_BY_ASC = 1;
|
||||||
|
// ORDER_BY_DESC defines descending order
|
||||||
|
ORDER_BY_DESC = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetTxsEventResponse is the response type for the Service.TxsByEvents
|
// GetTxsEventResponse is the response type for the Service.TxsByEvents
|
||||||
@ -89,7 +101,10 @@ message BroadcastTxResponse {
|
|||||||
// RPC method.
|
// RPC method.
|
||||||
message SimulateRequest {
|
message SimulateRequest {
|
||||||
// tx is the transaction to simulate.
|
// tx is the transaction to simulate.
|
||||||
cosmos.tx.v1beta1.Tx tx = 1;
|
// Deprecated. Send raw tx bytes instead.
|
||||||
|
cosmos.tx.v1beta1.Tx tx = 1 [deprecated = true];
|
||||||
|
// tx_bytes is the raw transaction.
|
||||||
|
bytes tx_bytes = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SimulateResponse is the response type for the
|
// SimulateResponse is the response type for the
|
||||||
|
4
third_party/proto/cosmos/tx/v1beta1/tx.proto
vendored
4
third_party/proto/cosmos/tx/v1beta1/tx.proto
vendored
@ -74,7 +74,9 @@ message TxBody {
|
|||||||
// transaction.
|
// transaction.
|
||||||
repeated google.protobuf.Any messages = 1;
|
repeated google.protobuf.Any messages = 1;
|
||||||
|
|
||||||
// memo is any arbitrary memo to be added to the transaction
|
// memo is any arbitrary note/comment to be added to the transaction.
|
||||||
|
// WARNING: in clients, any publicly exposed text should not be called memo,
|
||||||
|
// but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122).
|
||||||
string memo = 2;
|
string memo = 2;
|
||||||
|
|
||||||
// timeout is the block height after which this transaction will not
|
// timeout is the block height after which this transaction will not
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package cosmos.upgrade.v1beta1;
|
package cosmos.upgrade.v1beta1;
|
||||||
|
|
||||||
import "google/protobuf/any.proto";
|
|
||||||
import "google/api/annotations.proto";
|
import "google/api/annotations.proto";
|
||||||
import "cosmos/upgrade/v1beta1/upgrade.proto";
|
import "cosmos/upgrade/v1beta1/upgrade.proto";
|
||||||
|
|
||||||
@ -26,6 +25,11 @@ service Query {
|
|||||||
rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) {
|
rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) {
|
||||||
option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}";
|
option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ModuleVersions queries the list of module versions from state.
|
||||||
|
rpc ModuleVersions(QueryModuleVersionsRequest) returns (QueryModuleVersionsResponse) {
|
||||||
|
option (google.api.http).get = "/cosmos/upgrade/v1beta1/module_versions";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC
|
// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC
|
||||||
@ -64,5 +68,23 @@ message QueryUpgradedConsensusStateRequest {
|
|||||||
// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState
|
// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState
|
||||||
// RPC method.
|
// RPC method.
|
||||||
message QueryUpgradedConsensusStateResponse {
|
message QueryUpgradedConsensusStateResponse {
|
||||||
google.protobuf.Any upgraded_consensus_state = 1;
|
reserved 1;
|
||||||
|
|
||||||
|
bytes upgraded_consensus_state = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions
|
||||||
|
// RPC method.
|
||||||
|
message QueryModuleVersionsRequest {
|
||||||
|
// module_name is a field to query a specific module
|
||||||
|
// consensus version from state. Leaving this empty will
|
||||||
|
// fetch the full list of module versions from state
|
||||||
|
string module_name = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions
|
||||||
|
// RPC method.
|
||||||
|
message QueryModuleVersionsResponse {
|
||||||
|
// module_versions is a list of module names with their consensus versions.
|
||||||
|
repeated ModuleVersion module_versions = 1;
|
||||||
}
|
}
|
||||||
|
@ -5,13 +5,13 @@ import "google/protobuf/any.proto";
|
|||||||
import "gogoproto/gogo.proto";
|
import "gogoproto/gogo.proto";
|
||||||
import "google/protobuf/timestamp.proto";
|
import "google/protobuf/timestamp.proto";
|
||||||
|
|
||||||
option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types";
|
option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types";
|
||||||
option (gogoproto.goproto_stringer_all) = false;
|
option (gogoproto.goproto_getters_all) = false;
|
||||||
option (gogoproto.goproto_getters_all) = false;
|
|
||||||
|
|
||||||
// Plan specifies information about a planned upgrade and when it should occur.
|
// Plan specifies information about a planned upgrade and when it should occur.
|
||||||
message Plan {
|
message Plan {
|
||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
// Sets the name for the upgrade. This name will be used by the upgraded
|
// Sets the name for the upgrade. This name will be used by the upgraded
|
||||||
// version of the software to apply any special "on-upgrade" commands during
|
// version of the software to apply any special "on-upgrade" commands during
|
||||||
@ -22,9 +22,10 @@ message Plan {
|
|||||||
// reached and the software will exit.
|
// reached and the software will exit.
|
||||||
string name = 1;
|
string name = 1;
|
||||||
|
|
||||||
// The time after which the upgrade must be performed.
|
// Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
|
||||||
// Leave set to its zero value to use a pre-defined Height instead.
|
// has been removed from the SDK.
|
||||||
google.protobuf.Timestamp time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
// If this field is not empty, an error will be thrown.
|
||||||
|
google.protobuf.Timestamp time = 2 [deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||||
|
|
||||||
// The height at which the upgrade must be performed.
|
// The height at which the upgrade must be performed.
|
||||||
// Only used if Time is not set.
|
// Only used if Time is not set.
|
||||||
@ -34,18 +35,18 @@ message Plan {
|
|||||||
// such as a git commit that validators could automatically upgrade to
|
// such as a git commit that validators could automatically upgrade to
|
||||||
string info = 4;
|
string info = 4;
|
||||||
|
|
||||||
// IBC-enabled chains can opt-in to including the upgraded client state in its upgrade plan
|
// Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
|
||||||
// This will make the chain commit to the correct upgraded (self) client state before the upgrade occurs,
|
// moved to the IBC module in the sub module 02-client.
|
||||||
// so that connecting chains can verify that the new upgraded client is valid by verifying a proof on the
|
// If this field is not empty, an error will be thrown.
|
||||||
// previous version of the chain.
|
google.protobuf.Any upgraded_client_state = 5
|
||||||
// This will allow IBC connections to persist smoothly across planned chain upgrades
|
[deprecated = true, (gogoproto.moretags) = "yaml:\"upgraded_client_state\""];
|
||||||
google.protobuf.Any upgraded_client_state = 5 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SoftwareUpgradeProposal is a gov Content type for initiating a software
|
// SoftwareUpgradeProposal is a gov Content type for initiating a software
|
||||||
// upgrade.
|
// upgrade.
|
||||||
message SoftwareUpgradeProposal {
|
message SoftwareUpgradeProposal {
|
||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
string title = 1;
|
string title = 1;
|
||||||
string description = 2;
|
string description = 2;
|
||||||
@ -55,8 +56,21 @@ message SoftwareUpgradeProposal {
|
|||||||
// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
|
// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
|
||||||
// upgrade.
|
// upgrade.
|
||||||
message CancelSoftwareUpgradeProposal {
|
message CancelSoftwareUpgradeProposal {
|
||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
string title = 1;
|
string title = 1;
|
||||||
string description = 2;
|
string description = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ModuleVersion specifies a module and its consensus version.
|
||||||
|
message ModuleVersion {
|
||||||
|
option (gogoproto.equal) = true;
|
||||||
|
option (gogoproto.goproto_stringer) = true;
|
||||||
|
|
||||||
|
// name of the app module
|
||||||
|
string name = 1;
|
||||||
|
|
||||||
|
// consensus version of the app module
|
||||||
|
uint64 version = 2;
|
||||||
|
}
|
||||||
|
@ -71,3 +71,13 @@ message PeriodicVestingAccount {
|
|||||||
int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""];
|
int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""];
|
||||||
repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false];
|
repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PermanentLockedAccount implements the VestingAccount interface. It does
|
||||||
|
// not ever release coins, locking them indefinitely. Coins in this account can
|
||||||
|
// still be used for delegating and for governance votes even while locked.
|
||||||
|
message PermanentLockedAccount {
|
||||||
|
option (gogoproto.goproto_getters) = false;
|
||||||
|
option (gogoproto.goproto_stringer) = false;
|
||||||
|
|
||||||
|
BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true];
|
||||||
|
}
|
||||||
|
6
third_party/proto/cosmos_proto/cosmos.proto
vendored
6
third_party/proto/cosmos_proto/cosmos.proto
vendored
@ -6,11 +6,11 @@ import "google/protobuf/descriptor.proto";
|
|||||||
option go_package = "github.com/regen-network/cosmos-proto";
|
option go_package = "github.com/regen-network/cosmos-proto";
|
||||||
|
|
||||||
extend google.protobuf.MessageOptions {
|
extend google.protobuf.MessageOptions {
|
||||||
string interface_type = 93001;
|
string interface_type = 93001;
|
||||||
|
|
||||||
string implements_interface = 93002;
|
string implements_interface = 93002;
|
||||||
}
|
}
|
||||||
|
|
||||||
extend google.protobuf.FieldOptions {
|
extend google.protobuf.FieldOptions {
|
||||||
string accepts_interface = 93001;
|
string accepts_interface = 93001;
|
||||||
}
|
}
|
||||||
|
158
third_party/proto/gogoproto/gogo.proto
vendored
158
third_party/proto/gogoproto/gogo.proto
vendored
@ -31,115 +31,115 @@ package gogoproto;
|
|||||||
|
|
||||||
import "google/protobuf/descriptor.proto";
|
import "google/protobuf/descriptor.proto";
|
||||||
|
|
||||||
option java_package = "com.google.protobuf";
|
option java_package = "com.google.protobuf";
|
||||||
option java_outer_classname = "GoGoProtos";
|
option java_outer_classname = "GoGoProtos";
|
||||||
option go_package = "github.com/gogo/protobuf/gogoproto";
|
option go_package = "github.com/gogo/protobuf/gogoproto";
|
||||||
|
|
||||||
extend google.protobuf.EnumOptions {
|
extend google.protobuf.EnumOptions {
|
||||||
optional bool goproto_enum_prefix = 62001;
|
optional bool goproto_enum_prefix = 62001;
|
||||||
optional bool goproto_enum_stringer = 62021;
|
optional bool goproto_enum_stringer = 62021;
|
||||||
optional bool enum_stringer = 62022;
|
optional bool enum_stringer = 62022;
|
||||||
optional string enum_customname = 62023;
|
optional string enum_customname = 62023;
|
||||||
optional bool enumdecl = 62024;
|
optional bool enumdecl = 62024;
|
||||||
}
|
}
|
||||||
|
|
||||||
extend google.protobuf.EnumValueOptions {
|
extend google.protobuf.EnumValueOptions {
|
||||||
optional string enumvalue_customname = 66001;
|
optional string enumvalue_customname = 66001;
|
||||||
}
|
}
|
||||||
|
|
||||||
extend google.protobuf.FileOptions {
|
extend google.protobuf.FileOptions {
|
||||||
optional bool goproto_getters_all = 63001;
|
optional bool goproto_getters_all = 63001;
|
||||||
optional bool goproto_enum_prefix_all = 63002;
|
optional bool goproto_enum_prefix_all = 63002;
|
||||||
optional bool goproto_stringer_all = 63003;
|
optional bool goproto_stringer_all = 63003;
|
||||||
optional bool verbose_equal_all = 63004;
|
optional bool verbose_equal_all = 63004;
|
||||||
optional bool face_all = 63005;
|
optional bool face_all = 63005;
|
||||||
optional bool gostring_all = 63006;
|
optional bool gostring_all = 63006;
|
||||||
optional bool populate_all = 63007;
|
optional bool populate_all = 63007;
|
||||||
optional bool stringer_all = 63008;
|
optional bool stringer_all = 63008;
|
||||||
optional bool onlyone_all = 63009;
|
optional bool onlyone_all = 63009;
|
||||||
|
|
||||||
optional bool equal_all = 63013;
|
optional bool equal_all = 63013;
|
||||||
optional bool description_all = 63014;
|
optional bool description_all = 63014;
|
||||||
optional bool testgen_all = 63015;
|
optional bool testgen_all = 63015;
|
||||||
optional bool benchgen_all = 63016;
|
optional bool benchgen_all = 63016;
|
||||||
optional bool marshaler_all = 63017;
|
optional bool marshaler_all = 63017;
|
||||||
optional bool unmarshaler_all = 63018;
|
optional bool unmarshaler_all = 63018;
|
||||||
optional bool stable_marshaler_all = 63019;
|
optional bool stable_marshaler_all = 63019;
|
||||||
|
|
||||||
optional bool sizer_all = 63020;
|
optional bool sizer_all = 63020;
|
||||||
|
|
||||||
optional bool goproto_enum_stringer_all = 63021;
|
optional bool goproto_enum_stringer_all = 63021;
|
||||||
optional bool enum_stringer_all = 63022;
|
optional bool enum_stringer_all = 63022;
|
||||||
|
|
||||||
optional bool unsafe_marshaler_all = 63023;
|
optional bool unsafe_marshaler_all = 63023;
|
||||||
optional bool unsafe_unmarshaler_all = 63024;
|
optional bool unsafe_unmarshaler_all = 63024;
|
||||||
|
|
||||||
optional bool goproto_extensions_map_all = 63025;
|
optional bool goproto_extensions_map_all = 63025;
|
||||||
optional bool goproto_unrecognized_all = 63026;
|
optional bool goproto_unrecognized_all = 63026;
|
||||||
optional bool gogoproto_import = 63027;
|
optional bool gogoproto_import = 63027;
|
||||||
optional bool protosizer_all = 63028;
|
optional bool protosizer_all = 63028;
|
||||||
optional bool compare_all = 63029;
|
optional bool compare_all = 63029;
|
||||||
optional bool typedecl_all = 63030;
|
optional bool typedecl_all = 63030;
|
||||||
optional bool enumdecl_all = 63031;
|
optional bool enumdecl_all = 63031;
|
||||||
|
|
||||||
optional bool goproto_registration = 63032;
|
optional bool goproto_registration = 63032;
|
||||||
optional bool messagename_all = 63033;
|
optional bool messagename_all = 63033;
|
||||||
|
|
||||||
optional bool goproto_sizecache_all = 63034;
|
optional bool goproto_sizecache_all = 63034;
|
||||||
optional bool goproto_unkeyed_all = 63035;
|
optional bool goproto_unkeyed_all = 63035;
|
||||||
}
|
}
|
||||||
|
|
||||||
extend google.protobuf.MessageOptions {
|
extend google.protobuf.MessageOptions {
|
||||||
optional bool goproto_getters = 64001;
|
optional bool goproto_getters = 64001;
|
||||||
optional bool goproto_stringer = 64003;
|
optional bool goproto_stringer = 64003;
|
||||||
optional bool verbose_equal = 64004;
|
optional bool verbose_equal = 64004;
|
||||||
optional bool face = 64005;
|
optional bool face = 64005;
|
||||||
optional bool gostring = 64006;
|
optional bool gostring = 64006;
|
||||||
optional bool populate = 64007;
|
optional bool populate = 64007;
|
||||||
optional bool stringer = 67008;
|
optional bool stringer = 67008;
|
||||||
optional bool onlyone = 64009;
|
optional bool onlyone = 64009;
|
||||||
|
|
||||||
optional bool equal = 64013;
|
optional bool equal = 64013;
|
||||||
optional bool description = 64014;
|
optional bool description = 64014;
|
||||||
optional bool testgen = 64015;
|
optional bool testgen = 64015;
|
||||||
optional bool benchgen = 64016;
|
optional bool benchgen = 64016;
|
||||||
optional bool marshaler = 64017;
|
optional bool marshaler = 64017;
|
||||||
optional bool unmarshaler = 64018;
|
optional bool unmarshaler = 64018;
|
||||||
optional bool stable_marshaler = 64019;
|
optional bool stable_marshaler = 64019;
|
||||||
|
|
||||||
optional bool sizer = 64020;
|
optional bool sizer = 64020;
|
||||||
|
|
||||||
optional bool unsafe_marshaler = 64023;
|
optional bool unsafe_marshaler = 64023;
|
||||||
optional bool unsafe_unmarshaler = 64024;
|
optional bool unsafe_unmarshaler = 64024;
|
||||||
|
|
||||||
optional bool goproto_extensions_map = 64025;
|
optional bool goproto_extensions_map = 64025;
|
||||||
optional bool goproto_unrecognized = 64026;
|
optional bool goproto_unrecognized = 64026;
|
||||||
|
|
||||||
optional bool protosizer = 64028;
|
optional bool protosizer = 64028;
|
||||||
optional bool compare = 64029;
|
optional bool compare = 64029;
|
||||||
|
|
||||||
optional bool typedecl = 64030;
|
optional bool typedecl = 64030;
|
||||||
|
|
||||||
optional bool messagename = 64033;
|
optional bool messagename = 64033;
|
||||||
|
|
||||||
optional bool goproto_sizecache = 64034;
|
optional bool goproto_sizecache = 64034;
|
||||||
optional bool goproto_unkeyed = 64035;
|
optional bool goproto_unkeyed = 64035;
|
||||||
}
|
}
|
||||||
|
|
||||||
extend google.protobuf.FieldOptions {
|
extend google.protobuf.FieldOptions {
|
||||||
optional bool nullable = 65001;
|
optional bool nullable = 65001;
|
||||||
optional bool embed = 65002;
|
optional bool embed = 65002;
|
||||||
optional string customtype = 65003;
|
optional string customtype = 65003;
|
||||||
optional string customname = 65004;
|
optional string customname = 65004;
|
||||||
optional string jsontag = 65005;
|
optional string jsontag = 65005;
|
||||||
optional string moretags = 65006;
|
optional string moretags = 65006;
|
||||||
optional string casttype = 65007;
|
optional string casttype = 65007;
|
||||||
optional string castkey = 65008;
|
optional string castkey = 65008;
|
||||||
optional string castvalue = 65009;
|
optional string castvalue = 65009;
|
||||||
|
|
||||||
optional bool stdtime = 65010;
|
optional bool stdtime = 65010;
|
||||||
optional bool stdduration = 65011;
|
optional bool stdduration = 65011;
|
||||||
optional bool wktpointer = 65012;
|
optional bool wktpointer = 65012;
|
||||||
|
|
||||||
optional string castrepeated = 65013;
|
optional string castrepeated = 65013;
|
||||||
}
|
}
|
||||||
|
107
third_party/proto/tendermint/abci/types.proto
vendored
107
third_party/proto/tendermint/abci/types.proto
vendored
@ -58,12 +58,13 @@ message RequestSetOption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message RequestInitChain {
|
message RequestInitChain {
|
||||||
google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
google.protobuf.Timestamp time = 1
|
||||||
string chain_id = 2;
|
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||||
ConsensusParams consensus_params = 3;
|
string chain_id = 2;
|
||||||
repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false];
|
ConsensusParams consensus_params = 3;
|
||||||
bytes app_state_bytes = 5;
|
repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false];
|
||||||
int64 initial_height = 6;
|
bytes app_state_bytes = 5;
|
||||||
|
int64 initial_height = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
message RequestQuery {
|
message RequestQuery {
|
||||||
@ -101,12 +102,13 @@ message RequestEndBlock {
|
|||||||
message RequestCommit {}
|
message RequestCommit {}
|
||||||
|
|
||||||
// lists available snapshots
|
// lists available snapshots
|
||||||
message RequestListSnapshots {}
|
message RequestListSnapshots {
|
||||||
|
}
|
||||||
|
|
||||||
// offers a snapshot to the application
|
// offers a snapshot to the application
|
||||||
message RequestOfferSnapshot {
|
message RequestOfferSnapshot {
|
||||||
Snapshot snapshot = 1; // snapshot offered by peers
|
Snapshot snapshot = 1; // snapshot offered by peers
|
||||||
bytes app_hash = 2; // light client-verified app hash for snapshot height
|
bytes app_hash = 2; // light client-verified app hash for snapshot height
|
||||||
}
|
}
|
||||||
|
|
||||||
// loads a snapshot chunk
|
// loads a snapshot chunk
|
||||||
@ -185,8 +187,8 @@ message ResponseInitChain {
|
|||||||
message ResponseQuery {
|
message ResponseQuery {
|
||||||
uint32 code = 1;
|
uint32 code = 1;
|
||||||
// bytes data = 2; // use "value" instead.
|
// bytes data = 2; // use "value" instead.
|
||||||
string log = 3; // nondeterministic
|
string log = 3; // nondeterministic
|
||||||
string info = 4; // nondeterministic
|
string info = 4; // nondeterministic
|
||||||
int64 index = 5;
|
int64 index = 5;
|
||||||
bytes key = 6;
|
bytes key = 6;
|
||||||
bytes value = 7;
|
bytes value = 7;
|
||||||
@ -196,35 +198,40 @@ message ResponseQuery {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message ResponseBeginBlock {
|
message ResponseBeginBlock {
|
||||||
repeated Event events = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
repeated Event events = 1
|
||||||
|
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResponseCheckTx {
|
message ResponseCheckTx {
|
||||||
uint32 code = 1;
|
uint32 code = 1;
|
||||||
bytes data = 2;
|
bytes data = 2;
|
||||||
string log = 3; // nondeterministic
|
string log = 3; // nondeterministic
|
||||||
string info = 4; // nondeterministic
|
string info = 4; // nondeterministic
|
||||||
int64 gas_wanted = 5 [json_name = "gas_wanted"];
|
int64 gas_wanted = 5 [json_name = "gas_wanted"];
|
||||||
int64 gas_used = 6 [json_name = "gas_used"];
|
int64 gas_used = 6 [json_name = "gas_used"];
|
||||||
repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
repeated Event events = 7
|
||||||
string codespace = 8;
|
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
||||||
|
string codespace = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResponseDeliverTx {
|
message ResponseDeliverTx {
|
||||||
uint32 code = 1;
|
uint32 code = 1;
|
||||||
bytes data = 2;
|
bytes data = 2;
|
||||||
string log = 3; // nondeterministic
|
string log = 3; // nondeterministic
|
||||||
string info = 4; // nondeterministic
|
string info = 4; // nondeterministic
|
||||||
int64 gas_wanted = 5 [json_name = "gas_wanted"];
|
int64 gas_wanted = 5 [json_name = "gas_wanted"];
|
||||||
int64 gas_used = 6 [json_name = "gas_used"];
|
int64 gas_used = 6 [json_name = "gas_used"];
|
||||||
repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
repeated Event events = 7
|
||||||
string codespace = 8;
|
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic
|
||||||
|
string codespace = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResponseEndBlock {
|
message ResponseEndBlock {
|
||||||
repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false];
|
repeated ValidatorUpdate validator_updates = 1
|
||||||
ConsensusParams consensus_param_updates = 2;
|
[(gogoproto.nullable) = false];
|
||||||
repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
ConsensusParams consensus_param_updates = 2;
|
||||||
|
repeated Event events = 3
|
||||||
|
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message ResponseCommit {
|
message ResponseCommit {
|
||||||
@ -241,12 +248,12 @@ message ResponseOfferSnapshot {
|
|||||||
Result result = 1;
|
Result result = 1;
|
||||||
|
|
||||||
enum Result {
|
enum Result {
|
||||||
UNKNOWN = 0; // Unknown result, abort all snapshot restoration
|
UNKNOWN = 0; // Unknown result, abort all snapshot restoration
|
||||||
ACCEPT = 1; // Snapshot accepted, apply chunks
|
ACCEPT = 1; // Snapshot accepted, apply chunks
|
||||||
ABORT = 2; // Abort all snapshot restoration
|
ABORT = 2; // Abort all snapshot restoration
|
||||||
REJECT = 3; // Reject this specific snapshot, try others
|
REJECT = 3; // Reject this specific snapshot, try others
|
||||||
REJECT_FORMAT = 4; // Reject all snapshots of this format, try others
|
REJECT_FORMAT = 4; // Reject all snapshots of this format, try others
|
||||||
REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others
|
REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,16 +263,16 @@ message ResponseLoadSnapshotChunk {
|
|||||||
|
|
||||||
message ResponseApplySnapshotChunk {
|
message ResponseApplySnapshotChunk {
|
||||||
Result result = 1;
|
Result result = 1;
|
||||||
repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply
|
repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply
|
||||||
repeated string reject_senders = 3; // Chunk senders to reject and ban
|
repeated string reject_senders = 3; // Chunk senders to reject and ban
|
||||||
|
|
||||||
enum Result {
|
enum Result {
|
||||||
UNKNOWN = 0; // Unknown result, abort all snapshot restoration
|
UNKNOWN = 0; // Unknown result, abort all snapshot restoration
|
||||||
ACCEPT = 1; // Chunk successfully accepted
|
ACCEPT = 1; // Chunk successfully accepted
|
||||||
ABORT = 2; // Abort all snapshot restoration
|
ABORT = 2; // Abort all snapshot restoration
|
||||||
RETRY = 3; // Retry chunk (combine with refetch and reject)
|
RETRY = 3; // Retry chunk (combine with refetch and reject)
|
||||||
RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject)
|
RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject)
|
||||||
REJECT_SNAPSHOT = 5; // Reject this snapshot, try others
|
REJECT_SNAPSHOT = 5; // Reject this snapshot, try others
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,14 +306,17 @@ message LastCommitInfo {
|
|||||||
// Later, transactions may be queried using these events.
|
// Later, transactions may be queried using these events.
|
||||||
message Event {
|
message Event {
|
||||||
string type = 1;
|
string type = 1;
|
||||||
repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"];
|
repeated EventAttribute attributes = 2 [
|
||||||
|
(gogoproto.nullable) = false,
|
||||||
|
(gogoproto.jsontag) = "attributes,omitempty"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// EventAttribute is a single key-value pair, associated with an event.
|
// EventAttribute is a single key-value pair, associated with an event.
|
||||||
message EventAttribute {
|
message EventAttribute {
|
||||||
bytes key = 1;
|
bytes key = 1;
|
||||||
bytes value = 2;
|
bytes value = 2;
|
||||||
bool index = 3; // nondeterministic
|
bool index = 3; // nondeterministic
|
||||||
}
|
}
|
||||||
|
|
||||||
// TxResult contains results of executing the transaction.
|
// TxResult contains results of executing the transaction.
|
||||||
@ -324,9 +334,9 @@ message TxResult {
|
|||||||
|
|
||||||
// Validator
|
// Validator
|
||||||
message Validator {
|
message Validator {
|
||||||
bytes address = 1; // The first 20 bytes of SHA256(public key)
|
bytes address = 1; // The first 20 bytes of SHA256(public key)
|
||||||
// PubKey pub_key = 2 [(gogoproto.nullable)=false];
|
// PubKey pub_key = 2 [(gogoproto.nullable)=false];
|
||||||
int64 power = 3; // The voting power
|
int64 power = 3; // The voting power
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidatorUpdate
|
// ValidatorUpdate
|
||||||
@ -354,7 +364,10 @@ message Evidence {
|
|||||||
// The height when the offense occurred
|
// The height when the offense occurred
|
||||||
int64 height = 3;
|
int64 height = 3;
|
||||||
// The corresponding time where the offense occurred
|
// The corresponding time where the offense occurred
|
||||||
google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
google.protobuf.Timestamp time = 4 [
|
||||||
|
(gogoproto.nullable) = false,
|
||||||
|
(gogoproto.stdtime) = true
|
||||||
|
];
|
||||||
// Total voting power of the validator set in case the ABCI application does
|
// Total voting power of the validator set in case the ABCI application does
|
||||||
// not store historical validators.
|
// not store historical validators.
|
||||||
// https://github.com/tendermint/tendermint/issues/4581
|
// https://github.com/tendermint/tendermint/issues/4581
|
||||||
@ -365,11 +378,11 @@ message Evidence {
|
|||||||
// State Sync Types
|
// State Sync Types
|
||||||
|
|
||||||
message Snapshot {
|
message Snapshot {
|
||||||
uint64 height = 1; // The height at which the snapshot was taken
|
uint64 height = 1; // The height at which the snapshot was taken
|
||||||
uint32 format = 2; // The application-specific snapshot format
|
uint32 format = 2; // The application-specific snapshot format
|
||||||
uint32 chunks = 3; // Number of chunks in the snapshot
|
uint32 chunks = 3; // Number of chunks in the snapshot
|
||||||
bytes hash = 4; // Arbitrary snapshot hash, equal only if identical
|
bytes hash = 4; // Arbitrary snapshot hash, equal only if identical
|
||||||
bytes metadata = 5; // Arbitrary application metadata
|
bytes metadata = 5; // Arbitrary application metadata
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
|
@ -17,19 +17,19 @@ message Evidence {
|
|||||||
|
|
||||||
// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes.
|
// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes.
|
||||||
message DuplicateVoteEvidence {
|
message DuplicateVoteEvidence {
|
||||||
tendermint.types.Vote vote_a = 1;
|
tendermint.types.Vote vote_a = 1;
|
||||||
tendermint.types.Vote vote_b = 2;
|
tendermint.types.Vote vote_b = 2;
|
||||||
int64 total_voting_power = 3;
|
int64 total_voting_power = 3;
|
||||||
int64 validator_power = 4;
|
int64 validator_power = 4;
|
||||||
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||||
}
|
}
|
||||||
|
|
||||||
// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client.
|
// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client.
|
||||||
message LightClientAttackEvidence {
|
message LightClientAttackEvidence {
|
||||||
tendermint.types.LightBlock conflicting_block = 1;
|
tendermint.types.LightBlock conflicting_block = 1;
|
||||||
int64 common_height = 2;
|
int64 common_height = 2;
|
||||||
repeated tendermint.types.Validator byzantine_validators = 3;
|
repeated tendermint.types.Validator byzantine_validators = 3;
|
||||||
int64 total_voting_power = 4;
|
int64 total_voting_power = 4;
|
||||||
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,8 @@ message EvidenceParams {
|
|||||||
// It should correspond with an app's "unbonding period" or other similar
|
// It should correspond with an app's "unbonding period" or other similar
|
||||||
// mechanism for handling [Nothing-At-Stake
|
// mechanism for handling [Nothing-At-Stake
|
||||||
// attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
|
// attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
|
||||||
google.protobuf.Duration max_age_duration = 2 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
|
google.protobuf.Duration max_age_duration = 2
|
||||||
|
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
|
||||||
|
|
||||||
// This sets the maximum size of total evidence in bytes that can be committed in a single block.
|
// This sets the maximum size of total evidence in bytes that can be committed in a single block.
|
||||||
// and should fall comfortably under the max block bytes.
|
// and should fall comfortably under the max block bytes.
|
||||||
|
48
third_party/proto/tendermint/types/types.proto
vendored
48
third_party/proto/tendermint/types/types.proto
vendored
@ -66,19 +66,19 @@ message Header {
|
|||||||
BlockID last_block_id = 5 [(gogoproto.nullable) = false];
|
BlockID last_block_id = 5 [(gogoproto.nullable) = false];
|
||||||
|
|
||||||
// hashes of block data
|
// hashes of block data
|
||||||
bytes last_commit_hash = 6; // commit from validators from the last block
|
bytes last_commit_hash = 6; // commit from validators from the last block
|
||||||
bytes data_hash = 7; // transactions
|
bytes data_hash = 7; // transactions
|
||||||
|
|
||||||
// hashes from the app output from the prev block
|
// hashes from the app output from the prev block
|
||||||
bytes validators_hash = 8; // validators for the current block
|
bytes validators_hash = 8; // validators for the current block
|
||||||
bytes next_validators_hash = 9; // validators for the next block
|
bytes next_validators_hash = 9; // validators for the next block
|
||||||
bytes consensus_hash = 10; // consensus params for current block
|
bytes consensus_hash = 10; // consensus params for current block
|
||||||
bytes app_hash = 11; // state after txs from the previous block
|
bytes app_hash = 11; // state after txs from the previous block
|
||||||
bytes last_results_hash = 12; // root hash of all results from the txs from the previous block
|
bytes last_results_hash = 12; // root hash of all results from the txs from the previous block
|
||||||
|
|
||||||
// consensus info
|
// consensus info
|
||||||
bytes evidence_hash = 13; // evidence included in the block
|
bytes evidence_hash = 13; // evidence included in the block
|
||||||
bytes proposer_address = 14; // original proposer of the block
|
bytes proposer_address = 14; // original proposer of the block
|
||||||
}
|
}
|
||||||
|
|
||||||
// Data contains the set of transactions included in the block
|
// Data contains the set of transactions included in the block
|
||||||
@ -95,27 +95,30 @@ message Vote {
|
|||||||
SignedMsgType type = 1;
|
SignedMsgType type = 1;
|
||||||
int64 height = 2;
|
int64 height = 2;
|
||||||
int32 round = 3;
|
int32 round = 3;
|
||||||
BlockID block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil.
|
BlockID block_id = 4
|
||||||
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
[(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil.
|
||||||
bytes validator_address = 6;
|
google.protobuf.Timestamp timestamp = 5
|
||||||
int32 validator_index = 7;
|
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||||
bytes signature = 8;
|
bytes validator_address = 6;
|
||||||
|
int32 validator_index = 7;
|
||||||
|
bytes signature = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit contains the evidence that a block was committed by a set of validators.
|
// Commit contains the evidence that a block was committed by a set of validators.
|
||||||
message Commit {
|
message Commit {
|
||||||
int64 height = 1;
|
int64 height = 1;
|
||||||
int32 round = 2;
|
int32 round = 2;
|
||||||
BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"];
|
BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"];
|
||||||
repeated CommitSig signatures = 4 [(gogoproto.nullable) = false];
|
repeated CommitSig signatures = 4 [(gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
// CommitSig is a part of the Vote included in a Commit.
|
// CommitSig is a part of the Vote included in a Commit.
|
||||||
message CommitSig {
|
message CommitSig {
|
||||||
BlockIDFlag block_id_flag = 1;
|
BlockIDFlag block_id_flag = 1;
|
||||||
bytes validator_address = 2;
|
bytes validator_address = 2;
|
||||||
google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
google.protobuf.Timestamp timestamp = 3
|
||||||
bytes signature = 4;
|
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||||
|
bytes signature = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Proposal {
|
message Proposal {
|
||||||
@ -124,8 +127,9 @@ message Proposal {
|
|||||||
int32 round = 3;
|
int32 round = 3;
|
||||||
int32 pol_round = 4;
|
int32 pol_round = 4;
|
||||||
BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
|
BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
|
||||||
google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
google.protobuf.Timestamp timestamp = 6
|
||||||
bytes signature = 7;
|
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||||
|
bytes signature = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SignedHeader {
|
message SignedHeader {
|
||||||
|
Loading…
Reference in New Issue
Block a user