Commit aa5d0484 authored by clabby's avatar clabby

Deep Reorg Test (squashed)

Update

Fix order

wip

wip

Merge Josh's changes + disable parallel runs for `op-e2e` on circleCI

Reduce number of L2 blocks built by decreasing the `SeqWindowSize` + `L1BlockTime`

Submit batch for blocks derived from chain B, verify safe L2 head is accurate

Fixes

Bump to 3 sequence windows

Update

Remove batch submissions on reorged chain

Use `CrossLayerUser` instead of `BasicUser`

Fix

:broom:

de-spaghettify `setupReorgTest`; Correct comments
parent 8344e384
...@@ -24,7 +24,7 @@ func TestBatchInLastPossibleBlocks(gt *testing.T) { ...@@ -24,7 +24,7 @@ func TestBatchInLastPossibleBlocks(gt *testing.T) {
sd := e2eutils.Setup(t, dp, defaultAlloc) sd := e2eutils.Setup(t, dp, defaultAlloc)
log := testlog.Logger(t, log.LvlDebug) log := testlog.Logger(t, log.LvlDebug)
sd, miner, sequencer, sequencerEngine, _, _, batcher := setupReorgTestActors(t, dp, sd, log) sd, _, miner, sequencer, sequencerEngine, _, _, batcher := setupReorgTestActors(t, dp, sd, log)
signer := types.LatestSigner(sd.L2Cfg.Config) signer := types.LatestSigner(sd.L2Cfg.Config)
cl := sequencerEngine.EthClient() cl := sequencerEngine.EthClient()
...@@ -135,7 +135,7 @@ func TestLargeL1Gaps(gt *testing.T) { ...@@ -135,7 +135,7 @@ func TestLargeL1Gaps(gt *testing.T) {
sd := e2eutils.Setup(t, dp, defaultAlloc) sd := e2eutils.Setup(t, dp, defaultAlloc)
log := testlog.Logger(t, log.LvlDebug) log := testlog.Logger(t, log.LvlDebug)
sd, miner, sequencer, sequencerEngine, verifier, _, batcher := setupReorgTestActors(t, dp, sd, log) sd, _, miner, sequencer, sequencerEngine, verifier, _, batcher := setupReorgTestActors(t, dp, sd, log)
signer := types.LatestSigner(sd.L2Cfg.Config) signer := types.LatestSigner(sd.L2Cfg.Config)
cl := sequencerEngine.EthClient() cl := sequencerEngine.EthClient()
......
...@@ -22,6 +22,7 @@ var defaultRollupTestParams = &e2eutils.TestParams{ ...@@ -22,6 +22,7 @@ var defaultRollupTestParams = &e2eutils.TestParams{
MaxSequencerDrift: 40, MaxSequencerDrift: 40,
SequencerWindowSize: 120, SequencerWindowSize: 120,
ChannelTimeout: 120, ChannelTimeout: 120,
L1BlockTime: 15,
} }
var defaultAlloc = &e2eutils.AllocParams{PrefundTestUsers: true} var defaultAlloc = &e2eutils.AllocParams{PrefundTestUsers: true}
......
This diff is collapsed.
...@@ -16,7 +16,7 @@ func TestDerivationWithFlakyL1RPC(gt *testing.T) { ...@@ -16,7 +16,7 @@ func TestDerivationWithFlakyL1RPC(gt *testing.T) {
dp := e2eutils.MakeDeployParams(t, defaultRollupTestParams) dp := e2eutils.MakeDeployParams(t, defaultRollupTestParams)
sd := e2eutils.Setup(t, dp, defaultAlloc) sd := e2eutils.Setup(t, dp, defaultAlloc)
log := testlog.Logger(t, log.LvlError) // mute all the temporary derivation errors that we forcefully create log := testlog.Logger(t, log.LvlError) // mute all the temporary derivation errors that we forcefully create
_, miner, sequencer, _, verifier, _, batcher := setupReorgTestActors(t, dp, sd, log) _, _, miner, sequencer, _, verifier, _, batcher := setupReorgTestActors(t, dp, sd, log)
rng := rand.New(rand.NewSource(1234)) rng := rand.New(rand.NewSource(1234))
sequencer.ActL2PipelineFull(t) sequencer.ActL2PipelineFull(t)
......
...@@ -48,6 +48,7 @@ type TestParams struct { ...@@ -48,6 +48,7 @@ type TestParams struct {
MaxSequencerDrift uint64 MaxSequencerDrift uint64
SequencerWindowSize uint64 SequencerWindowSize uint64
ChannelTimeout uint64 ChannelTimeout uint64
L1BlockTime uint64
} }
func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams { func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams {
...@@ -74,7 +75,7 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams { ...@@ -74,7 +75,7 @@ func MakeDeployParams(t require.TestingT, tp *TestParams) *DeployParams {
FinalSystemOwner: addresses.SysCfgOwner, FinalSystemOwner: addresses.SysCfgOwner,
L1BlockTime: 15, L1BlockTime: tp.L1BlockTime,
L1GenesisBlockNonce: 0, L1GenesisBlockNonce: 0,
CliqueSignerAddress: common.Address{}, // proof of stake, no clique CliqueSignerAddress: common.Address{}, // proof of stake, no clique
L1GenesisBlockTimestamp: hexutil.Uint64(time.Now().Unix()), L1GenesisBlockTimestamp: hexutil.Uint64(time.Now().Unix()),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment