Skip to content

Commit

Permalink
fix(#191): Routing namespace --> Storage - pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
EthenNotEthan committed Oct 29, 2024
1 parent 7037575 commit 3a6f3fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ In order to disperse to the EigenDA network in production, or at high throughput
| `--s3.path` | | `$EIGENDA_PROXY_S3_PATH` | Bucket path for S3 storage. |
| `--s3.endpoint` | | `$EIGENDA_PROXY_S3_ENDPOINT` | Endpoint for S3 storage. |
| `--s3.enable-tls` | | `$EIGENDA_PROXY_S3_ENABLE_TLS` | Enable TLS connection to S3 endpoint. |
| `--store.fallback-targets` | `[]` | `$EIGENDA_PROXY_FALLBACK_TARGETS` | Fall back backend targets. Supports S3. | Backup storage locations to read from in the event of eigenda retrieval failure. |
| `--store.cache-targets` | `[]` | `$EIGENDA_PROXY_CACHE_TARGETS` | Caching targets. Supports S3. | Caches data to backend targets after dispersing to DA, retrieved from before trying read from EigenDA. |
| `--store.concurrent-write-threads` | `0` | `$EIGENDA_PROXY_CONCURRENT_WRITE_THREADS` | Number of threads spun-up for async secondary storage insertions. (<=0) denotes single threaded insertions where (>0) indicates decoupled writes. |
| `--storage.fallback-targets` | `[]` | `$EIGENDA_PROXY_STORAGE_FALLBACK_TARGETS` | Fall back backend targets. Supports S3. | Backup storage locations to read from in the event of eigenda retrieval failure. |
| `--storage.cache-targets` | `[]` | `$EIGENDA_PROXY_STORAGE_CACHE_TARGETS` | Caching targets. Supports S3. | Caches data to backend targets after dispersing to DA, retrieved from before trying read from EigenDA. |
| `--storage.concurrent-write-threads` | `0` | `$EIGENDA_PROXY_STORAGE_CONCURRENT_WRITE_THREADS` | Number of threads spun-up for async secondary storage insertions. (<=0) denotes single threaded insertions where (>0) indicates decoupled writes. |
| `--s3.timeout` | `5s` | `$EIGENDA_PROXY_S3_TIMEOUT` | timeout for S3 storage operations (e.g. get, put) |
| `--redis.db` | `0` | `$EIGENDA_PROXY_REDIS_DB` | redis database to use after connecting to server |
| `--redis.endpoint` | `""` | `$EIGENDA_PROXY_REDIS_ENDPOINT` | redis endpoint url |
Expand Down
22 changes: 11 additions & 11 deletions flags/eigendaflags/deprecated.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ func withDeprecatedFlagPrefix(s string) string {
return "eigenda-" + s
}

func withDeprecatedEnvPrefix(envPrefix, s string) []string {
return []string{envPrefix + "_" + s}
func withDeprecatedEnvPrefix(envPrefix, s string) string {
return envPrefix + "_" + s
}

// CLIFlags ... used for EigenDA client configuration
Expand All @@ -38,7 +38,7 @@ func DeprecatedCLIFlags(envPrefix, category string) []cli.Flag {
&cli.StringFlag{
Name: DeprecatedDisperserRPCFlagName,
Usage: "RPC endpoint of the EigenDA disperser.",
EnvVars: withDeprecatedEnvPrefix(envPrefix, "DISPERSER_RPC"),
EnvVars: []string{withDeprecatedEnvPrefix(envPrefix, "DISPERSER_RPC")},
Category: category,
Action: func(*cli.Context, string) error {
return fmt.Errorf("flag --%s (env var %s) is deprecated, use --%s (env var %s) instead",
Expand All @@ -50,7 +50,7 @@ func DeprecatedCLIFlags(envPrefix, category string) []cli.Flag {
Name: DeprecatedStatusQueryTimeoutFlagName,
Usage: "Duration to wait for a blob to finalize after being sent for dispersal. Default is 30 minutes.",
Value: 30 * time.Minute,
EnvVars: withDeprecatedEnvPrefix(envPrefix, "STATUS_QUERY_TIMEOUT"),
EnvVars: []string{withDeprecatedEnvPrefix(envPrefix, "STATUS_QUERY_TIMEOUT")},
Category: category,
Action: func(*cli.Context, time.Duration) error {
return fmt.Errorf("flag --%s (env var %s) is deprecated, use --%s (env var %s) instead",
Expand All @@ -62,7 +62,7 @@ func DeprecatedCLIFlags(envPrefix, category string) []cli.Flag {
Name: DeprecatedStatusQueryRetryIntervalFlagName,
Usage: "Interval between retries when awaiting network blob finalization. Default is 5 seconds.",
Value: 5 * time.Second,
EnvVars: withDeprecatedEnvPrefix(envPrefix, "STATUS_QUERY_INTERVAL"),
EnvVars: []string{withDeprecatedEnvPrefix(envPrefix, "STATUS_QUERY_INTERVAL")},
Category: category,
Action: func(*cli.Context, time.Duration) error {
return fmt.Errorf("flag --%s (env var %s) is deprecated, use --%s (env var %s) instead",
Expand All @@ -74,7 +74,7 @@ func DeprecatedCLIFlags(envPrefix, category string) []cli.Flag {
Name: DeprecatedDisableTLSFlagName,
Usage: "Disable TLS for gRPC communication with the EigenDA disperser. Default is false.",
Value: false,
EnvVars: withDeprecatedEnvPrefix(envPrefix, "GRPC_DISABLE_TLS"),
EnvVars: []string{withDeprecatedEnvPrefix(envPrefix, "GRPC_DISABLE_TLS")},
Category: category,
Action: func(*cli.Context, bool) error {
return fmt.Errorf("flag --%s (env var %s) is deprecated, use --%s (env var %s) instead",
Expand All @@ -86,7 +86,7 @@ func DeprecatedCLIFlags(envPrefix, category string) []cli.Flag {
Name: DeprecatedResponseTimeoutFlagName,
Usage: "Total time to wait for a response from the EigenDA disperser. Default is 60 seconds.",
Value: 60 * time.Second,
EnvVars: withDeprecatedEnvPrefix(envPrefix, "RESPONSE_TIMEOUT"),
EnvVars: []string{withDeprecatedEnvPrefix(envPrefix, "RESPONSE_TIMEOUT")},
Category: category,
Action: func(*cli.Context, time.Duration) error {
return fmt.Errorf("flag --%s (env var %s) is deprecated, use --%s (env var %s) instead",
Expand All @@ -98,7 +98,7 @@ func DeprecatedCLIFlags(envPrefix, category string) []cli.Flag {
Name: DeprecatedCustomQuorumIDsFlagName,
Usage: "Custom quorum IDs for writing blobs. Should not include default quorums 0 or 1.",
Value: cli.NewUintSlice(),
EnvVars: withDeprecatedEnvPrefix(envPrefix, "CUSTOM_QUORUM_IDS"),
EnvVars: []string{withDeprecatedEnvPrefix(envPrefix, "CUSTOM_QUORUM_IDS")},
Category: category,
Action: func(*cli.Context, []uint) error {
return fmt.Errorf("flag --%s (env var %s) is deprecated, use --%s (env var %s) instead",
Expand All @@ -109,7 +109,7 @@ func DeprecatedCLIFlags(envPrefix, category string) []cli.Flag {
&cli.StringFlag{
Name: DeprecatedSignerPrivateKeyHexFlagName,
Usage: "Hex-encoded signer private key. This key should not be associated with an Ethereum address holding any funds.",
EnvVars: withDeprecatedEnvPrefix(envPrefix, "SIGNER_PRIVATE_KEY_HEX"),
EnvVars: []string{withDeprecatedEnvPrefix(envPrefix, "SIGNER_PRIVATE_KEY_HEX")},
Category: category,
Action: func(*cli.Context, string) error {
return fmt.Errorf("flag --%s (env var %s) is deprecated, use --%s (env var %s) instead",
Expand All @@ -120,7 +120,7 @@ func DeprecatedCLIFlags(envPrefix, category string) []cli.Flag {
&cli.UintFlag{
Name: DeprecatedPutBlobEncodingVersionFlagName,
Usage: "Blob encoding version to use when writing blobs from the high-level interface.",
EnvVars: withDeprecatedEnvPrefix(envPrefix, "PUT_BLOB_ENCODING_VERSION"),
EnvVars: []string{withDeprecatedEnvPrefix(envPrefix, "PUT_BLOB_ENCODING_VERSION")},
Value: 0,
Category: category,
Action: func(*cli.Context, uint) error {
Expand All @@ -132,7 +132,7 @@ func DeprecatedCLIFlags(envPrefix, category string) []cli.Flag {
&cli.BoolFlag{
Name: DeprecatedDisablePointVerificationModeFlagName,
Usage: "Disable point verification mode. This mode performs IFFT on data before writing and FFT on data after reading. Disabling requires supplying the entire blob for verification against the KZG commitment.",
EnvVars: withDeprecatedEnvPrefix(envPrefix, "DISABLE_POINT_VERIFICATION_MODE"),
EnvVars: []string{withDeprecatedEnvPrefix(envPrefix, "DISABLE_POINT_VERIFICATION_MODE")},
Value: false,
Category: category,
Action: func(*cli.Context, bool) error {
Expand Down
6 changes: 3 additions & 3 deletions store/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ var (
)

func withFlagPrefix(s string) string {
return "store." + s
return "storage." + s
}

func withEnvPrefix(envPrefix, s string) []string {
return []string{envPrefix + "_STORE_" + s}
return []string{envPrefix + "_STORAGE_" + s}
}

// CLIFlags ... used for Redis backend configuration
// CLIFlags ... used for storage configuration
// category is used to group the flags in the help output (see https://cli.urfave.org/v2/examples/flags/#grouping)
func CLIFlags(envPrefix, category string) []cli.Flag {
return []cli.Flag{
Expand Down

0 comments on commit 3a6f3fb

Please sign in to comment.