Repository navigation
Expand file tree
/
Copy pathconfig.validator.example.toml
More file actions
239 lines (210 loc) · 9.48 KB
/
Copy pathconfig.validator.example.toml
File metadata and controls
239 lines (210 loc) · 9.48 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
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
# ==============================================================================
# MagicBlock Validator Configuration
# ==============================================================================
# This file serves as a reference for all available configuration options.
# ALL FIELDS ARE OPTIONAL. If removed, the "Default" value listed in the
# comments will be used.
#
# CONFIGURATION PRECEDENCE (Highest to Lowest):
# 1. CLI Arguments (e.g. --listen 127.0.0.1:8899)
# 2. Environment Vars (e.g. MBV_ENGINE__LEDGER__SIZE_LIMIT=536870912)
# 3. TOML Config File (this file)
# 4. System Defaults
#
# ENVIRONMENT VARIABLES:
# Prefix: MBV_
# Splitter: Double underscore (__) denotes hierarchy depth.
# Naming: Field names use UPPER_SNAKE_CASE.
# Example: [engine.blockstore] blocktime -> MBV_ENGINE__BLOCKSTORE__BLOCKTIME
# ==============================================================================
# --- Core Settings ---
# Remote endpoints for syncing with the base chain.
# You can specify multiple remotes of different types.
# The first HTTP/HTTPS remote will be used for JSON-RPC calls.
# Each WebSocket/gRPC remote creates a subscription client.
#
# Supported URL schemes:
# - "http", "https": JSON-RPC HTTP connections
# - "ws", "wss": WebSocket connections for PubSub
# - "grpc", "grpcs": gRPC connections for streaming
#
# URL Aliases (resolved during parsing):
# - "mainnet": resolves to https://api.mainnet-beta.solana.com/
# - "devnet": resolves to https://api.devnet.solana.com/
# - "testnet": resolves to https://api.testnet.solana.com/
# - "localhost": resolves to http://localhost:8899/ (only for http/https schemes)
#
# Examples:
# remotes = ["devnet"] # Single devnet HTTP endpoint
# remotes = ["mainnet", "wss://mainnet-beta.solana.com"] # Mainnet with explicit WebSocket
# remotes = ["http://localhost:8899", "ws://localhost:8900"] # Local endpoints
#
# If no remotes are specified, defaults to ["devnet"] with an auto-added WebSocket endpoint.
# Default: ["https://api.devnet.solana.com/"]
# Env: Not supported (must be configured via TOML or CLI)
# Note: gRPC remote requires a Helius API key/token.
# Example format: grpcs://<network>.helius-rpc.com?api-key=<YOUR_API_KEY>
# See Helius gRPC docs for available network endpoints.
#
# A WebSocket remote may also be written as a table to cap subscriptions
# per connection for that endpoint (overrides chainlink.ws-subs-per-connection):
# remotes = [{ url = "wss://api.devnet.solana.com", ws-subs-per-connection = 100 }]
remotes = [
"grpcs://laserstream-devnet-ewr.helius-rpc.com?api-key=YOUR_API_KEY",
"https://api.devnet.solana.com",
"wss://api.devnet.solana.com"
]
[metrics]
# Network address to bind the metrics service to.
# Default: "127.0.0.1:9090"
# Env: MBV_METRICS__ADDRESS
address = "127.0.0.1:9090"
# Frequency at which to collect metrics. Supports humantime (e.g. "30s", "1m").
# Default: "30s"
# Env: MBV_METRICS__COLLECT_FREQUENCY
collect-frequency = "30s"
# ==============================================================================
# gRPC (applies to all gRPC providers)
# ==============================================================================
[grpc]
# The maximum number of subscriptions that are added to a single optimized stream
# Default: 5000
# Env: MBV_GRPC__MAX_SUBS_IN_OLD_OPTIMIZED
max-subs-in-old-optimized = 5000
# The maximum number of old unoptimized subscriptions streams allowed until optimization is triggered
# Default: 5
# Env: MBV_GRPC__MAX_OLD_UNOPTIMIZED
max-old-unoptimized = 5
# The maximum number of subscriptions held in the current new stream which is updated frequently
# Default: 400
# Env: MBV_GRPC__MAX_SUBS_IN_NEW
max-subs-in-new = 400
# Maximum time without optimization before triggering optimization (in seconds)
# if not triggered by exceeding max-old-unoptimized.
# If not provided it defaults to 60 seconds.
# Env: MBV_GRPC__MAX_TIME_WITHOUT_OPTIMIZATION_SECS
max-time-without-optimization-secs = 60
# ==============================================================================
# Engine
# ==============================================================================
[engine.authority]
# The validator's identity keypair in Base58 format.
# Default: A pre-generated devnet keypair
# Env: MBV_ENGINE__AUTHORITY__LOCAL
local = "9Vo7TbA5YfC5a33JhAi9Fb41usA6JwecHNRw3f9MzzHAM8hFnXTzL5DcEHwsAFjuUZ8vNQcJ4XziRFpMc3gTgBQ"
[engine.accountsdb]
# AccountsDB lives under the ledger root by default.
directory = "magicblock-test-storage/accountsdb"
# Maximum number of recently loaded accounts retained in memory.
lru-capacity = 5000
[engine.blockstore]
blocktime = "400ms"
# Slots per superblock; 0 disables periodic sealing.
superblock = 72000
[engine.ledger]
# Shared durable root for the engine ledger, deprecated ledger, and service databases.
directory = "magicblock-test-storage"
size-limit = 536_870_912
[engine.replication]
# Nodes configured through LeaderParams are leaders.
allowed-followers = ["L12m1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo"]
bind-address = "127.0.0.1:10000"
[aperture]
# Network address to bind the main JSON RPC service to.
# Websocket bind address is derived by incrementing the port
# Default: "127.0.0.1:8899"
# CLI: -l, --listen <ADDR>
# Env: MBV_APERTURE__LISTEN
listen = "127.0.0.1:8899"
# List of paths to geyser json configuration files
# Default: empty list (no plugins)
geyser-plugins = ["config.json"]
# ==============================================================================
# Chain Commitment Strategy (ER -> BASE)
# ==============================================================================
[commit]
# The compute unit price (in micro-lamports) applied to commit transactions.
# Default: 1_000_000
# Env: MBV_COMMIT__COMPUTE_UNIT_PRICE
compute-unit-price = 1_000_000
# ==============================================================================
# Deprecated Ledger Compatibility
# ==============================================================================
[ledger]
# Capacity in bytes of the RocksDB block cache shared by all ledger columns.
# This is the only read caching layer (the ledger bypasses the OS page cache),
# so production nodes should set 16 GB or more.
# Default: 536_870_912 (512 MB)
# Env: MBV_LEDGER__BLOCK_CACHE_SIZE
block-cache-size = 536_870_912
# Whether to verify that the ledger on disk belongs to the configured keypair.
# Default: true
# Env: MBV_LEDGER__VERIFY_KEYPAIR
verify-keypair = true
# If true, deletes the existing ledger directory on startup.
# Default: false
# Env: MBV_LEDGER__RESET
reset = false
# ==============================================================================
# Chainlink (cloning pipeline)
# ==============================================================================
[chainlink]
# Maximum number of accounts to monitor for price updates.
# Default: 5000
# Env: MBV_CHAINLINK__MAX_MONITORED_ACCOUNTS
# Delay between resubscribing to accounts after a pubsub reconnection.
# This throttles the rate at which we resubscribe to prevent overwhelming the RPC provider.
# Supports humantime format (e.g. "50ms", "200ms", "1s").
# For example, with 50ms delay, resubscribing to 1000 accounts would take ~50 seconds.
# Default: "50ms"
# Env: MBV_CHAINLINK__RESUBSCRIPTION_DELAY
# resubscription-delay = "50ms"
# Period for polling DLP-owned UndelegationRequest accounts as a backfill for
# missed subscription updates. Set to "0s" to disable polling.
# Default: "5m"
# Env: MBV_CHAINLINK__UNDELEGATION_REQUEST_POLL_INTERVAL
# undelegation-request-poll-interval = "5m"
# Maximum subscriptions per websocket connection.
# Default: 900
# Env: MBV_CHAINLINK__WS_SUBS_PER_CONNECTION
# ws-subs-per-connection = 900
# ------------------------------------------------------------------------------
# Optional: Range Risk API validation for post-delegation actions signers
# ------------------------------------------------------------------------------
# When enabled, all signers referenced by post-delegation actions are checked
# against Range API before actions are allowed to execute.
[chainlink.risk]
# Enables/disables address risk checks against the risk server.
# Default: false
# Env: MBV_CHAINLINK__RISK__ENABLED
enabled = false
# Base URL of the risk server that performs address risk assessments.
# The risk server owns the upstream provider credentials, cache, and threshold.
# Default: "http://127.0.0.1:3001"
# Env: MBV_CHAINLINK__RISK__RISK_SERVER_URL
risk-server-url = "http://127.0.0.1:3001"
# HTTP timeout for risk server calls.
# Default: "5s"
# Env: MBV_CHAINLINK__RISK__REQUEST_TIMEOUT
request-timeout = "5s"
# Which post-delegation action signers to risk check.
# "all-signers": check every signer of every action (conservative).
# "relevant-programs": only check when an action involves a value
# transferring program: SPL Token (legacy and 2022),
# ephemeral SPL (eATA/ESPL), Magic, or the (ephemeral)
# system program. Actions touching none of these
# activate without any risk server call.
# Default: "all-signers"
# Env: MBV_CHAINLINK__RISK__CHECK_STRATEGY
check-strategy = "all-signers"
# ==============================================================================
# Pre-loaded Programs
# ==============================================================================
# You can specify multiple programs to load at startup.
# Default: Empty list
[[programs]]
id = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
path = "./libs/spl_token.so"
[[programs]]
id = "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo"
path = "./libs/spl_memo.so"