Skip to content

Commit

Permalink
use a string for tee verifier address
Browse files Browse the repository at this point in the history
Koanf cannot parse a common.Address by default, so we should use a
string when taking in this config option.
  • Loading branch information
zacshowa committed Dec 17, 2024
1 parent 0e1b7d9 commit 70b1ea5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arbnode/batch_poster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -288,6 +289,7 @@ var DefaultBatchPosterConfig = BatchPosterConfig{
EspressoSwitchDelayThreshold: 350,
LightClientAddress: "",
HotShotUrl: "",
EspressoTEEVerifierAdddress: ""
}

var DefaultBatchPosterL1WalletConfig = genericconf.WalletConfig{
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 70b1ea5

Please sign in to comment.