You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The previous code was confusing, the RPC-CONCURRENCY was configuring the
number of parallel blocks we could ingest, instead of the real jsonRPC
concurrency to the RPC node.
This (in a backwards compatible way) makes the variable configure the
jsonRPC max concurrency. The default value changed from: 25 to 80 to
account for this.
Number of concurrent workers to fetch blocks is now configured
internally to: RPC_CONCURRENCY / 4.
Copy file name to clipboardExpand all lines: README.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,8 +47,16 @@ Also, we mention some of the options here:
47
47
The `log` flag (environment variable `LOG`) controls the log level. Use `--log debug`/`LOG=debug` to emit more logs than the default `info` level. To emit less logs, use `warn`, or `error` (least).
48
48
49
49
### Tuning RPC concurrency
50
-
The flag `--rpc-concurrency` (environment variable `RPC_CONCURRENCY`) specifies the number of threads (goroutines)
51
-
to run concurrently to perform RPC node requests. Default is 25.
50
+
The flag `--rpc-concurrency` (environment variable `RPC_CONCURRENCY`) specifies the number of threads (goroutines) to run concurrently to perform RPC node requests. See `--help` for up to date default value.
51
+
52
+
### Tuning for throughput
53
+
Throughput depends on: latency & request rate between RPC <-> Node Indexer <--> DuneAPI and can be tuned via a combination of:
54
+
1. RPC_CONCURRENCY, higher values feed more blocks into the node indexer to process
55
+
1. MAX_BATCH_SIZE, higher values send more blocks per request to DuneAPI
56
+
1. BLOCK_SUBMIT_INTERVAL, the interval at which blocks to DuneAPI
57
+
See `--help` for up to date default values.
58
+
59
+
52
60
53
61
### RPC poll interval
54
62
The flag `--rpc-poll-interval` (environment variable `RPC_POLL_INTERVAL`) specifies the duration to wait before checking
Copy file name to clipboardExpand all lines: config/config.go
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -54,13 +54,12 @@ type Config struct {
54
54
DLQRetryInterval time.Duration`long:"dlq-retry-interval" env:"DLQ_RETRY_INTERVAL" description:"Interval for linear backoff in DLQ " default:"1m"`// nolint:lll
55
55
ReportProgressInterval time.Duration`long:"report-progress-interval" env:"REPORT_PROGRESS_INTERVAL" description:"Interval to report progress" default:"30s"`// nolint:lll
56
56
RPCNodeRPCClient
57
-
RPCStack models.EVMStack`long:"rpc-stack" env:"RPC_STACK" description:"Stack for the RPC client" default:"opstack"`// nolint:lll
58
-
// kept the old cmdline arg names and env variables for backwards compatibility
59
-
BlockConcurrencyint`long:"rpc-concurrency" env:"RPC_CONCURRENCY" description:"Number of concurrent block requests to the RPC node" default:"25"`// nolint:lll
60
-
DLQBlockConcurrencyint`long:"dlq-concurrency" env:"DLQ_CONCURRENCY" description:"Number of concurrent block requests to the RPC node for DLQ processing" default:"2"`// nolint:lll
61
-
BlockSubmitInterval time.Duration`long:"block-submit-interval" env:"BLOCK_SUBMIT_INTERVAL" description:"Interval at which to submit batched blocks to Dune" default:"500ms"`// nolint:lll
MaxBatchSizeint`long:"max-batch-size" env:"MAX_BATCH_SIZE" description:"Max number of blocks to send per batch (max:256)" default:"128"`// nolint:lll
57
+
RPCStack models.EVMStack`long:"rpc-stack" env:"RPC_STACK" description:"Stack for the RPC client" default:"opstack"`// nolint:lll
58
+
RPCConcurrencyint`long:"rpc-concurrency" env:"RPC_CONCURRENCY" description:"Number of maximum concurrent jsonRPC requests to the RPC node" default:"80"`// nolint:lll
59
+
DLQBlockConcurrencyint`long:"dlq-concurrency" env:"DLQ_CONCURRENCY" description:"Number of concurrent block requests to the RPC node for DLQ processing" default:"2"`// nolint:lll
60
+
BlockSubmitInterval time.Duration`long:"block-submit-interval" env:"BLOCK_SUBMIT_INTERVAL" description:"Interval at which to submit batched blocks to Dune" default:"500ms"`// nolint:lll
0 commit comments