Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion playground/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -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").
Expand All @@ -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")

Expand Down
7 changes: 7 additions & 0 deletions playground/recipe_opstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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{
Expand Down