Skip to content

Commit

Permalink
Add dangerous batch poster options configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
tsahee committed Nov 7, 2024
1 parent b8cf6ea commit 40c8c9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arbnode/batch_poster.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ func (c *BatchPosterConfig) Validate() error {

type BatchPosterConfigFetcher func() *BatchPosterConfig

func DangerousBatchPosterConfigAddOptions(prefix string, f *pflag.FlagSet) {
f.Bool(prefix+".allow-posting-first-batch-when-sequencer-message-count-mismatch", DefaultBatchPosterConfig.Dangerous.AllowPostingFirstBatchWhenSequencerMessageCountMismatch, "allow posting the first batch even if sequence number doesn't match chain (useful after force-inclusion)")
}

func BatchPosterConfigAddOptions(prefix string, f *pflag.FlagSet) {
f.Bool(prefix+".enable", DefaultBatchPosterConfig.Enable, "enable posting batches to l1")
f.Bool(prefix+".disable-dap-fallback-store-data-on-chain", DefaultBatchPosterConfig.DisableDapFallbackStoreDataOnChain, "If unable to batch to DA provider, disable fallback storing data on chain")
Expand All @@ -229,6 +233,7 @@ func BatchPosterConfigAddOptions(prefix string, f *pflag.FlagSet) {
redislock.AddConfigOptions(prefix+".redis-lock", f)
dataposter.DataPosterConfigAddOptions(prefix+".data-poster", f, dataposter.DefaultDataPosterConfig)
genericconf.WalletConfigAddOptions(prefix+".parent-chain-wallet", f, DefaultBatchPosterConfig.ParentChainWallet.Pathname)
DangerousBatchPosterConfigAddOptions(prefix+".dangerous", f)
}

var DefaultBatchPosterConfig = BatchPosterConfig{
Expand Down

0 comments on commit 40c8c9a

Please sign in to comment.