Sync from fork #74

Merged
0xmuralik merged 232 commits from murali/update-fork into main 2023-01-10 04:50:57 +00:00
4 changed files with 4 additions and 3 deletions
Showing only changes of commit ebbffc685c - Show all commits

View File

@ -51,6 +51,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (feemarket) [\#1165](https://github.com/evmos/ethermint/pull/1165) Add hint in specs about different gas terminology for gas in Cosmos and Ethereum. * (feemarket) [\#1165](https://github.com/evmos/ethermint/pull/1165) Add hint in specs about different gas terminology for gas in Cosmos and Ethereum.
* (rpc) [\#1169](https://github.com/evmos/ethermint/pull/1169) Remove unnecessary queries from `getBlockNumber` function * (rpc) [\#1169](https://github.com/evmos/ethermint/pull/1169) Remove unnecessary queries from `getBlockNumber` function
* (ante) [1208](https://github.com/evmos/ethermint/pull/1208) Change default `maxGasWanted` value
### Bug Fixes ### Bug Fixes

View File

@ -194,7 +194,7 @@ func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula
return ctx, sdkerrors.Wrap(err, "failed to unpack tx data") return ctx, sdkerrors.Wrap(err, "failed to unpack tx data")
} }
if ctx.IsCheckTx() { if ctx.IsCheckTx() && egcd.maxGasWanted != 0 {
// We can't trust the tx gas limit, because we'll refund the unused gas. // We can't trust the tx gas limit, because we'll refund the unused gas.
if txData.GetGas() > egcd.maxGasWanted { if txData.GetGas() > egcd.maxGasWanted {
gasWanted += egcd.maxGasWanted gasWanted += egcd.maxGasWanted

View File

@ -280,7 +280,7 @@ func (suite AnteTestSuite) TestEthGasConsumeDecorator() {
{ {
"success", "success",
tx2, tx2,
config.DefaultMaxTxGasWanted, // it's capped tx2GasLimit, // it's capped
func() { func() {
vmdb.AddBalance(addr, big.NewInt(1000000)) vmdb.AddBalance(addr, big.NewInt(1000000))

View File

@ -28,7 +28,7 @@ const (
// DefaultEVMTracer is the default vm.Tracer type // DefaultEVMTracer is the default vm.Tracer type
DefaultEVMTracer = "" DefaultEVMTracer = ""
DefaultMaxTxGasWanted = 500000 DefaultMaxTxGasWanted = 0
DefaultGasCap uint64 = 25000000 DefaultGasCap uint64 = 25000000