Repository navigation
Expand file tree
/
Copy pathexample.cloudbreak.api.toml
More file actions
143 lines (130 loc) · 5.46 KB
/
Copy pathexample.cloudbreak.api.toml
File metadata and controls
143 lines (130 loc) · 5.46 KB
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
[server]
host = "0.0.0.0"
port = 4000
max-connections = 100
# Unset: getProgramAccounts sends one batch, so every failure is a JSON-RPC error.
# Set to opt in to streaming (lower memory and time to first byte); a mid-stream
# failure then aborts the connection. See "Streamed Responses" in the README.
# gpa-stream-batch-size = 1000
request-timeout = "60s"
max-multiple-accounts = 100
[database]
url = "postgres://cloudbreak:cloudbreak@localhost:5432/cloudbreak"
api-queries-timeout = 20
[metrics]
host = "0.0.0.0"
port = 8875
# Header used to identify the subscription for per-subscription metrics. Also
# recorded as the `subscription_id` field on the `json_encoding` trace span.
# subscription-id-key = "x-subscription-id"
# Header carrying the caller's request ID, recorded as the `request_id` field on
# the `json_encoding` trace span so spans can be matched to the upstream request
# logs. Never used as a metric label.
# request-id-key = "x-request-id"
# Optional per-client-IP egress bandwidth metrics (peak gauge + throughput
# histogram). Off by default.
# client-ip-bandwidth-enabled = false
# Header used to group the per-client-IP bandwidth metrics, also recorded as the
# `client_ip` field on the `json_encoding` trace span. When unset (or when a
# request lacks the header) the bandwidth folds into a single "unconfigured"
# label and the span field reports "unconfigured" — no request header is read.
# Set it to a trusted ingress header (e.g. "x-forwarded-for") to group by client IP.
# client-ip-key = "x-forwarded-for"
[query-tracker-client]
endpoint = "http://localhost:4001"
timeout = "5s"
flush-interval = "1m"
# Bound the in-memory buffer: at most this many distinct index patterns are held
# between flushes; once full, new patterns are dropped (counted) while existing
# ones keep aggregating. A failed flush re-buffers instead of losing data.
max-buffered-identities = 10000
# Split large flushes into batches of at most this many patterns per HTTP POST.
max-batch-size = 1000
[tracing]
enabled = true
endpoint = "http://localhost:4317"
sample-ratio = 0.1
export-interval = 5
max-batch-size = 512
max-queue-size = 2048
track-idle-time = false
span-filter = [
"gpa_rpc",
"gpa_db",
"gpa_encode",
"json_encoding",
"http_request",
"gpa_db_execution",
"http_with_transport",
"gpa_encode2",
"http_connection",
"gtabo_rpc",
"gtabd_rpc",
"slot_db",
"mint_db",
"mint_data",
"gpa_cache_finalize_query",
"processed_read",
"account_db"
]
# How to handle requests with "processed" commitment level.
# "reject" (default) — return an error for processed commitment requests.
# "use-confirmed" — silently respond with confirmed data instead.
# processed-commitment = "reject"
# How to respond to requests while the node is unhealthy.
# "json-rpc-error" (default) — return a JSON-RPC error -32005 ("Node is unhealthy") with HTTP 200.
# "http-unavailable" — return an HTTP 503 Service Unavailable response instead.
# (Note: only applies to single requests; batch requests always return HTTP 200
# with per-item JSON-RPC errors.)
# unhealthy-response = "json-rpc-error"
# Serves getSupply from the supply ring the indexer maintains. Set it together
# with the indexer's [supply] section; a disabled node answers getSupply with
# method-not-found.
# [supply]
# enabled = false
# Slots arrive by Postgres LISTEN/NOTIFY on `cloudbreak_slots`.
[slot-syncronizer]
enabled = false
# Serves processed commitment for getAccountInfo, getMultipleAccounts, getBalance,
# getTokenAccountBalance, getTokenSupply and getSlot from a Yellowstone block feed held in
# memory around the Postgres confirmed slot. Other methods keep following
# processed-commitment. Requires [grpc] and [slot-syncronizer] enabled = true. Startup
# fails without them. For these methods it overrides processed-commitment = "reject":
# when no processed blocks can be proven, a processed request
# answers exactly as a confirmed request would. Each API instance carries its own
# full block feed.
# [processed-accounts]
# enabled = false
# Keeps the mint data jsonParsed needs in memory (~4.6 GB). Requires [grpc],
# [slot-syncronizer] enabled = true and the indexer's [mint-cache].
# [mint-cache]
# enabled = false
# The API gRPC feed used by [processed-accounts] and [mint-cache]. The connection
# fields default to the indexer values; the API panics after reconnect-give-up.
# [grpc]
# enabled = false
# endpoint = "https://grpc.example:443"
# x-token = "..."
# timeout = 60
# max-grpc-errors = 1
# reconnect-give-up = "600s"
# reconnect-backoff = "5s"
# reconnect-from-slot-retain = "300s"
# Optional module: cache configuration for the GPA queries.
[gpa-cache]
max-total-bytes = 1_073_741_824 # 1GB
min-bytes-per-query = 1_048_576 # 1MB
# Optional: queries larger than this are pinned and skipped by cleanup.
# max-bytes-query-cleanup = 104_857_600 # 100MB
# Required when max-bytes-query-cleanup is set: max fraction of max-total-bytes
# that pinned queries may collectively hold before the oldest are evicted.
# max-pinned-bytes-ratio = 0.5 # pinned queries capped at 50% of the cache
# getLargestAccounts (GLA) and getTokenLargestAccounts (GTLA) are served only
# when their section is present with enabled = true, and only when the co-deployed
# indexer enables the same section. Both are commented out (disabled) by default.
# A request for a not-enabled method returns JSON-RPC -32601 Method not found.
# Uncomment to enable, matching the indexer's sections.
# [largest-accounts]
# enabled = true
# [token-largest-accounts]
# enabled = true