-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
op-node/rollup/derive: Implement upgrade gas & upgrade block user tx omission #14797
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #14797 +/- ##
============================================
+ Coverage 46.95% 81.71% +34.75%
============================================
Files 1049 174 -875
Lines 90854 10165 -80689
============================================
- Hits 42660 8306 -34354
+ Misses 45063 1691 -43372
+ Partials 3131 168 -2963
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -245,3 +251,10 @@ func (s *L2Sequencer) ActBuildL2ToIsthmus(t Testing) { | |||
s.ActL2EmptyBlock(t) | |||
} | |||
} | |||
|
|||
func (s *L2Sequencer) ActBuildL2ToFork(t Testing, fork rollup.ForkName) { | |||
// TODO: add check that fork is set in rollup config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should either do this or reference an issue for it. Probably a simple require
could be added here since we have t
already.
@@ -66,7 +66,11 @@ func NewL2FaultProofEnv[c any](t helpers.Testing, testCfg *TestCfg[c], tp *e2eut | |||
case Holocene: | |||
dp.DeployConfig.ActivateForkAtGenesis(rollup.Holocene) | |||
case Isthmus: | |||
// Isthmus usually runs on a Prague L1 network | |||
dp.DeployConfig.L1PragueTimeOffset = &genesisBlock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a helper method we already have that would ensure all the Hardforks before Prague are also enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L1 Cancun is enabled by default. So that's currently the only L1 fork that needs to be enabled manually.
Name: "transactions in Interop upgrade block", | ||
L1Blocks: []eth.L1BlockRef{l1A, l1B, l1C}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can create these automatically so we pick up new forks. We have the list of hard forks already and we could iterate through them, then for each check that they forbid user transactions unless they're in a list that explicitly allows it. Then if we add a new fork, as long as we add it to the list of forks this test will remind us to update the if statement in batches.go
and prevent user transactions (or add it to the allow list if it doesn't have upgrade tx). Otherwise I can see us forgetting that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I was thinking of actually running the whole upgrade block action tests for all forks from Isthmus. But then, as you can see with the commented out code, it just failed for Interop, so I didn't follow up with this idea. Will do this in the batches tests and track it for Interop.
) //.AddDefaultTestCases( | ||
// upgradeBlockTestCfg{fork: rollup.Interop, numUpgradeTxs: 0}, | ||
// helpers.NewForkMatrix(helpers.Isthmus), | ||
// testUpgradeBlock, | ||
// ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Can probably remove the commented out code.
) //.AddDefaultTestCases( | ||
// upgradeBlockTestCfg{fork: rollup.Interop, numUpgradeTxs: 0}, | ||
// helpers.NewForkMatrix(helpers.Isthmus), | ||
// testUpgradeBlockTxOmission, | ||
// ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Uncomment or remove.
@@ -539,6 +558,42 @@ func TestValidBatch(t *testing.T) { | |||
}, | |||
Expected: BatchDrop, // dropped because it could have advanced the epoch to B | |||
}, | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't looked at all batches tests, but in case you don't, I think it'd be worthwhile to add a test here that covers the happy path when there are no txs in the activation block to confirm this still works as intended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea
Moved back into draft as we'll probably move this out of Isthmus. |
There is general consensus that this is not going into isthmus |
Description
This PR implements Upgrade Gas and the omission of user transactions in upgrade blocks per the specs at ethereum-optimism/specs#616
Tests
Added proofs action test of both features, plus unit tests for invalid batches. The omission of user tx by the sequencer is also covered by the action test.
Additional context
Metadata
Closes #14649