Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

continuation of previous discrepancy tests #3782

Open
1 task done
sslivkoff opened this issue Jul 14, 2023 · 2 comments
Open
1 task done

continuation of previous discrepancy tests #3782

sslivkoff opened this issue Jul 14, 2023 · 2 comments
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior
Milestone

Comments

@sslivkoff
Copy link
Member

Describe the bug

this is a sequel to #2457

rerunning the flood equality tests I'm seeing discrepancies for 7 methods

with this command flood all erigon=$IP_ERIGON:8545 reth=$IP_RETH:8545 --equality

I am seeing this:

┌────────────────────┐
│ Equality test: all │
└────────────────────┘
- methods: 
    - eth_getChainId
    - eth_getLogs
    - eth_gasPrice
    - eth_getBalance
    - eth_getTransactionCount
    - eth_getStorageAt
    - eth_getCode
    - eth_getBlockByNumber
    - eth_getBlockByHash
    - eth_getTransactionByHash
    - eth_getTransactionReceipt
    - eth_call
    - eth_feeHistory
    - trace_block
    - trace_call
    - trace_call_many
    - trace_replay_block_transactions
    - trace_replay_transaction
    - trace_transaction
- output_dir: /var/folders/ml/dymw9nkx51j7scsxc3qpqvl80000gp/T/tmpd3311vr1
- nodes: 
    1. {'name': 'erigon', 'url': 'http://185.209.178.178:8545', 'remote': None, 
'client_version': 'erigon/2.45.1/linux-amd64/go1.20.5', 'network': 'ethereum'}
    2. {'name': 'reth', 'url': 'http://45.250.253.77:8545', 'remote': None, 'client_version':
'reth/v0.1.0-alpha.3-dbafe23c/x86_64-unknown-linux-gnu', 'network': 'ethereum'}

┌─────────────────────────────────┐
│ Discrepancies in eth_feeHistory │
└─────────────────────────────────┘

args
────
- 512
- 11463082

call
────
{'jsonrpc': '2.0', 'method': 'eth_feeHistory', 'params': ['0xaee9aa', '0x200', []], 'id': 771836459325704840}

reth failed
response: {'jsonrpc': '2.0', 'error': {'code': -32602, 'message': 'Invalid block range'}, 'id': 771836459325704840}

┌──────────────────────────────┐
│ Discrepancies in trace_block │
└──────────────────────────────┘

args
────
- block_number: 15103746

call
────
{'jsonrpc': '2.0', 'method': 'trace_block', 'params': ['0xe67702'], 'id': 631570745035559838}

differences in response
───────────────────────
    type    index                erigon       reth                            
    ──────────────────────────────────────────────────────────────────────────
    value   0.action.gas         0x472ba      0x4c9c2                         
    value   9.action.gas         0x3b3b2      0x4cf62                         
    value   18.action.gas        0x30358      0x40388                         
    value   28.action.gas        0x0          0x5208                          
    value   29.action.gas        0x43f78      0x493e0                         
    value   30.action.gas        0x43f78      0x493e0                         
    value   31.action.gas        0x0          0x5208                          
    value   32.result.gasUsed    0x741c       0x615c                          
    value   32.action.gas        0x109b8      0x15f90                         
    value   33.action.gas        0x1f594      0x249f0                         
    value   35.action.gas        0x2e248      0x33450                         
    value   36.result.gasUsed    0x317bf      0x2e74f                         
    value   36.action.gas        0x4301f      0x49a37                         
    value   43.action.gas        0xfcd9       0x153b5                         
    value   46.result.gasUsed    0x1b9e0      0x1aef0                         
    value   46.action.gas        0x26980      0x2d44c                         
    value   53.action.gas        0xefc1       0x14379                         
    value   55.action.gas        0x7148       0xc350                          
    value   56.action.gas        0x7148       0xc350                          
    value   57.action.gas        0x7148       0xc350                          
    value   58.action.gas        0x0          0x5208                          
    value   59.result.gasUsed    0x741c       0x615c                          
    value   59.action.gas        0x130c8      0x186a0                         
    value   60.action.gas        0x0          0x5208                          
    value   61.action.gas        0xeedd8      0xf4240                         
    value   62.action.gas        0x14820      0x19a28                         
    value   63.action.gas        0x0          0x5208                          
    value   64.action.gas        0x7148       0xc350                          
    value   65.action.gas        0x7148       0xc350                          
    value   66.action.gas        0x7148       0xc350                          
    value   67.action.gas        0x7148       0xc350                          
    value   68.result.gasUsed    0x5fb5       0x4cf5                          
    value   68.action.gas        0xb9c9       0x10e3d                         
    value   69.action.gas        0x0          0x5208                          
    value   70.action.gas        0x0          0x5208                          
    value   71.action.gas        0x691a       0xbeda                          
    value   72.action.gas        0x691a       0xbeda                          
    value   73.action.gas        0x691a       0xbeda                          
    value   74.action.gas        0x20527      0x27107                         
    value   76.action.gas        0x691a       0xbeda                          
    value   77.action.gas        0x691a       0xbeda                          
    value   78.action.gas        0x691a       0xbeda                          
    value   79.action.gas        0x691a       0xbeda                          
    value   80.action.gas        0x12ffc      0x186a0                         
    value   81.action.gas        0xf3b8       0x14820                         
    value   82.action.gas        0x16d98      0x1d760                         
    value   83.action.gas        0x0          0x5208                          
    value   84.action.gas        0x0          0x5208                          
    value   85.action.gas        0x0          0x5208                          
    value   86.action.gas        0x10d88      0x15f90                         
    value   87.result.gasUsed    0x2c822      0x26f76                         
    value   87.action.gas        0x2f9b0      0x36b84                         
    value   100.result.gasUsed   0x5000       0x4000                          
    value   100.action.gas       0xb784       0x10d8c                         
    value   101.action.gas       0xa410       0xf618                          
    value   102.action.gas       0x9fe9       0xf451                          
    value   103.action.gas       0x8981       0xdd71                          
    value   106.action.gas       0x0          0x5208                          
    value   107.action.gas       0x7e0f       0xed67                          
    value   108.action.gas       0x6073       0xb4b7                          
    value   109.action.gas       0x0          0x5208                          
    value   110.action.gas       0x0          0x5208                          
    value   111.action.gas       0x0          0x5208                          
    value   112.action.gas       0x0          0x5208                          
    value   113.action.gas       0x0          0x5208                          
    value   114.action.gas       0x0          0x5208                          
    value   115.action.gas       0x0          0x5208                          
    value   116.result.gasUsed   0x2382b      0x22d3b                         
    value   116.action.gas       0x3c505      0x41839                         
    value   133.result.gasUsed   0x1fcac      0x1f1bc                         
    value   133.action.gas       0x2c052      0x32b12                         
    value   140.action.gas       0xb944       0x10d88                         
    value   141.result.gasUsed   0x1f7ab      0x1ecbb                         
    value   141.action.gas       0x20026      0x26c1a                         
    value   148.result.gasUsed   0x282ec      0x277fc                         
    value   148.action.gas       0x427ec      0x493e0                         
    value   156.action.gas       0x626e       0xb65e                          
    value   157.action.gas       0x6073       0xb463                          
    value   158.action.gas       0x9e42       0xf3f6                          
    value   159.action.gas       0x6073       0xb463                          
    value   160.result.gasUsed   0x2055b      0x1fa6b                         
    value   160.action.gas       0x25962      0x2c482                         
    value   167.action.gas       0x20527      0x27047                         
    value   169.result.gasUsed   0x215b3      0x1e543                         
    value   169.action.gas       0x21e2e      0x28b06                         
    value   176.action.gas       0x7e0f       0xed4f                          
    value   177.action.gas       0x6073       0xb463                          
    value   178.action.gas       0x7b46       0xe61e                          
    value   179.action.gas       0x20dd6      0x278f6                         
    value   181.action.gas       0x606b       0xb45b                          
    value   182.result.gasUsed   0x219c5      0x1fc15                         
    value   182.action.gas       0x22240      0x28e34                         
    value   190.action.gas       0xad8b       0x1033f                         
    value   191.action.gas       0x6a78       0xbec8                          
    value   192.result.gasUsed   0x27691      0x24621                         
    value   192.action.gas       0x27f0c      0x2eb00                         
    value   199.result.gasUsed   0x1b5af      0x1aabf                         
    value   199.action.gas       0x1be2a      0x22a12                         
    value   206.action.gas       0x603f       0xb42f                          
    value   207.action.gas       0x14bf6      0x19f56                         
    value   208.action.gas       0x603d       0xb42d                          
    value   209.result.gasUsed   0x1b9b1      0x1aec1                         
    value   209.action.gas       0x1c22c      0x22e20                         
    value   216.action.gas       0xacba0      0xb4aa0                         
    value   217.action.gas       0x626e       0xb65e                          
    value   218.result.gasUsed   0x1fcd0      0x1df20                         
    value   218.action.gas       0x2054b      0x2713f                         
    value   225.action.gas       0x5ffd       0xb3ed                          
    value   226.action.gas       0x626e       0xb65e                          
    value   227.action.gas       0x626e       0xb65e                          
    value   228.result.gasUsed   0x1f87b      0x1ed8b                         
    value   228.action.gas       0x200f6      0x26cd2                         
    value   235.action.gas       0x6282       0xb672                          
    value   236.action.gas       0x38450      0x3e050                         
    value   238.action.gas       0x1be2a      0x22a12                         
    value   240.result.gasUsed   0x1b5af      0x1aabf                         
    value   240.action.gas       0x1be2a      0x22a12                         
    value   247.result.gasUsed   0x250b8      0x245c8                         
    value   247.action.gas       0x25933      0x2c533                         
    value   254.action.gas       0x6073       0xb463                          
    value   255.result.gasUsed   0x872a       0x746a                          
    value   255.action.gas       0x872a       0xde76                          
    value   256.action.gas       0x626e       0xb65e                          
    value   257.action.gas       0x5f64       0xb4c8                          
    value   258.result.gasUsed   0x2d4c4      0x2a454                         
    value   258.action.gas       0x2dd3f      0x3494b                         
    value   265.result.gasUsed   0xa27c       0x8fbc                          
    value   265.action.gas       0x11e94      0x17448                         
    value   266.result.gasUsed   0x2ae7c      0x27e0c                         
    value   266.action.gas       0x2dd3f      0x3493f                         
    value   273.action.gas       0xb998       0x10d88                         
    value   274.action.gas       0xb998       0x10d88                         
    value   275.action.gas       0xb998       0x10d88                         
    value   276.action.gas       0xb998       0x10d88                         
    value   277.result.gasUsed   0x2bf4a      0x232a2                         
    value   277.action.gas       0x48733      0x4f31b                         
    value   292.action.gas       0x0          0x5208                          
    value   293.result.gasUsed   0x43a24      0x388cc                         
    value   293.action.gas       0x44640      0x4a294                         
    value   315.action.gas       0x26a88      0x2bf20                         
    value   316.action.gas       0x26a88      0x2bf20                         
    value   317.action.gas       0x0          0x5208                          
    value   318.action.gas       0x1c22c      0x22e20                         
    value   320.result.gasUsed   0x285f9      0x27b09                         
    value   320.action.gas       0x42303      0x4a023                         
    value   327.action.gas       0x6073       0xb463                          
    value   328.action.gas       0x37c1c      0x3d090                         
    value   329.result.gasUsed   0x441e8      0x372e0                         
    value   329.action.gas       0x54a7a      0x5c2ae                         
    value   356.action.gas       0x0          0x5208                          
    value   357.action.gas       0x74cac      0x7a120                         
    value   358.action.gas       0x74cac      0x7a120                         
    value   359.action.gas       0x74cd0      0x7a120                         
    value   360.action.gas       0x74cb8      0x7a120                         
    value   361.action.gas       0x0          0x5208                          
    value   362.action.gas       0x74cac      0x7a120                         
    value   363.action.gas       0x74cb8      0x7a120                         
    value   364.action.gas       0x74cb8      0x7a120                         
    value   365.action.gas       0xbd80       0x11170                         
    value   366.action.gas       0xbd80       0x11170                         
    value   367.action.gas       0xbd80       0x11170                         
    value   368.action.gas       0x1be2a      0x22a12                         
    value   370.action.gas       0x0          0x5208                          
    value   371.action.gas       0x0          0x5208                          
    value   372.result.gasUsed   0x4fe48      0x49aac                         
    value   372.action.gas       0x87452      0x95fb2                         
    value   390.action.gas       0x0          0x5208                          
    value   391.action.gas       0x0          0x5208                          
    value   392.action.gas       0x1d850      0x24be0                         
    value   393.action.gas       0x0          0x5208                          
    value   394.action.gas       0x2a4ce      0x310ce                         
    value   396.action.gas       0x2da4f      0x32f0b                         
    value   397.action.gas       0x0          0x5208                          
    value   398.action.gas       0x0          0x5208                          
    value   399.result.gasUsed   0x500c1      0x4009b                         
    value   399.action.gas       0x5d97a      0x6791e                         
    value   429.action.gas       0x0          0x5208                          
    value   430.action.gas       0x0          0x5208                          
    value   431.action.gas       0x0          0x5208                          
    value   432.action.gas       0x0          0x5208                          
    value   433.action.gas       0x0          0x5208                          
    value   434.action.gas       0x262c8      0x2cca0                         
    value   438.action.gas       0x0          0x5208                          
    value   439.action.gas       0x0          0x5208                          
    value   440.action.gas       0xace64      0xb4aa0                         
    value   441.action.gas       0x0          0x5208                          
    value   442.action.gas       0x0          0x5208                          
    value   443.action.gas       0xd9cf       0x12e4f                         
    value   444.action.gas       0x33765      0x3a34d                         
    value   446.action.gas       0x0          0x5208                          
    value   447.action.gas       0xbd08       0x11170                         
    value   448.action.gas       0x0          0x5208                          
    value   449.action.gas       0xbb32       0x10f9a                         
    value   450.result.gasUsed   0x1ffd1      0x1ed11                         
    value   450.action.gas       0x21c86      0x2729a                         
    value   458.action.gas       0x5208       0xa410                          
    value   459.action.gas       0x71b7       0xc61f                          
    value   460.action.gas       0x0          0x5208                          
    value   461.action.gas       0x0          0x5208                          
    value   462.action.gas       0x0          0x5208                          
    value   463.action.gas       0x162ba      0x1d63e                         
    value   464.action.gas       0x0          0x5208                          
    value   465.action.gas       0x0          0x5208                          
    value   466.action.gas       0x32cd6      0x3aa0e                         
    value   468.action.gas       0x20527      0x27107                         
    value   470.action.gas       0x0          0x5208                          
    value   471.result.gasUsed   0x1b569      0x15dee                         
    value   471.action.gas       0x22940      0x28658                         
    value   483.action.gas       0x6257       0xb647                          
    value   484.action.gas       0x879b       0xdd53                          
    value   485.action.gas       0x790cb      0x7e313                         
    value   488.action.gas       0x62d6       0xb7b6                          
    value   489.action.gas       0x600c       0xb450                          
    value   490.action.gas       0x0          0x5208                          
    value   491.result.gasUsed   0x1fe33      0x1a587                         
    value   491.action.gas       0x25195      0x2aea1                         
    value   503.action.gas       0x16247      0x1d5cb                         
    value   504.action.gas       0x0          0x5208                          
    value   505.action.gas       0x1b21b      0x207db                         
    value   506.result.gasUsed   0x1b5af      0x1aabf                         
    value   506.action.gas       0x1f729      0x2631d                         
    value   513.action.gas       0xef06       0x144fe                         
    value   520.result.gasUsed   0x1c260      0x1b770                         
    value   520.action.gas       0x25dce      0x2c9aa                         
    value   527.result.gasUsed   0x8b995      0x86e95                         
    value   527.action.gas       0xb7d2b      0xbe33b                         
    value   584.result.gasUsed   0x13a7e      0x127be                         
    value   584.action.gas       0x13a7e      0x193da                         
    value   586.action.gas       0x6073       0xb4af                          
    value   587.result.gasUsed   0x1e810      0x18674                         
    value   587.action.gas       0x263a3      0x2c3fb                         
    value   603.result.gasUsed   0x29264      0x274b4                         
    value   603.action.gas       0x33d4d      0x39a71                         
    value   614.action.gas       0x626e       0xb6b2                          
    value   615.action.gas       0x6054       0xb60c                          
    value   616.action.gas       0xe632       0x13f2a                         
    value   619.action.gas       0x1624c      0x1d5e8                         
    value   620.action.gas       0x2a7ab      0x30673                         
    value   623.result.gasUsed   0x28f6d      0x2847d                         
    value   623.action.gas       0x2e97c      0x34498                         
    value   632.action.gas       0x0          0x5208                          
    value   633.result.gasUsed   0xb2a0       0xa7b0                          
    value   633.action.gas       0xf586       0x15022                         
    value   635.action.gas       0x6221       0xb665                          
    value   636.result.gasUsed   0x46718      0x44968                         
    value   636.action.gas       0x577c0      0x5ce34                         
    value   650.action.gas       0x6073       0xb4b7                          
    value   651.action.gas       0x8981       0xdd71                          
    value   654.result.gasUsed   0x3ccd7      0x37f1b                         
    value   654.action.gas       0x522d2      0x5795a                         
    value   694.action.gas       0x62d6       0xb7b6                          
    value   695.result.gasUsed   0x73d5d      0x6ced1                         
    value   695.action.gas       0x99338      0xa7d88                         
    value   719.action.gas       0x12f44      0x183ac                         
    value   721.action.gas       0x6257       0xb647                          
    value   722.result.gasUsed   0x2d2b9      0x27a0d                         
    value   722.action.gas       0x3818a      0x3de72                         
    value   734.action.gas       0x2e22b      0x33ca7                         
    value   742.action.gas       0x0          0x5208                          
    value   743.action.gas       0x626e       0xb6b2                          
    value   744.action.gas       0x0          0x5208                          
    value   745.action.gas       0x239bb      0x28c8f                         
    value   746.action.gas       0x2dbec      0x347d8                         
    value   747.action.gas       0x2dbec      0x347d8                         
    value   748.result.gasUsed   0x240d2      0x21832                         
    value   748.action.gas       0x2d26c      0x32e20                         
    value   760.result.gasUsed   0x3758a      0x311ee                         
    value   760.action.gas       0x448a0      0x4d124                         
    value   772.result.gasUsed   0x28e8       0x20ba                          
    value   772.action.gas       0x693a       0xbdd2                          
    value   773.action.gas       0x3ace2      0x45c8a                         
    value   776.action.gas       0x12f44      0x183ac                         
    value   778.result.gasUsed   0x1da16      0x1cf26                         
    value   778.action.gas       0x2fd5d      0x35031                         
    value   782.action.gas       0x162f4      0x1d678                         
    value   783.result.gasUsed   0x437da      0x3cc6e                         
    value   783.action.gas       0x43b34      0x497b8                         
    value   802.error            out of gas   OutOfGas                        
     type   802.result           NoneType     dict                            
    value   804.error            out of gas   OutOfGas                        
     type   804.result           NoneType     dict                            
    value   805.action.gas       0x6073       0xb4b7                          
    value   806.result.gasUsed   0x1b5af      0x1aabf                         
    value   806.action.gas       0x1f729      0x2631d                         
    value   813.action.gas       0x6073       0xb4b7                          
    value   814.action.gas       0x0          0x5208                          
    value   815.result.gasUsed   0xcdfd       0xbb3d                          
    value   815.action.gas       0xee40       0x143f4                         
    value   817.action.gas       0xb411       0x109d1                         
    value   818.result.gasUsed   0x1b9b1      0x1aec1                         
    value   818.action.gas       0x1c22c      0x22e20                         
    value   825.action.gas       0xdb13       0x12f9f                         
    value   826.action.gas       0x0          0x5208                          
    value   827.action.gas       0x0          0x5208                          
    value   828.action.gas       0x162ba      0x1d63e                         
    value   829.action.gas       0x0          0x5208                          
    value   830.action.gas       0x20527      0x27107                         
    value   832.action.gas       0x7148       0xc350                          
    value   833.action.gas       0x0          0x5208                          
    value   834.action.gas       0xb9bd       0x10e19                         
    value   835.result.gasUsed   0x14db5      0x137d5                         
    value   835.action.gas       0x2311f      0x28863                         
    value   845.result.gasUsed   0x189c4      0x17ed4                         
    value   845.action.gas       0x43340      0x493e0                         
    value   857.action.gas       0xd6998      0xdbba0                         
    value   858.action.gas       0x14858      0x19b2c                         
    value   860.result.gasUsed   0x3b5f7      0x39847                         
    value   860.action.gas       0x410b7      0x46c1b                         
    value   880.action.gas       0x0          0x5208                          
    value   881.action.gas       0x7e0f       0xed07                          
    value   882.action.gas       0x57c1       0xad75                          
    value   883.result.gasUsed   0x97db5      0x7e649                         
    value   883.action.gas       0xe663f      0xeb99f                         
    value   917.action.gas       0x37e88      0x3d090                         
    value   918.action.gas       0x626e       0xb6b2                          
    value   919.action.gas       0x54f98      0x5a550                         
    value   920.action.gas       0x4e7a       0xa336                          
    value   921.action.gas       0x9ea2       0xf35e                          
    value   922.action.gas       0xd60e0      0xdbba0                         
    value   931.action.gas       0xd60d4      0xdbba0                         
    value   934.result.gasUsed   0x50be6      0x422b2                         
    value   934.action.gas       0x8c700      0x927c0                         
    value   949.action.gas       0xd6060      0xdbba0                         
    value   952.action.gas       0xd6024      0xdbba0                         
     keys   962                               transactionHash transactionPo...

┌─────────────────────────────┐
│ Discrepancies in trace_call │
└─────────────────────────────┘

args
────
- to_address: 0x6b175474e89094c44da98b954eedeac495271d0f
- trace_type: ['trace']
- function_abi: {'constant': True, 'inputs': [{'internalType': 'address', 'name': '', 'type':
'address'}], 'name': 'balanceOf', 'outputs': [{'internalType': 'uint256', 'name': '', 'type':
'uint256'}], 'payable': False, 'stateMutability': 'view', 'type': 'function'}
- function_parameters: ['0x5d3a536e4d6dbd6114cc1ead35777bab948e3643']
- block_number: 15103746

call
────
{'jsonrpc': '2.0', 'method': 'trace_call', 'params': [{'to': '0x6b175474e89094c44da98b954eedeac495271d0f', 'data': '0x70a082310000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643'}, ['trace'], '0xe67702'], 'id': 97934207523395998}

differences in response
───────────────────────
    type    index                erigon      reth     
    ──────────────────────────────────────────────────
    value   trace.0.action.gas   0x2fa9cc8   0x1c9c380

┌──────────────────────────────────┐
│ Discrepancies in trace_call_many │
└──────────────────────────────────┘

args
────
- calls: [{'to_address': '0x6b175474e89094c44da98b954eedeac495271d0f', 'function_abi': 
{'constant': True, 'inputs': [{'internalType': 'address', 'name': '', 'type': 'address'}], 
'name': 'balanceOf', 'outputs': [{'internalType': 'uint256', 'name': '', 'type': 'uint256'}],
'payable': False, 'stateMutability': 'view', 'type': 'function'}, 'function_parameters': 
['0x5d3a536e4d6dbd6114cc1ead35777bab948e3643'], 'trace_type': ['trace']}]
- trace_type: ['trace']

call
────
{'jsonrpc': '2.0', 'method': 'trace_callMany', 'params': [[[{'to': '0x6b175474e89094c44da98b954eedeac495271d0f', 'data': '0x70a082310000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643'}, ['trace']]], None], 'id': 501346092786441441}

differences in response
───────────────────────
    type    index                  erigon      reth     
    ────────────────────────────────────────────────────
    value   0.trace.0.action.gas   0x2fa9cc8   0x1c9c380

┌──────────────────────────────────────────────────┐
│ Discrepancies in trace_replay_block_transactions │
└──────────────────────────────────────────────────┘

args
────
- block_number: 15103746
- trace_type: ['trace']

call
────
{'jsonrpc': '2.0', 'method': 'trace_replayBlockTransactions', 'params': ['0xe67702', ['trace']], 'id': 887533958016906949}

differences in response
───────────────────────
    type    index                        erigon       reth    
    ──────────────────────────────────────────────────────────
    value   0.trace.0.action.gas         0x472ba      0x4c9c2 
    value   1.trace.0.action.gas         0x3b3b2      0x4cf62 
    value   2.trace.0.action.gas         0x30358      0x40388 
    value   3.trace.0.action.gas         0x0          0x5208  
    value   4.trace.0.action.gas         0x43f78      0x493e0 
    value   5.trace.0.action.gas         0x43f78      0x493e0 
    value   6.trace.0.action.gas         0x0          0x5208  
    value   7.trace.0.result.gasUsed     0x741c       0x615c  
    value   7.trace.0.action.gas         0x109b8      0x15f90 
    value   8.trace.0.action.gas         0x1f594      0x249f0 
    value   9.trace.0.action.gas         0x2e248      0x33450 
    value   10.trace.0.result.gasUsed    0x317bf      0x2e74f 
    value   10.trace.0.action.gas        0x4301f      0x49a37 
    value   11.trace.0.action.gas        0xfcd9       0x153b5 
    value   12.trace.0.result.gasUsed    0x1b9e0      0x1aef0 
    value   12.trace.0.action.gas        0x26980      0x2d44c 
    value   13.trace.0.action.gas        0xefc1       0x14379 
    value   14.trace.0.action.gas        0x7148       0xc350  
    value   15.trace.0.action.gas        0x7148       0xc350  
    value   16.trace.0.action.gas        0x7148       0xc350  
    value   17.trace.0.action.gas        0x0          0x5208  
    value   18.trace.0.result.gasUsed    0x741c       0x615c  
    value   18.trace.0.action.gas        0x130c8      0x186a0 
    value   19.trace.0.action.gas        0x0          0x5208  
    value   20.trace.0.action.gas        0xeedd8      0xf4240 
    value   21.trace.0.action.gas        0x14820      0x19a28 
    value   22.trace.0.action.gas        0x0          0x5208  
    value   23.trace.0.action.gas        0x7148       0xc350  
    value   24.trace.0.action.gas        0x7148       0xc350  
    value   25.trace.0.action.gas        0x7148       0xc350  
    value   26.trace.0.action.gas        0x7148       0xc350  
    value   27.trace.0.result.gasUsed    0x5fb5       0x4cf5  
    value   27.trace.0.action.gas        0xb9c9       0x10e3d 
    value   28.trace.0.action.gas        0x0          0x5208  
    value   29.trace.0.action.gas        0x0          0x5208  
    value   30.trace.0.action.gas        0x691a       0xbeda  
    value   31.trace.0.action.gas        0x691a       0xbeda  
    value   32.trace.0.action.gas        0x691a       0xbeda  
    value   33.trace.0.action.gas        0x20527      0x27107 
    value   34.trace.0.action.gas        0x691a       0xbeda  
    value   35.trace.0.action.gas        0x691a       0xbeda  
    value   36.trace.0.action.gas        0x691a       0xbeda  
    value   37.trace.0.action.gas        0x691a       0xbeda  
    value   38.trace.0.action.gas        0x12ffc      0x186a0 
    value   39.trace.0.action.gas        0xf3b8       0x14820 
    value   40.trace.0.action.gas        0x16d98      0x1d760 
    value   41.trace.0.action.gas        0x0          0x5208  
    value   42.trace.0.action.gas        0x0          0x5208  
    value   43.trace.0.action.gas        0x0          0x5208  
    value   44.trace.0.action.gas        0x10d88      0x15f90 
    value   45.trace.0.result.gasUsed    0x2c822      0x26f76 
    value   45.trace.0.action.gas        0x2f9b0      0x36b84 
    value   46.trace.0.result.gasUsed    0x5000       0x4000  
    value   46.trace.0.action.gas        0xb784       0x10d8c 
    value   47.trace.0.action.gas        0xa410       0xf618  
    value   48.trace.0.action.gas        0x9fe9       0xf451  
    value   49.trace.0.action.gas        0x8981       0xdd71  
    value   50.trace.0.action.gas        0x0          0x5208  
    value   51.trace.0.action.gas        0x7e0f       0xed67  
    value   52.trace.0.action.gas        0x6073       0xb4b7  
    value   53.trace.0.action.gas        0x0          0x5208  
    value   54.trace.0.action.gas        0x0          0x5208  
    value   55.trace.0.action.gas        0x0          0x5208  
    value   56.trace.0.action.gas        0x0          0x5208  
    value   57.trace.0.action.gas        0x0          0x5208  
    value   58.trace.0.action.gas        0x0          0x5208  
    value   59.trace.0.action.gas        0x0          0x5208  
    value   60.trace.0.result.gasUsed    0x2382b      0x22d3b 
    value   60.trace.0.action.gas        0x3c505      0x41839 
    value   61.trace.0.result.gasUsed    0x1fcac      0x1f1bc 
    value   61.trace.0.action.gas        0x2c052      0x32b12 
    value   62.trace.0.action.gas        0xb944       0x10d88 
    value   63.trace.0.result.gasUsed    0x1f7ab      0x1ecbb 
    value   63.trace.0.action.gas        0x20026      0x26c1a 
    value   64.trace.0.result.gasUsed    0x282ec      0x277fc 
    value   64.trace.0.action.gas        0x427ec      0x493e0 
    value   65.trace.0.action.gas        0x626e       0xb65e  
    value   66.trace.0.action.gas        0x6073       0xb463  
    value   67.trace.0.action.gas        0x9e42       0xf3f6  
    value   68.trace.0.action.gas        0x6073       0xb463  
    value   69.trace.0.result.gasUsed    0x2055b      0x1fa6b 
    value   69.trace.0.action.gas        0x25962      0x2c482 
    value   70.trace.0.action.gas        0x20527      0x27047 
    value   71.trace.0.result.gasUsed    0x215b3      0x1e543 
    value   71.trace.0.action.gas        0x21e2e      0x28b06 
    value   72.trace.0.action.gas        0x7e0f       0xed4f  
    value   73.trace.0.action.gas        0x6073       0xb463  
    value   74.trace.0.action.gas        0x7b46       0xe61e  
    value   75.trace.0.action.gas        0x20dd6      0x278f6 
    value   76.trace.0.action.gas        0x606b       0xb45b  
    value   77.trace.0.result.gasUsed    0x219c5      0x1fc15 
    value   77.trace.0.action.gas        0x22240      0x28e34 
    value   78.trace.0.action.gas        0xad8b       0x1033f 
    value   79.trace.0.action.gas        0x6a78       0xbec8  
    value   80.trace.0.result.gasUsed    0x27691      0x24621 
    value   80.trace.0.action.gas        0x27f0c      0x2eb00 
    value   81.trace.0.result.gasUsed    0x1b5af      0x1aabf 
    value   81.trace.0.action.gas        0x1be2a      0x22a12 
    value   82.trace.0.action.gas        0x603f       0xb42f  
    value   83.trace.0.action.gas        0x14bf6      0x19f56 
    value   84.trace.0.action.gas        0x603d       0xb42d  
    value   85.trace.0.result.gasUsed    0x1b9b1      0x1aec1 
    value   85.trace.0.action.gas        0x1c22c      0x22e20 
    value   86.trace.0.action.gas        0xacba0      0xb4aa0 
    value   87.trace.0.action.gas        0x626e       0xb65e  
    value   88.trace.0.result.gasUsed    0x1fcd0      0x1df20 
    value   88.trace.0.action.gas        0x2054b      0x2713f 
    value   89.trace.0.action.gas        0x5ffd       0xb3ed  
    value   90.trace.0.action.gas        0x626e       0xb65e  
    value   91.trace.0.action.gas        0x626e       0xb65e  
    value   92.trace.0.result.gasUsed    0x1f87b      0x1ed8b 
    value   92.trace.0.action.gas        0x200f6      0x26cd2 
    value   93.trace.0.action.gas        0x6282       0xb672  
    value   94.trace.0.action.gas        0x38450      0x3e050 
    value   95.trace.0.action.gas        0x1be2a      0x22a12 
    value   96.trace.0.result.gasUsed    0x1b5af      0x1aabf 
    value   96.trace.0.action.gas        0x1be2a      0x22a12 
    value   97.trace.0.result.gasUsed    0x250b8      0x245c8 
    value   97.trace.0.action.gas        0x25933      0x2c533 
    value   98.trace.0.action.gas        0x6073       0xb463  
    value   99.trace.0.result.gasUsed    0x872a       0x746a  
    value   99.trace.0.action.gas        0x872a       0xde76  
    value   100.trace.0.action.gas       0x626e       0xb65e  
    value   101.trace.0.action.gas       0x5f64       0xb4c8  
    value   102.trace.0.result.gasUsed   0x2d4c4      0x2a454 
    value   102.trace.0.action.gas       0x2dd3f      0x3494b 
    value   103.trace.0.result.gasUsed   0xa27c       0x8fbc  
    value   103.trace.0.action.gas       0x11e94      0x17448 
    value   104.trace.0.result.gasUsed   0x2ae7c      0x27e0c 
    value   104.trace.0.action.gas       0x2dd3f      0x3493f 
    value   105.trace.0.action.gas       0xb998       0x10d88 
    value   106.trace.0.action.gas       0xb998       0x10d88 
    value   107.trace.0.action.gas       0xb998       0x10d88 
    value   108.trace.0.action.gas       0xb998       0x10d88 
    value   109.trace.0.result.gasUsed   0x2bf4a      0x232a2 
    value   109.trace.0.action.gas       0x48733      0x4f31b 
    value   110.trace.0.action.gas       0x0          0x5208  
    value   111.trace.0.result.gasUsed   0x43a24      0x388cc 
    value   111.trace.0.action.gas       0x44640      0x4a294 
    value   112.trace.0.action.gas       0x26a88      0x2bf20 
    value   113.trace.0.action.gas       0x26a88      0x2bf20 
    value   114.trace.0.action.gas       0x0          0x5208  
    value   115.trace.0.action.gas       0x1c22c      0x22e20 
    value   116.trace.0.result.gasUsed   0x285f9      0x27b09 
    value   116.trace.0.action.gas       0x42303      0x4a023 
    value   117.trace.0.action.gas       0x6073       0xb463  
    value   118.trace.0.action.gas       0x37c1c      0x3d090 
    value   119.trace.0.result.gasUsed   0x441e8      0x372e0 
    value   119.trace.0.action.gas       0x54a7a      0x5c2ae 
    value   120.trace.0.action.gas       0x0          0x5208  
    value   121.trace.0.action.gas       0x74cac      0x7a120 
    value   122.trace.0.action.gas       0x74cac      0x7a120 
    value   123.trace.0.action.gas       0x74cd0      0x7a120 
    value   124.trace.0.action.gas       0x74cb8      0x7a120 
    value   125.trace.0.action.gas       0x0          0x5208  
    value   126.trace.0.action.gas       0x74cac      0x7a120 
    value   127.trace.0.action.gas       0x74cb8      0x7a120 
    value   128.trace.0.action.gas       0x74cb8      0x7a120 
    value   129.trace.0.action.gas       0xbd80       0x11170 
    value   130.trace.0.action.gas       0xbd80       0x11170 
    value   131.trace.0.action.gas       0xbd80       0x11170 
    value   132.trace.0.action.gas       0x1be2a      0x22a12 
    value   133.trace.0.action.gas       0x0          0x5208  
    value   134.trace.0.action.gas       0x0          0x5208  
    value   135.trace.0.result.gasUsed   0x4fe48      0x49aac 
    value   135.trace.0.action.gas       0x87452      0x95fb2 
    value   136.trace.0.action.gas       0x0          0x5208  
    value   137.trace.0.action.gas       0x0          0x5208  
    value   138.trace.0.action.gas       0x1d850      0x24be0 
    value   139.trace.0.action.gas       0x0          0x5208  
    value   140.trace.0.action.gas       0x2a4ce      0x310ce 
    value   141.trace.0.action.gas       0x2da4f      0x32f0b 
    value   142.trace.0.action.gas       0x0          0x5208  
    value   143.trace.0.action.gas       0x0          0x5208  
    value   144.trace.0.result.gasUsed   0x500c1      0x4009b 
    value   144.trace.0.action.gas       0x5d97a      0x6791e 
    value   145.trace.0.action.gas       0x0          0x5208  
    value   146.trace.0.action.gas       0x0          0x5208  
    value   147.trace.0.action.gas       0x0          0x5208  
    value   148.trace.0.action.gas       0x0          0x5208  
    value   149.trace.0.action.gas       0x0          0x5208  
    value   150.trace.0.action.gas       0x262c8      0x2cca0 
    value   151.trace.0.action.gas       0x0          0x5208  
    value   152.trace.0.action.gas       0x0          0x5208  
    value   153.trace.0.action.gas       0xace64      0xb4aa0 
    value   154.trace.0.action.gas       0x0          0x5208  
    value   155.trace.0.action.gas       0x0          0x5208  
    value   156.trace.0.action.gas       0xd9cf       0x12e4f 
    value   157.trace.0.action.gas       0x33765      0x3a34d 
    value   158.trace.0.action.gas       0x0          0x5208  
    value   159.trace.0.action.gas       0xbd08       0x11170 
    value   160.trace.0.action.gas       0x0          0x5208  
    value   161.trace.0.action.gas       0xbb32       0x10f9a 
    value   162.trace.0.result.gasUsed   0x1ffd1      0x1ed11 
    value   162.trace.0.action.gas       0x21c86      0x2729a 
    value   163.trace.0.action.gas       0x5208       0xa410  
    value   164.trace.0.action.gas       0x71b7       0xc61f  
    value   165.trace.0.action.gas       0x0          0x5208  
    value   166.trace.0.action.gas       0x0          0x5208  
    value   167.trace.0.action.gas       0x0          0x5208  
    value   168.trace.0.action.gas       0x162ba      0x1d63e 
    value   169.trace.0.action.gas       0x0          0x5208  
    value   170.trace.0.action.gas       0x0          0x5208  
    value   171.trace.0.action.gas       0x32cd6      0x3aa0e 
    value   172.trace.0.action.gas       0x20527      0x27107 
    value   173.trace.0.action.gas       0x0          0x5208  
    value   174.trace.0.result.gasUsed   0x1b569      0x15dee 
    value   174.trace.0.action.gas       0x22940      0x28658 
    value   175.trace.0.action.gas       0x6257       0xb647  
    value   176.trace.0.action.gas       0x879b       0xdd53  
    value   177.trace.0.action.gas       0x790cb      0x7e313 
    value   178.trace.0.action.gas       0x62d6       0xb7b6  
    value   179.trace.0.action.gas       0x600c       0xb450  
    value   180.trace.0.action.gas       0x0          0x5208  
    value   181.trace.0.result.gasUsed   0x1fe33      0x1a587 
    value   181.trace.0.action.gas       0x25195      0x2aea1 
    value   182.trace.0.action.gas       0x16247      0x1d5cb 
    value   183.trace.0.action.gas       0x0          0x5208  
    value   184.trace.0.action.gas       0x1b21b      0x207db 
    value   185.trace.0.result.gasUsed   0x1b5af      0x1aabf 
    value   185.trace.0.action.gas       0x1f729      0x2631d 
    value   186.trace.0.action.gas       0xef06       0x144fe 
    value   187.trace.0.result.gasUsed   0x1c260      0x1b770 
    value   187.trace.0.action.gas       0x25dce      0x2c9aa 
    value   188.trace.0.result.gasUsed   0x8b995      0x86e95 
    value   188.trace.0.action.gas       0xb7d2b      0xbe33b 
    value   189.trace.0.result.gasUsed   0x13a7e      0x127be 
    value   189.trace.0.action.gas       0x13a7e      0x193da 
    value   190.trace.0.action.gas       0x6073       0xb4af  
    value   191.trace.0.result.gasUsed   0x1e810      0x18674 
    value   191.trace.0.action.gas       0x263a3      0x2c3fb 
    value   192.trace.0.result.gasUsed   0x29264      0x274b4 
    value   192.trace.0.action.gas       0x33d4d      0x39a71 
    value   193.trace.0.action.gas       0x626e       0xb6b2  
    value   194.trace.0.action.gas       0x6054       0xb60c  
    value   195.trace.0.action.gas       0xe632       0x13f2a 
    value   196.trace.0.action.gas       0x1624c      0x1d5e8 
    value   197.trace.0.action.gas       0x2a7ab      0x30673 
    value   198.trace.0.result.gasUsed   0x28f6d      0x2847d 
    value   198.trace.0.action.gas       0x2e97c      0x34498 
    value   199.trace.0.action.gas       0x0          0x5208  
    value   200.trace.0.result.gasUsed   0xb2a0       0xa7b0  
    value   200.trace.0.action.gas       0xf586       0x15022 
    value   201.trace.0.action.gas       0x6221       0xb665  
    value   202.trace.0.result.gasUsed   0x46718      0x44968 
    value   202.trace.0.action.gas       0x577c0      0x5ce34 
    value   203.trace.0.action.gas       0x6073       0xb4b7  
    value   204.trace.0.action.gas       0x8981       0xdd71  
    value   205.trace.0.result.gasUsed   0x3ccd7      0x37f1b 
    value   205.trace.0.action.gas       0x522d2      0x5795a 
    value   206.trace.0.action.gas       0x62d6       0xb7b6  
    value   207.trace.0.result.gasUsed   0x73d5d      0x6ced1 
    value   207.trace.0.action.gas       0x99338      0xa7d88 
    value   208.trace.0.action.gas       0x12f44      0x183ac 
    value   209.trace.0.action.gas       0x6257       0xb647  
    value   210.trace.0.result.gasUsed   0x2d2b9      0x27a0d 
    value   210.trace.0.action.gas       0x3818a      0x3de72 
    value   211.trace.0.action.gas       0x2e22b      0x33ca7 
    value   212.trace.0.action.gas       0x0          0x5208  
    value   213.trace.0.action.gas       0x626e       0xb6b2  
    value   214.trace.0.action.gas       0x0          0x5208  
    value   215.trace.0.action.gas       0x239bb      0x28c8f 
    value   216.trace.0.action.gas       0x2dbec      0x347d8 
    value   217.trace.0.action.gas       0x2dbec      0x347d8 
    value   218.trace.0.result.gasUsed   0x240d2      0x21832 
    value   218.trace.0.action.gas       0x2d26c      0x32e20 
    value   219.trace.0.result.gasUsed   0x3758a      0x311ee 
    value   219.trace.0.action.gas       0x448a0      0x4d124 
    value   220.trace.0.result.gasUsed   0x28e8       0x20ba  
    value   220.trace.0.action.gas       0x693a       0xbdd2  
    value   221.trace.0.action.gas       0x3ace2      0x45c8a 
    value   222.trace.0.action.gas       0x12f44      0x183ac 
    value   223.trace.0.result.gasUsed   0x1da16      0x1cf26 
    value   223.trace.0.action.gas       0x2fd5d      0x35031 
    value   224.trace.0.action.gas       0x162f4      0x1d678 
    value   225.trace.0.result.gasUsed   0x437da      0x3cc6e 
    value   225.trace.0.action.gas       0x43b34      0x497b8 
    value   225.trace.19.error           out of gas   OutOfGas
     type   225.trace.19.result          NoneType     dict    
    value   225.trace.21.error           out of gas   OutOfGas
     type   225.trace.21.result          NoneType     dict    
    value   226.trace.0.action.gas       0x6073       0xb4b7  
    value   227.trace.0.result.gasUsed   0x1b5af      0x1aabf 
    value   227.trace.0.action.gas       0x1f729      0x2631d 
    value   228.trace.0.action.gas       0x6073       0xb4b7  
    value   229.trace.0.action.gas       0x0          0x5208  
    value   230.trace.0.result.gasUsed   0xcdfd       0xbb3d  
    value   230.trace.0.action.gas       0xee40       0x143f4 
    value   231.trace.0.action.gas       0xb411       0x109d1 
    value   232.trace.0.result.gasUsed   0x1b9b1      0x1aec1 
    value   232.trace.0.action.gas       0x1c22c      0x22e20 
    value   233.trace.0.action.gas       0xdb13       0x12f9f 
    value   234.trace.0.action.gas       0x0          0x5208  
    value   235.trace.0.action.gas       0x0          0x5208  
    value   236.trace.0.action.gas       0x162ba      0x1d63e 
    value   237.trace.0.action.gas       0x0          0x5208  
    value   238.trace.0.action.gas       0x20527      0x27107 
    value   239.trace.0.action.gas       0x7148       0xc350  
    value   240.trace.0.action.gas       0x0          0x5208  
    value   241.trace.0.action.gas       0xb9bd       0x10e19 
    value   242.trace.0.result.gasUsed   0x14db5      0x137d5 
    value   242.trace.0.action.gas       0x2311f      0x28863 
    value   243.trace.0.result.gasUsed   0x189c4      0x17ed4 
    value   243.trace.0.action.gas       0x43340      0x493e0 
    value   244.trace.0.action.gas       0xd6998      0xdbba0 
    value   245.trace.0.action.gas       0x14858      0x19b2c 
    value   246.trace.0.result.gasUsed   0x3b5f7      0x39847 
    value   246.trace.0.action.gas       0x410b7      0x46c1b 
    value   247.trace.0.action.gas       0x0          0x5208  
    value   248.trace.0.action.gas       0x7e0f       0xed07  
    value   249.trace.0.action.gas       0x57c1       0xad75  
    value   250.trace.0.result.gasUsed   0x97db5      0x7e649 
    value   250.trace.0.action.gas       0xe663f      0xeb99f 
    value   251.trace.0.action.gas       0x37e88      0x3d090 
    value   252.trace.0.action.gas       0x626e       0xb6b2  
    value   253.trace.0.action.gas       0x54f98      0x5a550 
    value   254.trace.0.action.gas       0x4e7a       0xa336  
    value   255.trace.0.action.gas       0x9ea2       0xf35e  
    value   256.trace.0.action.gas       0xd60e0      0xdbba0 
    value   257.trace.0.action.gas       0xd60d4      0xdbba0 
    value   258.trace.0.result.gasUsed   0x50be6      0x422b2 
    value   258.trace.0.action.gas       0x8c700      0x927c0 
    value   259.trace.0.action.gas       0xd6060      0xdbba0 
    value   260.trace.0.action.gas       0xd6024      0xdbba0 

┌───────────────────────────────────────────┐
│ Discrepancies in trace_replay_transaction │
└───────────────────────────────────────────┘

args
────
- 0xd01212e8ab48d2fd2ea9c4f33f8670fd1cf0cfb09d2e3c6ceddfaf54152386e5
- trace_type: ['trace']

call
────
{'jsonrpc': '2.0', 'method': 'trace_replayTransaction', 'params': ['0xd01212e8ab48d2fd2ea9c4f33f8670fd1cf0cfb09d2e3c6ceddfaf54152386e5', ['trace']], 'id': 976046032368697410}

differences in response
───────────────────────
    type    index                erigon   reth  
    ────────────────────────────────────────────
    value   trace.0.action.gas   0x6013   0xb41b

┌────────────────────────────────────┐
│ Discrepancies in trace_transaction │
└────────────────────────────────────┘

args
────
- 0xd01212e8ab48d2fd2ea9c4f33f8670fd1cf0cfb09d2e3c6ceddfaf54152386e5

call
────
{'jsonrpc': '2.0', 'method': 'trace_transaction', 'params': ['0xd01212e8ab48d2fd2ea9c4f33f8670fd1cf0cfb09d2e3c6ceddfaf54152386e5'], 'id': 893054561422084770}

differences in response
───────────────────────
    type    index          erigon   reth  
    ──────────────────────────────────────
    value   0.action.gas   0x6013   0xb41b

┌───────────────────────┐
│ Equality Test Summary │
└───────────────────────┘

No differences detected (n = 12)
────────────────────────────────
- eth_call
- eth_gasPrice
- eth_getBalance
- eth_getBlockByHash
- eth_getBlockByNumber
- eth_getChainId
- eth_getCode
- eth_getLogs
- eth_getStorageAt
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionReceipt

Differences detected (n = 7)
────────────────────────────
- eth_feeHistory
- trace_block
- trace_call
- trace_call_many
- trace_replay_block_transactions
- trace_replay_transaction
- trace_transaction

summary saved to: 
/var/folders/ml/dymw9nkx51j7scsxc3qpqvl80000gp/T/tmpd3311vr1/equality_results.json

Steps to reproduce

flood all erigon=$IP_ERIGON:8545 reth=$IP_RETH:8545 --equality

Node logs

No response

Platform(s)

Linux (x86)

What version/commit are you on?

v0.1.0-alpha.3-dbafe23c

What database version are you on?

Current database version: 1
Local database version: 1

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct
@sslivkoff sslivkoff added C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled labels Jul 14, 2023
@sslivkoff
Copy link
Member Author

related issues
#2457
#3678
#3721

@sslivkoff
Copy link
Member Author

added almost every trace method to the flood equality test

seeing discrepancies in these methods

Differences detected (n = 23)
─────────────────────────────
- debug_traceBlockByHash
- debug_traceBlockByHash_prestateTracer
- debug_traceBlockByNumber
- debug_traceBlockByNumber_prestateTracer
- debug_traceCall
- debug_traceCall_prestateTracer
- debug_traceTransaction
- debug_traceTransaction_prestateTracer
- eth_feeHistory
- trace_block
- trace_call
- trace_call_many
- trace_call_many_state_diff
- trace_call_many_vm_trace
- trace_call_state_diff
- trace_call_vm_trace
- trace_replay_block_transactions
- trace_replay_block_transactions_state_diff
- trace_replay_block_transactions_vm_traces
- trace_replay_transaction
- trace_replay_transaction_state_diff
- trace_replay_transaction_vm_trace
- trace_transaction

@onbjerg onbjerg added A-rpc Related to the RPC implementation and removed S-needs-triage This issue needs to be labelled labels Jul 19, 2023
@onbjerg onbjerg added this to the 0.1.0-alpha.5 milestone Jul 19, 2023
mattsse pushed a commit to paradigmxyz/revm-inspectors that referenced this issue Jul 25, 2024
## Description

This pull request is Part 1/2 of fixing the bug where the `gas` and
`gasUsed` fields in Parity Trace root are incorrect.

Part 2/2 paradigmxyz/reth#9761

## Related Issues and Pull Requests

- Follow: ethereum/go-ethereum#27029
- Improve: paradigmxyz/reth#3678 and paradigmxyz/reth#3719
- Fix: paradigmxyz/reth#9142 with #170 
- Update: paradigmxyz/reth#3782

## Problem

The `gas` and `gasUsed` fields in Geth Debug Trace root should be the
gas limit and gas used for the entire transaction.

However, two fields in Parity Trace root should be the original ones.

### Reproducible Example

With the latest version Reth v1.0.3, using `trace_transaction()` to
trace
the transaction
`0x03128677ee3a9623d20f3c677f423ccc592d126374bf32e331343dd1bdf38b61`

```
curl http://localhost:8545 \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"trace_transaction","params":["0x03128677ee3a9623d20f3c677f423ccc592d126374bf32e331343dd1bdf38b61"],"id":1,"jsonrpc":"2.0"}'  
```

**From Reth**

```
gas: 0x55493 (349331)
gasUsed: 0x32d16 (208150)
```

**From
[Etherscan](https://etherscan.io/vmtrace?txhash=0x03128677ee3a9623d20f3c677f423ccc592d126374bf32e331343dd1bdf38b61&type=parity#raw)
and QuickNode**

```
gas: 0x4f227 (324135)
gasUsed: 0x36622 (222754)
```

## Solution for `revm-inspectors`

1. Not modify `gas_limit` and `gas_used` in the trace root

    ```diff
    - gas_limit = context.env.tx.gas_limit;
    - trace.set_root_trace_gas_used(gas_used);
- trace.gas_used = gas_used(context.spec_id(), gas.spent(),
gas.refunded() as u64);
    ```

2. The modification in Step 1 will cause another problem

The `gas` field for Geth Debug Trace root will also be reset (not the
gas limitation for the entire transaction).

therefore, can define `set_transaction_gas_limit()` and
`with_transaction_gas_limit()` for Geth Debug,

which is similar to current `set_transaction_gas_used()` and
`with_transaction_gas_used()` for Parity.

3. Then, modify the Reth Part: 

`crates/rpc/rpc/src/trace.rs` and `crates/rpc/rpc/src/debug.rs` to
completely fix the bug.

## Miscellaneous

- Actually, I love the current design, but the results are inconsistent
with those of others.

- When I used `make pr` to test the Reth Part, the issue
paradigmxyz/reth#9381 still exists for me.

    I should only skip tests for `lockfile` and test them seperately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior
Projects
Status: Todo
Development

No branches or pull requests

2 participants