Fantom-foundation / Aida

Aida is a block-processing testing infrastructure for EVM-compatible chains.
GNU Lesser General Public License v3.0
6 stars 12 forks source link

Failed to validate balance when using Sonic to block process recorded eth test #1172

Closed rpl-ffl closed 1 week ago

rpl-ffl commented 2 months ago

Updated to use main branch.

aida-vm reported balance mismatch when validating recorded eth substate using Sonic Block Processor. When switching to Geth Block Processor, the validation passed.

Steps to Reproduce

  1. Clone and build Aida.

    git clone git@github.com:Fantom-foundation/Aida.git
    cd Aida
    git submodule update --init --recursive
    make -j aida-vm
  2. Prepare aida-db

    wget https://elc.yonsei.ac.kr/record-replay/stage2-substate/substate.ethereum.0-1M.tar.zst
    tar --zstd -xvf substate.ethereum.0-1M.tar.zst
  3. To block process with Sonic, make the aida-vm call with --evm-impl aida

    # Where PATH is the path to the extracted aida-db in step 2
    $ build/aida-vm --validate --chainid 1 --workers 1 --evm-impl aida --vm-impl geth --substate-encoding rlp --aida-db <PATH> 0 100000
    ...
    NOTICE: Used EVM implementation: aida
    ...
    2024/09/23 12:18:06 NOTICE: Total elapsed time: 0s; last block 46147; total transaction rate ~562.82 Tx/s, ~11.82 MGas/s
    live-db-validator err:
    world-state output error at block 46147 tx 0;   Failed to validate balance for account 0xe6A7a1d47ff21B6321162AEA7C6CB457D5476Bca
    have 4487343750000000000000
    want 4488393750000000000000
  4. To block process with geth, make the aida-vm call with --evm-impl aida-geth:

    # Where PATH is the path to the extracted aida-db in step 2
    $ build/aida-vm --validate --chainid 1 --workers 1 --evm-impl aida-geth --vm-impl geth --substate-encoding rlp --aida-db <PATH> 0 100000
    ...
    NOTICE: Used EVM implementation: aida-geth
    ...
    // completed successfully
    2024/09/23 12:20:14 NOTICE: Total elapsed time: 3s; last block 99998; total transaction rate ~7976.69 Tx/s, ~318.40 MGas/s
wsodsong commented 1 week ago

This issue has been resolved. Let me close it.