EIP-8456 The call status query instruction (CALLSTATUS) (CALLSTATUS Instruction)
Hegota Proposed for Inclusion · EVM & execution · EIP status Draft · created 2026-10-25
Adds a new instruction that reports, as a single number, whether the preceding CALL/CREATE-type instruction succeeded, reverted, halted exceptionally, or had a halt in a frame below it.
Why it is needed
For a contract to keep operating after a call failure, it needs to know the cause of the failure. A failure that ends in REVERT can safely be recorded as final, but a halt caused by, for example, running out of gas can be manipulated by the transaction sender adjusting the gas amount, so it should not be treated as final. The EVM currently exposes only the success flag, the return data, and the remaining gas, so contracts infer the cause through gas arithmetic that compares the GAS instruction's value against a threshold. This inference relies on the assumption that the gas schedule consumes all forwarded gas on an exceptional halt, but every repricing fork has broken these thresholds, and multidimensional gas proposals that charge state creation separately weaken this further. Return data does not help distinguish the cases either, since both a REVERT with no data and an exceptional halt leave empty return data. Because the EVM already knows whether a halt occurred each time a frame ends, exposing that fact directly makes it possible to determine finality without gas arithmetic.
What changes
Today
- The cause of a call failure must be inferred through gas arithmetic such as comparing the GAS value against a threshold
- Every gas repricing breaks that inference threshold
- In calls that pass through intermediaries such as proxies and wrappers, a halt can hide behind a revert reason or a false return
- Empty return data alone cannot distinguish a REVERT from an exceptional halt
After EIP-8456
- The CALLSTATUS instruction directly queries the result of the preceding call as one of the values 0, 1, 2, 4, or 5
- A value of 2 or higher means forwarded gas was consumed somewhere along the call chain by a halt or address collision, so it can be treated as 'not final'
- The halt_seen flag propagates across frame boundaries, so even a halt hidden behind an intermediary is revealed as 4 or 5
- Retry and finality logic can be written without relying on gas arithmetic
Who is affected
- Contract developer: In logic such as retries, batch processing, and payment finalization, CALLSTATUS can be used instead of gas arithmetic to determine whether a failure is final.
- Authors of proxies, routers, and wrappers: Must handle whether a halt occurred in a call they are intermediating, in accordance with the halt_seen propagation rules.
- Client teams: Must maintain two registers per frame, call_status and halt_seen, and update them with exactly the same rules every time a CALL/CREATE-type instruction completes.
- Compiler and library developers: Can optionally add CALLSTATUS for more precise error handling without changing existing success flag checking code.
In depth
A status value made up of three bits
The value returned by CALLSTATUS is the sum of up to three bits. Bit 0 (value 1) means the call reverted, or the child frame never started and the gas was refunded. Bit 1 (value 2) means the child frame halted exceptionally, or failed while consuming forwarded gas, as with an address collision in CREATE/CREATE2. Bit 2 (value 4) means there was an exceptional halt or address collision somewhere in a frame below. The values that actually occur are only 0, 1, 2, 4, and 5, and bit 1 never combines with the other bits.
Two registers per frame
Every frame initializes call_status to 0 and halt_seen to false when it starts. Each time CALL, CALLCODE, DELEGATECALL, STATICCALL, CREATE, or CREATE2 completes, the executing frame updates these values. If the child frame ended successfully, it records 0 when halt_seen is false and 4 when it is true. If it ended with REVERT, it records 1 or 5 respectively, and 2 for an exceptional halt or address collision. Once call_status reaches 2 or higher, halt_seen becomes true and never reverts back to false. The registers are bound to the frame, so no other frame can read or change them, and no journaling is needed.
The CALLSTATUS instruction itself
The opcode is 0xA5, with a gas cost of 2. It takes no values off the stack and simply pushes the current frame's call_status register value. It can be used in a static context, and executing it while the stack is full causes an exceptional halt due to stack overflow, following the usual rules. Just as RETURNDATASIZE shows the return data size of the preceding call, CALLSTATUS shows the result status of the preceding call.
Relation to the success flag and return data
The success flag pushed by CALL-type instructions is exactly 1 when the status is 0 or 4, and the address pushed by CREATE-type instructions is non-zero exactly when the status is 0 or 4. The return data buffer is set exactly as before, and CALLSTATUS does not change it. The specification states that contracts should not compare individual status values one by one, but instead check CALLSTATUS >= 2 to test for not-final.
Why an instruction was added instead of changing the existing success flag
The success flag is only 1 bit and cannot hold more information, and deployed code already checks it as a boolean in both directions, so changing its value would break existing behavior. EIP-7069 solves this by replacing the success flag itself with a status code in a new set of call instructions, but this EIP leaves the existing CALL/CREATE-type instructions unchanged and adds only a single instruction that reads a register, like RETURNDATASIZE.
Why the halt-below bit exists
Most contracts are called through intermediaries such as proxies, routers, wrappers, and signature checkers. An exceptional halt occurring two or more levels down can reach the caller in various forms as it passes through intermediaries: a revert with empty data, a revert with its own reason, a revert after an additional call, or even a successful return of false. The halt_seen flag records whether an exceptional halt or address collision occurred in itself or in any frame below it, and is passed across the boundary whether the frame reverts or returns. This is why a revert following a halt shows 5, and a return following a halt shows 4. There is a cost in that the same bit is set even in cases like an intentional low-gas probe call that reverts with its own reason after a halt, but this pushes the caller toward the safer choice of treating it as not final.
Relation to multidimensional gas
After EIP-8037, which charges state creation cost separately from execution gas, a frame can draw gas from a separate store that GAS does not show, and gas can return to that store when state is cleared or a frame reverts. The existing approach of inferring the cause of failure from the GAS value alone must now account for this store, and a fixed budget that was previously sufficient can become insufficient if the gas schedule changes. CALLSTATUS, regardless of the gas schedule, only tells you that gas was consumed by a halt somewhere in the call chain when the value is 2 or higher, which eliminates the need for this kind of inference.
Current status and remaining room for change
This EIP is currently in Draft status and has not yet been finalized. The opcode number 0xA5 provisionally uses an unused number following LOG0 through LOG4 (0xA0-0xA4), and it is stated that this may change to avoid conflicts with other new instructions. No call decision on fork inclusion is included in the provided material.