diff --git a/flags/eigendaflags/cli.go b/flags/eigendaflags/cli.go index eb87ffd0..30937401 100644 --- a/flags/eigendaflags/cli.go +++ b/flags/eigendaflags/cli.go @@ -15,10 +15,11 @@ import ( var ( DisperserRPCFlagName = withFlagPrefix("disperser-rpc") + ResponseTimeoutFlagName = withFlagPrefix("response-timeout") + ConfirmationTimeoutFlagName = withFlagPrefix("confirmation-timeout") StatusQueryRetryIntervalFlagName = withFlagPrefix("status-query-retry-interval") StatusQueryTimeoutFlagName = withFlagPrefix("status-query-timeout") DisableTLSFlagName = withFlagPrefix("disable-tls") - ResponseTimeoutFlagName = withFlagPrefix("response-timeout") CustomQuorumIDsFlagName = withFlagPrefix("custom-quorum-ids") SignerPrivateKeyHexFlagName = withFlagPrefix("signer-private-key-hex") PutBlobEncodingVersionFlagName = withFlagPrefix("put-blob-encoding-version") @@ -48,6 +49,26 @@ func CLIFlags(envPrefix, category string) []cli.Flag { EnvVars: []string{withEnvPrefix(envPrefix, "DISPERSER_RPC")}, Category: category, }, + &cli.DurationFlag{ + Name: ResponseTimeoutFlagName, + Usage: "Total time to wait for a response from the EigenDA disperser. Default is 60 seconds.", + Value: 60 * time.Second, + EnvVars: []string{withEnvPrefix(envPrefix, "RESPONSE_TIMEOUT")}, + Category: category, + }, + &cli.DurationFlag{ + Name: ConfirmationTimeoutFlagName, + Usage: `The total amount of time that the client will spend waiting for EigenDA + to "confirm" (include onchain) a blob after it has been dispersed. Note that + we stick to "confirm" here but this really means InclusionTimeout, + not confirmation in the sense of confirmation depth. + + If ConfirmationTimeout time passes and the blob is not yet confirmed, + the client will return an api.ErrorFailover to let the caller failover to EthDA.`, + Value: 15 * time.Minute, + EnvVars: []string{withEnvPrefix(envPrefix, "CONFIRMATION_TIMEOUT")}, + Category: category, + }, &cli.DurationFlag{ Name: StatusQueryTimeoutFlagName, Usage: "Duration to wait for a blob to finalize after being sent for dispersal. Default is 30 minutes.", @@ -69,13 +90,6 @@ func CLIFlags(envPrefix, category string) []cli.Flag { EnvVars: []string{withEnvPrefix(envPrefix, "GRPC_DISABLE_TLS")}, Category: category, }, - &cli.DurationFlag{ - Name: ResponseTimeoutFlagName, - Usage: "Total time to wait for a response from the EigenDA disperser. Default is 60 seconds.", - Value: 60 * time.Second, - EnvVars: []string{withEnvPrefix(envPrefix, "RESPONSE_TIMEOUT")}, - Category: category, - }, &cli.UintSliceFlag{ Name: CustomQuorumIDsFlagName, Usage: "Custom quorum IDs for writing blobs. Should not include default quorums 0 or 1.", @@ -155,10 +169,11 @@ func ReadConfig(ctx *cli.Context) clients.EigenDAClientConfig { waitForFinalization, confirmationDepth := parseConfirmationFlag(ctx.String(ConfirmationDepthFlagName)) return clients.EigenDAClientConfig{ RPC: ctx.String(DisperserRPCFlagName), + ResponseTimeout: ctx.Duration(ResponseTimeoutFlagName), + ConfirmationTimeout: ctx.Duration(ConfirmationTimeoutFlagName), StatusQueryRetryInterval: ctx.Duration(StatusQueryRetryIntervalFlagName), StatusQueryTimeout: ctx.Duration(StatusQueryTimeoutFlagName), DisableTLS: ctx.Bool(DisableTLSFlagName), - ResponseTimeout: ctx.Duration(ResponseTimeoutFlagName), CustomQuorumIDs: ctx.UintSlice(CustomQuorumIDsFlagName), SignerPrivateKeyHex: ctx.String(SignerPrivateKeyHexFlagName), PutBlobEncodingVersion: codecs.BlobEncodingVersion(ctx.Uint(PutBlobEncodingVersionFlagName)),