@@ -134,12 +134,12 @@ func TestTxGossipingMultipleNodesDAIncluded(t *testing.T) {
134134func TestFastDASync (t * testing.T ) {
135135 require := require .New (t )
136136
137- // Set up two nodes with different block and DA block times
137+ // Set up two nodes where DA is faster than block production
138138 config := getTestConfig (t , 1 )
139- // Set the block time to 2 seconds and the DA block time to 1 second
140- // Note: these are large values to avoid test failures due to slow CI machines
141- config . Node . BlockTime = evconfig. DurationWrapper { Duration : 2 * time . Second }
142- config .DA .BlockTime = evconfig.DurationWrapper {Duration : 1 * time .Second }
139+ // Slow block production (sequencer takes 1s per block)
140+ config . Node . BlockTime = evconfig. DurationWrapper { Duration : 1 * time . Second }
141+ // Fast DA availability (DA makes blocks available every 200ms)
142+ config .DA .BlockTime = evconfig.DurationWrapper {Duration : 200 * time .Millisecond }
143143
144144 nodes , cleanups := createNodesWithCleanup (t , 2 , config )
145145 for _ , cleanup := range cleanups {
@@ -165,10 +165,15 @@ func TestFastDASync(t *testing.T) {
165165 // Wait for the second node to catch up to the first node
166166 require .NoError (waitForAtLeastNBlocks (nodes [1 ], blocksToWaitFor , Store ))
167167 syncDuration := time .Since (start )
168-
169- // Ensure node syncs within a small delta of DA block time
170- delta := 250 * time .Millisecond
171- require .Less (syncDuration , config .DA .BlockTime .Duration + delta , "Block sync should be faster than DA block time" )
168+ // The key test: sync should be much faster than sequential block production time
169+ // Since DA provides blocks faster than sequencer block time, sync should complete
170+ // in significantly less time than it took the sequencer to produce them sequentially
171+ expectedSequentialTime := time .Duration (blocksToWaitFor ) * config .Node .BlockTime .Duration
172+ maxReasonableSyncTime := expectedSequentialTime / 3 // Should be at least 3x faster than sequential
173+
174+ require .Less (syncDuration , maxReasonableSyncTime ,
175+ "DA fast sync took %v, should be much faster than sequential block time %v (max reasonable: %v). " ,
176+ syncDuration , expectedSequentialTime , maxReasonableSyncTime )
172177
173178 // Verify both nodes are synced and that the synced block is DA-included
174179 assertAllNodesSynced (t , nodes , blocksToWaitFor )
0 commit comments