EIP-4863 Beacon chain push-based withdrawals (Beacon chain push withdrawals)

No call decision · Consensus & staking · EIP status Stagnant · created 2022-02-28

A proposal that introduces a new transaction type (WITHDRAWAL_TX_TYPE) that automatically pushes a validator's withdrawal amount from the beacon chain into an execution-layer account.

Why it is needed

When a validator exits staking, ETH to be withdrawn accumulates on the beacon chain, but the protocol had no way to actually move that amount into an execution-layer account. There are two ways to solve this: a 'pull' approach, where beacon chain data is loaded into the EVM and a user-space contract handles the withdrawal, and a 'push' approach, where withdrawals determined by the beacon chain are forcibly included in the execution block. This EIP chooses the latter, proposing a structure in which the withdrawal list computed by the consensus layer is carried directly as a special transaction at the end of every block.

What changes

Today

After EIP-4863

Who is affected

In depth

New transaction type definition

This EIP extends the EIP-2718 transaction format to define a new type whose TransactionType is WITHDRAWAL_TX_TYPE (`0x3`). The TransactionPayload is the RLP-encoded list RLP([index, address, amount]). index is a 64-bit value that distinguishes each withdrawal, address is the execution-layer account that receives the ETH, and amount is the withdrawal amount in wei. All three values are determined and supplied by the consensus layer. It takes effect after FORK_TIMESTAMP, and this value is still left as TBD in the source.

Positional constraint within the block

If a block contains even one WITHDRAWAL_TX_TYPE transaction, those transactions must come after all other transactions. If an execution client receives a block that violates this condition, it must treat the block as invalid. The reason for fixing the order this way is so that when the beacon chain verifies that its internal scheduling logic matches the withdrawal list in the execution block, it only needs to scan a fixed number of entries linearly from the end of the block.

Balance handling: unconditional success, no gas

When processing a WITHDRAWAL_TX_TYPE transaction, implementations must increase the balance of address by amount, and this balance change must be unconditional and must not fail. No gas cost whatsoever is charged for this transaction type. The source explains that any special processing cost this type could incur is negligible relative to the overall block execution, because the consensus layer already keeps the number of withdrawals it can send to the execution layer at any given time small.

Why the push approach was chosen

The source divides the methods for passing withdrawals from the beacon chain to the execution layer into two categories: a 'pull' approach that combines EIP-4788 with a user-space withdrawal contract, and the 'push' approach proposed by this EIP. It explains that the push approach is more complex from the core protocol's standpoint, since it requires a new transaction type and special processing rules, but it removes the burden on validators of having to buy EVM gas to pull in withdrawals, and gives the experience of automatic processing once the beacon chain's conditions are met.

Why general EVM execution was not allowed

This transaction type does nothing other than increase a balance. The source points out that allowing more general processing would create the possibility of failure, and that failure would complicate accounting on the beacon chain side. It states that it therefore chose plain balance updates as the path that captures most of the benefit of withdrawals while keeping the complexity cost to a minimum. For the same reason, it explains that keeping this as a separate new transaction type, apart from general EVM execution, simplifies testing and security review.

Security considerations and current status

The source emphasizes that the procedure by which the consensus layer verifies withdrawal transactions is critically important. It must guarantee that the exact correct amount of ETH is withdrawn, and it states that this movement of ETH from the consensus layer to the execution layer is an action with no precedent in the EVM, requiring a very high level of security review. The FORK_TIMESTAMP value is left only as TBD in the source, and whether to add logs is also marked TODO, so the specification is not yet complete. This EIP's current status is Stagnant.

Original EIP · ← EIPs