Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some regolith bugs #43

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

jyellick
Copy link

This patch fixes three distinct issues (broken into three commits).

  1. When a deposit transaction creates a new contract, the nonce was not being set correctly for the contract creation.
  2. When a deposit transaction is processed under Regolith, the actual gas used should be reported for the transaction, not the gas limit as was done in Bedrock.
  3. When transactions have their rollup data gas computed, the computation differs for Regolith and therefore requires a parameter indicating the network conditions.

With these three fixes in place, the previously failing op-e2e p2p sync test succeeds again, and all other passing tests still pass.

It's possible that Deposit Txes will be contract creations.  But, the
deposit tx nonce is always zero and inferred based on the order.  To
prevent collisions we properly utilize the computed nonce.
Previously, the deposit tx was always assumed to use all of the GasLimit
in its processing.  Instead, Regolith requires that the actual gas usage
be reported.  Gas price is always 0 so the refund logic is unaffected.
The Bedrock and Regolith computation for rollup data gas differs.  This
change adds the chain rules as a parameter to the computation so that it
can be appropriately switched, depending on the chain state.
Copy link

@mmontour1306 mmontour1306 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@jyellick jyellick merged commit fd98f9a into boba-develop Sep 15, 2023
7 checks passed
@jyellick jyellick deleted the jyellick/fix-regolith-some-regolith-bugs branch September 15, 2023 16:37
jyellick pushed a commit that referenced this pull request Feb 26, 2024
…asUsed

Add Deposit Tx gasUsed and Fix block Fee Calculation for Otterscan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants