Scroll introduced l1sload as a component of our Keystore infrastructure. However, it is a generalized infrastructure solution that can be leveraged for use cases beyond the Keystore.
L1SLOAD
?L1SLOAD is a new precompile built into Scroll. It allows L2 smart contracts to read data from Ethereum L1 smart contract storage in a trustless manner without requiring Merkle Inclusion Proofs (MIP). It introduces 2 significant benefits:
We’ve created a Rollup Improvement Proposal to encourage the L2 community to implement this functionality across rollups. See https://ethereum-magicians.org/t/rip-7728-l1sload-precompile/20388 if interested.
Demos:
We created a new system contract to Scroll called L1Blocks
. The contract is used to hold the data from L1 block headers.
Parameter | Value |
---|---|
BLOCK_BUFFER_SIZE |
8192 |
Contract address | 0x5300000000000000000000000000000000000001 |
The L1Blocks
contract currently stores eight fields from the L1 block headers for the most recent BLOCK_BUFFER_SIZE
blocks. The protocol and contract guarantees the continuity of the imported L1 blocks. The header fields that are stored in the contract are: