Skip to content

Commit 7443206

Browse files
authored
Merge pull request #717 from onflow/mpeter/remove-obsolete-config-flags
Remove obsolete config flags `stream-limit` & `stream-timeout`
2 parents 08d369b + 40d58f4 commit 7443206

File tree

4 files changed

+0
-14
lines changed

4 files changed

+0
-14
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,9 @@ The application can be configured using the following flags at runtime:
242242
| `coa-cloud-kms-key` | `""` | KMS keys and versions, comma-separated (e.g. `"gw-key-6@1,gw-key-7@1"`) |
243243
| `log-level` | `debug` | Log verbosity level (`debug`, `info`, `warn`, `error`, `fatal`, `panic`) |
244244
| `log-writer` | `stderr` | Output method for logs (`stderr`, `console`) |
245-
| `stream-limit` | `10` | Rate-limit for client events sent per second |
246245
| `rate-limit` | `50` | Requests per second limit for clients over any protocol (ws/http) |
247246
| `address-header` | `""` | Header for client IP when server is behind a proxy |
248247
| `heartbeat-interval` | `100` | Interval for AN event subscription heartbeats |
249-
| `stream-timeout` | `3` | Timeout in seconds for sending events to clients |
250248
| `force-start-height` | `0` | Force-set starting Cadence height (local/testing use only) |
251249
| `wallet-api-key` | `""` | ECDSA private key for wallet APIs (local/testing use only) |
252250
| `filter-expiry` | `5m` | Expiry time for idle filters |

cmd/run/cmd.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ func parseConfigFromFlags() error {
199199
cfg.LogWriter = zerolog.NewConsoleWriter()
200200
}
201201

202-
cfg.StreamTimeout = time.Second * time.Duration(streamTimeout)
203-
204202
exp, err := time.ParseDuration(filterExpiry)
205203
if err != nil {
206204
return fmt.Errorf("invalid unit %s for filter expiry: %w", filterExpiry, err)
@@ -246,8 +244,6 @@ var (
246244
walletKey,
247245
txStateValidation string
248246

249-
streamTimeout int
250-
251247
initHeight,
252248
forceStartHeight uint64
253249
)
@@ -269,10 +265,8 @@ func init() {
269265
Cmd.Flags().StringVar(&keyAlg, "coa-key-alg", "ECDSA_P256", "Private key algorithm for the COA private key, only effective if coa-key/coa-key-file is present. Available values (ECDSA_P256 / ECDSA_secp256k1 / BLS_BLS12_381), defaults to ECDSA_P256.")
270266
Cmd.Flags().StringVar(&logLevel, "log-level", "debug", "Define verbosity of the log output ('debug', 'info', 'warn', 'error', 'fatal', 'panic')")
271267
Cmd.Flags().StringVar(&logWriter, "log-writer", "stderr", "Log writer used for output ('stderr', 'console')")
272-
Cmd.Flags().Float64Var(&cfg.StreamLimit, "stream-limit", 10, "Rate-limits the events sent to the client within one second")
273268
Cmd.Flags().Uint64Var(&cfg.RateLimit, "rate-limit", 50, "Rate-limit requests per second made by the client over any protocol (ws/http)")
274269
Cmd.Flags().StringVar(&cfg.AddressHeader, "address-header", "", "Address header that contains the client IP, this is useful when the server is behind a proxy that sets the source IP of the client. Leave empty if no proxy is used.")
275-
Cmd.Flags().IntVar(&streamTimeout, "stream-timeout", 3, "Defines the timeout in seconds the server waits for the event to be sent to the client")
276270
Cmd.Flags().Uint64Var(&forceStartHeight, "force-start-height", 0, "Force set starting Cadence height. WARNING: This should only be used locally or for testing, never in production.")
277271
Cmd.Flags().StringVar(&filterExpiry, "filter-expiry", "5m", "Filter defines the time it takes for an idle filter to expire")
278272
Cmd.Flags().StringVar(&cloudKMSProjectID, "coa-cloud-kms-project-id", "", "The project ID containing the KMS keys, e.g. 'flow-evm-gateway'")

config/config.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ type Config struct {
6868
RateLimit uint64
6969
// Address header used to identified clients, usually set by the proxy
7070
AddressHeader string
71-
// StreamLimit rate-limits the events sent to the client within 1 second time interval.
72-
StreamLimit float64
73-
// StreamTimeout defines the timeout the server waits for the event to be sent to the client.
74-
StreamTimeout time.Duration
7571
// FilterExpiry defines the time it takes for an idle filter to expire
7672
FilterExpiry time.Duration
7773
// ForceStartCadenceHeight will force set the starting Cadence height, this should be only used for testing or locally.

tests/helpers.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ func servicesSetup(t *testing.T) (emulator.Emulator, func()) {
167167
GasPrice: new(big.Int).SetUint64(150),
168168
LogLevel: zerolog.DebugLevel,
169169
LogWriter: testLogWriter(),
170-
StreamTimeout: time.Second * 30,
171-
StreamLimit: 10,
172170
RateLimit: 500,
173171
WSEnabled: true,
174172
MetricsPort: 8443,

0 commit comments

Comments
 (0)