Documentation ¶
Index ¶
Constants ¶
const MaxOracleMsgGasUsage = uint64(100000)
MaxOracleMsgGasUsage defines the maximum gas allowed for an oracle transaction.
Variables ¶
This section is empty.
Functions ¶
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.
Types ¶
type HandlerOptions ¶
type HandlerOptions struct { AccountKeeper cosmosante.AccountKeeper BankKeeper types.BankKeeper FeegrantKeeper cosmosante.FeegrantKeeper OracleKeeper OracleKeeper SignModeHandler signing.SignModeHandler SigGasConsumer cosmosante.SignatureVerificationGasConsumer }
type MempoolFeeDecorator ¶
type MempoolFeeDecorator struct{}
MempoolFeeDecorator defines a custom Umee AnteHandler decorator that is responsible for allowing oracle transactions from oracle feeders to bypass the minimum fee CheckTx check. However, if an oracle transaction's gas limit is beyond the accepted threshold, the minimum fee check is still applied.
For non-oracle transactions, the minimum fee check is applied.
func NewMempoolFeeDecorator ¶
func NewMempoolFeeDecorator() MempoolFeeDecorator
func (MempoolFeeDecorator) AnteHandle ¶
type OracleKeeper ¶
type OracleKeeper interface {
ValidateFeeder(ctx sdk.Context, feederAddr sdk.AccAddress, validatorAddr sdk.ValAddress) error
}
OracleKeeper for feeder validation
type SpamPreventionDecorator ¶
type SpamPreventionDecorator struct {
// contains filtered or unexported fields
}
SpamPreventionDecorator defines a custom Umee AnteHandler decorator that is responsible for preventing oracle message spam. Specifically, it prohibits oracle feeders from submitting multiple oracle messages in a single block.
func NewSpamPreventionDecorator ¶
func NewSpamPreventionDecorator(oracleKeeper OracleKeeper) *SpamPreventionDecorator
func (*SpamPreventionDecorator) AnteHandle ¶
func (*SpamPreventionDecorator) CheckOracleSpam ¶
CheckOracleSpam performs the check of whether or not we've seen an oracle message from an oracle feeder in the current block or not. If we have, we return an error which prohibits the transaction from being processed.