Expand description
EXECUTE precompile for Native Rollups — aligned with the l2beat spec.
This is a thin wrapper around verify_stateless_new_payload (accessed via
the StatelessValidator trait). The precompile:
- Deserializes SSZ
StatelessInputonce (to read gas_limit and check L2 constraints) - Validates L2-specific constraints (no blobs, no withdrawals, etc.)
- Charges gas equal to
gas_limit + calldata.len() * EXECUTE_GAS_PER_WITNESS_BYTE - Delegates to the
StatelessValidatortrait, passing the already-decoded input - On success returns the SSZ-encoded
StatelessValidationResult.
Fail-closed semantics: both invalid input and a failed validation return an
ExceptionalHalt (CALL-level success=false), so a require(success) caller
is safe. Invalid input (undecodable SSZ or an L2-constraint violation) is
rejected in steps 1-2, before the step-3 gas charge — those checks are cheap
and already priced by the L1 calldata gas the attacker paid to submit the blob.
A failed validation (step 4) is rejected after the step-3 charge, so an
attacker who forces full re-execution still pays for it: that is the DoS bound.
Constants§
- EXECUTE_
GAS_ PER_ WITNESS_ BYTE - WIP DA/decode cost — the SSZ witness decode + trie rebuild scales with input size; 16 mirrors calldata non-zero byte cost. Tune when EIP-8079 pricing is finalized.
Functions§
- execute_
precompile - EXECUTE precompile entrypoint.