From 70b1ea52187fa4b9b9f5fd69067be902b7937b06 Mon Sep 17 00:00:00 2001 From: Zach Showalter Date: Mon, 16 Dec 2024 20:06:16 -0500 Subject: [PATCH] use a string for tee verifier address Koanf cannot parse a common.Address by default, so we should use a string when taking in this config option. --- arbnode/batch_poster.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arbnode/batch_poster.go b/arbnode/batch_poster.go index 784b5a64ae..9b470cf7c4 100644 --- a/arbnode/batch_poster.go +++ b/arbnode/batch_poster.go @@ -188,7 +188,7 @@ type BatchPosterConfig struct { UseEscapeHatch bool `koanf:"use-escape-hatch"` EspressoTxnsPollingInterval time.Duration `koanf:"espresso-txns-polling-interval"` EspressoSwitchDelayThreshold uint64 `koanf:"espresso-switch-delay-threshold"` - EspressoTEEVerifierAdddress common.Address `koanf:"espresso-tee-verifier-address"` + EspressoTEEVerifierAdddress string `koanf:"espresso-tee-verifier-address"` } func (c *BatchPosterConfig) Validate() error { @@ -250,6 +250,7 @@ func BatchPosterConfigAddOptions(prefix string, f *pflag.FlagSet) { f.Bool(prefix+".use-escape-hatch", DefaultBatchPosterConfig.UseEscapeHatch, "if true, batches will be posted without doing the espresso verification when hotshot is down. If false, wait for hotshot being up") f.Duration(prefix+".espresso-txns-polling-interval", DefaultBatchPosterConfig.EspressoTxnsPollingInterval, "interval between polling for transactions to be included in the block") f.Uint64(prefix+".espresso-switch-delay-threshold", DefaultBatchPosterConfig.EspressoSwitchDelayThreshold, "specifies the switch delay threshold used to determine hotshot liveness") + f.String(prefix+"espresso-tee-verifier-address", DefaultBatchPosterConfig.EspressoTEEVerifierAdddress, "") redislock.AddConfigOptions(prefix+".redis-lock", f) dataposter.DataPosterConfigAddOptions(prefix+".data-poster", f, dataposter.DefaultDataPosterConfig) genericconf.WalletConfigAddOptions(prefix+".parent-chain-wallet", f, DefaultBatchPosterConfig.ParentChainWallet.Pathname) @@ -288,6 +289,7 @@ var DefaultBatchPosterConfig = BatchPosterConfig{ EspressoSwitchDelayThreshold: 350, LightClientAddress: "", HotShotUrl: "", + EspressoTEEVerifierAdddress: "" } var DefaultBatchPosterL1WalletConfig = genericconf.WalletConfig{ @@ -388,7 +390,7 @@ func NewBatchPoster(ctx context.Context, opts *BatchPosterOpts) (*BatchPoster, e opts.Streamer.UseEscapeHatch = opts.Config().UseEscapeHatch opts.Streamer.espressoTxnsPollingInterval = opts.Config().EspressoTxnsPollingInterval opts.Streamer.espressoSwitchDelayThreshold = opts.Config().EspressoSwitchDelayThreshold - opts.Streamer.espressoTEEVerifierAddress = opts.Config().EspressoTEEVerifierAdddress + opts.Streamer.espressoTEEVerifierAddress = common.HexToAddress(opts.Config().EspressoTEEVerifierAdddress) } b := &BatchPoster{