Add L1 Block Info to L2 context #12
joeandrews
started this conversation in
AZIP Proposals
Replies: 2 comments 1 reply
-
|
Draft AZIP here: https://github.com/joeandrews/governance/blob/623e77ff0e1726b3ddac87204bdb0f9d594ccced/AZIPs/azip-4.md |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@joeandrews @The-CTra1n (Conor) had an interesting idea - instead of relying on 6 fields, we do rely only on |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Aztec contracts can't read Ethereum state directly. If you want to verify an L1 balance, check a Uniswap price, or confirm a bridge deposit landed, you either trust an oracle or must send a message through the L1→L2 inbox.
Aztec is an Ethereum rollup so access to this data is easy to include directly from L1.
Proposal
Add a single Poseidon2 commitment to six L1 block header fields (state_root, receipts_root, block_number, timestamp, prev_randao, parent_beacon_block_root) as one Field
l1_block-hashin GlobalVariables. L2 Contracts can open the commitment with a preimage and use the raw fields for MPT proofs, receipt proofs, or beacon chain state proofs.The mechanism piggybacks on the existing L1→L2 message infrastructure using the same dual-hash pattern (SHA256 on L1, Poseidon2 in circuits), same block root first rollup integration point, same propagation through merges. The addition costs ~10k gas per checkpoint
Motivation
Trustless L1 state reads — verify any account, balance, storage slot, or contract code via MPT proof against state_root
Event proofs — prove an L1 event was emitted via receipts_root, enabling trust-minimized bridge designs
Beacon chain access — prove validator sets, staking balances, and consensus-layer data via parent_beacon_block_root
L1 clock + randomness — timestamp for freshness enforcement, prev_randao for public entropy
Feedback wanted
The AZIP excludes transactions_root, parent_hash and gas fields. Should any of these be included?
Is the freshness bound (MAX_L1_BLOCK_LAG) of ~144 seconds needed / correct?
Are there use cases we're missing that would change the design?
Beta Was this translation helpful? Give feedback.
All reactions