Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShouldSkipSequenceValidation ¶
ShouldSkipSequenceValidation returns whether sequence validation can be skipped for a given list of messages. If the transaction consists of only messages which use `GoodTilBlock` to prevent transaction replay, the sequence numbers for this transaction won't get incremented and verified.
Important: ALL messages from a transaction must use `GoodTilBlock` in order to skip sequence number validation. Otherwise, attackers can create transactions with a single `GoodTilBlock` message, followed by any number of messages that they wish to be replayed which normally use sequence numbers. This would cause the sequence validation to be skipped for all of those messages and this transaction could be replayed.
Types ¶
type FreeInfiniteGasDecorator ¶
type FreeInfiniteGasDecorator struct { }
FreeInfiniteGasDecorator is an AnteHandler that sets `GasMeter` to `FreeInfiniteGasMeter` for off-chain single clob msg transactions, and app-injected transactions. These transactions should not use any gas, and the sender should not be charged any gas. Using this meter means gas will never be consumed for these transactions. Also note that not explicitly setting a `gasMeter` means that the `gasMeter` from the previous transaction or from `BeginBlock` will be used. Not doing this could result in consensus failure as demonstrated in #869. Cosmos SDK expects an explicit call to `WithGasMeter` at the beginning of the AnteHandler chain.
func NewFreeInfiniteGasDecorator ¶
func NewFreeInfiniteGasDecorator() FreeInfiniteGasDecorator
func (FreeInfiniteGasDecorator) AnteHandle ¶
type SigVerificationDecorator ¶
type SigVerificationDecorator struct {
// contains filtered or unexported fields
}
SigVerificationDecorator verifies all signatures for a tx and return an error if any are invalid. Note, the SigVerificationDecorator will not check signatures on ReCheck.
CONTRACT: Pubkeys are set in context for all signers before this decorator runs CONTRACT: Tx must implement SigVerifiableTx interface
func NewSigVerificationDecorator ¶
func NewSigVerificationDecorator( ak sdkante.AccountKeeper, signModeHandler *txsigning.HandlerMap, ) SigVerificationDecorator
func (SigVerificationDecorator) AnteHandle ¶
type ValidateMsgTypeDecorator ¶
type ValidateMsgTypeDecorator struct{}
ValidateMsgTypeDecorator checks that the tx has the expected message types. Specifically, if the list of msgs in the tx contains an "app-injected message", the tx must only contain a single message. This decorator will not get exeuted on ReCheckTx since it does not depend on app state.
func NewValidateMsgTypeDecorator ¶
func NewValidateMsgTypeDecorator() ValidateMsgTypeDecorator