Skip to content

Commit

Permalink
chore: refactor code, add timeouts on operations
Browse files Browse the repository at this point in the history
  • Loading branch information
allnil committed Nov 13, 2024
1 parent 14a0e2b commit c93dc36
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 225 deletions.
3 changes: 3 additions & 0 deletions .env.example.holesky
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ EIGENDA_PROXY_EIGENDA_SERVICE_MANAGER_ADDR=0xD4A7E1Bd8015057293f0D0A557088c28694
# WVM chain id
# EIGENDA_PROXY_WVM_CHAIN_ID=9496

# WVM operations timeout
# EIGENDA_PROXY_WVM_TIMEOUT=5s

# WVM web3signer endpoint
# EIGENDA_PROXY_WVM_WEB3_SIGNER_ENDPOINT=

Expand Down
18 changes: 10 additions & 8 deletions store/precomputed_key/wvm/cli.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package wvm

import (
"time"

"github.com/urfave/cli/v2"
)

Expand Down Expand Up @@ -56,13 +58,13 @@ func CLIFlags(envPrefix, category string) []cli.Flag {
EnvVars: withEnvPrefix(envPrefix, "WEB3_SIGNER_ENDPOINT"),
Category: category,
},
// &cli.DurationFlag{
// Name: TimeoutFlagName,
// Usage: "timeout for S3 storage operations (e.g. get, put)",
// Value: 5 * time.Second,
// EnvVars: withEnvPrefix(envPrefix, "TIMEOUT"),
// Category: category,
// },
&cli.DurationFlag{
Name: TimeoutFlagName,
Usage: "timeout for WVM requests operations (e.g. get, put)",
Value: 5 * time.Second,
EnvVars: withEnvPrefix(envPrefix, "TIMEOUT"),
Category: category,
},
}
}

Expand All @@ -73,6 +75,6 @@ func ReadConfig(ctx *cli.Context) Config {
ArchiverAddress: ctx.String(ArchiverAddressFlagName),
Web3SignerEndpoint: ctx.String(Web3SignerEndpoint),
Enabled: ctx.Bool(EnabledFlagName),
// Timeout: ctx.Duration(TimeoutFlagName),
Timeout: ctx.Duration(TimeoutFlagName),
}
}
Loading

0 comments on commit c93dc36

Please sign in to comment.