[PROPOSAL] Latest L1 Blockhash syscall

Currently smart contracts on Starknet can access the following L2 parameters through these syscalls:

  • get_sequencer_address
  • get_block_number
  • get_block_timestamp
    Nevertheless these parameters relate to L2 only.
    Currently any external data can be sent as a message originated from L1.
    These messages in many cases can be sent multiple times especially in systems like fossil. That obviously is very inefficient as multiple actors will send the same multiple times wasting gas and introducing additional latency.

Proposal

  1. The sequencer after each L2 batch submission on L1 should relay the L1 blockhash(latest_block - reorg_bufer) to L2.
  2. Such message should be accessible through a new syscall called: get_latest_l1_blockhash.
18 Likes