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

Adjustments for v1.8.0 release #717

Merged
merged 14 commits into from
Mar 9, 2022
1 change: 1 addition & 0 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ var handlers = map[string]appUpgrade{
return versionMap, nil
}, // upgrade for pio-testnet-1 from v1.8.0-rc8 to v1.8.0-rc9
},
"kahlua": {}, // upgrade for pio-testnet-1 from v1.8.0-rc9 to v1.8.0
// TODO - Add new upgrade definitions here.
}

Expand Down
2 changes: 1 addition & 1 deletion internal/antewrapper/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
// outermost AnteDecorator. SetUpContext must be called first
NewFeeMeterContextDecorator(), // NOTE : fee gas meter also has the functionality of GasTracerContextDecorator in previous versions
cosmosante.NewRejectExtensionOptionsDecorator(),
cosmosante.NewMempoolFeeDecorator(),
NewTxGasLimitDecorator(),
cosmosante.NewMempoolFeeDecorator(),
// Fee Decorator works to augment NewMempoolFeeDecorator and also check that enough fees are paid
NewMsgFeesDecorator(options.BankKeeper, options.AccountKeeper, options.FeegrantKeeper, options.MsgFeesKeeper),
cosmosante.NewValidateBasicDecorator(),
Expand Down
7 changes: 2 additions & 5 deletions internal/antewrapper/tx_gas_limit_decorator.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
type TxGasLimitDecorator struct{}

// MinTxPerBlock is used to determine the maximum amount of gas that any given transaction can use based on the block gas limit.
const MinTxPerBlock = 20
const MinTxPerBlock = 15

func NewTxGasLimitDecorator() TxGasLimitDecorator {
return TxGasLimitDecorator{}
Expand All @@ -27,10 +27,7 @@ func (mfd TxGasLimitDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate b
}
// Ensure that the requested gas does not exceed the configured block maximum
gas := feeTx.GetGas()
gasTxLimit := uint64(0)
if ctx.BlockGasMeter() != nil {
gasTxLimit = ctx.BlockGasMeter().Limit() / MinTxPerBlock
}
gasTxLimit := uint64(4_000_000)

// Skip gas limit check for txs with MsgSubmitProposal
hasSubmitPropMsg := false
Expand Down