-
Notifications
You must be signed in to change notification settings - Fork 562
Disable basefee for non london block #662
Disable basefee for non london block #662
Conversation
998d5ef
to
10da4f4
Compare
Codecov Report
@@ Coverage Diff @@
## main #662 +/- ##
==========================================
+ Coverage 57.00% 57.02% +0.01%
==========================================
Files 63 63
Lines 5540 5547 +7
==========================================
+ Hits 3158 3163 +5
- Misses 2219 2221 +2
Partials 163 163
|
1831217
to
2b21f00
Compare
app/ante/eth.go
Outdated
@@ -359,7 +359,7 @@ func (ctd CanTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate | |||
} | |||
|
|||
var baseFee *big.Int | |||
if !feeMktParams.NoBaseFee { | |||
if evmtypes.IsLondon(ctx, ctd.evmKeeper.GetParams(ctx), ctd.evmKeeper.ChainID()) && !feeMktParams.NoBaseFee { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can pass the params directly instead
if evmtypes.IsLondon(ctx, ctd.evmKeeper.GetParams(ctx), ctd.evmKeeper.ChainID()) && !feeMktParams.NoBaseFee { | |
if evmtypes.IsLondon(ctx, params, ethCfg.ChainID) && !feeMktParams.NoBaseFee { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto for the others
rpc/ethereum/backend/backend.go
Outdated
func (e *EVMBackend) getBaseFee(height int64) (*big.Int, error) { | ||
cfg := e.ChainConfig() | ||
if !cfg.IsLondon(new(big.Int).SetInt64(height)) { | ||
return nil, nil | ||
} | ||
|
||
baseFee, err := e.BaseFee() | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return baseFee, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update the BaseFee
function instead
x/evm/types/eip1559.go
Outdated
"math/big" | ||
) | ||
|
||
func IsLondon(ctx sdk.Context, params Params, chainID *big.Int) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add use the ethereum ChainConfig instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it uses github.com/ethereum/go-ethereum/params
now. Is it the one you are talking about?
e1977c3
to
3edc9a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes requested
661eb5f
to
7f1b7ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, pending Changelog entry and lint fix
Closes: #XXX
Description
Unifying the logic between the rpc endpoint "GasPrice", "EstimateGas", "SendTransaction" and "GetBlock"
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)