Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit f795515

Browse files
Ruteriavalonche
authored andcommitted
Add disable bundle fetcher flag (#48)
1 parent 236329f commit f795515

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

builder/service.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ type BuilderConfig struct {
108108
Enabled bool
109109
EnableValidatorChecks bool
110110
EnableLocalRelay bool
111+
DisableBundleFetcher bool
111112
DryRun bool
112113
BuilderSecretKey string
113114
RelaySecretKey string
@@ -203,10 +204,12 @@ func Register(stack *node.Node, backend *eth.Ethereum, cfg *BuilderConfig) error
203204
}
204205

205206
// Bundle fetcher
206-
mevBundleCh := make(chan []types.MevBundle)
207-
blockNumCh := make(chan int64)
208-
bundleFetcher := flashbotsextra.NewBundleFetcher(backend, ds, blockNumCh, mevBundleCh, true)
209-
go bundleFetcher.Run()
207+
if !cfg.DisableBundleFetcher {
208+
mevBundleCh := make(chan []types.MevBundle)
209+
blockNumCh := make(chan int64)
210+
bundleFetcher := flashbotsextra.NewBundleFetcher(backend, ds, blockNumCh, mevBundleCh, true)
211+
go bundleFetcher.Run()
212+
}
210213

211214
ethereumService := NewEthereumService(backend)
212215
builderBackend := NewBuilder(builderSk, ds, relay, builderSigningDomain, ethereumService, cfg.DryRun, validator)

cmd/geth/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ var (
146146
utils.BuilderEnabled,
147147
utils.BuilderEnableValidatorChecks,
148148
utils.BuilderEnableLocalRelay,
149+
utils.BuilderDisableBundleFetcher,
149150
utils.BuilderDryRun,
150151
utils.BuilderSecretKey,
151152
utils.BuilderRelaySecretKey,

cmd/utils/flags.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,10 @@ var (
630630
Name: "builder.local_relay",
631631
Usage: "Enable the local relay",
632632
}
633+
BuilderDisableBundleFetcher = &cli.BoolFlag{
634+
Name: "builder.no_bundle_fetcher",
635+
Usage: "Disable the bundle fetcher",
636+
}
633637
BuilderDryRun = &cli.BoolFlag{
634638
Name: "builder.dry-run",
635639
Usage: "Builder only validates blocks without submission to the relay",

0 commit comments

Comments
 (0)