@@ -57,7 +57,9 @@ type BoldConfig struct {
5757 // How often to scan for newly created assertions onchain.
5858 AssertionScanningInterval time.Duration `koanf:"assertion-scanning-interval"`
5959 // How often to confirm assertions onchain.
60- AssertionConfirmingInterval time.Duration `koanf:"assertion-confirming-interval"`
60+ AssertionConfirmingInterval time.Duration `koanf:"assertion-confirming-interval"`
61+ // How long to wait since parent assertion was created to post a new assertion
62+ MinimumGapToParentAssertion time.Duration `koanf:"minimum-gap-to-parent-assertion"`
6163 API bool `koanf:"api"`
6264 APIHost string `koanf:"api-host"`
6365 APIPort uint16 `koanf:"api-port"`
@@ -98,6 +100,7 @@ var DefaultBoldConfig = BoldConfig{
98100 AssertionPostingInterval : time .Minute * 15 ,
99101 AssertionScanningInterval : time .Minute ,
100102 AssertionConfirmingInterval : time .Minute ,
103+ MinimumGapToParentAssertion : time .Minute , // Correct default?
101104 API : false ,
102105 APIHost : "127.0.0.1" ,
103106 APIPort : 9393 ,
@@ -121,6 +124,7 @@ func BoldConfigAddOptions(prefix string, f *flag.FlagSet) {
121124 f .Duration (prefix + ".assertion-posting-interval" , DefaultBoldConfig .AssertionPostingInterval , "assertion posting interval" )
122125 f .Duration (prefix + ".assertion-scanning-interval" , DefaultBoldConfig .AssertionScanningInterval , "scan assertion interval" )
123126 f .Duration (prefix + ".assertion-confirming-interval" , DefaultBoldConfig .AssertionConfirmingInterval , "confirm assertion interval" )
127+ f .Duration (prefix + ".minimum-gap-to-parent-assertion" , DefaultBoldConfig .MinimumGapToParentAssertion , "minimum duration to wait since the parent assertion was created to post a new assertion" )
124128 f .Duration (prefix + ".check-staker-switch-interval" , DefaultBoldConfig .CheckStakerSwitchInterval , "how often to check if staker can switch to bold" )
125129 f .Bool (prefix + ".api" , DefaultBoldConfig .API , "enable api" )
126130 f .String (prefix + ".api-host" , DefaultBoldConfig .APIHost , "bold api host" )
@@ -455,6 +459,7 @@ func newBOLDChallengeManager(
455459 challengemanager .StackWithPollingInterval (scanningInterval ),
456460 challengemanager .StackWithPostingInterval (postingInterval ),
457461 challengemanager .StackWithConfirmationInterval (confirmingInterval ),
462+ challengemanager .StackWithMinimumGapToParentAssertion (config .MinimumGapToParentAssertion ),
458463 challengemanager .StackWithTrackChallengeParentAssertionHashes (config .TrackChallengeParentAssertionHashes ),
459464 challengemanager .StackWithHeaderProvider (l1Reader ),
460465 }
0 commit comments