Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiNode Soak Testing #894

Merged
merged 266 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
266 commits
Select commit Hold shift + click to select a range
95e1c9a
Add defaults
DylanTinianov Sep 6, 2024
45a7596
Add latest block methods
DylanTinianov Sep 6, 2024
6641bc9
Merge branch 'develop' into BCI-2835-integrate-multinode
DylanTinianov Sep 6, 2024
d8d312c
Address comments
DylanTinianov Sep 10, 2024
aa3c068
Merge branch 'develop' into BCI-2835-integrate-multinode
DylanTinianov Sep 10, 2024
3c3756e
lint
DylanTinianov Sep 12, 2024
7c8b55d
Merge branch 'develop' into BCI-2835-integrate-multinode
DylanTinianov Sep 12, 2024
2521670
Fix lint overflow issues
DylanTinianov Sep 12, 2024
5b5cfd6
Update transaction_sender.go
DylanTinianov Sep 12, 2024
690f812
Fix lint
DylanTinianov Sep 12, 2024
fd3823b
Validate node config
DylanTinianov Sep 12, 2024
4bf96b7
Update toml.go
DylanTinianov Sep 12, 2024
c1b83a5
Add SendOnly nodes
DylanTinianov Sep 18, 2024
c58dbc8
Merge branch 'BCI-2835-integrate-multinode' into BCFR-302-multinode-toml
DylanTinianov Sep 18, 2024
d90e3b8
Merge branch 'BCFR-302-multinode-toml' into BCFR-298-multinode-client
DylanTinianov Sep 18, 2024
e0231b0
Use pointers on config
DylanTinianov Sep 18, 2024
0122a5f
Fix conflicts
DylanTinianov Sep 18, 2024
8b13548
Add test outlines
DylanTinianov Sep 19, 2024
8aa39f6
Use test context
DylanTinianov Sep 19, 2024
94f3669
Merge branch 'BCFR-302-multinode-toml' into BCFR-298-multinode-client
DylanTinianov Sep 19, 2024
0e5a35e
Merge branch 'BCI-2835-integrate-multinode' into BCFR-302-multinode-toml
DylanTinianov Sep 19, 2024
06bf565
Merge branch 'BCFR-302-multinode-toml' into BCFR-298-multinode-client
DylanTinianov Sep 19, 2024
b5ff16d
Use configured selection mode
DylanTinianov Sep 19, 2024
1b3a101
Set defaults
DylanTinianov Sep 24, 2024
b7cc350
Merge branch 'develop' into BCFR-302-multinode-toml
DylanTinianov Sep 24, 2024
0afd8da
lint
DylanTinianov Sep 24, 2024
b99b90c
Add nil check
DylanTinianov Sep 24, 2024
8080fed
Merge branch 'BCFR-302-multinode-toml' into BCFR-298-multinode-client
DylanTinianov Sep 24, 2024
05524a1
Add client test
DylanTinianov Sep 24, 2024
6b92e70
Add subscription test
DylanTinianov Sep 24, 2024
500233a
tidy
DylanTinianov Sep 24, 2024
31a2f04
Fix imports
DylanTinianov Sep 24, 2024
bb5e47c
Update chain_test.go
DylanTinianov Sep 24, 2024
d7203f8
Merge branch 'develop' into BCFR-302-multinode-toml
DylanTinianov Sep 27, 2024
98b0e9d
Update multinode.go
DylanTinianov Sep 27, 2024
0621cf4
Merge branch 'develop' into BCFR-302-multinode-toml
DylanTinianov Oct 1, 2024
fd0cc16
Add comments
DylanTinianov Oct 1, 2024
75b8f02
Merge branch 'BCFR-302-multinode-toml' of https://github.com/smartcon…
DylanTinianov Oct 1, 2024
456be6c
Update multinode.go
DylanTinianov Oct 1, 2024
ad70b8a
Wrap multinode config
DylanTinianov Oct 1, 2024
99149a4
Merge branch 'develop' into BCFR-302-multinode-toml
DylanTinianov Oct 1, 2024
e628945
Fix imports
DylanTinianov Oct 1, 2024
3b497ef
Update .golangci.yml
DylanTinianov Oct 1, 2024
17a3a76
Merge branch 'BCFR-302-multinode-toml' into BCFR-298-multinode-client
DylanTinianov Oct 1, 2024
83dced8
Use MultiNode
DylanTinianov Oct 2, 2024
b5c3891
Add multinode to txm
DylanTinianov Oct 2, 2024
8a2c117
Use MultiNode
DylanTinianov Oct 2, 2024
284e90b
Update chain.go
DylanTinianov Oct 2, 2024
4d72403
Update balance_test.go
DylanTinianov Oct 2, 2024
df8a356
Add retries
DylanTinianov Oct 2, 2024
fe2f291
Fix head
DylanTinianov Oct 2, 2024
7bfb700
Update client.go
DylanTinianov Oct 2, 2024
523947e
lint
DylanTinianov Oct 2, 2024
05625a8
lint
DylanTinianov Oct 2, 2024
0a7e9b6
Use MultiNode TxSender
DylanTinianov Oct 2, 2024
eee4b50
Update txm_internal_test.go
DylanTinianov Oct 2, 2024
1eaf4a5
Address comments
DylanTinianov Oct 4, 2024
be646ed
Remove total difficulty
DylanTinianov Oct 4, 2024
ce0c39c
Register polling subs
DylanTinianov Oct 4, 2024
f3a3cac
Merge
DylanTinianov Oct 4, 2024
a4e2fa9
Merge branch 'BCFR-298-multinode-client' of https://github.com/smartc…
DylanTinianov Oct 4, 2024
1d1fa97
Extract MultiNodeClient
DylanTinianov Oct 4, 2024
dd09ef0
merge
DylanTinianov Oct 4, 2024
7cefbac
Remove caching changes
DylanTinianov Oct 4, 2024
50c4f8e
Undo cache changes
DylanTinianov Oct 4, 2024
8324639
Fix tests
DylanTinianov Oct 4, 2024
1630c9f
Merge branch 'BCFR-298-multinode-client' of https://github.com/smartc…
DylanTinianov Oct 4, 2024
316ea4b
Update chain.go
DylanTinianov Oct 4, 2024
eb50e6a
Fix variables
DylanTinianov Oct 4, 2024
f9f0f45
Move classify errors
DylanTinianov Oct 4, 2024
9bf92d3
Fix imports
DylanTinianov Oct 4, 2024
38166ee
lint
DylanTinianov Oct 4, 2024
a769bf0
Merge branch 'BCFR-298-multinode-client' of https://github.com/smartc…
DylanTinianov Oct 4, 2024
95789d5
Update txm_internal_test.go
DylanTinianov Oct 4, 2024
6bbe6f9
Merge branch 'BCFR-298-multinode-client' of https://github.com/smartc…
DylanTinianov Oct 4, 2024
179c95a
Update txm_internal_test.go
DylanTinianov Oct 4, 2024
ab8fe88
lint
DylanTinianov Oct 4, 2024
d50b756
Merge branch 'BCFR-298-multinode-client' into BCFR-300-multinode-txse…
DylanTinianov Oct 6, 2024
2bd9fdc
Fix error classification
DylanTinianov Oct 8, 2024
40a4d5d
Update txm_internal_test.go
DylanTinianov Oct 8, 2024
324dfde
Update multinode_client.go
DylanTinianov Oct 8, 2024
83cf950
lint
DylanTinianov Oct 8, 2024
e25f8e1
Merge branch 'BCFR-298-multinode-client' into BCFR-300-multinode-txse…
DylanTinianov Oct 8, 2024
c8f3e2e
Merge branch 'develop' into BCFR-298-multinode-client
DylanTinianov Oct 8, 2024
9748b50
Merge branch 'BCFR-298-multinode-client' into BCFR-300-multinode-txse…
DylanTinianov Oct 8, 2024
489040f
Update classify_errors.go
DylanTinianov Oct 8, 2024
03da4d4
Update classify_errors.go
DylanTinianov Oct 8, 2024
47bba5d
Add tests
DylanTinianov Oct 8, 2024
c9558ce
Merge branch 'BCFR-298-multinode-client' into BCFR-300-multinode-txse…
DylanTinianov Oct 8, 2024
5b4811f
Add test coverage
DylanTinianov Oct 8, 2024
7b24501
lint
DylanTinianov Oct 8, 2024
37dd998
Add dial comment
DylanTinianov Oct 9, 2024
778fbb3
CTF bump for image build
smickovskid Oct 15, 2024
56ae7dd
Update pkg/solana/client/multinode_client.go
DylanTinianov Oct 15, 2024
5e610fa
Merge branch 'develop' into BCFR-298-multinode-client
DylanTinianov Oct 15, 2024
cb4613b
Merge branch 'BCFR-298-multinode-client' of https://github.com/smartc…
DylanTinianov Oct 15, 2024
f0d346e
Merge branch 'BCFR-300-multinode-txsender' of https://github.com/smar…
DylanTinianov Oct 15, 2024
4f445c5
Update txm.go
DylanTinianov Oct 15, 2024
86c92a8
Create loader
DylanTinianov Oct 16, 2024
8073c46
Update transaction_sender.go
DylanTinianov Oct 16, 2024
1091173
Fix tests
DylanTinianov Oct 16, 2024
edd480f
Update txm_internal_test.go
DylanTinianov Oct 16, 2024
f374f3e
lint
DylanTinianov Oct 16, 2024
45170ba
Update txm.go
DylanTinianov Oct 16, 2024
f5be760
Merge branch 'develop' into BCFR-298-multinode-client
DylanTinianov Oct 17, 2024
03adb58
Fix conflicts
DylanTinianov Oct 17, 2024
de24312
Add ctx
DylanTinianov Oct 17, 2024
4aca05e
Fix imports
DylanTinianov Oct 17, 2024
fb2fcda
Merge branch 'develop' into BCFR-298-multinode-client
DylanTinianov Oct 17, 2024
2045854
Merge branch 'BCFR-298-multinode-client' into BCFR-300-multinode-txse…
DylanTinianov Oct 17, 2024
0bd7741
Add SendTxResult to TxSender
DylanTinianov Oct 17, 2024
857a9e5
Merge branch 'BCFR-300-multinode-txsender' of https://github.com/smar…
DylanTinianov Oct 17, 2024
29c3f41
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov Oct 17, 2024
ca8d2c7
Update chain_test.go
DylanTinianov Oct 17, 2024
49076b6
Enable MultiNode
DylanTinianov Oct 17, 2024
75c33ce
Move error classification
DylanTinianov Oct 17, 2024
198a894
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 17, 2024
f67e09c
Add MultiNode config
DylanTinianov Oct 17, 2024
3fa8849
Merge branch 'BCFR-622-multinode-soak-testing' of https://github.com/…
DylanTinianov Oct 17, 2024
e11de9a
Use loader
DylanTinianov Oct 17, 2024
9b6f043
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 17, 2024
e058ad6
Merge branch 'BCFR-300-multinode-txsender' of https://github.com/smar…
DylanTinianov Oct 17, 2024
deb1607
Merge branch 'BCFR-622-multinode-soak-testing' of https://github.com/…
DylanTinianov Oct 17, 2024
cb8313e
Update multinode.go
DylanTinianov Oct 17, 2024
3f8d20b
Update multinode.go
DylanTinianov Oct 17, 2024
909b49d
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov Oct 18, 2024
85c1699
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 18, 2024
9757621
Use loader in txm tests
DylanTinianov Oct 18, 2024
1d49485
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 18, 2024
a8c9a0d
lint
DylanTinianov Oct 18, 2024
1175ed4
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 18, 2024
43edd92
Update testconfig.go
DylanTinianov Oct 18, 2024
f2e3cb8
Update loader
DylanTinianov Oct 18, 2024
193143f
Use single RPC
DylanTinianov Oct 18, 2024
c737fa7
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 18, 2024
b22f85f
Fix tests
DylanTinianov Oct 18, 2024
7d9ab3a
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 18, 2024
6b87b56
lint
DylanTinianov Oct 18, 2024
aeeec4d
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 18, 2024
7655519
Merge branch 'develop' into BCFR-300-multinode-txsender
DylanTinianov Oct 18, 2024
0efd2b5
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 18, 2024
ac5fdd7
Use default thresholds
DylanTinianov Oct 18, 2024
d122700
Address comments
DylanTinianov Oct 21, 2024
cacffbf
Update classify_errors.go
DylanTinianov Oct 21, 2024
e945897
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 21, 2024
5ecb5b7
Update testconfig.go
DylanTinianov Oct 21, 2024
5e82bd4
Merge branch 'BCFR-622-multinode-soak-testing' of https://github.com/…
DylanTinianov Oct 21, 2024
9ef4e76
Update errors
DylanTinianov Oct 21, 2024
6647fa1
lint
DylanTinianov Oct 21, 2024
d848527
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 21, 2024
d6df3b1
Merge branch 'develop' into BCFR-300-multinode-txsender
DylanTinianov Oct 21, 2024
6b52d79
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 21, 2024
6c568c6
Fix SendTransaction
DylanTinianov Oct 22, 2024
4acc436
Merge branch 'develop' into BCFR-300-multinode-txsender
DylanTinianov Oct 22, 2024
794b7d1
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 22, 2024
f87632f
Update chain.go
DylanTinianov Oct 22, 2024
76f3c07
Merge branch 'BCFR-300-multinode-txsender' of https://github.com/smar…
DylanTinianov Oct 22, 2024
84e8ddc
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 22, 2024
06c0c86
Update sendTx
DylanTinianov Oct 22, 2024
b3f2e9c
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 22, 2024
c673d2b
Fix ctx issues
DylanTinianov Oct 23, 2024
a3d5127
Merge branch 'develop' into BCFR-300-multinode-txsender
DylanTinianov Oct 23, 2024
7c0b1d0
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 23, 2024
ac74b1c
Enable multiple RPCs in soak tests
DylanTinianov Oct 23, 2024
b23a62c
Update defaults for testing
DylanTinianov Oct 23, 2024
4b86236
Add health check tags
DylanTinianov Oct 24, 2024
432f11f
Merge branch 'develop' into BCFR-300-multinode-txsender
DylanTinianov Oct 24, 2024
1fe4243
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 24, 2024
fc4455b
Increase sync threshold
DylanTinianov Oct 24, 2024
a36cb49
Merge branch 'BCFR-622-multinode-soak-testing' of https://github.com/…
DylanTinianov Oct 24, 2024
71dd294
Validate heads
DylanTinianov Oct 24, 2024
8c3ba88
Use latestChainInfo
DylanTinianov Oct 25, 2024
45b79ab
Fix AliveLoop bug
DylanTinianov Oct 25, 2024
f2e68b0
Update configurations
DylanTinianov Oct 25, 2024
fe26304
Update transaction_sender.go
DylanTinianov Oct 25, 2024
e113854
Get chain info
DylanTinianov Oct 28, 2024
c3527b4
Update ctx
DylanTinianov Oct 29, 2024
2410dfa
Merge branch 'develop' into BCFR-300-multinode-txsender
DylanTinianov Oct 30, 2024
d7e6c26
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 30, 2024
f46c681
Update transaction_sender.go
DylanTinianov Oct 30, 2024
3388cbb
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 30, 2024
a647746
Update transaction_sender.go
DylanTinianov Oct 30, 2024
75071fa
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 30, 2024
4428c12
Increase tx timeout
DylanTinianov Oct 30, 2024
8c624ce
Update transaction_sender.go
DylanTinianov Oct 30, 2024
c70ee81
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 30, 2024
329be9a
Update ctx
DylanTinianov Oct 30, 2024
c7e74eb
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 30, 2024
265fd67
Add timer
DylanTinianov Oct 30, 2024
480d91c
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 30, 2024
3592243
Update transaction_sender.go
DylanTinianov Oct 30, 2024
a5bab9b
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 30, 2024
abed47c
Update transaction_sender.go
DylanTinianov Oct 30, 2024
97bb6c1
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 30, 2024
b258370
Update testconfig.go
DylanTinianov Oct 30, 2024
a75815f
Fix ctx
DylanTinianov Oct 30, 2024
422d655
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 30, 2024
1914f47
Remove debug logging
DylanTinianov Oct 30, 2024
0198a36
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 30, 2024
1643efc
Update run_soak_test.sh
DylanTinianov Oct 30, 2024
e82103d
lint
DylanTinianov Oct 30, 2024
dd39cc0
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 30, 2024
6392027
Add debugging logs
DylanTinianov Oct 31, 2024
fe86168
Fix ctx cancel
DylanTinianov Oct 31, 2024
e5f03a0
Fix ctx cancel
DylanTinianov Oct 31, 2024
315b21d
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 31, 2024
85165b6
Fix DoAll ctx
DylanTinianov Oct 31, 2024
4f792d3
Remove debugging logs
DylanTinianov Oct 31, 2024
4faf0a1
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Oct 31, 2024
5891c3c
Remove logs
DylanTinianov Oct 31, 2024
e1e458b
defer reportWg
DylanTinianov Nov 5, 2024
e7608b6
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov Nov 5, 2024
5c4c6a6
Merge branch 'BCFR-300-multinode-txsender' into BCFR-622-multinode-so…
DylanTinianov Nov 5, 2024
e30f10e
Add result ctx logging
DylanTinianov Nov 5, 2024
b15bd57
Merge branch 'develop' into BCFR-622-multinode-soak-testing
DylanTinianov Nov 5, 2024
b972c1b
log on close
DylanTinianov Nov 5, 2024
13d7072
Update transaction_sender.go
DylanTinianov Nov 5, 2024
1306020
add cancel func
DylanTinianov Nov 5, 2024
71ed9fc
Update transaction_sender.go
DylanTinianov Nov 5, 2024
50872b6
Update transaction_sender.go
DylanTinianov Nov 5, 2024
b1c33a2
Add ctx to reportSendTxAnomalies
DylanTinianov Nov 5, 2024
cd83472
Update comments
DylanTinianov Nov 6, 2024
fce0ca9
Fix comments
DylanTinianov Nov 6, 2024
d0adc9e
Address comments
DylanTinianov Nov 7, 2024
66b1757
lint
DylanTinianov Nov 7, 2024
5e75cd7
Merge branch 'develop' into BCFR-622-multinode-soak-testing
DylanTinianov Nov 7, 2024
40448bf
lint
DylanTinianov Nov 7, 2024
35614e2
Merge branch 'BCFR-622-multinode-soak-testing' of https://github.com/…
DylanTinianov Nov 7, 2024
1cc97ed
Pass context
DylanTinianov Nov 7, 2024
5c9fd29
Update node_lifecycle.go
DylanTinianov Nov 7, 2024
fdbf119
Use get reader function
DylanTinianov Nov 8, 2024
e1eab95
Make rpcurls plural
DylanTinianov Nov 8, 2024
5c0079a
Fix reader getters
DylanTinianov Nov 8, 2024
9838345
lint
DylanTinianov Nov 8, 2024
8ba0e30
Merge branch 'develop' into BCFR-622-multinode-soak-testing
DylanTinianov Nov 8, 2024
c4cef31
fix imports
DylanTinianov Nov 8, 2024
5a3cc8e
Merge branch 'BCFR-622-multinode-soak-testing' of https://github.com/…
DylanTinianov Nov 8, 2024
bbb714c
Update transaction_sender.go
DylanTinianov Nov 11, 2024
4959f2d
Merge branch 'develop' into BCFR-622-multinode-soak-testing
DylanTinianov Nov 12, 2024
91c64b3
Remove TxError
DylanTinianov Nov 13, 2024
83cf57b
Rename getReader
DylanTinianov Nov 13, 2024
6408ea3
lint
DylanTinianov Nov 13, 2024
50e3a21
Update chain_test.go
DylanTinianov Nov 13, 2024
42ea402
Merge branch 'develop' into BCFR-622-multinode-soak-testing
DylanTinianov Nov 13, 2024
40e280f
Update transmissions_cache.go
DylanTinianov Nov 14, 2024
249e901
Merge branch 'BCFR-622-multinode-soak-testing' of https://github.com/…
DylanTinianov Nov 14, 2024
8e9ab20
Update run_soak_test.sh
DylanTinianov Nov 14, 2024
ca7c982
Fix deprecated method
DylanTinianov Nov 14, 2024
e671b69
Clean up getReader
DylanTinianov Nov 15, 2024
7aa905d
Use AccountReader
DylanTinianov Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions integration-tests/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type TestEnvDetails struct {
type ChainDetails struct {
ChainName string
ChainID string
RPCUrl string
RPCUrls []string
RPCURLExternal string
WSURLExternal string
ProgramAddresses *chainConfig.ProgramAddresses
Expand Down Expand Up @@ -116,9 +116,9 @@ func New(testConfig *tc.TestConfig) *Common {
config = chainConfig.DevnetConfig()
privateKeyString = *testConfig.Common.PrivateKey

if *testConfig.Common.RPCURL != "" {
config.RPCUrl = *testConfig.Common.RPCURL
config.WSUrl = *testConfig.Common.WsURL
if len(*testConfig.Common.RPCURLs) > 0 {
config.RPCUrls = *testConfig.Common.RPCURLs
config.WSUrls = *testConfig.Common.WsURLs
config.ProgramAddresses = &chainConfig.ProgramAddresses{
OCR2: *testConfig.SolanaConfig.OCR2ProgramID,
AccessController: *testConfig.SolanaConfig.AccessControllerProgramID,
Expand All @@ -130,7 +130,7 @@ func New(testConfig *tc.TestConfig) *Common {
c = &Common{
ChainDetails: &ChainDetails{
ChainID: config.ChainID,
RPCUrl: config.RPCUrl,
RPCUrls: config.RPCUrls,
ChainName: config.ChainName,
ProgramAddresses: config.ProgramAddresses,
},
Expand All @@ -146,7 +146,7 @@ func New(testConfig *tc.TestConfig) *Common {
}
// provide getters for TestConfig (pointers to chain details)
c.TestConfig.GetChainID = func() string { return c.ChainDetails.ChainID }
c.TestConfig.GetURL = func() string { return c.ChainDetails.RPCUrl }
c.TestConfig.GetURL = func() []string { return c.ChainDetails.RPCUrls }

return c
}
Expand Down Expand Up @@ -298,7 +298,7 @@ func (c *Common) CreateJobsForContract(contractNodeInfo *ContractNodeInfo) error
bootstrapNodeInternalIP = contractNodeInfo.BootstrapNode.InternalIP()
}
relayConfig := job.JSONConfig{
"nodeEndpointHTTP": c.ChainDetails.RPCUrl,
"nodeEndpointHTTP": c.ChainDetails.RPCUrls,
"ocr2ProgramID": contractNodeInfo.OCR2.ProgramAddress(),
"transmissionsID": contractNodeInfo.Store.TransmissionsAddress(),
"storeProgramID": contractNodeInfo.Store.ProgramAddress(),
Expand Down
16 changes: 8 additions & 8 deletions integration-tests/common/test_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ func (m *OCRv2TestState) DeployCluster(contractsDir string) {
m.Common.ChainDetails.WSURLExternal = m.Common.Env.URLs["sol"][1]

if *m.Config.TestConfig.Common.Network == "devnet" {
m.Common.ChainDetails.RPCUrl = *m.Config.TestConfig.Common.RPCURL
m.Common.ChainDetails.RPCURLExternal = *m.Config.TestConfig.Common.RPCURL
m.Common.ChainDetails.WSURLExternal = *m.Config.TestConfig.Common.WsURL
m.Common.ChainDetails.RPCUrls = *m.Config.TestConfig.Common.RPCURLs
m.Common.ChainDetails.RPCURLExternal = (*m.Config.TestConfig.Common.RPCURLs)[0]
m.Common.ChainDetails.WSURLExternal = (*m.Config.TestConfig.Common.WsURLs)[0]
}

m.Common.ChainDetails.MockserverURLInternal = m.Common.Env.URLs["qa_mock_adapter_internal"][0]
Expand All @@ -133,14 +133,14 @@ func (m *OCRv2TestState) DeployCluster(contractsDir string) {
require.NoError(m.Config.T, err)

// Setting the External RPC url for Gauntlet
m.Common.ChainDetails.RPCUrl = sol.InternalHTTPURL
m.Common.ChainDetails.RPCUrls = []string{sol.InternalHTTPURL}
m.Common.ChainDetails.RPCURLExternal = sol.ExternalHTTPURL
m.Common.ChainDetails.WSURLExternal = sol.ExternalWsURL

if *m.Config.TestConfig.Common.Network == "devnet" {
m.Common.ChainDetails.RPCUrl = *m.Config.TestConfig.Common.RPCURL
m.Common.ChainDetails.RPCURLExternal = *m.Config.TestConfig.Common.RPCURL
m.Common.ChainDetails.WSURLExternal = *m.Config.TestConfig.Common.WsURL
m.Common.ChainDetails.RPCUrls = *m.Config.TestConfig.Common.RPCURLs
m.Common.ChainDetails.RPCURLExternal = (*m.Config.TestConfig.Common.RPCURLs)[0]
m.Common.ChainDetails.WSURLExternal = (*m.Config.TestConfig.Common.WsURLs)[0]
}

b, err := test_env.NewCLTestEnvBuilder().
Expand Down Expand Up @@ -273,7 +273,7 @@ func (m *OCRv2TestState) CreateJobs() {
require.NoError(m.Config.T, err, "Error connecting to websocket client")

relayConfig := job.JSONConfig{
"nodeEndpointHTTP": m.Common.ChainDetails.RPCUrl,
"nodeEndpointHTTP": m.Common.ChainDetails.RPCUrls,
"ocr2ProgramID": m.Common.ChainDetails.ProgramAddresses.OCR2,
"transmissionsID": m.Gauntlet.FeedAddress,
"storeProgramID": m.Common.ChainDetails.ProgramAddresses.Store,
Expand Down
12 changes: 6 additions & 6 deletions integration-tests/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package config
type Config struct {
ChainName string
ChainID string
RPCUrl string
WSUrl string
RPCUrls []string
WSUrls []string
ProgramAddresses *ProgramAddresses
PrivateKey string
}
Expand All @@ -20,8 +20,8 @@ func DevnetConfig() *Config {
ChainName: "solana",
ChainID: "devnet",
// Will be overridden if set in toml
RPCUrl: "https://api.devnet.solana.com",
WSUrl: "wss://api.devnet.solana.com/",
RPCUrls: []string{"https://api.devnet.solana.com"},
WSUrls: []string{"wss://api.devnet.solana.com/"},
}
}

Expand All @@ -30,8 +30,8 @@ func LocalNetConfig() *Config {
ChainName: "solana",
ChainID: "localnet",
// Will be overridden if set in toml
RPCUrl: "http://sol:8899",
WSUrl: "ws://sol:8900",
RPCUrls: []string{"http://sol:8899"},
WSUrls: []string{"ws://sol:8900"},
ProgramAddresses: &ProgramAddresses{
OCR2: "E3j24rx12SyVsG6quKuZPbQqZPkhAUCh8Uek4XrKYD2x",
AccessController: "2ckhep7Mvy1dExenBqpcdevhRu7CLuuctMcx7G9mWEvo",
Expand Down
59 changes: 59 additions & 0 deletions integration-tests/scripts/run_soak_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash

NODE_VERSION=18

cd ../smoke || exit

echo "Switching to required Node.js version $NODE_VERSION..."
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm use $NODE_VERSION

echo "Initializing soak test..."
terminated_by_script=false
while IFS= read -r line; do
echo "$line"
# Check if the line contains the target string
if echo "$line" | grep -q "ocr2:inspect:responses"; then
# Send SIGINT (Ctrl+C) to the 'go test' process
sudo pkill -INT -P $$ go 2>/dev/null
terminated_by_script=true
break
fi
done < <(sudo go test -timeout 24h -count=1 -run TestSolanaOCRV2Smoke/embedded -test.timeout 30m 2>&1)

# Capture the PID of the background process
READER_PID=$!

# Start a background timer (sleeps for 15 minutes, then sends SIGALRM to the script)
( sleep 900 && kill -s ALRM $$ ) &
TIMER_PID=$!

# Set a trap to catch the SIGALRM signal for timeout
trap 'on_timeout' ALRM

# Function to handle timeout
on_timeout() {
echo "Error: failed to start soak test: timeout exceeded (15 minutes)."
# Send SIGINT to the 'go test' process
pkill -INT -P $$ go 2>/dev/null
# Clean up
kill "$TIMER_PID" 2>/dev/null
kill "$READER_PID" 2>/dev/null
exit 1
}

# Wait for the reader process to finish
wait "$READER_PID"
EXIT_STATUS=$?

# Clean up: kill the timer process if it's still running
kill "$TIMER_PID" 2>/dev/null

if [ "$terminated_by_script" = true ]; then
echo "Soak test started successfully"
exit 0
else
echo "Soak test failed to start"
exit 1
fi
2 changes: 1 addition & 1 deletion integration-tests/solclient/solclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ func SendFunds(senderPrivateKey string, receiverPublicKey string, lamports uint6
accountTo := solana.MustPublicKeyFromBase58(receiverPublicKey)

// Get recent blockhash
recent, err := rpcClient.GetRecentBlockhash(context.Background(), rpc.CommitmentFinalized)
recent, err := rpcClient.GetLatestBlockhash(context.Background(), rpc.CommitmentFinalized)
if err != nil {
return err
}
Expand Down
4 changes: 3 additions & 1 deletion integration-tests/solclient/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/smartcontractkit/chainlink-solana/contracts/generated/store"
relaySol "github.com/smartcontractkit/chainlink-solana/pkg/solana"
"github.com/smartcontractkit/chainlink-solana/pkg/solana/client"
)

type Store struct {
Expand All @@ -19,7 +20,8 @@ type Store struct {
}

func (m *Store) GetLatestRoundData() (uint64, uint64, uint64, error) {
a, _, err := relaySol.GetLatestTransmission(context.Background(), m.Client.RPC, m.Feed.PublicKey(), rpc.CommitmentConfirmed)
getReader := func() (client.AccountReader, error) { return m.Client.RPC, nil }
a, _, err := relaySol.GetLatestTransmission(context.Background(), getReader, m.Feed.PublicKey(), rpc.CommitmentConfirmed)
if err != nil {
return 0, 0, 0, err
}
Expand Down
72 changes: 46 additions & 26 deletions integration-tests/testconfig/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type TestConfig struct {

// getter funcs for passing parameters
GetChainID func() string
GetURL func() string
GetURL func() []string
}

const (
Expand Down Expand Up @@ -188,22 +188,22 @@ func (c *TestConfig) ReadFromEnvVar() error {
c.Network.RpcWsUrls = rpcWsUrls
}

commonRPCURL := ctf_config.MustReadEnvVar_String(E2E_TEST_COMMON_RPC_URL_ENV)
if commonRPCURL != "" {
commonRPCURL := ctf_config.MustReadEnvVar_Strings(E2E_TEST_COMMON_RPC_URL_ENV, ",")
if len(commonRPCURL) > 0 {
if c.Common == nil {
c.Common = &Common{}
}
logger.Info().Msgf("Using %s env var to override Common.RPCURL", E2E_TEST_COMMON_RPC_URL_ENV)
c.Common.RPCURL = &commonRPCURL
logger.Info().Msgf("Using %s env var to override Common.RPCURLs", E2E_TEST_COMMON_RPC_URL_ENV)
c.Common.RPCURLs = &commonRPCURL
}

commonWSURL := ctf_config.MustReadEnvVar_String(E2E_TEST_COMMON_WS_URL_ENV)
if commonWSURL != "" {
commonWSURL := ctf_config.MustReadEnvVar_Strings(E2E_TEST_COMMON_WS_URL_ENV, ",")
if len(commonWSURL) > 0 {
if c.Common == nil {
c.Common = &Common{}
}
logger.Info().Msgf("Using %s env var to override Common.WsURL", E2E_TEST_COMMON_WS_URL_ENV)
c.Common.WsURL = &commonWSURL
logger.Info().Msgf("Using %s env var to override Common.WsURLs", E2E_TEST_COMMON_WS_URL_ENV)
c.Common.WsURLs = &commonWSURL
}

commonPrivateKey := ctf_config.MustReadEnvVar_String(E2E_TEST_COMMON_PRIVATE_KEY_ENV)
Expand Down Expand Up @@ -256,24 +256,44 @@ func (c *TestConfig) GetNodeConfig() *ctf_config.NodeConfig {
}

func (c *TestConfig) GetNodeConfigTOML() (string, error) {
var chainID, url string
var chainID string
var url []string
if c.GetChainID != nil {
chainID = c.GetChainID()
}
if c.GetURL != nil {
url = c.GetURL()
}

solConfig := solcfg.TOMLConfig{
Enabled: ptr.Ptr(true),
ChainID: ptr.Ptr(chainID),
Nodes: []*solcfg.Node{
{
Name: ptr.Ptr("primary"),
URL: config.MustParseURL(url),
},
mnConfig := solcfg.MultiNodeConfig{
MultiNode: solcfg.MultiNode{
Enabled: ptr.Ptr(true),
SyncThreshold: ptr.Ptr(uint32(170)),
},
}
mnConfig.SetDefaults()

var nodes []*solcfg.Node
for i, u := range url {
nodes = append(nodes, &solcfg.Node{
Name: ptr.Ptr(fmt.Sprintf("primary-%d", i)),
URL: config.MustParseURL(u),
})
}

chainCfg := solcfg.Chain{
// Increase timeout for TransactionSender
TxTimeout: config.MustNewDuration(2 * time.Minute),
}
chainCfg.SetDefaults()

solConfig := solcfg.TOMLConfig{
Enabled: ptr.Ptr(true),
ChainID: ptr.Ptr(chainID),
Nodes: nodes,
MultiNode: mnConfig,
Chain: chainCfg,
}
baseConfig := node.NewBaseConfig()
baseConfig.Solana = solcfg.TOMLConfigs{
&solConfig,
Expand Down Expand Up @@ -357,12 +377,12 @@ type Common struct {
InsideK8s *bool `toml:"inside_k8"`
User *string `toml:"user"`
// if rpc requires api key to be passed as an HTTP header
RPCURL *string `toml:"-"`
WsURL *string `toml:"-"`
PrivateKey *string `toml:"-"`
Stateful *bool `toml:"stateful_db"`
InternalDockerRepo *string `toml:"internal_docker_repo"`
DevnetImage *string `toml:"devnet_image"`
RPCURLs *[]string `toml:"-"`
WsURLs *[]string `toml:"-"`
PrivateKey *string `toml:"-"`
Stateful *bool `toml:"stateful_db"`
InternalDockerRepo *string `toml:"internal_docker_repo"`
DevnetImage *string `toml:"devnet_image"`
}

type SolanaConfig struct {
Expand Down Expand Up @@ -410,10 +430,10 @@ func (c *Common) Validate() error {
if c.PrivateKey == nil {
return fmt.Errorf("private_key must be set")
}
if c.RPCURL == nil {
if c.RPCURLs == nil {
return fmt.Errorf("rpc_url must be set")
}
if c.WsURL == nil {
if c.WsURLs == nil {
return fmt.Errorf("rpc_url must be set")
}

Expand Down
7 changes: 5 additions & 2 deletions pkg/monitoring/chain_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/gagliardetto/solana-go/rpc"

pkgSolana "github.com/smartcontractkit/chainlink-solana/pkg/solana"
"github.com/smartcontractkit/chainlink-solana/pkg/solana/client"
)

//go:generate mockery --name ChainReader --output ./mocks/
Expand All @@ -31,11 +32,13 @@ type chainReader struct {
}

func (c *chainReader) GetState(ctx context.Context, account solana.PublicKey, commitment rpc.CommitmentType) (state pkgSolana.State, blockHeight uint64, err error) {
return pkgSolana.GetState(ctx, c.client, account, commitment)
getReader := func() (client.AccountReader, error) { return c.client, nil }
return pkgSolana.GetState(ctx, getReader, account, commitment)
}

func (c *chainReader) GetLatestTransmission(ctx context.Context, account solana.PublicKey, commitment rpc.CommitmentType) (answer pkgSolana.Answer, blockHeight uint64, err error) {
return pkgSolana.GetLatestTransmission(ctx, c.client, account, commitment)
getReader := func() (client.AccountReader, error) { return c.client, nil }
return pkgSolana.GetLatestTransmission(ctx, getReader, account, commitment)
DylanTinianov marked this conversation as resolved.
Show resolved Hide resolved
}

func (c *chainReader) GetTokenAccountBalance(ctx context.Context, account solana.PublicKey, commitment rpc.CommitmentType) (out *rpc.GetTokenAccountBalanceResult, err error) {
Expand Down
Loading
Loading