sei-chain icon indicating copy to clipboard operation
sei-chain copied to clipboard

Add utils to replay ETH mainnet txs

Open codchen opened this issue 11 months ago • 1 comments

Describe your changes and provide context

Add a new command ethreplay to replay transactions from ethereum mainnet. Note that currently this command only supports one-off mode (i.e. replay a predefined number of blocks and exit), but can be extended to long-running if needed in the future.

Details of operation can be found here: https://www.notion.so/3pgv/ETH-Mainnet-Replay-8887dea71cbc4f3294c264f8d8858e83

Even though this PR added a new state prefix, it would never be written/read if eth_replay.enabled = false, which will be the case for all actual network nodes.

Testing performed to validate your change

replay

codchen avatar Mar 11 '24 05:03 codchen

Codecov Report

Attention: Patch coverage is 14.68254% with 215 lines in your changes are missing coverage. Please review.

Project coverage is 62.24%. Comparing base (523c19a) to head (5ea2ac2).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##            seiv2    #1419      +/-   ##
==========================================
- Coverage   62.82%   62.24%   -0.58%     
==========================================
  Files         350      352       +2     
  Lines       23932    24180     +248     
==========================================
+ Hits        15036    15052      +16     
- Misses       8035     8262     +227     
- Partials      861      866       +5     
Files Coverage Δ
x/evm/state/accesslist.go 94.44% <100.00%> (+0.79%) :arrow_up:
x/evm/state/balance.go 70.58% <100.00%> (+1.35%) :arrow_up:
x/evm/state/check.go 76.92% <100.00%> (+4.19%) :arrow_up:
x/evm/state/code.go 100.00% <100.00%> (ø)
x/evm/state/nonce.go 100.00% <100.00%> (ø)
x/evm/state/state.go 97.36% <100.00%> (+0.12%) :arrow_up:
x/evm/types/keys.go 0.00% <ø> (ø)
x/evm/ante/preprocess.go 77.02% <0.00%> (-1.06%) :arrow_down:
x/evm/keeper/params.go 72.72% <0.00%> (-16.17%) :arrow_down:
x/evm/module.go 62.50% <40.00%> (-1.87%) :arrow_down:
... and 6 more

... and 2 files with indirect coverage changes

codecov-commenter avatar Mar 11 '24 06:03 codecov-commenter