@@ -2,7 +2,6 @@ package main
22
33import (
44 "context"
5- "errors"
65 "log"
76 "net/http"
87 "net/http/pprof"
@@ -22,11 +21,7 @@ import (
2221const (
2322 flagUserListenAddr = "user-listen-addr"
2423 flagSystemListenAddr = "system-listen-addr"
25- flagCertListenAddr = "cert-listen-addr"
2624 flagMaxUserRPS = "max-user-requests-per-second"
27-
28- flagCertPath = "cert-path"
29- flagCertKeyPath = "cert-key-path"
3025)
3126
3227var flags = []cli.Flag {
@@ -43,12 +38,6 @@ var flags = []cli.Flag{
4338 Usage : "server to receive orderflow from BuilderNet network" ,
4439 EnvVars : []string {"SYSTEM_LISTEN_ADDR" },
4540 },
46- & cli.StringFlag {
47- Name : flagCertListenAddr ,
48- Value : "127.0.0.1:14727" ,
49- Usage : "address to listen on for orderflow proxy serving its SSL certificate on /cert" ,
50- EnvVars : []string {"CERT_LISTEN_ADDR" },
51- },
5241
5342 // Connections to Builder, BuilderHub, RPC and block-processor
5443 & cli.StringFlag {
@@ -108,30 +97,6 @@ var flags = []cli.Flag{
10897 EnvVars : []string {"MAX_USER_RPS" },
10998 },
11099
111- // Certificate config
112- & cli.DurationFlag {
113- Name : "cert-duration" ,
114- Value : time .Hour * 24 * 365 ,
115- Usage : "generated certificate duration" ,
116- EnvVars : []string {"CERT_DURATION" },
117- },
118- & cli.StringSliceFlag {
119- Name : "cert-hosts" ,
120- Value : cli .NewStringSlice ("127.0.0.1" , "localhost" ),
121- Usage : "generated certificate hosts" ,
122- EnvVars : []string {"CERT_HOSTS" },
123- },
124- & cli.StringFlag {
125- Name : flagCertPath ,
126- Usage : "path where to store the generated certificate" ,
127- EnvVars : []string {"CERT_PATH" },
128- },
129- & cli.StringFlag {
130- Name : flagCertKeyPath ,
131- Usage : "path where to store the generated certificate key" ,
132- EnvVars : []string {"CERT_KEY_PATH" },
133- },
134-
135100 // Logging, metrics and debug
136101 & cli.StringFlag {
137102 Name : "metrics-addr" ,
@@ -246,20 +211,8 @@ func runMain(cCtx *cli.Context) error {
246211 archiveWorkerCount := cCtx .Int ("archive-worker-count" )
247212 maxUserRPS := cCtx .Int (flagMaxUserRPS )
248213
249- certDuration := cCtx .Duration ("cert-duration" )
250- certHosts := cCtx .StringSlice ("cert-hosts" )
251- certPath := cCtx .String (flagCertPath )
252- certKeyPath := cCtx .String (flagCertKeyPath )
253- if certPath == "" || certKeyPath == "" {
254- return errors .New ("cert-path and cert-key-path must be set" )
255- }
256-
257214 proxyConfig := & proxy.ReceiverProxyConfig {
258215 ReceiverProxyConstantConfig : proxy.ReceiverProxyConstantConfig {Log : log , FlashbotsSignerAddress : flashbotsSignerAddress },
259- CertValidDuration : certDuration ,
260- CertHosts : certHosts ,
261- CertPath : certPath ,
262- CertKeyPath : certKeyPath ,
263216 BuilderConfigHubEndpoint : builderConfigHubEndpoint ,
264217 ArchiveEndpoint : archiveEndpoint ,
265218 ArchiveConnections : connectionsPerPeer ,
@@ -286,24 +239,16 @@ func runMain(cCtx *cli.Context) error {
286239 }
287240 }()
288241
289- err = instance .RegisterSecrets (registerContext )
290- registerCancel ()
291- if err != nil {
292- log .Error ("Failed to generate and publish secrets" , "err" , err )
293- return err
294- }
295-
296242 userListenAddr := cCtx .String (flagUserListenAddr )
297243 systemListenAddr := cCtx .String (flagSystemListenAddr )
298- certListenAddr := cCtx .String (flagCertListenAddr )
299244
300- servers , err := proxy .StartReceiverServers (instance , userListenAddr , systemListenAddr , certListenAddr )
245+ servers , err := proxy .StartReceiverServers (instance , userListenAddr , systemListenAddr )
301246 if err != nil {
302247 log .Error ("Failed to start proxy server" , "err" , err )
303248 return err
304249 }
305250
306- log .Info ("Started receiver proxy" , "userListenAddress" , userListenAddr , "systemListenAddress" , systemListenAddr , "certListenAddress" , certListenAddr )
251+ log .Info ("Started receiver proxy" , "userListenAddress" , userListenAddr , "systemListenAddress" , systemListenAddr )
307252
308253 <- exit
309254 servers .Stop ()
0 commit comments