Skip to content

[General] Why does L1L2 tx require >2x gas limit overhead to succeed on L2? #991

Answered by itegulov
sanekmelnikov asked this question in General
Discussion options

You must be logged in to vote

@albertlai431

Sorry for the late reply, investigating this required a fairly deep dive into ZKsync protocol.

Why is so much overhead required and where does this assertion logic live?

Several things that need to be mentioned here:

  • Protocol specifies what gas per pubdata byte should be used by every L1->L2 transaction (src).
  • This constant can be significantly higher than fair gas per pubdata depending on chain's pubdata type and market conditions. In case of GenLayer testnet, which is a validium, REQUIRED_L2_GAS_PRICE_PER_PUBDATA=800 is 160x higher than current fair pubdata price of 5.
  • During execution bootloader checks whether enough gas was provided to publish generated pubdata assuming

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sanekmelnikov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
general General question
2 participants