@@ -72,9 +72,10 @@ func testBatchProposerLimitsCodecV7(t *testing.T) {
7272 assert .NoError (t , err )
7373
7474 cp := NewChunkProposer (context .Background (), & config.ChunkProposerConfig {
75- MaxBlockNumPerChunk : 1 ,
76- MaxL2GasPerChunk : 20000000 ,
77- ChunkTimeoutSec : 300 ,
75+ MaxBlockNumPerChunk : 1 ,
76+ MaxL2GasPerChunk : 20000000 ,
77+ ChunkTimeoutSec : 300 ,
78+ MaxUncompressedBatchBytesSize : 4000000 ,
7879 }, encoding .CodecV7 , & params.ChainConfig {
7980 LondonBlock : big .NewInt (0 ),
8081 BernoulliBlock : big .NewInt (0 ),
@@ -88,8 +89,9 @@ func testBatchProposerLimitsCodecV7(t *testing.T) {
8889 cp .TryProposeChunk () // chunk2 contains block2
8990
9091 bp := NewBatchProposer (context .Background (), & config.BatchProposerConfig {
91- MaxChunksPerBatch : math .MaxInt32 ,
92- BatchTimeoutSec : tt .batchTimeoutSec ,
92+ MaxChunksPerBatch : math .MaxInt32 ,
93+ BatchTimeoutSec : tt .batchTimeoutSec ,
94+ MaxUncompressedBatchBytesSize : 4000000 ,
9395 }, encoding .CodecV7 , & params.ChainConfig {
9496 LondonBlock : big .NewInt (0 ),
9597 BernoulliBlock : big .NewInt (0 ),
@@ -152,9 +154,10 @@ func testBatchProposerBlobSizeLimitCodecV7(t *testing.T) {
152154 chainConfig := & params.ChainConfig {LondonBlock : big .NewInt (0 ), BernoulliBlock : big .NewInt (0 ), CurieBlock : big .NewInt (0 ), DarwinTime : new (uint64 ), DarwinV2Time : new (uint64 ), EuclidTime : new (uint64 ), EuclidV2Time : new (uint64 )}
153155
154156 cp := NewChunkProposer (context .Background (), & config.ChunkProposerConfig {
155- MaxBlockNumPerChunk : math .MaxUint64 ,
156- MaxL2GasPerChunk : math .MaxUint64 ,
157- ChunkTimeoutSec : 0 ,
157+ MaxBlockNumPerChunk : math .MaxUint64 ,
158+ MaxL2GasPerChunk : math .MaxUint64 ,
159+ ChunkTimeoutSec : 0 ,
160+ MaxUncompressedBatchBytesSize : 4000000 ,
158161 }, encoding .CodecV7 , chainConfig , db , nil )
159162
160163 blockHeight := uint64 (0 )
@@ -172,8 +175,9 @@ func testBatchProposerBlobSizeLimitCodecV7(t *testing.T) {
172175 }
173176
174177 bp := NewBatchProposer (context .Background (), & config.BatchProposerConfig {
175- MaxChunksPerBatch : math .MaxInt32 ,
176- BatchTimeoutSec : math .MaxUint32 ,
178+ MaxChunksPerBatch : math .MaxInt32 ,
179+ BatchTimeoutSec : math .MaxUint32 ,
180+ MaxUncompressedBatchBytesSize : 4000000 ,
177181 }, encoding .CodecV7 , chainConfig , db , nil )
178182
179183 for i := 0 ; i < 2 ; i ++ {
@@ -223,9 +227,10 @@ func testBatchProposerMaxChunkNumPerBatchLimitCodecV7(t *testing.T) {
223227 chainConfig := & params.ChainConfig {LondonBlock : big .NewInt (0 ), BernoulliBlock : big .NewInt (0 ), CurieBlock : big .NewInt (0 ), DarwinTime : new (uint64 ), DarwinV2Time : new (uint64 ), EuclidTime : new (uint64 ), EuclidV2Time : new (uint64 )}
224228
225229 cp := NewChunkProposer (context .Background (), & config.ChunkProposerConfig {
226- MaxBlockNumPerChunk : math .MaxUint64 ,
227- MaxL2GasPerChunk : math .MaxUint64 ,
228- ChunkTimeoutSec : 0 ,
230+ MaxBlockNumPerChunk : math .MaxUint64 ,
231+ MaxL2GasPerChunk : math .MaxUint64 ,
232+ ChunkTimeoutSec : 0 ,
233+ MaxUncompressedBatchBytesSize : 4000000 ,
229234 }, encoding .CodecV7 , chainConfig , db , nil )
230235
231236 block = readBlockFromJSON (t , "../../../testdata/blockTrace_03.json" )
@@ -238,8 +243,9 @@ func testBatchProposerMaxChunkNumPerBatchLimitCodecV7(t *testing.T) {
238243 }
239244
240245 bp := NewBatchProposer (context .Background (), & config.BatchProposerConfig {
241- MaxChunksPerBatch : 45 ,
242- BatchTimeoutSec : math .MaxUint32 ,
246+ MaxChunksPerBatch : 45 ,
247+ BatchTimeoutSec : math .MaxUint32 ,
248+ MaxUncompressedBatchBytesSize : 4000000 ,
243249 }, encoding .CodecV7 , chainConfig , db , nil )
244250 bp .TryProposeBatch ()
245251
0 commit comments