44 "context"
55 "fmt"
66 "io"
7- "net"
87 "strconv"
98 "strings"
109 "time"
@@ -29,6 +28,7 @@ func (r *RollupBoost) Apply(manifest *Manifest) {
2928 service := manifest .NewService ("rollup-boost" ).
3029 WithImage ("docker.io/flashbots/rollup-boost" ).
3130 WithTag ("v0.7.5" ).
31+ DependsOnHealthy (r .ELNode ).
3232 WithArgs (
3333 "--rpc-host" , "0.0.0.0" ,
3434 "--rpc-port" , `{{Port "authrpc" 8551}}` ,
@@ -220,47 +220,31 @@ func (w *WebsocketProxy) Apply(manifest *Manifest) {
220220 )
221221}
222222
223- func (w * WebsocketProxy ) Name () string {
224- return "websocket-proxy"
225- }
226-
227223type ChainMonitor struct {
228224 L1RPC string
229225 L2BlockTime string
230226 L2BuilderAddress string
231227 L2RPC string
232- ServerListenAddress string
233228}
234229
235- func (c * ChainMonitor ) Run (service * Service , ctx * ExContext ) {
236- serverListenAddress := c .ServerListenAddress
237- if serverListenAddress == "" {
238- serverListenAddress = "0.0.0.0:{{Port \" metrics\" 8080}}"
239- }
240-
241- // we need to extract the port to register this service as exposing metrics
242- if _ , portStr , err := net .SplitHostPort (serverListenAddress ); err == nil {
243- if portNum , err := strconv .Atoi (portStr ); err == nil {
244- service .WithPort ("metrics" , portNum )
245- }
246- }
230+ func (c * ChainMonitor ) Apply (manifest * Manifest ) {
231+ l1rpc := Connect (c .L1RPC , "http" )
247232
248- service .WithImage ("ghcr.io/flashbots/chain-monitor" ).
249- WithTag ("v0.0.54" ).
233+ manifest .NewService ("chain-monitor" ).
234+ WithPort ("metrics" , 8080 ).
235+ WithImage ("ghcr.io/flashbots/chain-monitor" ).
236+ WithTag ("v0.0.54" ).
237+ DependsOnHealthy (l1rpc ).
238+ DependsOnHealthy (c .L2RPC ).
250239 WithArgs (
251240 "serve" ,
252- "--l1-rpc" , c . L1RPC ,
241+ "--l1-rpc" , l1rpc ,
253242 "--l2-block-time" , c .L2BlockTime ,
254243 "--l2-monitor-builder-address" , c .L2BuilderAddress ,
255- "--l2-rpc" , c .L2RPC ,
256- "--server-listen-address" , serverListenAddress ,
244+ "--l2-rpc" , Connect (c .L2RPC , "http" ),
257245 )
258246}
259247
260- func (c * ChainMonitor ) Name () string {
261- return "chain-monitor"
262- }
263-
264248type OpBatcher struct {
265249 L1Node string
266250 L2Node string
0 commit comments