From e0ac3d75da9e8e3244f9b04410dd671c7030fdf8 Mon Sep 17 00:00:00 2001 From: Denis Kolodin Date: Thu, 25 Sep 2025 17:52:59 +0200 Subject: [PATCH 1/4] Add a parameter to set a peer for bproxy --- playground/recipe_opstack.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/playground/recipe_opstack.go b/playground/recipe_opstack.go index d0b1a0e..90a00c8 100644 --- a/playground/recipe_opstack.go +++ b/playground/recipe_opstack.go @@ -12,6 +12,9 @@ type OpRecipe struct { // rollup-boost on the sequencer and uses this URL as the external builder. externalBuilder string + // an extra peer for a bproxy + authrpcPeer string + // whether to enable the latest fork isthmus and when enableLatestFork *uint64 @@ -49,6 +52,7 @@ func (o *OpRecipe) Description() string { func (o *OpRecipe) Flags() *flag.FlagSet { flags := flag.NewFlagSet("opstack", flag.ContinueOnError) flags.StringVar(&o.externalBuilder, "external-builder", "", "External builder URL") + flags.StringVar(&o.authrpcPeer, "authrpc-peer", "", "A peer for bproxy") flags.Var(&nullableUint64Value{&o.enableLatestFork}, "enable-latest-fork", "Enable latest fork isthmus (nil or empty = disabled, otherwise enabled at specified block)") flags.Uint64Var(&o.blockTime, "block-time", defaultOpBlockTimeSeconds, "Block time to use for the rollup") flags.Uint64Var(&o.batcherMaxChannelDuration, "batcher-max-channel-duration", 2, "Maximum channel duration to use for the batcher") @@ -109,6 +113,10 @@ func (o *OpRecipe) Apply(ctx *ExContext, artifacts *Artifacts) *Manifest { peers = append(peers, "flashblocks-rpc") } + if o.authrpcPeer != "" { + peers = append(peers, o.authrpcPeer) + } + // Only enable bproxy if flashblocks is enabled (since flashblocks-rpc is the only service that needs it) if o.flashblocks { svcManager.AddService("bproxy", &BProxy{ From 4c8312ae0ba6ea0ba4c47e6a7f3c0d639f461654 Mon Sep 17 00:00:00 2001 From: Denis Kolodin Date: Fri, 26 Sep 2025 16:27:08 +0200 Subject: [PATCH 2/4] Allow to set peers parameter multiple times --- playground/recipe_opstack.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/playground/recipe_opstack.go b/playground/recipe_opstack.go index 90a00c8..8201f71 100644 --- a/playground/recipe_opstack.go +++ b/playground/recipe_opstack.go @@ -12,8 +12,9 @@ type OpRecipe struct { // rollup-boost on the sequencer and uses this URL as the external builder. externalBuilder string - // an extra peer for a bproxy - authrpcPeer string + // authrpcPeers is a list of additional peers to connect to the bproxy service. + // Each peer can be specified multiple times using the --authrpc-peer flag. + authrpcPeers []string // whether to enable the latest fork isthmus and when enableLatestFork *uint64 @@ -52,7 +53,7 @@ func (o *OpRecipe) Description() string { func (o *OpRecipe) Flags() *flag.FlagSet { flags := flag.NewFlagSet("opstack", flag.ContinueOnError) flags.StringVar(&o.externalBuilder, "external-builder", "", "External builder URL") - flags.StringVar(&o.authrpcPeer, "authrpc-peer", "", "A peer for bproxy") + flags.StringSliceVar(&o.authrpcPeers, "authrpc-peers", []string{}, "Peers for bproxy (can be specified multiple times)") flags.Var(&nullableUint64Value{&o.enableLatestFork}, "enable-latest-fork", "Enable latest fork isthmus (nil or empty = disabled, otherwise enabled at specified block)") flags.Uint64Var(&o.blockTime, "block-time", defaultOpBlockTimeSeconds, "Block time to use for the rollup") flags.Uint64Var(&o.batcherMaxChannelDuration, "batcher-max-channel-duration", 2, "Maximum channel duration to use for the batcher") @@ -113,9 +114,7 @@ func (o *OpRecipe) Apply(ctx *ExContext, artifacts *Artifacts) *Manifest { peers = append(peers, "flashblocks-rpc") } - if o.authrpcPeer != "" { - peers = append(peers, o.authrpcPeer) - } + peers = append(peers, o.authrpcPeers...) // Only enable bproxy if flashblocks is enabled (since flashblocks-rpc is the only service that needs it) if o.flashblocks { From 53e6546e59b0064fa091e9959859749ad16dc6ad Mon Sep 17 00:00:00 2001 From: Denis Kolodin Date: Fri, 26 Sep 2025 16:47:50 +0200 Subject: [PATCH 3/4] Add http peers directly (not as a service) --- playground/components.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/playground/components.go b/playground/components.go index ee70830..dcf2645 100644 --- a/playground/components.go +++ b/playground/components.go @@ -168,7 +168,11 @@ type BProxy struct { func (f *BProxy) Run(service *Service, ctx *ExContext) { peers := []string{} for _, peer := range f.Peers { - peers = append(peers, Connect(peer, "authrpc")) + if strings.HasPrefix(peer, "http") { + peers = append(peers, peer) + } else { + peers = append(peers, Connect(peer, "authrpc")) + } } service.WithImage("ghcr.io/flashbots/bproxy"). WithTag("v0.0.91"). From 08335e1ec279517da0d72f332133ab056cade7d5 Mon Sep 17 00:00:00 2001 From: Denis Kolodin Date: Fri, 3 Oct 2025 16:49:27 +0200 Subject: [PATCH 4/4] Proxy sendRawTransaction method --- playground/components.go | 1 + 1 file changed, 1 insertion(+) diff --git a/playground/components.go b/playground/components.go index dcf2645..8bb73ac 100644 --- a/playground/components.go +++ b/playground/components.go @@ -192,6 +192,7 @@ func (f *BProxy) Run(service *Service, ctx *ExContext) { "--authrpc-peers", strings.Join(peers, ","), "--authrpc-remove-backend-from-peers", "--authrpc-use-priority-queue", + "--authrpc-extra-mirrored-jrpc-methods", "eth_sendRawTransaction", ). WithArtifact("/data/jwtsecret", "jwtsecret")