-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfig.toml.dist
146 lines (133 loc) · 4.69 KB
/
config.toml.dist
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
# List of WS methods to whitelist.
ws_method_whitelist = ["starknet_chainId"]
# Enable WS on this backend group. There can only be one WS-enabled backend group.
ws_backend_group = "main"
[server]
# Host for the nori RPC server to listen on.
rpc_host = "0.0.0.0"
# Port for the above.
rpc_port = 8080
# Host for the nori WS server to listen on.
ws_host = "0.0.0.0"
# Port for the above
# Set the ws_port to 0 to disable WS
ws_port = 8085
# Maximum client body size, in bytes, that the server will accept.
max_body_size_bytes = 10485760
max_concurrent_rpcs = 1000
# Server log level
log_level = "info"
use_juno_data_source = true # or false, based need, also to toggle the usage of Juno as a data source for block fetching.
[redis]
# URL to a Redis instance.
url = "redis://localhost:6379"
[metrics]
# Whether or not to enable Prometheus metrics.
enabled = true
# Host for the Prometheus metrics endpoint to listen on.
host = "0.0.0.0"
# Port for the above.
port = 9761
[backend]
# How long nori should wait for a backend response before timing out.
response_timeout_seconds = 5
# Maximum response size, in bytes, that nori will accept from a backend.
max_response_size_bytes = 5242880
# Maximum number of times nori will try a backend before giving up.
max_retries = 3
# Number of seconds to wait before trying an unhealthy backend again.
out_of_service_seconds = 600
# Maximum latency accepted to serve requests, default 10s
max_latency_threshold = "30s"
# Maximum latency accepted to serve requests before degraded, default 5s
max_degraded_latency_threshold = "10s"
# Maximum error rate accepted to serve requests, default 0.5 (i.e. 50%)
max_error_rate_threshold = 0.3
[backends]
# A map of backends by name.
[backends.madara]
rpc_url = "http://localhost:9944"
[backends.katana]
rpc_url = "http://localhost:5050"
[backends.infura]
# The URL to contact the backend at. Will be read from the environment
# if an environment variable prefixed with $ is provided.
rpc_url = "http://localhost"
# The WS URL to contact the backend at. Will be read from the environment
# if an environment variable prefixed with $ is provided.
ws_url = ""
username = ""
# An HTTP Basic password to authenticate with the backend. Will be read from
# the environment if an environment variable prefixed with $ is provided.
password = ""
max_rps = 3
max_ws_conns = 1
# Path to a custom root CA.
ca_file = ""
# Path to a custom client cert file.
client_cert_file = ""
# Path to a custom client key file.
client_key_file = ""
# Allows backends to skip peer count checking, default false
# consensus_skip_peer_count = true
[backends.alchemy]
rpc_url = "http://localhost"
ws_url = ""
username = ""
password = ""
max_rps = 3
max_ws_conns = 1
[backend_groups]
[backend_groups.main]
backends = ["madara"]
# Enable consensus awareness for backend group, making it act as a load balancer, default false
# consensus_aware = true
# Period in which the backend wont serve requests if banned, default 5m
# consensus_ban_period = "1m"
# Maximum delay for update the backend, default 30s
# consensus_max_update_threshold = "20s"
# Maximum block lag, default 8
# consensus_max_block_lag = 16
# Minimum peer count, default 3
# consensus_min_peer_count = 4
[backend_groups.alchemy]
backends = ["alchemy"]
# If the authentication group below is in the config,
# nori will only accept authenticated requests.
[authentication]
# Mapping of auth key to alias. The alias is used to provide a human-
# readable name for the auth key in monitoring. The auth key will be
# read from the environment if an environment variable prefixed with $
# is provided. Note that you will need to quote the environment variable
# in order for it to be value TOML, e.g. "$FOO_AUTH_KEY" = "foo_alias".
# secret = "test"
# Mapping of methods to backend groups.
[rpc_method_mappings]
starknet_addDeclareTransaction = "main"
starknet_addDeployAccountTransaction = "main"
starknet_addInvokeTransaction = "main"
starknet_blockNumber = "main"
starknet_blockHashAndNumber = "main"
starknet_call = "main"
starknet_chainId = "main"
starknet_estimateFee = "main"
starknet_estimateMessageFee = "main"
starknet_getBlockTransactionCount = "main"
starknet_getBlockWithTxHashes = "main"
starknet_getBlockWithTxs = "main"
starknet_getClass = "main"
starknet_getClassAt = "main"
starknet_getClassHashAt = "main"
starknet_getEvents = "main"
starknet_getNonce = "main"
starknet_getStateUpdate = "main"
starknet_getStorageAt = "main"
starknet_getTransactionByBlockIdAndIndex = "main"
starknet_getTransactionByHash = "main"
starknet_getTransactionReceipt = "main"
starknet_getTransactionStatus = "main"
starknet_simulateTransaction = "main"
starknet_specVersion = "main"
starknet_syncing = "main"
starknet_traceBlockTransactions = "main"
starknet_traceTransaction = "main"