Skip to content

feat: Add builder-hub component and buildernet-recipe #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 31, 2025
1 change: 1 addition & 0 deletions internal/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func init() {
register(&BuilderHub{})
register(&BuilderHubPostgres{})
register(&BuilderHubMockProxy{})
register(&OrderflowProxySender{})
}

func FindComponent(name string) Service {
Expand Down
32 changes: 32 additions & 0 deletions internal/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,38 @@ func (b *BuilderHubMockProxy) Name() string {
return "builder-hub-mock-proxy"
}

type OrderflowProxySender struct {
ConfigHubEndpoint string
SignerKey string
}

func (o *OrderflowProxySender) Run(service *service, ctx *ExContext) {
service.
WithImage("docker.io/flashbots/orderflow-proxy-sender").
WithTag("latest").
WithArgs(
"--listen-address", fmt.Sprintf("0.0.0.0:%s", `{{Port "http" 8080}}`),
"--builder-confighub-endpoint", Connect(o.ConfigHubEndpoint, "http"),
"--orderflow-signer-key", o.SignerKey,
"--connections-per-peer", "10",
"--metrics-addr", fmt.Sprintf("0.0.0.0:%s", `{{Port "metrics" 8090}}`),
"--log-json",
).
WithPort("http", 8080).
WithPort("metrics", 8090).
WithReady(ReadyCheck{
Test: []string{"CMD-SHELL", "wget -q --spider http://localhost:8080 || curl -s http://localhost:8080 > /dev/null"},
Interval: 1 * time.Second,
Timeout: 5 * time.Second,
Retries: 3,
StartPeriod: 3 * time.Second,
})
}

func (o *OrderflowProxySender) Name() string {
return "orderflow-proxy-sender"
}

type OpReth struct {
}

Expand Down
6 changes: 6 additions & 0 deletions internal/recipe_buildernet.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ type BuilderNetRecipe struct {

// Add mock proxy for testing
includeMockProxy bool

// Add orderflow proxy sender
includeOrderflowProxySender bool

// Orderflow proxy signer key
orderflowProxySignerKey string
}

func (b *BuilderNetRecipe) Name() string {
Expand Down