EVM kernel: FA bridge queue bug storage migration
What
V45 storage migration to reinject a delayed transaction.
Why
This delayed transaction exposed an internal error caused by the FA bridge precompile contract deployement failure.
The txn did not go through and the associated amount got lost, we want to reexecute this transaction.
How
- Check chain id = mainnet
- Check we are in the rollup (to avoid double injection of rollup and evm node)
- Get a hold to the delayed inbox
- Read current timestamp and level
- Hard code everything else to match the missed txn value
- Write the txn into the delayed inbox path of the durable storage
Manually testing the MR
> RUST_LOG=info ./octez-evm-node replay blueprint 34093446 --data-dir latest --kernel evm_kernel.wasm
Dec 17 20:27:15.934 NOTICE │ running with default profile
Dec 17 20:27:17.841 NOTICE │ kernel d2842ae4dea4447b7adc2e01079ed9fe9bc7a393 successfully preloaded
[2025-12-17T19:27:17Z INFO octez_evm_node_wasm_runtime::write_debug] Migrating to V45
[2025-12-17T19:27:18Z INFO octez_evm_node_wasm_runtime::write_debug] Migrating to V46
[2025-12-17T19:27:18Z WARN octez_evm_node_wasm_runtime::write_debug] TOTO CP = Transaction { tx_hash: [130, 245, 7, 188, 90, 186, 15, 63, 96, 136, 192, 135, 194, 252, 216, 127, 199, 183, 243, 60, 148, 69, 227, 49, 236, 61, 31, 223, 69, 228, 190, 56], content: FaDeposit(FaDeposit { amount: 3125423349, receiver: 0x946a4f7a4ec44077c68b5a1b00fbe0b9610cf687, proxy: Some(0x19418d0af0f36865cdfbb2437dfed29ba34d3190), ticket_hash: 0x230644d9a1c45d22fbe46661c0f5f8658c4531bdb1a8e9731aad386addb61dff, inbox_level: 11228700, inbox_msg_id: 4 }) }
[2025-12-17T19:27:18Z INFO octez_evm_node_wasm_runtime::write_debug] Saved transaction 82f507bc5aba0f3f6088c087c2fcd87fc7b7f33c9445e331ec3d1fdf45e4be38 in the delayed inbox
[2025-12-17T19:27:18Z WARN octez_evm_node_wasm_runtime::write_debug] TOTO OG = Transaction { tx_hash: [130, 245, 7, 188, 90, 186, 15, 63, 96, 136, 192, 135, 194, 252, 216, 127, 199, 183, 243, 60, 148, 69, 227, 49, 236, 61, 31, 223, 69, 228, 190, 56], content: FaDeposit(FaDeposit { amount: 3125423349, receiver: 0x946a4f7a4ec44077c68b5a1b00fbe0b9610cf687, proxy: Some(0x19418d0af0f36865cdfbb2437dfed29ba34d3190), ticket_hash: 0x230644d9a1c45d22fbe46661c0f5f8658c4531bdb1a8e9731aad386addb61dff, inbox_level: 11228700, inbox_msg_id: 4 }) }
[2025-12-17T19:27:18Z WARN octez_evm_node_wasm_runtime::write_debug] THOMAS = Ok(ExecutionOutcome { result: Success { reason: Return, gas_used: 80716, gas_refunded: 0, logs: [Log { address: 0xff00000000000000000000000000000000000002, data: LogData { topics: [0xb02d79c5657e344e23d91529b954c3087c60a974d598939583904a4f0b959614, 0x230644d9a1c45d22fbe46661c0f5f8658c4531bdb1a8e9731aad386addb61dff, 0x00000000000000000000000019418d0af0f36865cdfbb2437dfed29ba34d3190], data: 0x00000000000000000000000000000000000000000000000000000000000049be000000000000000000000000946a4f7a4ec44077c68b5a1b00fbe0b9610cf68700000000000000000000000000000000000000000000000000000000ba4a2cf50000000000000000000000000000000000000000000000000000000000ab561c0000000000000000000000000000000000000000000000000000000000000004 } }], output: Call(0x) }, withdrawals: [] })
[2025-12-17T19:27:18Z INFO octez_evm_node_wasm_runtime::write_debug] Storing block 34093446 at 2025-12-17T08:37:05Z containing 1 transaction(s) for 80716 gas used.
[2025-12-17T19:27:18Z INFO octez_evm_node_wasm_runtime::write_debug] Removing transaction 82f507bc5aba0f3f6088c087c2fcd87fc7b7f33c9445e331ec3d1fdf45e4be38 from the delayed inbox
Edited by plissi