From c5fe06ddb8c82dd98b0e189b4b32c8d27e7c0fd7 Mon Sep 17 00:00:00 2001 From: Robin Salen Date: Mon, 9 Oct 2023 18:55:34 -0400 Subject: [PATCH] Make sure success is 0 in contract failure --- evm/src/cpu/kernel/asm/core/process_txn.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evm/src/cpu/kernel/asm/core/process_txn.asm b/evm/src/cpu/kernel/asm/core/process_txn.asm index 6a1b1c6c2d..779acab1da 100644 --- a/evm/src/cpu/kernel/asm/core/process_txn.asm +++ b/evm/src/cpu/kernel/asm/core/process_txn.asm @@ -420,7 +420,7 @@ contract_creation_fault_3: // stack: leftover_gas', retdest, success %delete_all_touched_addresses %delete_all_selfdestructed_addresses - %stack (leftover_gas, retdest, success) -> (retdest, success, leftover_gas) + %stack (leftover_gas, retdest, success) -> (retdest, 0, leftover_gas) JUMP contract_creation_fault_3_zero_leftover: @@ -432,7 +432,7 @@ contract_creation_fault_3_zero_leftover: %pay_coinbase_and_refund_sender %delete_all_touched_addresses %delete_all_selfdestructed_addresses - %stack (leftover_gas, retdest, success) -> (retdest, success, leftover_gas) + %stack (leftover_gas, retdest, success) -> (retdest, 0, leftover_gas) JUMP contract_creation_fault_4: @@ -444,7 +444,7 @@ contract_creation_fault_4: %pay_coinbase_and_refund_sender %delete_all_touched_addresses %delete_all_selfdestructed_addresses - %stack (leftover_gas, retdest, success) -> (retdest, success, leftover_gas) + %stack (leftover_gas, retdest, success) -> (retdest, 0, leftover_gas) JUMP