@@ -37,12 +37,14 @@ func TestBatcherFullChannelsAfterDowntime(gt *testing.T) {
3737 l .Info ("Latest unsafe block after stopping the L2 sequencer" , "latestUnsafe" , latestUnsafe_A )
3838
3939 parent := latestUnsafe_A
40+ nonce := uint64 (0 )
4041 for j := 0 ; j < 200 ; j ++ {
4142 l1Origin := sys .L1EL .BlockRefByLabel (eth .Unsafe ).Hash
4243
4344 for i := 0 ; i < 5 ; i ++ {
4445 l .Debug ("Sequencing L2 block" , "iteration" , i , "parent" , parent )
45- sequenceBlockWithL1Origin (t , ts_L2 , parent , l1Origin , alice , cathrine )
46+ sequenceBlockWithL1Origin (t , ts_L2 , parent , l1Origin , alice , cathrine , nonce )
47+ nonce ++
4648
4749 parent = sys .L2CL .HeadBlockRef (types .LocalUnsafe ).Hash
4850
@@ -66,7 +68,7 @@ func TestBatcherFullChannelsAfterDowntime(gt *testing.T) {
6668 l .Info ("Channel details" , "channelID" , c .String (), "frameCount" , len (channelFrames [c ]), "dataLength_frame0" , len (channelFrames [c ][0 ].Data ))
6769 }
6870
69- require .Equal (t , 10 , len (channels )) // we expect a total of 10 channels, due to existing MaxChannelDuration bug filed at: https://github.com/ethereum-optimism/optimism/issues/18092
71+ require .Equal (t , 2 , len (channels )) // we expect a total of 2 channels
7072
7173 // values are dependent on:
7274 // - MaxPendingTransactions
@@ -77,16 +79,8 @@ func TestBatcherFullChannelsAfterDowntime(gt *testing.T) {
7779 max int
7880 note string
7981 }{
80- {min : 7_000 , max : 10_000 , note : "channel 0 - the first 100 blocks" },
81- {min : 100 , max : 1000 , note : "channel 1 - only a few blocks due to racy behavior, nowhere near the channel capacity" },
82- {min : 100 , max : 1000 , note : "channel 2 - only a few blocks due to racy behavior, nowhere near the channel capacity" },
83- {min : 100 , max : 1000 , note : "channel 3 - only a few blocks due to racy behavior, nowhere near the channel capacity" },
84- {min : 100 , max : 1000 , note : "channel 4 - only a few blocks due to racy behavior, nowhere near the channel capacity" },
85- {min : 100 , max : 1000 , note : "channel 5 - only a few blocks due to racy behavior, nowhere near the channel capacity" },
86- {min : 100 , max : 1000 , note : "channel 6 - only a few blocks due to racy behavior, nowhere near the channel capacity" },
87- {min : 100 , max : 1000 , note : "channel 7 - only a few blocks due to racy behavior, nowhere near the channel capacity" },
88- {min : 20_000 , max : 40_000 , note : "channel 8 - filled to the max capacity, due to blocking behavior because of MaxPendingTransactions limit reached" },
89- {min : 20_000 , max : 40_000 , note : "channel 9 - filled to the max capacity, due to blocking behavior because of MaxPendingTransactions limit reached" },
82+ {min : 30_000 , max : 40_000 , note : "channel 0 - filled to the max capacity" },
83+ {min : 30_000 , max : 40_000 , note : "channel 1 - remaining data, filling channel close to max capacity" },
9084 }
9185
9286 for i , entry := range sizeRanges {
@@ -109,13 +103,13 @@ func sequenceBlock(t devtest.T, ts apis.TestSequencerControlAPI, parent common.H
109103 require .NoError (t , ts .Next (t .Ctx ()))
110104}
111105
112- func sequenceBlockWithL1Origin (t devtest.T , ts apis.TestSequencerControlAPI , parent common.Hash , l1Origin common.Hash , alice * dsl.EOA , cathrine * dsl.EOA ) {
106+ func sequenceBlockWithL1Origin (t devtest.T , ts apis.TestSequencerControlAPI , parent common.Hash , l1Origin common.Hash , alice * dsl.EOA , cathrine * dsl.EOA , nonce uint64 ) {
113107 require .NoError (t , ts .New (t .Ctx (), seqtypes.BuildOpts {Parent : parent , L1Origin : & l1Origin }))
114108
115109 // include simple transfer tx in opened block
116110 {
117111 to := cathrine .PlanTransfer (alice .Address (), eth .OneWei )
118- opt := txplan .Combine (to )
112+ opt := txplan .Combine (to , txplan . WithStaticNonce ( nonce ) )
119113 ptx := txplan .NewPlannedTx (opt )
120114 signed_tx , err := ptx .Signed .Eval (t .Ctx ())
121115 require .NoError (t , err , "Expected to be able to evaluate a planned transaction on op-test-sequencer, but got error" )
0 commit comments