@@ -255,6 +255,11 @@ pub trait ConfigurationSource {
255255 panic ! ( "cardano_transactions_signing_config is not implemented." ) ;
256256 }
257257
258+ /// Blocks offset, from the tip of the chain, to exclude during the cardano transactions preload
259+ fn preload_security_parameter ( & self ) -> BlockNumber {
260+ panic ! ( "preload_security_parameter is not implemented." ) ;
261+ }
262+
258263 /// Maximum number of transactions hashes allowed by request to the prover of the Cardano transactions
259264 fn cardano_transactions_prover_max_hashes_allowed_by_request ( & self ) -> usize {
260265 panic ! ( "cardano_transactions_prover_max_hashes_allowed_by_request is not implemented." ) ;
@@ -558,6 +563,10 @@ pub struct ServeCommandConfiguration {
558563 #[ example = "`{ security_parameter: 3000, step: 120 }`" ]
559564 pub cardano_transactions_signing_config : CardanoTransactionsSigningConfig ,
560565
566+ /// Blocks offset, from the tip of the chain, to exclude during the cardano transactions preload
567+ /// `[default: 2160]`.
568+ pub preload_security_parameter : BlockNumber ,
569+
561570 /// Maximum number of transactions hashes allowed by request to the prover of the Cardano transactions
562571 pub cardano_transactions_prover_max_hashes_allowed_by_request : usize ,
563572
@@ -714,6 +723,7 @@ impl ServeCommandConfiguration {
714723 security_parameter : BlockNumber ( 120 ) ,
715724 step : BlockNumber ( 15 ) ,
716725 } ,
726+ preload_security_parameter : BlockNumber ( 30 ) ,
717727 cardano_transactions_prover_max_hashes_allowed_by_request : 100 ,
718728 cardano_transactions_block_streamer_max_roll_forwards_per_poll : 1000 ,
719729 enable_metrics_server : true ,
@@ -881,6 +891,10 @@ impl ConfigurationSource for ServeCommandConfiguration {
881891 self . cardano_transactions_signing_config . clone ( )
882892 }
883893
894+ fn preload_security_parameter ( & self ) -> BlockNumber {
895+ self . preload_security_parameter
896+ }
897+
884898 fn cardano_transactions_prover_max_hashes_allowed_by_request ( & self ) -> usize {
885899 self . cardano_transactions_prover_max_hashes_allowed_by_request
886900 }
@@ -981,6 +995,9 @@ pub struct DefaultConfiguration {
981995 /// Cardano transactions signing configuration
982996 pub cardano_transactions_signing_config : CardanoTransactionsSigningConfig ,
983997
998+ /// Blocks offset, from the tip of the chain, to exclude during the cardano transactions preload
999+ pub preload_security_parameter : u64 ,
1000+
9841001 /// Maximum number of transactions hashes allowed by request to the prover of the Cardano transactions
9851002 pub cardano_transactions_prover_max_hashes_allowed_by_request : u32 ,
9861003
@@ -1026,6 +1043,7 @@ impl Default for DefaultConfiguration {
10261043 security_parameter : BlockNumber ( 3000 ) ,
10271044 step : BlockNumber ( 120 ) ,
10281045 } ,
1046+ preload_security_parameter : 2160 ,
10291047 cardano_transactions_prover_max_hashes_allowed_by_request : 100 ,
10301048 cardano_transactions_block_streamer_max_roll_forwards_per_poll : 10000 ,
10311049 enable_metrics_server : "false" . to_string ( ) ,
@@ -1104,14 +1122,15 @@ impl Source for DefaultConfiguration {
11041122 & namespace,
11051123 myself. persist_usage_report_interval_in_seconds
11061124 ) ;
1125+ register_config_value ! ( result, & namespace, myself. preload_security_parameter) ;
11071126 register_config_value ! (
11081127 result,
11091128 & namespace,
11101129 myself. cardano_transactions_signing_config,
11111130 |v: CardanoTransactionsSigningConfig | HashMap :: from( [
11121131 (
11131132 "security_parameter" . to_string( ) ,
1114- ValueKind :: from( * v. security_parameter, ) ,
1133+ ValueKind :: from( * v. security_parameter) ,
11151134 ) ,
11161135 ( "step" . to_string( ) , ValueKind :: from( * v. step) , )
11171136 ] )
0 commit comments