File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -255,9 +255,18 @@ where
255
255
// Adding 0.5 seconds as wiggle room since block times are shorter here.
256
256
// TODO: A better long-term solution would be to implement cancellation logic
257
257
// that cancels existing jobs when receiving new block building requests.
258
+ //
259
+ // When batcher's max channel duration is big enough (e.g. 10m), the
260
+ // sequencer would send an avalanche of FCUs/getBlockByNumber on
261
+ // each batcher update (with 10m channel it's ~800 FCUs at once).
262
+ // At such moment it can happen that the time b/w FCU and ensuing
263
+ // getPayload would be on the scale of ~2.5s. Therefore we should
264
+ // "remember" the payloads long enough to accommodate this corner-case
265
+ // (without it we are losing blocks). Postponing the deadline for 5s
266
+ // (not just 0.5s) because of that.
258
267
let config = PayloadConfig :: new ( Arc :: new ( parent_header. clone ( ) ) , attributes) ;
259
268
260
- let until = job_deadline ( config. attributes . timestamp ( ) ) + Duration :: from_millis ( 500 ) ;
269
+ let until = job_deadline ( config. attributes . timestamp ( ) ) + Duration :: from_millis ( 5000 ) ;
261
270
let deadline = Box :: pin ( tokio:: time:: sleep_until ( until) ) ;
262
271
263
272
let cached_reads = self . maybe_pre_cached ( parent_header. hash ( ) ) ;
You can’t perform that action at this time.
0 commit comments