EIP.tools

EIP.tools

⚠️ DraftStandards Track: Core

EIP-8531: EL-Triggered Validator Voluntary Exits

Enable validator voluntary exits through an execution-layer system contract

Authors
Created2026-12-04
Discussion Linkhttps://ethereum-magicians.org/t/eip-8531-el-triggered-validator-voluntary-exits/30603
Requires

Markdown

https://raw.githubusercontent.com/ethereum/EIPs/re...
Pull Request#12807PR open

EIP-GPT summary

Contents
AbstractMotivationSpecificationConstantsExecution LayerRequest Types and EncodingValidator Voluntary Exit MessageSystem ContractSystem CallRequest Encoding and CommitmentEngine APIPayload BuildingPayload ValidationConsensus LayerExecution RequestsRequest ProcessingBeacon Block OperationsNetworkingRationaleQueue and Fee MechanismKey-Only RequestsReserved LeavesEarliest-Valid EpochBackwards CompatibilityTest CasesSecurity ConsiderationsOne-Time Leaf UsePresigned AuthorizationsDomain SeparationResource UsageCopyright

Abstract

Introduce an execution-layer (EL) system contract that verifies lean eXtended Merkle Signature Scheme (leanXMSS) exit authorizations and queues public keys for consensus-layer (CL) processing. This replaces signed voluntary exits in beacon block bodies and the dedicated voluntary-exit gossip topic. Anyone can submit an authorization; the signature, rather than the transaction sender or withdrawal address, authorizes it. The CL applies validator eligibility and exit-churn rules to each verified key.

Motivation

Voluntary exits currently require a dedicated gossip topic, signature validation and a signed operation in beacon blocks. A post-quantum (PQ) transition needs to replace the signature scheme, creating an opportunity to remove those separate networking and block-processing paths.

An EL request mechanism can carry validator-authorized exits through the existing execution-request infrastructure. The CL still decides whether a validator can exit, while transaction execution accounts for the cost of verifying signatures and admitting requests. Direct submissions, relayers and presigned authorizations remain possible without requiring an EL account controlled by the validator operator.

Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.

Constants

ParameterValue
VOLUNTARY_EXIT_REQUEST_ADDRESSTBD
VOLUNTARY_EXIT_REQUEST_TYPE0x09, provisional
SYSTEM_ADDRESS0xfffffffffffffffffffffffffffffffffffffffe
XMSS_PUBLIC_KEY_LENGTH32 bytes
XMSS_SIGNATURE_LENGTH2404 bytes
XMSS_RESERVED_LEAVES2**15
TARGET_REQUESTS_PER_BLOCK4
MAX_REQUESTS_PER_BLOCK16
MIN_REQUEST_FEE1 wei
FEE_UPDATE_FRACTION17
EXCESS_INHIBITOR2**256 - 1
QUEUE_STORAGE_OFFSET4
SYSTEM_CALL_GAS_LIMIT30,000,000

Execution Layer

Request Types and Encoding

XMSSPubkey = ByteVector[32]
XMSSSignature = ByteVector[2404]


class VoluntaryExitRequestInput(Container):
    pubkey: XMSSPubkey
    signature: XMSSSignature

    def encode(self) -> bytes:
        return bytes(self.pubkey) + bytes(self.signature)

    @classmethod
    def decode(cls, data: bytes) -> "VoluntaryExitRequestInput":
        require(len(data) == 2436)
        return cls(
            pubkey=XMSSPubkey(data[:32]), signature=XMSSSignature(data[32:])
        )


class VoluntaryExitRequest(Container):
    pubkey: XMSSPubkey

    def encode(self) -> bytes:
        return bytes(self.pubkey)

The input is 2436 bytes: public key followed by signature, with no function selector or length prefixes. The output is the same single-field Simple Serialize (SSZ) container used by the CL. Its SSZ encoding is exactly the 32-byte public key returned by encode().

Validator Voluntary Exit Message

Verification uses the leanXMSS scheme and encodings used by EIP-8483. The function leanxmss_verify(pubkey, message, signature) returns whether the signature authenticates the supplied 32-byte message under the public key at the leaf index carried in the signature. The exit-specific message and permitted leaf range are defined below.

def signature_index(signature: XMSSSignature) -> U256:
    return U256.from_le_bytes(bytes(signature)[:4])


def validator_voluntary_exit_message(
    chain_id: U256, pubkey: XMSSPubkey
) -> bytes:
    domain = keccak256(b"leanXMSS voluntary exit v1")
    return keccak256(domain + chain_id.to_be_bytes32() + bytes(pubkey))

The contract MUST require signature_index(signature) < XMSS_RESERVED_LEAVES before verification. The signer uses an unused leaf from that range. keccak256 is Ethereum's Keccak-256 hash function.

System Contract

U256 word arithmetic is unsigned and wraps modulo 2**256; // denotes integer division.

Storage
SlotContents
0Excess demand, or EXCESS_INHIBITOR
1Requests admitted since the last system call
2Queue head
3Queue tail
QUEUE_STORAGE_OFFSET + iPublic key for record i, interpreted as a big-endian word

Slots 0 through 3 are initially zero. The queue is first-in, first-out (FIFO), and dequeuing does not erase old record words. There is no separate admission-count or total queue-length cap.

Entry Point

Request admission from signer and relayer through EL system-contract verification.

The following pseudocode defines queue admission and system-call dispatch:

def require(condition: bool) -> None:
    if not condition:
        revert()


def execute(
    sender: Address, value: U256, data: bytes, chain_id: U256
) -> bytes:
    if sender == SYSTEM_ADDRESS:
        return process_system_call(data)

    fee = get_fee()
    if len(data) == 0:
        require(value == U256(0))
        return fee.to_be_bytes32()

    require(value >= fee)
    request = VoluntaryExitRequestInput.decode(data)
    require(signature_index(request.signature) < XMSS_RESERVED_LEAVES)
    message = validator_voluntary_exit_message(chain_id, request.pubkey)
    require(leanxmss_verify(request.pubkey, message, request.signature))

    tail = load(U256(3))
    store(U256(1), load(U256(1)) + U256(1))
    slot = QUEUE_STORAGE_OFFSET + tail
    store(slot, U256.from_be_bytes(bytes(request.pubkey)))
    store(U256(3), tail + U256(1))
    log0(VoluntaryExitRequest(pubkey=request.pubkey).encode())
    return b""

The fee and any overpayment remain in the contract after admission. Failed calls revert their state changes, value transfer and logs. A fee query does not modify storage, and identical signed authorizations may be resubmitted. Transactions pay ordinary execution gas in addition to the request fee.

Fee Calculation

The fee quote includes accumulated excess and admissions above the target since the last system call. Quoting does not modify storage:

def get_fee() -> U256:
    excess = load(U256(0))
    require(excess != EXCESS_INHIBITOR)
    count = load(U256(1))
    additional = (
        count - TARGET_REQUESTS_PER_BLOCK
        if count > TARGET_REQUESTS_PER_BLOCK else U256(0)
    )
    return fake_exponential(excess + additional)


def fake_exponential(numerator: U256) -> U256:
    accumulator = MIN_REQUEST_FEE * FEE_UPDATE_FRACTION
    output = U256(0)
    index = U256(1)
    while accumulator != U256(0):
        output = output + accumulator
        denominator = FEE_UPDATE_FRACTION * index
        product = accumulator * numerator
        accumulator = (
            product // denominator if denominator != U256(0) else U256(0)
        )
        index = index + U256(1)
    return output // FEE_UPDATE_FRACTION
Queue Draining and Fee Update

The system path drains at most 16 records and updates the fee state:

def dequeue() -> bytes:
    head = load(U256(2))
    tail = load(U256(3))
    count = min(tail - head, MAX_REQUESTS_PER_BLOCK)
    records: list[bytes] = []
    for i in range(int(count)):
        index = head + U256(i)
        slot = QUEUE_STORAGE_OFFSET + index
        records.append(load(slot).to_be_bytes32())

    new_head = head + count
    if new_head == tail:
        store(U256(2), U256(0))
        store(U256(3), U256(0))
    else:
        store(U256(2), new_head)
    return b"".join(records)


def process_system_call(data: bytes) -> bytes:
    output = dequeue()
    excess = load(U256(0))
    if len(data) != 0:
        next_excess = EXCESS_INHIBITOR
    elif excess == EXCESS_INHIBITOR:
        next_excess = U256(0)
    else:
        total = excess + load(U256(1))
        next_excess = (
            total - TARGET_REQUESTS_PER_BLOCK
            if total > TARGET_REQUESTS_PER_BLOCK else U256(0)
        )
    store(U256(0), next_excess)
    store(U256(1), U256(0))
    return output

Normal processing uses empty system calldata. Nonempty system calldata drains a batch and inhibits admission; the next empty system call re-enables it. The protocol use of this inhibition branch is reserved for a future fork.

System Call

Post-payload system call draining FIFO keys and forming the exit request batch.

After processing an execution payload's transactions and withdrawals, the EL MUST invoke the deployed system contract using SYSTEM_ADDRESS as the caller, zero value, empty calldata and SYSTEM_CALL_GAS_LIMIT. System-call gas is excluded from the payload's transaction gas usage.

Using the active fork's execution-specifications system-transaction helper, the post-payload hook is:

def process_voluntary_exit_requests(block_env: BlockEnvironment) -> bytes:
    result = process_checked_system_transaction(
        block_env, VOLUNTARY_EXIT_REQUEST_ADDRESS, b""
    )
    data = result.return_data
    if len(data) % 32 != 0 or len(data) > 512:
        raise InvalidBlock("invalid voluntary exit request output")
    return data

process_checked_system_transaction performs the system-address invocation with its dedicated gas budget, checks for code and call failure, and commits successful state changes, following the execution-specifications system-call convention. Its system-transaction gas allowance is SYSTEM_CALL_GAS_LIMIT. Missing code, call failure or malformed output MUST invalidate the payload.

Request Encoding and Commitment

The system-call output becomes one EIP-7685 batch:

VOLUNTARY_EXIT_REQUEST_TYPE || pubkey_0 || ... || pubkey_n

The type byte appears once per batch. Keys MUST retain FIFO order, including duplicates. Empty batches are omitted, and request types appear in ascending order in the request commitment.

Engine API

Engine API payload building and validation exchanges carrying executionRequests.

The exit batch uses the existing executionRequests list and the activation fork's method versions, as defined by the Engine API request interface.

Payload Building

The applicable engine_getPayload method MUST return the exit batch defined above in its executionRequests field. The CL decodes its records into ExecutionRequests.voluntary_exits.

Payload Validation

The applicable engine_newPayload method receives the batch in its executionRequests argument. The EL MUST validate the supplied request commitment and ensure that execution, including the exit system call, produces the committed requests.

An out-of-order list, duplicate type elements, a type-only or shorter element, or a null executionRequests argument is an invalid-parameters error (-32602). For an otherwise well-framed exit batch, a payload length not divisible by 32 or more than 16 keys is invalid payload content. When validated, such content, a mismatching commitment or requests inconsistent with execution MUST receive INVALID under the inherited payload-status rules.

Consensus Layer

Validator public keys are XMSS keys as defined by EIP-8530. The VoluntaryExitRequest defined above is the CL request container.

Execution Requests

Define VoluntaryExitRequests as the fork's SSZ progressive list of VoluntaryExitRequest. Add the following field to ExecutionRequests:

voluntary_exits: VoluntaryExitRequests

The CL MUST reject a list longer than MAX_REQUESTS_PER_BLOCK or malformed request lengths. Each element serializes to its 32-byte public key.

Request Processing

CL eligibility checks that initiate an exit or ignore the request.

During apply_parent_execution_payload, process voluntary exits after the existing execution requests:

for request in requests.voluntary_exits:
    process_voluntary_exit_request(state, request)

This uses the current CL state and epoch in the EIP-7732 parent-payload processing stage.

def process_voluntary_exit_request(state, request):
    pubkeys = [validator.pubkey for validator in state.validators]
    if request.pubkey not in pubkeys:
        return
    index = pubkeys.index(request.pubkey)
    validator = state.validators[index]
    epoch = get_current_epoch(state)
    if not is_active_validator(validator, epoch):
        return
    if validator.exit_epoch != FAR_FUTURE_EPOCH:
        return
    if epoch < validator.activation_epoch + SHARD_COMMITTEE_PERIOD:
        return
    if get_pending_balance_to_withdraw(state, index) != 0:
        return
    initiate_validator_exit(state, index)

The CL predicates and initiate_validator_exit retain the active fork's eligibility, churn and withdrawal-delay rules. An ignored request is not retained for later processing.

Beacon Block Operations

Remove voluntary_exits from BeaconBlockBody and its iteration and operation-count check in process_operations. Preserve the vacated SSZ field position. Remove the superseded VoluntaryExit, SignedVoluntaryExit, process_voluntary_exit, MAX_VOLUNTARY_EXITS and DOMAIN_VOLUNTARY_EXIT from the post-fork specification.

Networking

Remove the voluntary_exit gossip topic and its dedicated validation and forwarding rules. Validators and relayers submit signed authorizations through the EL system contract. Historical blocks retain their original processing rules.

Rationale

Queue and Fee Mechanism

The FIFO and bounded system-call drain use the EIP-7002 pattern. Count-inclusive fee quotes and inhibition use the EIP-8282 policy. Records contain one public key, so each occupies one storage word.

The target is four admissions per payload, with at most 16 dequeued. The target controls the rate at which excess demand grows; it is not a hard admission cap or a CL exit-churn limit. Keeping the drain maximum above the target allows a backlog to shrink when arrivals remain near the target.

FEE_UPDATE_FRACTION = 17 controls fee sensitivity. Each additional 17 units of excess demand increases the fee by roughly 2.7 times; integer truncation produces coarser changes near the minimum fee. Transaction gas pays for verification and state writes, while the request fee prices queue demand.

Key-Only Requests

The EL verifies the authorization before publishing the request, allowing the CL record to contain only the key. Any party can relay the authorization without acquiring withdrawal authority.

Reserved Leaves

Exit signatures use an unused leaf in the reserved range. Signing different messages at the same leaf can compromise the key, so registration and exit tooling need coordinated leaf allocation.

Earliest-Valid Epoch

The key-only interface gives the authorization holder control over submission time. EIP-7044 retained an earliest-valid epoch while making BLS exits remain valid across later forks. A signed epoch can therefore matter for long-lived presigned authorizations; retaining it here would require a different signed message, input, output and CL check.

Backwards Compatibility

Signed CL voluntary exits and their gossip topic are replaced by execution requests at the accompanying PQ fork. Existing BLS exit signatures are not accepted by this contract. The companion migration governs non-migrated validators, and withdrawal-credential-authorized EL exits retain their separate authorization rules.

Presigned-exit services need the new signing and submission format and unused-leaf tracking. The public key in the request does not grant withdrawal rights.

Test Cases

CaseExpected Outcome
Input of 2435 or 2437 bytesRevert before verification
Valid unused reserved leafAdmit the public key
Signature at leaf 32768Revert before verification
Changed key, chain identifier or exit message domainReject signature
Empty public call with zero valueReturn the fee without modifying storage
Empty public call with nonzero valueRevert
UnderpaymentRevert without queue changes or retained value
Identical authorization submitted twiceQueue both records
Queue of 17 recordsDrain 16 and retain one
Six admissions with initially zero excessThe sixth quote includes one excess unit; the integer fee may still equal the minimum
System count of 8 and initially zero excessAfter system processing, excess is 4 and count is zero
Malformed system-call outputInvalid payload
Unknown, inactive or already-exiting keyIgnore the CL request
Insufficient validator tenure or pending balance withdrawalIgnore the CL request
Eligible validator keyInitiate an exit using the fork's churn rules

Cryptographic vectors, canonical-bytecode gas and out-of-gas (OOG) cases, and end-to-end EL/CL fixtures remain to be supplied.

Security Considerations

One-Time Leaf Use

A key's leaf allocation must account for registration, consensus duties and exits. Replaying an existing signature is different from producing a new signature at the same leaf. A replay filter cannot repair unsafe signing that has already occurred.

Presigned Authorizations

Anyone holding a valid signed exit can submit it once the mechanism is active. It has no expiry or earliest-valid epoch. Minimum validator tenure is a protocol eligibility check, not a signer-chosen submission time.

Domain Separation

The signed message binds the exit operation and EVM chain identifier. Deployments on the same chain, or chains sharing an identifier and accepted keys, can accept the same authorization. Contract-address or genesis-identity binding remains a design choice.

Resource Usage

The EL does not know whether a key belongs to an eligible validator. A valid signature can therefore consume gas and queue space without causing an exit. Dynamic pricing and bounded draining impose costs and processing limits but do not guarantee inclusion time or a bounded queue.

Copyright and related rights waived via CC0.

EIP.tools

EIP.tools

Search, read, and map Ethereum improvement proposals, ERCs, RIPs, and CAIPs from one focused interface.

Farcaster
by @apoorveth