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: 7 additions & 0 deletions cmd/el-proxy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/offchainlabs/nitro/cmd/conf"
"github.com/offchainlabs/nitro/cmd/genericconf"
"github.com/offchainlabs/nitro/execution/gethexec"
"github.com/offchainlabs/nitro/util/colors"
)

Expand All @@ -31,6 +32,7 @@ type ExpressLaneProxyConfig struct {
HTTP genericconf.HTTPConfig `koanf:"http"`
WS genericconf.WSConfig `koanf:"ws"`
IPC genericconf.IPCConfig `koanf:"ipc"`
MaxTxDataSize uint64 `koanf:"max-tx-data-size" reload:"hot"`
Metrics bool `koanf:"metrics"`
MetricsServer genericconf.MetricsServerConfig `koanf:"metrics-server"`
PProf bool `koanf:"pprof"`
Expand Down Expand Up @@ -72,6 +74,7 @@ var ExpressLaneProxyConfigDefault = ExpressLaneProxyConfig{
HTTP: HTTPConfigDefault,
WS: WSConfigDefault,
IPC: IPCConfigDefault,
MaxTxDataSize: uint64(gethexec.DefaultSequencerConfig.MaxTxDataSize),
Metrics: false,
MetricsServer: genericconf.MetricsServerConfigDefault,
PProf: false,
Expand All @@ -94,6 +97,7 @@ func ExpressLaneProxyConfigAddOptions(f *pflag.FlagSet) {
genericconf.HTTPConfigAddOptions("http", f)
genericconf.WSConfigAddOptions("ws", f)
genericconf.IPCConfigAddOptions("ipc", f)
f.Uint64("max-tx-data-size", ExpressLaneProxyConfigDefault.MaxTxDataSize, "maximum transaction size the sequencer will accept")
f.Bool("metrics", ExpressLaneProxyConfigDefault.Metrics, "enable metrics")
genericconf.MetricsServerAddOptions("metrics-server", f)
f.Bool("pprof", ExpressLaneProxyConfigDefault.PProf, "enable pprof")
Expand Down Expand Up @@ -143,6 +147,9 @@ func (c *ExpressLaneProxyConfig) GetReloadInterval() time.Duration {
}

func (c *ExpressLaneProxyConfig) Validate() error {
if err := gethexec.ValidateMaxTxDataSize(c.MaxTxDataSize); err != nil {
return err
}
return nil
}

Expand Down
6 changes: 5 additions & 1 deletion cmd/el-proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,19 @@ func NewExpressLaneProxy(
return nil, err
}

expressLaneTracker := gethexec.NewExpressLaneTracker(
expressLaneTracker, err := gethexec.NewExpressLaneTracker(
*roundTimingInfo,
time.Millisecond*250,
&HeaderProviderAdapter{arbClient},
auctionContract,
auctionContractAddr,
&params.ChainConfig{ChainID: big.NewInt(config.ChainId)},
config.MaxTxDataSize,
0,
)
if err != nil {
return nil, fmt.Errorf("error creating express lane tracker: %w", err)
}

_, dataSignerFunc, err := util.OpenWallet("el-proxy", &config.Wallet, big.NewInt(config.ChainId))
if err != nil {
Expand Down
Loading
Loading