0xPolygonHermez / zkevm-node

Go implementation of a node that operates the Polygon zkEVM Network
Other
531 stars 685 forks source link

Reset balance in memory after OOG #3579

Closed zjg555543 closed 4 months ago

zjg555543 commented 5 months ago

What does this PR do?

Ensure consistency with Ethereum behavior.After OOG, reset the balance in memory. Test cases: A has 1 ETH, nonce is 1, B is contract account, C is other account

  1. Tx A to B, nonce 3 with 0.8 ETH, will get an oog error
  2. Tx A to C, nonce 4 with 0.8 ETH
  3. Tx A to C, nonce 2 with 0.01 ETH
  4. Tx C to A with 1 ETH

Both tx will be minted, order of execution: 3,1(oog),4,2

Reviewers

Main reviewers:

Codeowner reviewers: