forked from rainshowerLabs/blutgang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_config.toml
65 lines (60 loc) · 1.87 KB
/
example_config.toml
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
# To use the config file, use the -c/--config option pointing to the path of a config file
# Config for blutgang goes here
[blutgang]
# Clear the cache DB on startup
do_clear = false
# Where to bind blutgang to
address = "127.0.0.1:3000"
# Moving average length for the latency
ma_length = 100
# Sort RPCs by latency on startup. Recommended to leave on.
sort_on_startup = true
# Enable health checking
health_check = true
# Acceptable time to wait for a response in ms
ttl = 30
# How many times to retry a request before giving up
max_retries = 32
# Time between health checks in ms
health_check_ttl = 1250
# Note: the admin namespace contains volatile functions and
# should not be exposed publicly.
[admin]
# Enable the admin namespace
enabled = false
# Address for the admin RPC
address = "127.0.0.1:5715"
# Only allow read-only methods
# Recommended `true` unless you 100% need write methods
readonly = true
# Enable the use of JWT for auth
# Should be on if exposing to the internet
jwt = false
# jwt token
key = ""
# Sled config
# Sled is the database we use for our cache, for more info check their docs
[sled]
# Path to db
db_path = "./blutgang-cache"
# sled mode. Can be HighThroughput/LowSpace
mode = "HighThroughput"
# Cache size in bytes.
cache_capacity = 1000000000
# Use zstd compression. Reduces size 60-70%,
# and increases CPU and latency by around 10% for db writes and 2% for reads.
# If storage constrained, it's fine to have it be on.
compression = false
# Print DB profile when dropped. Doesn't do anything for now.
print_profile = false
# Frequency of flushes in ms
flush_every_ms = 24000
# Add seperate RPCs as TOML tables
# DO NOT name an rpc `blutgang`, `admin`, or `sled`
[merkle]
url = "https://eth.merkle.io"
ws_url = "wss://eth.merkle.io"
# The maximum ammount of time we can use this rpc in a row.
max_consecutive = 150
# Max ammount of querries per second.
max_per_second = 200