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

Chain Agnostic MultiNode + EVM Implementation #13386

Merged
merged 170 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 167 commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
09f9ee1
Update rpc client
DylanTinianov May 6, 2024
90f1bc8
Merge branch 'develop' into BCI-3160-implement-rpc-client
DylanTinianov May 6, 2024
8879883
Update RPCClient
DylanTinianov May 6, 2024
e889b81
Update RPCClient
DylanTinianov May 6, 2024
c39476a
use Eth Subscription for heads
DylanTinianov May 7, 2024
9762c8d
Make RpcClient public
DylanTinianov May 7, 2024
ad368f9
Merge pull request #13111 from smartcontractkit/BCI-3160-implement-rp…
DylanTinianov May 7, 2024
86a5d58
Update node
DylanTinianov May 13, 2024
281f93f
Update Multinode
DylanTinianov May 14, 2024
6813259
Fix build + generate
DylanTinianov May 15, 2024
9e45475
Udate multinode
DylanTinianov May 16, 2024
a61a99e
update multinode
DylanTinianov May 16, 2024
3ff4cb9
fix tests
DylanTinianov May 16, 2024
c399391
Fix mocks
DylanTinianov May 21, 2024
b2b5926
Update node_lifecycle_test.go
DylanTinianov May 22, 2024
029c82b
Fix all client tests
DylanTinianov May 22, 2024
bd14d51
Fix tests
DylanTinianov May 24, 2024
db2c5f3
Update client_test.go
DylanTinianov May 24, 2024
28c917f
go mod tidy
DylanTinianov May 24, 2024
d873d25
fix tests
DylanTinianov May 29, 2024
119d947
Fix tests
DylanTinianov May 29, 2024
b3b60fc
Clean up
DylanTinianov May 29, 2024
9db0039
Fix features test mocking
DylanTinianov May 29, 2024
88bc047
Fix logging
DylanTinianov May 29, 2024
59e6752
Remove logging
DylanTinianov May 31, 2024
e940efa
Fix tests
DylanTinianov May 31, 2024
d8ce63d
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov May 31, 2024
5dd3c5c
Merge branch 'BCI-3160-EVM-MultiNode-PoC' of https://github.com/smart…
DylanTinianov May 31, 2024
7b52a43
Fix context
DylanTinianov May 31, 2024
f6c83ac
lint
DylanTinianov Jun 4, 2024
8ccad6e
Update node_lifecycle_test.go
DylanTinianov Jun 4, 2024
3469af3
Remove unused generics
DylanTinianov Jun 4, 2024
3d0209c
Add state locking
DylanTinianov Jun 4, 2024
8755d87
Set block difficulty
DylanTinianov Jun 6, 2024
80e0030
Update node_lifecycle.go
DylanTinianov Jun 6, 2024
0182578
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov Jun 6, 2024
ded393c
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Jun 11, 2024
35d6ec6
Merge branch 'BCI-3160-EVM-MultiNode-PoC' of https://github.com/smart…
DylanTinianov Jun 11, 2024
9d8b107
Fix tests
DylanTinianov Jun 11, 2024
4c1d7ee
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Jun 11, 2024
4079440
Make NodeStates public
DylanTinianov Jun 12, 2024
7498dde
Update multi_node_test.go
DylanTinianov Jun 12, 2024
4796377
Update Unsubscribe
DylanTinianov Jun 12, 2024
ce1214b
Remove HEAD generic from Node interface
DylanTinianov Jun 12, 2024
ae2afe0
Remove unneeded generics
DylanTinianov Jun 12, 2024
0454491
Remove unneeded generics from Multinode
DylanTinianov Jun 12, 2024
107a767
Remove Multinode as interface
DylanTinianov Jun 12, 2024
b291867
Add PoolChainInfoProvider
DylanTinianov Jun 12, 2024
438e61e
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Jun 12, 2024
f7425d9
Setup SendOnly nodes
DylanTinianov Jun 18, 2024
6a26747
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Jun 18, 2024
a78085b
Merge branch 'BCI-3160-EVM-MultiNode-PoC' of https://github.com/smart…
DylanTinianov Jun 18, 2024
cd3fdc9
Test empty context
DylanTinianov Jun 18, 2024
252c488
Add err to log
DylanTinianov Jun 18, 2024
e50e1f3
Add rpc newHeads method
DylanTinianov Jun 18, 2024
caa83e6
Fix context
DylanTinianov Jun 18, 2024
7cd64ef
Changeset
DylanTinianov Jun 18, 2024
511a7a2
Remove unused mocks
DylanTinianov Jun 18, 2024
c307b10
Create Transaction Sender
DylanTinianov Jun 19, 2024
354c1bc
Implement TransactionSender
DylanTinianov Jun 19, 2024
17f77c0
Fix transaction sender types
DylanTinianov Jun 20, 2024
55ff6b6
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Jun 21, 2024
e5a619e
Implement transaction sender tests
DylanTinianov Jun 25, 2024
fc2d410
Ensure MultiNode is running
DylanTinianov Jun 25, 2024
8886d0c
Address comments
DylanTinianov Jun 27, 2024
a83d342
Remove ChainClientRPC interface
DylanTinianov Jun 28, 2024
71a2b7f
Remove unneeded test
DylanTinianov Jun 28, 2024
181a38b
Generate mocks
DylanTinianov Jun 28, 2024
00169be
Fix tests
DylanTinianov Jun 28, 2024
23b0991
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov Jul 3, 2024
e6e5419
Merge branch 'BCI-3160-EVM-MultiNode-PoC' of https://github.com/smart…
DylanTinianov Jul 4, 2024
70cea08
fix tests
DylanTinianov Jul 4, 2024
c9a6c12
Use UnsubscribeAllExcept
DylanTinianov Jul 4, 2024
d5a1a8c
Fix rpc client tests
DylanTinianov Jul 4, 2024
a50bb22
Address comments
DylanTinianov Jul 4, 2024
4bc6894
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Jul 4, 2024
6a6c5d1
Merge branch 'BCI-3160-EVM-MultiNode-PoC' of https://github.com/smart…
DylanTinianov Jul 4, 2024
21c1c64
Remove unused code
DylanTinianov Jul 4, 2024
15e3fa7
Generate private mock
DylanTinianov Jul 4, 2024
f4ebec0
lint
DylanTinianov Jul 4, 2024
f3e0ec1
Fix locks and unsubscribing
DylanTinianov Jul 5, 2024
96febe1
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Jul 5, 2024
62e5f55
Update node.go
DylanTinianov Jul 5, 2024
8308ece
fixed flaky headtracker tests
dhaidashenko Jul 8, 2024
c4dce66
Merge branch 'BCI-3160-implement-node-interface' of github.com:smartc…
dhaidashenko Jul 8, 2024
80ddd26
Update node_lifecycle_test.go
DylanTinianov Jul 8, 2024
169e44b
Update node_lifecycle_test.go
DylanTinianov Jul 8, 2024
a432047
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Jul 8, 2024
7a2d71d
Merge
DylanTinianov Jul 8, 2024
8870b56
Update transaction sender
DylanTinianov Jul 8, 2024
2895a65
Merge pull request #13184 from smartcontractkit/BCI-3160-implement-no…
DylanTinianov Jul 8, 2024
6507ebd
Update chain_client_test.go
DylanTinianov Jul 8, 2024
4556370
Remove unused variables
DylanTinianov Jul 8, 2024
8e222db
lint
DylanTinianov Jul 8, 2024
7268f24
enable secondary url test
DylanTinianov Jul 8, 2024
ff5b0b7
Use http if not nil
DylanTinianov Jul 8, 2024
5377099
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Jul 8, 2024
e29a871
Merge branch 'BCI-3160-EVM-MultiNode-PoC' of https://github.com/smart…
DylanTinianov Jul 8, 2024
2ccef1c
Update transaction_sender.go
DylanTinianov Jul 9, 2024
3256963
Add close method
DylanTinianov Jul 12, 2024
c0e28c6
Update rpc_client.go
DylanTinianov Jul 12, 2024
ee924c6
changeset
DylanTinianov Jul 12, 2024
bb82aa1
Add Close to transaction sender
DylanTinianov Jul 16, 2024
66faa46
Return struct not interface
DylanTinianov Jul 16, 2024
2858be8
Remove flaky test
DylanTinianov Jul 16, 2024
2a64d47
Fix context
DylanTinianov Jul 16, 2024
9d9eeb8
Test if mn closes
DylanTinianov Jul 16, 2024
09b6f72
Fix context cancel
DylanTinianov Jul 16, 2024
871088e
Fix DoAll
DylanTinianov Jul 16, 2024
49234de
Merge pull request #13693 from smartcontractkit/BCI-3160-implement-tx…
DylanTinianov Jul 17, 2024
d5d8ed3
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov Jul 17, 2024
05d0061
lint generate
DylanTinianov Jul 17, 2024
e6ceeb1
Revert
DylanTinianov Jul 17, 2024
f5c4ff7
Fix mocks
DylanTinianov Jul 17, 2024
742ae28
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov Aug 6, 2024
98cbda7
Update node_lifecycle.go
DylanTinianov Aug 6, 2024
4abada5
lint
DylanTinianov Aug 6, 2024
b67b440
Delete rpc_client.go
DylanTinianov Aug 6, 2024
2c914a6
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Aug 6, 2024
4eb6389
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Aug 6, 2024
f94d9fe
Address comments
DylanTinianov Aug 12, 2024
dfadfc4
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov Aug 12, 2024
a92eb44
Fix tests
DylanTinianov Aug 12, 2024
fedb715
Update common/client/send_only_node.go
DylanTinianov Aug 16, 2024
8d2f464
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Aug 16, 2024
541e7e4
Address comments
DylanTinianov Aug 21, 2024
fbb19bf
Address comments
DylanTinianov Aug 22, 2024
d0caa9f
Rename SubscribeToHeads
DylanTinianov Aug 22, 2024
ddaf144
Return code
DylanTinianov Aug 22, 2024
959779e
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Aug 23, 2024
95fad34
Update transaction_sender.go
DylanTinianov Aug 27, 2024
e1052a2
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov Aug 27, 2024
032d45e
Fix merge conflicts
DylanTinianov Aug 27, 2024
b437445
Handle batch requests
DylanTinianov Aug 27, 2024
e09403a
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Aug 27, 2024
92248ab
Delete mock_rpc_client_test.go
DylanTinianov Aug 27, 2024
a158dd2
Update common/client/types.go
DylanTinianov Sep 3, 2024
51c5d42
Move RPC methods
DylanTinianov Sep 3, 2024
3ac31eb
Merge branch 'BCI-3160-EVM-MultiNode-PoC' of https://github.com/smart…
DylanTinianov Sep 3, 2024
7d85631
Use map for subs
DylanTinianov Sep 3, 2024
a7017fc
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Sep 3, 2024
97d382e
Fix conflicts
DylanTinianov Sep 4, 2024
74703c1
Don't cancel context
DylanTinianov Sep 5, 2024
031b5e7
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Sep 6, 2024
51db93a
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Sep 6, 2024
c9eadc2
Update transaction_sender.go
DylanTinianov Sep 6, 2024
6b60c89
Fix lint
DylanTinianov Sep 6, 2024
277e5e6
Delete late-mails-battle.md
DylanTinianov Sep 6, 2024
968013f
lint
DylanTinianov Sep 6, 2024
30369a6
lint
DylanTinianov Sep 6, 2024
0037103
Check Transaction Sender state
DylanTinianov Sep 6, 2024
44e9253
Return Retryable
DylanTinianov Sep 12, 2024
ff4929b
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Sep 17, 2024
a5e987f
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Sep 19, 2024
842eb4b
Fix lint
DylanTinianov Sep 24, 2024
d0efc6c
Update core/chains/evm/client/chain_client_test.go
DylanTinianov Sep 24, 2024
3f9c453
Update sub_forwarder.go
DylanTinianov Sep 24, 2024
5587376
Update config.go
DylanTinianov Sep 24, 2024
f1d85e9
lint
DylanTinianov Sep 24, 2024
1b2dd36
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
DylanTinianov Sep 24, 2024
b09f569
Don't export nodeState
DylanTinianov Sep 24, 2024
11f1125
Update changeset
DylanTinianov Sep 26, 2024
2ff7fbf
Fix conflicts
DylanTinianov Oct 2, 2024
ec20239
Merge branch 'develop' of https://github.com/smartcontractkit/chainli…
DylanTinianov Oct 4, 2024
66bd9d2
Use subsSliceMu
DylanTinianov Oct 4, 2024
d2aacf8
lint
DylanTinianov Oct 4, 2024
e19f473
Update rpc_client.go
DylanTinianov Oct 4, 2024
55b6efb
nil ws url for sendonly nodes
dhaidashenko Oct 6, 2024
c441bfa
Use head polling
DylanTinianov Oct 8, 2024
d5ce6f2
Merge branch 'develop' into BCI-3160-EVM-MultiNode-PoC
dhaidashenko Oct 14, 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
25 changes: 25 additions & 0 deletions .changeset/orange-feet-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
"chainlink": minor
---

Implemented new chain agnostic MultiNode design along with the corresponding EVM implementation. The chain agnostic components enable Multinode to be integrated with Solana and other non-EVM chains. Previously the Multinode was coupled with EVM specific actions, and was called to execute these actions direclty. With this change, the MultiNode's responsibility has been simplified to focus on RPC selection along with performing health checks. Chain specific actions will instead be executed on the RPC directly after being selected by MultiNode. The Chain Agnostic MultiNode provides improved reliability and metrics for all chain integrations using it.

These are following main components:
Node: Common component which wraps an RPC with state information, health checks, and an alive loop to handle state changes along with maintaining chain information.
RPCClient: Chain-specific RPC wrapper which implements required interface for MultiNode along with any chain-specific functionality needed.
MultiNode: Perform RPCClient selection and performs health checks on all RPCs.
TransactionSender: Chain agnostic component which broadcasts transactions to all healthy RPCs and aggregates results. A chain-specific error classifier must be implemented.

MultiNode picks the "best" RPC based on one of the configurable criteria:
- Priority defined in the config.
- Highest latest block.
- Round-robin within the same priority level (or using other configurable selection algorithms)

Benefits of Chain Agnostic MultiNode:
Reliability: Improved RPC reliability scaleable to all chains
Maintainability: Can apply changes across all chain integrations through the use of common code
Extendability: Can add new health checks, RPC selection and ranking algorithms
Integration Speed: Much faster to integrate MultiNode with new chains
Reduced Generics: Significantly less bulky code!

#updated #changed #internal
4 changes: 1 addition & 3 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ packages:
NodeSelector:
sendOnlyClient:
SendOnlyNode:
RPC:
RPCClient:
Head:
NodeClient:
PoolChainInfoProvider:
github.com/smartcontractkit/chainlink/v2/common/headtracker:
interfaces:
Expand Down Expand Up @@ -54,7 +53,6 @@ packages:
github.com/smartcontractkit/chainlink/v2/core/chains/evm/client:
interfaces:
Client:
RPCClient:
github.com/smartcontractkit/chainlink/v2/core/chains/evm/config:
interfaces:
GasEstimator:
Expand Down
Loading
Loading