Update proto files & definitions in accordance with ADR023 (#6413)
* consolidate proto files into single directory, turn on PACKAGE_DIRECTORY_MATCH linting * add third_party root for third party proto files * move ibc proto files to top level folder, rename .proto files to types.proto as before * update protocgen script, and run code generation * move vesting proto definition to cosmos namespace, rename from types.proto in alignment with buf.build naming conventions * update Makefile so proto dependencies are set with new structure when updated * add comment for sed usage in makefile * remove unused aliases of proto generated types * add settings.json instructions to contributing.md for including protobuf paths Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Aaron Craelius <aaron@regen.network>
This commit is contained in:
co-authored by
Federico Kunze
Aaron Craelius
parent
fe9356ddb8
commit
4e73e0f817
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: types/tx/signing/types.proto
|
||||
// source: cosmos/tx/signing/signing.proto
|
||||
|
||||
package signing
|
||||
|
||||
@@ -56,29 +56,29 @@ func (x SignMode) String() string {
|
||||
}
|
||||
|
||||
func (SignMode) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_52d5d5e2efced9ba, []int{0}
|
||||
return fileDescriptor_8a04324e5f3729bf, []int{0}
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("cosmos_sdk.tx.signing.v1.SignMode", SignMode_name, SignMode_value)
|
||||
proto.RegisterEnum("cosmos.tx.signing.SignMode", SignMode_name, SignMode_value)
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("types/tx/signing/types.proto", fileDescriptor_52d5d5e2efced9ba) }
|
||||
func init() { proto.RegisterFile("cosmos/tx/signing/signing.proto", fileDescriptor_8a04324e5f3729bf) }
|
||||
|
||||
var fileDescriptor_52d5d5e2efced9ba = []byte{
|
||||
// 222 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0xa9, 0x2c, 0x48,
|
||||
0x2d, 0xd6, 0x2f, 0xa9, 0xd0, 0x2f, 0xce, 0x4c, 0xcf, 0xcb, 0xcc, 0x4b, 0xd7, 0x07, 0x0b, 0xe8,
|
||||
0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x49, 0x24, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xc7, 0x17, 0xa7,
|
||||
0x64, 0xeb, 0x95, 0x54, 0xe8, 0x41, 0x95, 0xe8, 0x95, 0x19, 0x6a, 0x15, 0x73, 0x71, 0x04, 0x67,
|
||||
0xa6, 0xe7, 0xf9, 0xe6, 0xa7, 0xa4, 0x0a, 0x49, 0x72, 0x89, 0x06, 0x7b, 0xba, 0xfb, 0xc5, 0xfb,
|
||||
0xfa, 0xbb, 0xb8, 0xc6, 0x87, 0xfa, 0x05, 0x07, 0xb8, 0x3a, 0x7b, 0xba, 0x79, 0xba, 0xba, 0x08,
|
||||
0x30, 0x08, 0x89, 0x70, 0x09, 0x20, 0xa4, 0x5c, 0x3c, 0x83, 0x5c, 0x9d, 0x43, 0x04, 0x18, 0x85,
|
||||
0x44, 0xb9, 0x04, 0x11, 0xa2, 0x21, 0xae, 0x11, 0x21, 0xa1, 0x8e, 0x3e, 0x02, 0x4c, 0x42, 0xf2,
|
||||
0x5c, 0xd2, 0x08, 0x61, 0x1f, 0x57, 0x77, 0x47, 0xe7, 0xc8, 0x78, 0x47, 0x5f, 0x4f, 0x3f, 0xff,
|
||||
0x78, 0xaf, 0x60, 0x7f, 0x3f, 0x81, 0x7a, 0x27, 0xf7, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92,
|
||||
0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c,
|
||||
0x96, 0x63, 0x88, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87,
|
||||
0xb8, 0x19, 0x4a, 0xe9, 0x16, 0xa7, 0x64, 0xeb, 0xa3, 0xfb, 0x31, 0x89, 0x0d, 0xec, 0x3d, 0x63,
|
||||
0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x11, 0xdd, 0x92, 0xfe, 0x00, 0x00, 0x00,
|
||||
var fileDescriptor_8a04324e5f3729bf = []byte{
|
||||
// 214 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce,
|
||||
0xcd, 0x2f, 0xd6, 0x2f, 0xa9, 0xd0, 0x2f, 0xce, 0x4c, 0xcf, 0xcb, 0xcc, 0x4b, 0x87, 0xd1, 0x7a,
|
||||
0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x82, 0x10, 0x05, 0x7a, 0x25, 0x15, 0x7a, 0x50, 0x09, 0xad,
|
||||
0x62, 0x2e, 0x8e, 0xe0, 0xcc, 0xf4, 0x3c, 0xdf, 0xfc, 0x94, 0x54, 0x21, 0x49, 0x2e, 0xd1, 0x60,
|
||||
0x4f, 0x77, 0xbf, 0x78, 0x5f, 0x7f, 0x17, 0xd7, 0xf8, 0x50, 0xbf, 0xe0, 0x00, 0x57, 0x67, 0x4f,
|
||||
0x37, 0x4f, 0x57, 0x17, 0x01, 0x06, 0x21, 0x11, 0x2e, 0x01, 0x84, 0x94, 0x8b, 0x67, 0x90, 0xab,
|
||||
0x73, 0x88, 0x00, 0xa3, 0x90, 0x28, 0x97, 0x20, 0x42, 0x34, 0xc4, 0x35, 0x22, 0x24, 0xd4, 0xd1,
|
||||
0x47, 0x80, 0x49, 0x48, 0x9e, 0x4b, 0x1a, 0x21, 0xec, 0xe3, 0xea, 0xee, 0xe8, 0x1c, 0x19, 0xef,
|
||||
0xe8, 0xeb, 0xe9, 0xe7, 0x1f, 0xef, 0x15, 0xec, 0xef, 0x27, 0x50, 0xef, 0xe4, 0x7e, 0xe2, 0x91,
|
||||
0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1,
|
||||
0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a,
|
||||
0xc9, 0xf9, 0xb9, 0xfa, 0x50, 0xdf, 0x40, 0x28, 0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x92, 0xca, 0x82,
|
||||
0x54, 0x64, 0xef, 0x25, 0xb1, 0x81, 0xfd, 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x92,
|
||||
0x08, 0x61, 0xfa, 0x00, 0x00, 0x00,
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos_sdk.tx.signing.v1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types/tx/signing";
|
||||
|
||||
// SignMode represents a signing mode with its own security guarantees
|
||||
enum SignMode {
|
||||
// SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected
|
||||
SIGN_MODE_UNSPECIFIED = 0;
|
||||
|
||||
// SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified
|
||||
// with raw bytes from Tx
|
||||
SIGN_MODE_DIRECT = 1;
|
||||
|
||||
// SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable
|
||||
// textual representation on top of the binary representation from SIGN_MODE_DIRECT
|
||||
SIGN_MODE_TEXTUAL = 2;
|
||||
|
||||
// SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses
|
||||
// Amino JSON and will be removed in the future
|
||||
SIGN_MODE_LEGACY_AMINO_JSON = 127;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,133 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos_sdk.tx.v1;
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "crypto/types/types.proto";
|
||||
import "types/types.proto";
|
||||
import "types/tx/signing/types.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/tx/types";
|
||||
|
||||
// Tx is the standard type used for broadcasting transactions
|
||||
message Tx {
|
||||
// body is the processable content of the transaction
|
||||
TxBody body = 1;
|
||||
|
||||
// auth_info is the authorization related content of the transaction, specifically
|
||||
// signers, signer modes and fee
|
||||
AuthInfo auth_info = 2;
|
||||
|
||||
// signatures are the raw binary signatures of signers specified by body and auth_info
|
||||
repeated bytes signatures = 3;
|
||||
}
|
||||
|
||||
// SignDoc is the standard type used for signing transaction in SIGN_MODE_DIRECT
|
||||
message SignDoc {
|
||||
// body is the TxBody from Tx
|
||||
TxBody body = 1;
|
||||
|
||||
// auth_info is the AuthInfo from Tx
|
||||
AuthInfo auth_info = 2;
|
||||
|
||||
// chain_id is the unique identifier of the chain this transaction targets.
|
||||
// It prevents signed transactions from being used on another chain by an
|
||||
// attacker
|
||||
string chain_id = 3;
|
||||
|
||||
// account_number is the account number of the account in state
|
||||
uint64 account_number = 4;
|
||||
|
||||
// account_sequence starts at 1 rather than 0 to avoid the case where
|
||||
// the default 0 value must be omitted in protobuf serialization
|
||||
uint64 account_sequence = 5;
|
||||
}
|
||||
|
||||
// TxBody is the body of a transaction that all signers sign over
|
||||
message TxBody {
|
||||
// messages are the processable content of the transaction
|
||||
repeated google.protobuf.Any messages = 1;
|
||||
|
||||
// memo is any arbitrary memo to be added to the transaction
|
||||
string memo = 2;
|
||||
|
||||
// timeout is the block height after which this transaction will not
|
||||
// be processed by the chain
|
||||
int64 timeout_height = 3;
|
||||
|
||||
// extension_options are arbitrary options that can be added by chains
|
||||
// when the default options are not sufficient. If any of these are present
|
||||
// and can't be handled, the transaction will be rejected
|
||||
repeated google.protobuf.Any extension_options = 1023;
|
||||
|
||||
// extension_options are arbitrary options that can be added by chains
|
||||
// when the default options are not sufficient. If any of these are present
|
||||
// and can't be handled, they will be ignored
|
||||
repeated google.protobuf.Any non_critical_extension_options = 2047;
|
||||
}
|
||||
|
||||
// AuthInfo describes the fee and signer modes that are used to sign a transaction
|
||||
message AuthInfo {
|
||||
// signer_infos is the list of signer infos which corresponds with
|
||||
// Tx.signatures and expected signers derived from TxBody.messages. All signers
|
||||
// are expected to occur in the same order in each of these locations
|
||||
repeated SignerInfo signer_infos = 1;
|
||||
|
||||
// Fee is the fee and gas limit for the transaction. The first signer is the
|
||||
// primary signer and the one which pays the fee
|
||||
Fee fee = 2;
|
||||
}
|
||||
|
||||
// SignerInfo describes the public key and signing mode of a single top-level signer
|
||||
message SignerInfo {
|
||||
// public_key is the public key of the signer. It is optional for accounts
|
||||
// that already exist in state
|
||||
google.protobuf.Any public_key = 1;
|
||||
|
||||
// mode_info describes the signing mode of the signer and is a nested
|
||||
// structure to support nested multisig pubkey's
|
||||
ModeInfo mode_info = 2;
|
||||
}
|
||||
|
||||
// ModeInfo describes the signing mode of a single or nested multisig signer
|
||||
message ModeInfo {
|
||||
// sum is the oneof that specifies whether this represents a single or nested
|
||||
// multisig signer
|
||||
oneof sum {
|
||||
// single represents a single signer
|
||||
Single single = 1;
|
||||
|
||||
// multi represents a nested multisig signer
|
||||
Multi multi = 2;
|
||||
}
|
||||
|
||||
// Single is the mode info for a single signer. It is structured as a message
|
||||
// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future
|
||||
message Single {
|
||||
// mode is the signing mode of the single signer
|
||||
cosmos_sdk.tx.signing.v1.SignMode mode = 1;
|
||||
}
|
||||
|
||||
// Multi is the mode info for a multisig public key
|
||||
message Multi {
|
||||
// bitarray specifies which keys within the multisig are signing
|
||||
cosmos_sdk.crypto.v1.CompactBitArray bitarray = 1;
|
||||
|
||||
// mode_infos is the corresponding modes of the signers of the multisig
|
||||
// which could include nested multisig public keys
|
||||
repeated ModeInfo mode_infos = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// Fee includes the amount of coins paid in fees and the maximum
|
||||
// gas to be used by the transaction. The ratio yields an effective "gasprice",
|
||||
// which must be above some miminum to be accepted into the mempool.
|
||||
message Fee {
|
||||
// amount is the amount of coins to be paid as a fee
|
||||
repeated cosmos_sdk.v1.Coin amount = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// gas_limit is the maximum gas that can be used in transaction processing
|
||||
// before an out of gas error occurs
|
||||
uint64 gas_limit = 2;
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos_sdk.v1;
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "third_party/proto/tendermint/abci/types/types.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types";
|
||||
option (gogoproto.goproto_stringer_all) = false;
|
||||
option (gogoproto.stringer_all) = false;
|
||||
|
||||
// Coin defines a token with a denomination and an amount.
|
||||
//
|
||||
// NOTE: The amount field is an Int which implements the custom method
|
||||
// signatures required by gogoproto.
|
||||
message Coin {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string denom = 1;
|
||||
string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// DecCoin defines a token with a denomination and a decimal amount.
|
||||
//
|
||||
// NOTE: The amount field is an Dec which implements the custom method
|
||||
// signatures required by gogoproto.
|
||||
message DecCoin {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string denom = 1;
|
||||
string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// IntProto defines a Protobuf wrapper around an Int object.
|
||||
message IntProto {
|
||||
string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// DecProto defines a Protobuf wrapper around a Dec object.
|
||||
message DecProto {
|
||||
string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// ValAddresses defines a repeated set of validator addresses.
|
||||
message ValAddresses {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
repeated bytes addresses = 1 [(gogoproto.casttype) = "ValAddress"];
|
||||
}
|
||||
|
||||
// GasInfo defines tx execution gas context.
|
||||
message GasInfo {
|
||||
// GasWanted is the maximum units of work we allow this tx to perform.
|
||||
uint64 gas_wanted = 1 [(gogoproto.moretags) = "yaml:\"gas_wanted\""];
|
||||
|
||||
// GasUsed is the amount of gas actually consumed.
|
||||
uint64 gas_used = 2 [(gogoproto.moretags) = "yaml:\"gas_used\""];
|
||||
}
|
||||
|
||||
// Result is the union of ResponseFormat and ResponseCheckTx.
|
||||
message Result {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// Data is any data returned from message or handler execution. It MUST be length
|
||||
// prefixed in order to separate data from multiple message executions.
|
||||
bytes data = 1;
|
||||
|
||||
// Log contains the log information from message or handler execution.
|
||||
string log = 2;
|
||||
|
||||
// Events contains a slice of Event objects that were emitted during message or
|
||||
// handler execution.
|
||||
repeated tendermint.abci.types.Event events = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// SimulationResponse defines the response generated when a transaction is
|
||||
// successfully simulated.
|
||||
message SimulationResponse {
|
||||
GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||
Result result = 2;
|
||||
}
|
||||
|
||||
// MsgData defines the data returned in a Result object during message execution.
|
||||
message MsgData {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
string msg_type = 1;
|
||||
bytes data = 2;
|
||||
}
|
||||
|
||||
// TxData defines a list of MsgData. A transaction will have a MsgData object for
|
||||
// each message.
|
||||
message TxData {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
repeated MsgData data = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user