@@ -37,10 +37,21 @@ pub struct FlashblocksConfig {
3737 /// The address of the flashblocks number contract.
3838 ///
3939 /// If set a builder tx will be added to the start of every flashblock instead of the regular builder tx.
40- pub flashblocks_number_contract_address : Option < Address > ,
40+ pub number_contract_address : Option < Address > ,
4141
4242 /// whether to use permit signatures for the contract calls
43- pub flashblocks_number_contract_use_permit : bool ,
43+ pub number_contract_use_permit : bool ,
44+
45+ /// Build flashblock at the end of the flashblock interval
46+ pub build_at_interval_end : bool ,
47+
48+ /// Offset in milliseconds for when to send flashblocks.
49+ /// Positive values send late, negative values send early.
50+ pub send_offset_ms : i64 ,
51+
52+ /// Time in milliseconds to build the last flashblock early before the end of the slot.
53+ /// This serves as a buffer time to account for the last flashblock being delayed.
54+ pub end_buffer_ms : u64 ,
4455
4556 /// Whether to enable the p2p node for flashblocks
4657 pub p2p_enabled : bool ,
@@ -63,11 +74,14 @@ impl Default for FlashblocksConfig {
6374 Self {
6475 ws_addr : SocketAddr :: new ( Ipv4Addr :: UNSPECIFIED . into ( ) , 1111 ) ,
6576 interval : Duration :: from_millis ( 250 ) ,
66- leeway_time : Duration :: from_millis ( 50 ) ,
77+ leeway_time : Duration :: from_millis ( 0 ) ,
6778 fixed : false ,
6879 disable_state_root : false ,
69- flashblocks_number_contract_address : None ,
70- flashblocks_number_contract_use_permit : false ,
80+ number_contract_address : None ,
81+ number_contract_use_permit : false ,
82+ build_at_interval_end : false ,
83+ send_offset_ms : 0 ,
84+ end_buffer_ms : 0 ,
7185 p2p_enabled : false ,
7286 p2p_port : 9009 ,
7387 p2p_private_key_file : None ,
@@ -94,20 +108,21 @@ impl TryFrom<OpRbuilderArgs> for FlashblocksConfig {
94108
95109 let disable_state_root = args. flashblocks . flashblocks_disable_state_root ;
96110
97- let flashblocks_number_contract_address =
98- args. flashblocks . flashblocks_number_contract_address ;
111+ let number_contract_address = args. flashblocks . flashblocks_number_contract_address ;
99112
100- let flashblocks_number_contract_use_permit =
101- args. flashblocks . flashblocks_number_contract_use_permit ;
113+ let number_contract_use_permit = args. flashblocks . flashblocks_number_contract_use_permit ;
102114
103115 Ok ( Self {
104116 ws_addr,
105117 interval,
106118 leeway_time,
107119 fixed,
108120 disable_state_root,
109- flashblocks_number_contract_address,
110- flashblocks_number_contract_use_permit,
121+ number_contract_address,
122+ number_contract_use_permit,
123+ build_at_interval_end : args. flashblocks . flashblocks_build_at_interval_end ,
124+ send_offset_ms : args. flashblocks . flashblocks_send_offset_ms ,
125+ end_buffer_ms : args. flashblocks . flashblocks_end_buffer_ms ,
111126 p2p_enabled : args. flashblocks . p2p . p2p_enabled ,
112127 p2p_port : args. flashblocks . p2p . p2p_port ,
113128 p2p_private_key_file : args. flashblocks . p2p . p2p_private_key_file ,
0 commit comments