Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add SIGN_MODE_AMINO_AUX handler #10268

Merged
merged 13 commits into from
Oct 4, 2021
2 changes: 2 additions & 0 deletions client/tx_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package client

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/tx"
signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing"
"github.com/cosmos/cosmos-sdk/x/auth/signing"
)
Expand Down Expand Up @@ -41,6 +42,7 @@ type (
SetMemo(memo string)
SetFeeAmount(amount sdk.Coins)
SetGasLimit(limit uint64)
SetTip(tip *tx.Tip)
SetTimeoutHeight(height uint64)
SetFeeGranter(feeGranter sdk.AccAddress)
}
Expand Down
33 changes: 17 additions & 16 deletions docs/core/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2469,7 +2469,7 @@ ReflectionService defines a service for interface reflection.
<a name="cosmos.base.reflection.v2alpha1.AppDescriptor"></a>

### AppDescriptor
AppDescriptor describes a Cosmos SDK based application
AppDescriptor describes a cosmos-sdk based application


| Field | Type | Label | Description |
Expand Down Expand Up @@ -2750,7 +2750,7 @@ InterfaceImplementerDescriptor describes an interface implementer
<a name="cosmos.base.reflection.v2alpha1.MsgDescriptor"></a>

### MsgDescriptor
MsgDescriptor describes a Cosmos SDK message that can be delivered with a transaction
MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction
alexanderbez marked this conversation as resolved.
Show resolved Hide resolved


| Field | Type | Label | Description |
Expand Down Expand Up @@ -2783,7 +2783,7 @@ because it would be redundant with the grpc reflection service
<a name="cosmos.base.reflection.v2alpha1.QueryServiceDescriptor"></a>

### QueryServiceDescriptor
QueryServiceDescriptor describes a Cosmos SDK queryable service
QueryServiceDescriptor describes a cosmos-sdk queryable service


| Field | Type | Label | Description |
Expand All @@ -2800,12 +2800,12 @@ QueryServiceDescriptor describes a Cosmos SDK queryable service
<a name="cosmos.base.reflection.v2alpha1.QueryServicesDescriptor"></a>

### QueryServicesDescriptor
QueryServicesDescriptor contains the list of Cosmos SDK queriable services
QueryServicesDescriptor contains the list of cosmos-sdk queriable services


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `query_services` | [QueryServiceDescriptor](#cosmos.base.reflection.v2alpha1.QueryServiceDescriptor) | repeated | query_services is a list of Cosmos SDK QueryServiceDescriptor |
| `query_services` | [QueryServiceDescriptor](#cosmos.base.reflection.v2alpha1.QueryServiceDescriptor) | repeated | query_services is a list of cosmos-sdk QueryServiceDescriptor |



Expand Down Expand Up @@ -2861,7 +2861,7 @@ ReflectionService defines a service for application reflection.

| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `GetAuthnDescriptor` | [GetAuthnDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest) | [GetAuthnDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse) | 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. | GET|/cosmos/base/reflection/v1beta1/app_descriptor/authn|
| `GetAuthnDescriptor` | [GetAuthnDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest) | [GetAuthnDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse) | 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. | GET|/cosmos/base/reflection/v1beta1/app_descriptor/authn|
| `GetChainDescriptor` | [GetChainDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest) | [GetChainDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse) | GetChainDescriptor returns the description of the chain | GET|/cosmos/base/reflection/v1beta1/app_descriptor/chain|
| `GetCodecDescriptor` | [GetCodecDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest) | [GetCodecDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse) | GetCodecDescriptor returns the descriptor of the codec of the application | GET|/cosmos/base/reflection/v1beta1/app_descriptor/codec|
| `GetConfigurationDescriptor` | [GetConfigurationDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest) | [GetConfigurationDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse) | GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application | GET|/cosmos/base/reflection/v1beta1/app_descriptor/configuration|
Expand All @@ -2882,7 +2882,7 @@ ReflectionService defines a service for application reflection.
<a name="cosmos.base.snapshots.v1beta1.Metadata"></a>

### Metadata
Metadata contains Cosmos SDK-specific snapshot metadata.
Metadata contains SDK-specific snapshot metadata.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're going to use just SDK, then it should be an SDK ...



| Field | Type | Label | Description |
Expand Down Expand Up @@ -3559,7 +3559,7 @@ Msg defines the bank Msg service.

### PrivKey
Deprecated: PrivKey defines a ed25519 private key.
NOTE: ed25519 keys must not be used in Cosmos SDK apps except in a tendermint validator context.
NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context.


| Field | Type | Label | Description |
Expand All @@ -3574,8 +3574,8 @@ NOTE: ed25519 keys must not be used in Cosmos SDK apps except in a tendermint va
<a name="cosmos.crypto.ed25519.PubKey"></a>

### PubKey
PubKey is an ed25519 public key for handling Tendermint keys in the Cosmos SDK.
It's needed for Any serialization and Cosmos SDK compatibility.
PubKey is an ed25519 public key for handling Tendermint keys in SDK.
It's needed for Any serialization and SDK compatibility.
It must not be used in a non Tendermint key context because it doesn't implement
ADR-28. Nevertheless, you will like to use ed25519 in app user level
then you must create a new proto message and follow ADR-28 for Address construction.
Expand Down Expand Up @@ -9089,7 +9089,7 @@ Query defines the gRPC querier service.
<a name="cosmos.staking.v1beta1.MsgBeginRedelegate"></a>

### MsgBeginRedelegate
MsgBeginRedelegate defines a Cosmos SDK message for performing a redelegation
MsgBeginRedelegate defines a SDK message for performing a redelegation
of coins from a delegator and source validator to a destination validator.


Expand Down Expand Up @@ -9123,7 +9123,7 @@ MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type.
<a name="cosmos.staking.v1beta1.MsgCreateValidator"></a>

### MsgCreateValidator
MsgCreateValidator defines a Cosmos SDK message for creating a new validator.
MsgCreateValidator defines a SDK message for creating a new validator.


| Field | Type | Label | Description |
Expand Down Expand Up @@ -9154,7 +9154,7 @@ MsgCreateValidatorResponse defines the Msg/CreateValidator response type.
<a name="cosmos.staking.v1beta1.MsgDelegate"></a>

### MsgDelegate
MsgDelegate defines a Cosmos SDK message for performing a delegation of coins
MsgDelegate defines a SDK message for performing a delegation of coins
from a delegator to a validator.


Expand Down Expand Up @@ -9182,7 +9182,7 @@ MsgDelegateResponse defines the Msg/Delegate response type.
<a name="cosmos.staking.v1beta1.MsgEditValidator"></a>

### MsgEditValidator
MsgEditValidator defines a Cosmos SDK message for editing an existing validator.
MsgEditValidator defines a SDK message for editing an existing validator.


| Field | Type | Label | Description |
Expand Down Expand Up @@ -9210,7 +9210,7 @@ MsgEditValidatorResponse defines the Msg/EditValidator response type.
<a name="cosmos.staking.v1beta1.MsgUndelegate"></a>

### MsgUndelegate
MsgUndelegate defines a Cosmos SDK message for performing an undelegation from a
MsgUndelegate defines a SDK message for performing an undelegation from a
delegate and a validator.


Expand Down Expand Up @@ -9367,6 +9367,7 @@ SignMode represents a signing mode with its own security guarantees.
| SIGN_MODE_TEXTUAL | 2 | 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. It is currently not supported. |
| SIGN_MODE_DIRECT_JSON | 3 | SIGN_MODE_DIRECT_JSON specifies a signing mode which uses SignDocJSON. It is verified using a canonical JSON representation of the bytes used in SIGN_MODE_DIRECT. It is currently not supported. |
| SIGN_MODE_DIRECT_AUX | 4 | SIGN_MODE_DIRECT_AUX specifies a signing mode which uses SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not require signers signing over other signers' `signer_info`. It also allows for adding Tips in transactions. |
| SIGN_MODE_AMINO_AUX | 5 | SIGN_MODE_AMINO_AUX specifies a signing mode which uses SignDocAminoAux. |
| SIGN_MODE_LEGACY_AMINO_JSON | 127 | SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses Amino JSON and will be removed in the future. |


Expand Down Expand Up @@ -9873,7 +9874,7 @@ Plan specifies information about a planned upgrade and when it should occur.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `name` | [string](#string) | | 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 the first BeginBlock method after the upgrade is applied. It is also used to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height is reached and the software will exit. |
| `time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | **Deprecated.** Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the Cosmos SDK. If this field is not empty, an error will be thrown. |
| `time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | **Deprecated.** Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the SDK. If this field is not empty, an error will be thrown. |
| `height` | [int64](#int64) | | The height at which the upgrade must be performed. Only used if Time is not set. |
| `info` | [string](#string) | | Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to |
| `upgraded_client_state` | [google.protobuf.Any](#google.protobuf.Any) | | **Deprecated.** Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been moved to the IBC module in the sub module 02-client. If this field is not empty, an error will be thrown. |
Expand Down
4 changes: 4 additions & 0 deletions proto/cosmos/tx/signing/v1beta1/signing.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ enum SignMode {
// for adding Tips in transactions.
SIGN_MODE_DIRECT_AUX = 4;

// SIGN_MODE_AMINO_AUX specifies a signing mode which uses
// SignDocAminoAux.
SIGN_MODE_AMINO_AUX = 5;

// 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;
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/tx/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ message Fee {
// Tip is the tip used for meta-transactions.
message Tip {
// amount is the amount of the tip
repeated cosmos.base.v1beta1.Coin amount = 1;
repeated cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false];
// tipper is the address of the account paying for the tip
string tipper = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
79 changes: 42 additions & 37 deletions types/tx/signing/signing.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading