-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathconfig.yml
482 lines (462 loc) · 16.4 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# Core space RPC proxy server configurations
rpc:
# Available exposed modules are `cfx`, `txpool`, `pos`, `trace`, `gasstation` and `debug`.
# if left empty all public APIs will be exposed.
exposedModules: []
# Served HTTP endpoint
endpoint: ":22537"
# Served debug endpoint
# debugEndpoint: ":22588"
# Served websocket endpoint
# wsEndpoint: ":22535"
# The websocket ping/pong heartbeating interval
# wsPingInterval: "10s"
# Core space bridge server configurations
cfxBridge:
# EVM space fullnode endpoint
ethNode: http://evmtestnet.confluxrpc.com
# core space fullnode endpoint (optional)
# cfxNode: http://test.confluxrpc.com
# Available exposed modules are `cfx`, `txpool`, `trace`, if empty all APIs will be exposed.
# exposedModules: []
# Served HTTP endpoint
# endpoint: ":32537"
# # Throttling configurations for requesting pruned event logs from archive fullnode
# throttling:
# # Redis used for throttling based on reference counter
# redisUrl: redis://<user>:<pass>@localhost:6379/<db>
# EVM space RPC proxy server configurations
ethrpc:
# Available exposed modules are `eth`, `web3`, `net`, `trace`, `parity`, `gasstation` and `debug`.
# if left empty all public APIs will be exposed.
exposedModules: []
# Served HTTP endpoint
endpoint: ":28545"
# Served debug endpoint
# debugEndpoint: ":28588"
# Served websocket endpoint
# wsEndpoint: ":28535"
# Enable or disable data correctness check by cross-referencing data among multiple nodes.
# Currently supports only `eth_getTransactionReceipt` and `eth_getBlockReceipts` rpc methods.
# reValidation: false
# Core space SDK client configurations
cfx:
# Fullnode HTTP endpoints
http: [http://test.confluxrpc.com]
# Retry times if failure, if 0 never
retry: 0
# Interval duration before each retry
retryInterval: 1s
# Request timeout duration
requestTimeout: 3s
# Max connections allowed per fullnode
maxConnsPerHost: 1024
# Circuit breaker configurations
circuitBreaker:
# Turn on/off switch.
enabled: false
# Threshold of continuous failure times.
maxFail: 10
# The time window within which the threshold of continuous failure times is achieved to
# open the circuit breaker.
failTimeWindow: 1s
# The cold interval before the circuit breaker turns to be half-open since being turned open.
openColdTime: 15s
# EVM space SDK client configurations
eth:
# Fullnode HTTP endpoints
http: [http://evmtestnet.confluxrpc.com]
# Retry times if failure, if 0 never
retry: 0
# Interval duration before each retry
retryInterval: 1s
# Request timeout duration
requestTimeout: 3s
# Max connections allowed per fullnode
maxConnsPerHost: 1024
# Circuit breaker configurations
circuitBreaker:
# Turn on/off switch.
enabled: false
# Threshold of continuous failure times.
maxFail: 10
# The time window within which the threshold of continuous failure times is achieved to
# open the circuit breaker.
failTimeWindow: 1s
# The cold interval before the circuit breaker turns to be half-open since being turned open.
openColdTime: 15s
# # Gas station configurations
# gasstation:
# # Whether to enable gas station.
# enabled: false
# # The number of blocks (or epochs) from the latest block (or epoch) to peek for gas price estimation.
# historicalPeekCount: 100
# # Percentiles of average txn gas price mapped to three levels of urgency (`low`, `medium` and `high`).
# percentiles: [1, 50, 99]
# # Blockchain sync configurations
# sync:
# # Core space sync configurations
# #
# # Pub/Sub configurations
# sub:
# # Channel size to buffer notified epoch response
# buffer: 1000
# # Whether to use `epoch_getEpochReceipts` to batch get receipts
# useBatch: false
# # The epoch number from which to sync core space
# fromEpoch: 0
# # Maximum number of epochs to batch sync once
# maxEpochs: 10
# # Blacklisted contract address(es) whose event logs will be ignored until some specific
# # epoch height, with 0 means always.
# blackListAddrs: >
# [
# {"address": "cfx:acav5v98np8t3m66uw7x61yer1ja1jm0dpzj1zyzxv", "epoch": 0}
# ]
# # Fast cache-up sync configuration
# catchup:
# # Pool of fullnodes for catching up. There will be 1 goroutine per fullnode or
# # the catch up will be disabled if none fullnode provided.
# cfxPool: [http://test.confluxrpc.com]
# # Threshold for number of db rows per batch persistence
# dbRowsThreshold: 2500
# # Max number of db rows collected before persistence to restrict memory usage
# maxDbRows: 7500
# # Capacity of channel per worker to buffer queried epoch data
# workerChanSize: 5
# # Whether to enable benchmark.
# benchmark: false
# # Boost mode configuration
# boost:
# # Task queue sizes to schedule tasks
# taskQueueSize: 1000
# # Task result queue sizes to collect results
# resultQueueSize: 1000
# # Size of buffer for storage write
# writeBufferSize: 3000
# # Default task size and bounds
# defaultTaskSize: 100
# minTaskSize: 1
# maxTaskSize: 1000
# # Task size adjustment ratios
# incrementRatio: 0.2
# decrementRatio: 0.5
# # Maximum sample size for dynamic new task size estimation
# maxSampleSize: 20
# # Max allowed memory usage (in bytes), no limit if 0
# memoryThreshold: 0
# # Memory check interval
# memoryCheckInterval: 20s
# # Force persistence interval
# forcePersistenceInterval: 45s
# # EVM space sync configurations
# eth:
# # The block number from which to sync evm space, better use the evm space hardfork point:
# # for mainnet it is 36935000, for testnet it is 61465000
# fromBlock: 61465000
# # Maximum number of blocks to batch sync ETH data once
# maxBlocks: 10
# # HA leader/follower election.
# election:
# # Enable/disable leader election
# enabled: false
# # The leader identity
# id: "leader"
# # The duration of the leader term
# lease: 1m
# # the amount of time to wait between retries of becoming the leader
# retry: 5s
# # the time interval at which the leader will try to renew its term
# renew: 15s
# # Metrics configurations
# metrics:
# # Whether to collect metrics
# enabled: false
# # Namespace for metrics reporting
# namespace:
# # Interval to report collected metrics to InfluxDB periodically
# reportInterval: 10s
# # InfluxDB configurations
# influxdb:
# host: http://127.0.0.1:8086
# db: metrics_db
# username:
# password:
# # Log Configurations
# log:
# # Available levels are `trace`, `debug`, `info`, `error` and `fatal`
# level: info
# forceColor: false
# disableColor: false
# alertHook: # Alert hooking settings
# # Hooked logrus level for alert notification
# level: warn
# # Default notification channels
# channels: []
# # Maximum request timeout allowed to send alert.
# sendTimeout: 3s
# # Async worker options for sending alert
# async:
# # The number of worker goroutines (Set to 0 to disable async mode).
# numWorkers: 0
# # The maximum number of queued jobs.
# queueSize: 60
# # Maximum timeout allowed to gracefully stop.
# StopTimeout: 5s
# # Core space store configurations
# store:
# # MySQL database configurations
# mysql:
# # Whether to use MySQL store
# enabled: false
# host: 127.0.0.1:3306
# username: root
# password: root
# database: confura
# # Refer to gorm configurations
# connMaxLifeTime: 3m
# maxOpenConns: 10
# maxIdleConns: 10
# # Whether to use event log partitions hashed by contract address
# addressIndexedLogEnabled: true
# # Number of partitions for address indexed event log table, valid only if above option enabled
# addressIndexedLogPartitions: 100
# # Max number of archive log partitions ranged by block number to maintain. Once exceeded,
# # partitions will be dropped one by one from the oldest to keep the max archive limit.
# maxBnRangedArchiveLogPartitions: 5
# # Redis configurations
# redis:
# # Whether to use redis store
# enabled: false
# # Cache expiry duration
# cacheTime: 12h
# url: redis://<user>:<pass>@localhost:6379/<db>
# # Chain data types ignored to be persisted within store, available options are:
# # `block`, `transaction`, `receipt` and `log`
# disables: [block,transaction,receipt]
# EVM space store configurations
# Please refer to core space store configurations
# ethstore:
# mysql:
# enabled: false
# dsn: user:password@tcp(127.0.0.1:3306)/conflux_infura_eth?parseTime=true
# connMaxLifeTime: 3m
# maxOpenConns: 10
# maxIdleConns: 10
# addressIndexedLogEnabled: true
# addressIndexedLogPartitions: 100
# maxBnRangedArchiveLogPartitions: 5
# disables: [block,transaction,receipt]
# # Alert configurations
# alert:
# # Custom tags are used to distinguish between different networks and environments.
# # For example, they can be used to differentiate between mainnet/testnet, prod/test/dev, etc.
# customTags: [testnet,dev]
# # Channels are used for sending notifications.
# # Each channel is identified by a unique key (e.g., channel ID), which is case insensitive.
# # The value for each key is the configuration for that channel.
# channels:
# # Example configuration for the DingTalk robot channel
# dingrobot:
# # The type of the channel. In this case, it's 'dingtalk'.
# platform: dingtalk
# # The webhook URL for the DingTalk robot.
# webhook: https://oapi.dingtalk.com/robot/send?access_token=${your_access_token}
# # The secret key for the DingTalk robot.
# secret: ${your_access_secret}
# # List of mobile numbers to be mentioned in the alert. If empty, no one is mentioned.
# atMobiles: []
# # If set to true, all members are mentioned in the alert. If false, only the members
# # in 'atMobiles' are mentioned.
# isAtAll: false
# # Prune configurations
# prune:
# # Cache prune configurations
# cache:
# # Monitoring interval
# interval: 30s
# # Max number of epochs to prune per time in case of IO hogging
# maxEpochs: 10
# # Threshold to trigger data prune
# threshold:
# maxBlocks: 100000
# maxTxs: 100000
# maxLogs: 100000
# Node management configurations
node:
# Group `cfxhttp` fullnodes
urls: [http://test.confluxrpc.com]
# Group `cfxfullstate` fullnodes
# fullStateURLs: [http://test.confluxrpc.com]
# Group `cfxws` fullnodes
# wsUrls: [ws://test.confluxrpc.com/ws]
# Group `cfxlog` fullnodes
# logNodes: [http://test.confluxrpc.com]
# Group `cfxfilter` fullnodes
# filterNodes: [http://test.confluxrpc.com]
# Group `cfxarchives` fullnodes
# archiveNodes: []
# Group `ethhttp` fullnodes
ethurls: [http://evmtestnet.confluxrpc.com]
# Group `ethfullstate` fullnodes
# ethFullStateURLs: [http://evmtestnet.confluxrpc.com]
# Group `ethlogs` fullnodes
# ethLogNodes: [http://evmtestnet.confluxrpc.com]
# Group `ethfilter` fullnodes
# ethFilterNodes: [http://evmtestnet.confluxrpc.com]
# Group `ethws` fullnodes
# ethWsUrls: [wss://evmtestnet.confluxrpc.com/ws]
# # Consistent hash ring configurations
# hashRing:
# partitionCount: 15739
# replicationFactor: 51
# load: 1.25
# # Health monitoring configurations
# monitor:
# interval: 1s
# # Unhealth conditions
# unhealth:
# failures: 3
# epochsFallBehind: 30
# latencyPercentile: 0.9
# maxLatency: 3s
# # Recovering conditions
# recover:
# remindInterval: 5m
# successCounter: 60
# # Served HTTP endpoint for core space
# endpoint: ":22530"
# # Served HTTP endpoint for evm space
# ethEndpoint: ":28530"
# # Chained routers configurations
# router:
# # Redis used for `RedisRouter`
# redisUrl: redis://<user>:<pass>@localhost:6379/<db>
# # Node manager RPC endpoint for `NodeRpcRouter`
# nodeRpcUrl: http://127.0.0.1:22530
# # EVM space node manager RPC endpoint for `NodeRpcRouter`
# ethNodeRpcUrl: http://127.0.0.1:28530
# # Failover fullnode configuration
# chainedFailover:
# # Failover fullnode if group `cfxhttp` is capsized
# url:
# # Failover fullnode if group `cfxws` is capsized
# wsUrl:
# # Failover fullnode if group `ethhttp` is capsized
# ethUrl:
# # Failover fullnode if group `ethws` is capsized
# ethWsUrl:
# # Transaction relay configurations
# relay:
# # Channel size to buffer relay transaction
# bufferSize: 2000
# # Number of go-routines to relay transaction
# concurrency: 1
# # Request settings for SDK client
# retry: 0
# retryInterval: 1s
# requestTimeout: 3s
# # List of core space fullnodes to be broadcasted.
# nodeUrls: []
# # List of evm space fullnodes to be broadcasted.
# ethNodeUrls: []
# # Whether to relay the transaction to other group nodes synchronously
# # while sending raw transaction.
# relayTxn: false
# # Web3Pay client middleware configurations
# web3pay:
# # Whether to enable web3pay
# enabled: false
# # Available payment modes are `billing` and `subscription`
# mode: billing
# # Billing middleware configurations.
# # Effective only if the payment mode set as `billing`
# billing:
# # Request timeout duration
# timeout: 200ms
# # billing API gateway endpoint
# gateway:
# # Billing auth key
# billingKey:
# # VIP subscription middleware configurations.
# # Effective only if the payment mode set as `subscription`
# subscription:
# # EVM space blockchain node RPC endpoint
# chainRpcUrl:
# # VIP subscription App contract address
# AppContract:
# # EVM space virtual filters configurations
# ethVirtualFilters:
# # Served HTTP endpoint
# endpoint: ":48545"
# # Time to live for inactive filter
# TTL: 1m
# # Max number of filter blocks full of event logs to restrict memory usage
# maxFullFilterBlocks: 100
# client: # Request client configuration
# enabled: false
# # Exposed RPC endpoint of virtual filter service for client request
# serviceRpcUrl: http://127.0.0.1:48545
# # Core space virtual filters configurations
# virtualFilters:
# # Served HTTP endpoint
# endpoint: ":42537"
# # Time to live for inactive filter
# TTL: 1m
# # Max number of filter blocks full of event logs to restrict memory usage
# maxFullFilterEpochs: 100
# client: # Request client configuration
# enabled: false
# # Exposed RPC endpoint of virtual filter service for client request
# serviceRpcUrl: http://127.0.0.1:42537
# # Request control Configuration
# requestControl:
# # Log filter limits for handling 'getLogs' requests
# logFilter:
# # Maximum number of block hashes allowed in a filter
# maxBlockHashCount: 32
# # Maximum number of addresses allowed in a filter
# maxAddressCount: 32
# # Maximum number of topics allowed in a filter
# maxTopicCount: 32
# # Maximum epoch range to split log filters for full nodes
# maxSplitEpochRange: 1000
# # Maximum block range to split log filters for full nodes
# maxSplitBlockRange: 1000
#
# # Resource usage constraints
# resourceLimits:
# # Maximum response bytes for 'getLogs' requests (default 10MB)
# MaxGetLogsResponseBytes: 10485760
#
# # ETH Cache settings
# ethCache:
# # Cache expiration time duration for 'net_version' requests
# netVersionExpiration: 1m
# # Cache expiration time duration for 'eth_clientVersion' requests
# clientVersionExpiration: 1m
# # Cache expiration time duration for 'eth_chainId' requests
# chainIdExpiration: 8760h
# # Cache expiration time duration for 'eth_blockNumber'equests
# blockNumberExpiration: 1s
# # Cache expiration time duration for 'eth_gasPrice'
# priceExpiration: 3s
# # LRU Cache size and expiration time duration for 'eth_call'
# callCacheExpiration: 1s
# callCacheSize: 128
#
# # ETH receipt retrieval configuration
# ethReceiptRetrieval:
# # 0 - Auto-detect (tries following methods in order)
# # 1 - `eth_getBlockReceipts` (limited support)
# # 2 - `parity_getBlockReceipts` (limited support)
# # 3 - `eth_getTransactionReceipt` (universal but slower)
# method: 0
# # Concurrent operations for `eth_getTransactionReceipt` only
# concurrency: 0
# # Go performance profiling
# pprof:
# # Switch to turn on/off pprof
# enabled: false
# # The endpoint to start a http server for pprof
# httpEndpoint: ":6060"