EscanBE / evermint

Evermint is a fork of open source Evmos, maintains bug fixes, customization and enable developers to fork and transform to their chain, fully customized naming, in just 2 steps. For research and development purpose.
GNU Lesser General Public License v3.0
3 stars 3 forks source link

Problem: custom nonce management might causes incorrect state & behavior #152

Closed VictorTrustyDev closed 2 months ago

VictorTrustyDev commented 2 months ago

Go-Ethereum: self manage the nonce logic in state transition https://github.com/ethereum/go-ethereum/blob/v1.10.26/core/state_transition.go#L328-L334

Evermint code increases nonce in AnteHandle and skip the logic in state transition https://github.com/EscanBE/evermint/blob/154230cf2447fcd780a7cb217fbda1c2b56c89f3/x/evm/keeper/state_transition.go#L271-L280

This can cause invalid nonce of sender in case of simulation like trace*