reth icon indicating copy to clipboard operation
reth copied to clipboard

`Transaction Reorg - Check Blockhash` hive test fails

Open Rjected opened this issue 2 years ago • 0 comments

Describe the bug

The Transaction Reorg - Check Blockhash hive test (and its variants) fail because we encounter a transaction error during the reorg and report a valid block as INVALID.

Simulator logs:

... initial test block production

>> (650fcc13) {"jsonrpc":"2.0","id":26,"method":"engine_forkchoiceUpdatedV1","params":[{"headBlockHash":"0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6","safeBlockHash":"0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca","finalizedBlockHash":"0x298f75b096d23a052190f226310da27de3bc70fedb7fe324b779bdcecde23f50"},null]}
<< (650fcc13) {"jsonrpc":"2.0","result":{"payloadStatus":{"status":"VALID","latestValidHash":"0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6","validationError":null},"payloadId":null},"id":26}
>> (650fcc13) {"jsonrpc":"2.0","id":19,"method":"eth_getTransactionReceipt","params":["0x595c6bc14dd1bab30043802ca10aa1d31be6b4997d45d16c33b5c05cce8a8b0f"]}
<< (650fcc13) {"jsonrpc":"2.0","result":{"transactionHash":"0x595c6bc14dd1bab30043802ca10aa1d31be6b4997d45d16c33b5c05cce8a8b0f","transactionIndex":"0x0","blockHash":"0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6","blockNumber":"0x6","from":"0xcf49fda3be353c69b41ed96333cd24302da4556f","to":"0x0000000000000000000000000000000000000317","cumulativeGasUsed":"0xa8e5","gasUsed":"0xa8e5","contractAddress":null,"logs":[],"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","status":"0x1","effectiveGasPrice":"0x6fc23ac00","type":"0x0"},"id":19}
>> (650fcc13) {"jsonrpc":"2.0","id":27,"method":"engine_newPayloadV1","params":[{"parentHash":"0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca","feeRecipient":"0x0000000000000000000000000000000000000000","stateRoot":"0x6e82d96c559bff9c6faae7a095b7423ac2d9c3d6b71ee2a5d99a432c42d235a6","receiptsRoot":"0x974da07e0f6f8ed5e9369117bfc7c7feacf233d2ca19bb7e4163ca0f2b515e7c","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","prevRandao":"0xc3fd6fe9c36e9d48479dc6429e06a771cab572ee125eeaf1e68fe0b92836c048","blockNumber":"0x6","gasLimit":"0x2fefd8","gasUsed":"0xa8e5","timestamp":"0x123a","extraData":"0x01","baseFeePerGas":"0x1ac012b7","blockHash":"0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0","transactions":["0xf885808506fc23ac00830124f894000000000000000000000000000000000000031780a0000000000000000000000000000000000000000000000000000000000000000032a04e1c0406759683865d6e38a1c4e7a50e4dcb0cfd6702bb380594d2b8d5f244ada05930a8b78de184d87d55c7702c24d435b6f37a37b9f058f2c17508f18a29e926"]}]}
<< (650fcc13) {"jsonrpc":"2.0","result":{"status":"INVALID","latestValidHash":"0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca","validationError":"EVM reported invalid transaction (0x595c6bc14dd1bab30043802ca10aa1d31be6b4997d45d16c33b5c05cce8a8b0f): Transaction(LackOfFundForGasLimit { gas_limit: 0x0000000000000000000000000000000000000000000000000007fe5cf2bea000_U256, balance: 0x0000000000000000000000000000000000000000000000000000000000000000_U256 })"},"id":27}
DEBUG (Transaction Reorg - Check Blockhash): Failed `Expect*` routine called from: file=/source/suites/engine/tests.go, line=3116
FAIL (Transaction Reorg - Check Blockhash): Unexpected status response on EngineNewPayloadV1: INVALID, expected=VALID, payload={
 "parentHash": "0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca",
 "feeRecipient": "0x0000000000000000000000000000000000000000",
 "stateRoot": "0x6e82d96c559bff9c6faae7a095b7423ac2d9c3d6b71ee2a5d99a432c42d235a6",
 "receiptsRoot": "0x974da07e0f6f8ed5e9369117bfc7c7feacf233d2ca19bb7e4163ca0f2b515e7c",
 "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
 "prevRandao": "0xc3fd6fe9c36e9d48479dc6429e06a771cab572ee125eeaf1e68fe0b92836c048",
 "blockNumber": "0x6",
 "gasLimit": "0x2fefd8",
 "gasUsed": "0xa8e5",
 "timestamp": "0x123a",
 "extraData": "0x01",
 "baseFeePerGas": "0x1ac012b7",
 "blockHash": "0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0",
 "transactions": [
  "0xf885808506fc23ac00830124f894000000000000000000000000000000000000031780a0000000000000000000000000000000000000000000000000000000000000000032a04e1c0406759683865d6e38a1c4e7a50e4dcb0cfd6702bb380594d2b8d5f244ada05930a8b78de184d87d55c7702c24d435b6f37a37b9f058f2c17508f18a29e926"
 ],
 "withdrawals": null
}
CLMocker: Closing engine client 650fcc13

Reth logs:

2023-06-07T19:15:35.105254Z TRACE connection{remote_addr=172.17.0.3:53332 conn_id=1}: rpc::eth: Serving engine_forkchoiceUpdatedV1
2023-06-07T19:15:35.105344Z TRACE consensus::engine: Received new forkchoice state update state=ForkchoiceState { head_block_hash: 0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6, safe_block_hash: 0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca, finalized_block_hash: 0x298f75b096d23a052190f226310da27de3bc70fedb7fe324b779bdcecde23f50 }
2023-06-07T19:15:35.105366Z TRACE blockchain_tree: Returning lowest buffered ancestor hash=0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6
2023-06-07T19:15:35.105373Z TRACE blockchain_tree: Making block canonical block_hash=0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6
2023-06-07T19:15:35.105414Z  INFO make_canonical{block_hash=0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6}: blockchain_tree: Committing new canonical chain: [(6, 0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6)]
2023-06-07T19:15:35.111457Z DEBUG consensus::engine: canonicalized new head hash=0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6 number=6
2023-06-07T19:15:35.111490Z TRACE blockchain_tree: Returning block by hash block_hash=0x298f75b096d23a052190f226310da27de3bc70fedb7fe324b779bdcecde23f50
2023-06-07T19:15:35.111519Z TRACE blockchain_tree: Returning block by hash block_hash=0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca
2023-06-07T19:15:35.111531Z TRACE blockchain_tree: Returning block by hash block_hash=0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6
2023-06-07T19:15:35.111800Z TRACE consensus::engine: Returning forkchoice status status=PayloadStatus { status: Valid, latest_valid_hash: Some(0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6) } state=ForkchoiceState { head_block_hash: 0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6, safe_block_hash: 0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca, finalized_block_hash: 0x298f75b096d23a052190f226310da27de3bc70fedb7fe324b779bdcecde23f50 }
2023-06-07T19:15:35.111832Z TRACE blockchain_tree: Returning canonical tip
2023-06-07T19:15:35.111849Z  INFO reth::cli: Forkchoice updated state=ForkchoiceState { head_block_hash: 0xf4758d7d2d0d601d7ab2e7b0fb04bbc789433b1c29f0dfae1af21d79dde66cf6, safe_block_hash: 0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca, finalized_block_hash: 0x298f75b096d23a052190f226310da27de3bc70fedb7fe324b779bdcecde23f50 }
2023-06-07T19:15:35.112590Z TRACE connection{remote_addr=172.17.0.3:34798 conn_id=2}: rpc::eth: Serving eth_getTransactionReceipt hash=0x595c6bc14dd1bab30043802ca10aa1d31be6b4997d45d16c33b5c05cce8a8b0f
2023-06-07T19:15:35.114144Z TRACE connection{remote_addr=172.17.0.3:53332 conn_id=1}: rpc::eth: Serving engine_newPayloadV1
2023-06-07T19:15:35.114347Z TRACE on_new_payload{block_hash=0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0 block_number=6 is_pipeline_idle=true}:try_insert_new_payload: blockchain_tree: Inserting block hash=0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0 number=6 parent_hash=0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca
2023-06-07T19:15:35.114487Z DEBUG on_new_payload{block_hash=0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0 block_number=6 is_pipeline_idle=true}:try_insert_new_payload:try_insert_validated_block{block=(6, 0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0)}:try_append_canonical_chain: blockchain_tree: Appending block to canonical chain head=0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0 parent=(5, 0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca)
2023-06-07T19:15:35.114592Z  INFO on_new_payload{block_hash=0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0 block_number=6 is_pipeline_idle=true}:try_insert_new_payload:try_insert_validated_block{block=(6, 0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0)}: blockchain_tree: return=Err(InsertBlockError { error: Execution(Validation(EVM { hash: 0x595c6bc14dd1bab30043802ca10aa1d31be6b4997d45d16c33b5c05cce8a8b0f, message: "Transaction(LackOfFundForGasLimit { gas_limit: 0x0000000000000000000000000000000000000000000000000007fe5cf2bea000_U256, balance: 0x0000000000000000000000000000000000000000000000000000000000000000_U256 })" })), hash: 0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0, number: 6, parent_hash: 0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca, num_txs: 1, .. })
2023-06-07T19:15:35.114616Z TRACE on_new_payload{block_hash=0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0 block_number=6 is_pipeline_idle=true}:try_insert_new_payload: consensus::engine: return=Err(InsertBlockError { error: Execution(Validation(EVM { hash: 0x595c6bc14dd1bab30043802ca10aa1d31be6b4997d45d16c33b5c05cce8a8b0f, message: "Transaction(LackOfFundForGasLimit { gas_limit: 0x0000000000000000000000000000000000000000000000000007fe5cf2bea000_U256, balance: 0x0000000000000000000000000000000000000000000000000000000000000000_U256 })" })), hash: 0x0afbfa03f779526f8a564af00dbbcb5fbe6df3c43b8353d20e075cd3c0969bf0, number: 6, parent_hash: 0xca80756ef074922c6b650936f617544f6998994e28b71889054c1341951c97ca, num_txs: 1, .. })

A description of the test and its implementation is here: https://github.com/ethereum/hive/blob/bbd52d324914d737469e666d5e5279b4ed01f8c6/simulators/ethereum/engine/suites/engine/tests.go#L3028-L3035

Steps to reproduce

Run the Transaction Reorg - Check Blockhash hive test:

./hive --client reth --sim "ethereum/engine" --sim.limit "engine-api/Transaction Reorg - Check Blockhash"

Node logs

No response

Platform(s)

No response

What version/commit are you on?

No response

Code of Conduct

  • [X] I agree to follow the Code of Conduct

Rjected avatar Jun 07 '23 20:06 Rjected