Simulated backend Rollback() function should set gas tip back to the parameter passed by config
System information
Geth version: 1.14.8
OS & Version: OSX
Expected behaviour
Calling the Rollback() function on the simulated backend should set gas tip back to parameter passed by config as it was the case before https://github.com/ethereum/go-ethereum/pull/28202 was merged.
Actual behaviour
Currently the gas tip is arbitrary set to 1 Gwei after calling the Rollback() function, which is not even the default config parameter (1 wei).
There is a TODO in the code left by @MariusVanDerWijden here: https://github.com/ethereum/go-ethereum/blob/a9523b6428238a762e1a1e55e46ead47630c3a23/eth/catalyst/simulated_beacon.go#L276-L277
Steps to reproduce the behaviour
- Create a new simulated client with the default values.
- Call Rollback()
- Make a TX using the suggested gas tip.
You will get the error transaction underpriced: gas tip cap 1000000, minimum needed 1000000000.
Would you like to submit the pull request to fix it?
Would you like to submit the pull request to fix it?
Would love to but might need a bit of guidance on what would be the preferred strategy. I see two solutions so far:
- saving the gas tip value inside the
TxPoolstruct and exposing a getterfunc (p *TxPool) GetGasTip() *big.Int - saving the initial gas tip value inside the
SimulatedBeaconstruct
Was this issue addressed by #30534?
Yes, thank you closing this