diff --git a/playground/components.go b/playground/components.go index ee70830..8bb73ac 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"). @@ -188,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") diff --git a/playground/recipe_opstack.go b/playground/recipe_opstack.go index d0b1a0e..8201f71 100644 --- a/playground/recipe_opstack.go +++ b/playground/recipe_opstack.go @@ -12,6 +12,10 @@ type OpRecipe struct { // rollup-boost on the sequencer and uses this URL as the external builder. externalBuilder 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 @@ -49,6 +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.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") @@ -109,6 +114,8 @@ func (o *OpRecipe) Apply(ctx *ExContext, artifacts *Artifacts) *Manifest { peers = append(peers, "flashblocks-rpc") } + 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 { svcManager.AddService("bproxy", &BProxy{