Skip to content

Commit 239d72a

Browse files
committed
pkg/solana/config: config enhancements
1 parent 1697af4 commit 239d72a

File tree

12 files changed

+638
-6
lines changed

12 files changed

+638
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require (
2121
github.com/prometheus/client_model v0.6.1
2222
github.com/smartcontractkit/chainlink-ccip v0.0.0-20250417161444-6af45cb2bf9e
2323
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250411163110-21a13ceb3ac4
24-
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250423184741-8b59e5dd60e1
24+
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250428140325-7ea957803c52
2525
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7
2626
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250421203809-e0f5602c126c
2727
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250402142713-6529d36f91f3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250417161444-6af45cb2bf9e h1
407407
github.com/smartcontractkit/chainlink-ccip v0.0.0-20250417161444-6af45cb2bf9e/go.mod h1:Jb05WL6lj5H89XGcaaOinxTf4Gdj+vXO4TcUhqTgqIM=
408408
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250411163110-21a13ceb3ac4 h1:ujhHdxB3+K6lOnhku7lqpj3WsoOhyvOAAkdsGtwon/o=
409409
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250411163110-21a13ceb3ac4/go.mod h1:k3/Z6AvwurPUlfuDFEonRbkkiTSgNSrtVNhJEWNlUZA=
410-
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250423184741-8b59e5dd60e1 h1:qYv7f++PMP3mEAd1QYLmBmyqKr0036Z1XqIrr19QpC8=
411-
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250423184741-8b59e5dd60e1/go.mod h1:vHs/mPpAztdKJtzRKLnmLinmpS78fBh9sAuyKqQrQ+I=
410+
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250428140325-7ea957803c52 h1:s9Wu5Lp9pSOQmVIxHcon5RoFgqm77aO36FTTDTznzI4=
411+
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250428140325-7ea957803c52/go.mod h1:UGZVg18zzyJ1KimGM5SSmxG5jb7aCSq3OwQQKfhHGyE=
412412
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw=
413413
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7/go.mod h1:yaDOAZF6MNB+NGYpxGCUc+owIdKrjvFW0JODdTcQ3V0=
414414
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250421203809-e0f5602c126c h1:aWvuA6iEpPNlXnY/xHp92P8Elt7sz1GMOVbhnjnlyxE=

integration-tests/go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require (
1717
github.com/rs/zerolog v1.33.0
1818
github.com/smartcontractkit/chainlink-ccip v0.0.0-20250422180320-d43a4ac14d8a
1919
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250411163110-21a13ceb3ac4
20-
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250423184741-8b59e5dd60e1
20+
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250428140325-7ea957803c52
2121
github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250423143844-b2f8187cc342
2222
github.com/smartcontractkit/chainlink-testing-framework/lib v1.54.0
2323
github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2
@@ -267,6 +267,7 @@ require (
267267
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
268268
github.com/kr/pretty v0.3.1 // indirect
269269
github.com/kr/text v0.2.0 // indirect
270+
github.com/kylelemons/godebug v1.1.0 // indirect
270271
github.com/leanovate/gopter v0.2.11 // indirect
271272
github.com/leodido/go-urn v1.4.0 // indirect
272273
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect

integration-tests/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,8 +1195,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250422180320-d43a4ac14d8a h1
11951195
github.com/smartcontractkit/chainlink-ccip v0.0.0-20250422180320-d43a4ac14d8a/go.mod h1:Jb05WL6lj5H89XGcaaOinxTf4Gdj+vXO4TcUhqTgqIM=
11961196
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250411163110-21a13ceb3ac4 h1:ujhHdxB3+K6lOnhku7lqpj3WsoOhyvOAAkdsGtwon/o=
11971197
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250411163110-21a13ceb3ac4/go.mod h1:k3/Z6AvwurPUlfuDFEonRbkkiTSgNSrtVNhJEWNlUZA=
1198-
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250423184741-8b59e5dd60e1 h1:qYv7f++PMP3mEAd1QYLmBmyqKr0036Z1XqIrr19QpC8=
1199-
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250423184741-8b59e5dd60e1/go.mod h1:vHs/mPpAztdKJtzRKLnmLinmpS78fBh9sAuyKqQrQ+I=
1198+
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250428140325-7ea957803c52 h1:s9Wu5Lp9pSOQmVIxHcon5RoFgqm77aO36FTTDTznzI4=
1199+
github.com/smartcontractkit/chainlink-common v0.7.1-0.20250428140325-7ea957803c52/go.mod h1:UGZVg18zzyJ1KimGM5SSmxG5jb7aCSq3OwQQKfhHGyE=
12001200
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw=
12011201
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7/go.mod h1:yaDOAZF6MNB+NGYpxGCUc+owIdKrjvFW0JODdTcQ3V0=
12021202
github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250417193446-eeb0a7d1e049 h1:7HwYt8rDz1ehTcB28oNipdTZUtV17F2sfkLTLtMJC4c=

pkg/solana/CONFIG.md

Lines changed: 325 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,325 @@
1+
TODO header
2+
## Example
3+
4+
```toml
5+
TODO example
6+
```
7+
8+
## Global
9+
```toml
10+
ChainID = 'fake-chain' # Example
11+
Enabled = true # Default
12+
BalancePollPeriod = '5s' # Default
13+
ConfirmPollPeriod = '500ms' # Default
14+
OCR2CachePollPeriod = '1s' # Default
15+
OCR2CacheTTL = '1m' # Default
16+
TxTimeout = '1m' # Default
17+
TxRetryTimeout = '10s' # Default
18+
TxConfirmTimeout = '30s' # Default
19+
TxExpirationRebroadcast = false # Default
20+
TxRetentionTimeout = '0s' # Default
21+
SkipPreflight = true # Default
22+
Commitment = 'confirmed' # Default
23+
MaxRetries = 0 # Default
24+
FeeEstimatorMode = 'fixed' # Default
25+
ComputeUnitPriceMax = 1000 # Default
26+
ComputeUnitPriceMin = 0 # Default
27+
ComputeUnitPriceDefault = 0 # Default
28+
FeeBumpPeriod = '3s' # Default
29+
BlockHistoryPollPeriod = '5s' # Default
30+
BlockHistorySize = 1 # Default
31+
ComputeUnitLimitDefault = 200_000 # Default
32+
EstimateComputeUnitLimit = false # Default
33+
```
34+
35+
36+
### ChainID
37+
```toml
38+
ChainID = 'fake-chain' # Example
39+
```
40+
ChainID TODO
41+
42+
### Enabled
43+
```toml
44+
Enabled = true # Default
45+
```
46+
Enabled TODO
47+
48+
### BalancePollPeriod
49+
```toml
50+
BalancePollPeriod = '5s' # Default
51+
```
52+
BalancePollPeriod TODO
53+
54+
### ConfirmPollPeriod
55+
```toml
56+
ConfirmPollPeriod = '500ms' # Default
57+
```
58+
ConfirmPollPeriod TODO
59+
60+
### OCR2CachePollPeriod
61+
```toml
62+
OCR2CachePollPeriod = '1s' # Default
63+
```
64+
OCR2CachePollPeriod TODO
65+
66+
### OCR2CacheTTL
67+
```toml
68+
OCR2CacheTTL = '1m' # Default
69+
```
70+
OCR2CacheTTL TODO
71+
72+
### TxTimeout
73+
```toml
74+
TxTimeout = '1m' # Default
75+
```
76+
TxTimeout TODO
77+
78+
### TxRetryTimeout
79+
```toml
80+
TxRetryTimeout = '10s' # Default
81+
```
82+
TxRetryTimeout TODO
83+
84+
### TxConfirmTimeout
85+
```toml
86+
TxConfirmTimeout = '30s' # Default
87+
```
88+
TxConfirmTimeout TODO
89+
90+
### TxExpirationRebroadcast
91+
```toml
92+
TxExpirationRebroadcast = false # Default
93+
```
94+
TxExpirationRebroadcast TODO
95+
96+
### TxRetentionTimeout
97+
```toml
98+
TxRetentionTimeout = '0s' # Default
99+
```
100+
TxRetentionTimeout TODO
101+
102+
### SkipPreflight
103+
```toml
104+
SkipPreflight = true # Default
105+
```
106+
SkipPreflight TODO
107+
108+
### Commitment
109+
```toml
110+
Commitment = 'confirmed' # Default
111+
```
112+
Commitment TODO
113+
114+
### MaxRetries
115+
```toml
116+
MaxRetries = 0 # Default
117+
```
118+
MaxRetries TODO
119+
120+
### FeeEstimatorMode
121+
```toml
122+
FeeEstimatorMode = 'fixed' # Default
123+
```
124+
FeeEstimatorMode TODO
125+
126+
### ComputeUnitPriceMax
127+
```toml
128+
ComputeUnitPriceMax = 1000 # Default
129+
```
130+
ComputeUnitPriceMax TODO
131+
132+
### ComputeUnitPriceMin
133+
```toml
134+
ComputeUnitPriceMin = 0 # Default
135+
```
136+
ComputeUnitPriceMin TODO
137+
138+
### ComputeUnitPriceDefault
139+
```toml
140+
ComputeUnitPriceDefault = 0 # Default
141+
```
142+
ComputeUnitPriceDefault TODO
143+
144+
### FeeBumpPeriod
145+
```toml
146+
FeeBumpPeriod = '3s' # Default
147+
```
148+
FeeBumpPeriod TODO
149+
150+
### BlockHistoryPollPeriod
151+
```toml
152+
BlockHistoryPollPeriod = '5s' # Default
153+
```
154+
BlockHistoryPollPeriod TODO
155+
156+
### BlockHistorySize
157+
```toml
158+
BlockHistorySize = 1 # Default
159+
```
160+
BlockHistorySize TODO
161+
162+
### ComputeUnitLimitDefault
163+
```toml
164+
ComputeUnitLimitDefault = 200_000 # Default
165+
```
166+
ComputeUnitLimitDefault TODO
167+
168+
### EstimateComputeUnitLimit
169+
```toml
170+
EstimateComputeUnitLimit = false # Default
171+
```
172+
EstimateComputeUnitLimit TODO
173+
174+
## MultiNode
175+
```toml
176+
[MultiNode]
177+
Enabled = false # Default
178+
PollFailureThreshold = 5 # Example
179+
PollInterval = '1s' # Example
180+
SelectionMode = 'HighestHead' # Example
181+
SyncThreshold = 5 # Example
182+
NodeIsSyncingEnabled = false # Example
183+
LeaseDuration = '1m0s' # Example
184+
NewHeadsPollInterval = '2s' # Example
185+
FinalizedBlockPollInterval = '3s' # Example
186+
EnforceRepeatableRead = true # Example
187+
DeathDeclarationDelay = '2m0s' # Example
188+
VerifyChainID = true # Example
189+
NodeNoNewHeadsThreshold = '3m0s' # Example
190+
NoNewFinalizedHeadsThreshold = '1h0m0s' # Example
191+
FinalityDepth = 0 # Example
192+
FinalityTagEnabled = true # Example
193+
FinalizedBlockOffset = 0 # Example
194+
```
195+
196+
197+
### Enabled
198+
```toml
199+
Enabled = false # Default
200+
```
201+
Enabled TODO
202+
203+
### PollFailureThreshold
204+
```toml
205+
PollFailureThreshold = 5 # Example
206+
```
207+
PollFailureThreshold TODO
208+
209+
### PollInterval
210+
```toml
211+
PollInterval = '1s' # Example
212+
```
213+
PollInterval TODO
214+
215+
### SelectionMode
216+
```toml
217+
SelectionMode = 'HighestHead' # Example
218+
```
219+
SelectionMode TODO
220+
221+
### SyncThreshold
222+
```toml
223+
SyncThreshold = 5 # Example
224+
```
225+
SyncThreshold TODO
226+
227+
### NodeIsSyncingEnabled
228+
```toml
229+
NodeIsSyncingEnabled = false # Example
230+
```
231+
NodeIsSyncingEnabled TODO
232+
233+
### LeaseDuration
234+
```toml
235+
LeaseDuration = '1m0s' # Example
236+
```
237+
LeaseDuration TODO
238+
239+
### NewHeadsPollInterval
240+
```toml
241+
NewHeadsPollInterval = '2s' # Example
242+
```
243+
NewHeadsPollInterval TODO
244+
245+
### FinalizedBlockPollInterval
246+
```toml
247+
FinalizedBlockPollInterval = '3s' # Example
248+
```
249+
FinalizedBlockPollInterval TODO
250+
251+
### EnforceRepeatableRead
252+
```toml
253+
EnforceRepeatableRead = true # Example
254+
```
255+
EnforceRepeatableRead TODO
256+
257+
### DeathDeclarationDelay
258+
```toml
259+
DeathDeclarationDelay = '2m0s' # Example
260+
```
261+
DeathDeclarationDelay TODO
262+
263+
### VerifyChainID
264+
```toml
265+
VerifyChainID = true # Example
266+
```
267+
VerifyChainID TODO
268+
269+
### NodeNoNewHeadsThreshold
270+
```toml
271+
NodeNoNewHeadsThreshold = '3m0s' # Example
272+
```
273+
NodeNoNewHeadsThreshold TODO
274+
275+
### NoNewFinalizedHeadsThreshold
276+
```toml
277+
NoNewFinalizedHeadsThreshold = '1h0m0s' # Example
278+
```
279+
NoNewFinalizedHeadsThreshold TODO
280+
281+
### FinalityDepth
282+
```toml
283+
FinalityDepth = 0 # Example
284+
```
285+
FinalityDepth TODO
286+
287+
### FinalityTagEnabled
288+
```toml
289+
FinalityTagEnabled = true # Example
290+
```
291+
FinalityTagEnabled TODO
292+
293+
### FinalizedBlockOffset
294+
```toml
295+
FinalizedBlockOffset = 0 # Example
296+
```
297+
FinalizedBlockOffset TODO
298+
299+
## Nodes
300+
```toml
301+
[[Nodes]]
302+
Name = 'primary' # Example
303+
URL = 'http://solana.web' # Example
304+
SendOnly = false # Default
305+
```
306+
307+
308+
### Name
309+
```toml
310+
Name = 'primary' # Example
311+
```
312+
Name TODO
313+
314+
### URL
315+
```toml
316+
URL = 'http://solana.web' # Example
317+
```
318+
URL TODO
319+
320+
### SendOnly
321+
```toml
322+
SendOnly = false # Default
323+
```
324+
SendOnly TODO
325+

pkg/solana/cmd/config-docs/main.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package main
2+
3+
import (
4+
"flag"
5+
"fmt"
6+
"log"
7+
"os"
8+
"path"
9+
10+
"github.com/smartcontractkit/chainlink-solana/pkg/solana/config"
11+
)
12+
13+
var outDir = flag.String("o", "", "output directory")
14+
15+
func main() {
16+
s, err := config.GenerateDocs()
17+
if err != nil {
18+
log.Fatalln("Failed to generate docs:", err)
19+
}
20+
if err = os.WriteFile(path.Join(*outDir, "CONFIG.md"), []byte(s), 0600); err != nil {
21+
fmt.Fprintf(os.Stderr, "failed to write config docs: %v\n", err)
22+
os.Exit(1)
23+
}
24+
}

0 commit comments

Comments
 (0)