-
Notifications
You must be signed in to change notification settings - Fork 51
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
CCIP Integration tests - wiring contracts [CCIP-2698] #1148
Conversation
d5bff91
to
30e2739
Compare
30e2739
to
8bca6d3
Compare
8bca6d3
to
058d971
Compare
0fd5d5e
to
69af04b
Compare
* Generating NonceManager * Add onRamp as an authorized caller to NonceManager
e037726
to
5761eb2
Compare
* Test fails if any wiring between contracts is not correct. | ||
*/ | ||
func TestPingPong(t *testing.T) { | ||
_, universes := createUniverses(t, 4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the naming a bit odd (universe
).
Maybe better something like:
createUniverses -> setupContracts
universes -> chainContracts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO tying it to contracts can limit us. We can later add log pollers and other stuff. It also already has backend, owner that are not contracts.
core/services/ocr3/plugins/ccip_integration_tests/ping_pong_test.go
Outdated
Show resolved
Hide resolved
core/services/ocr3/plugins/ccip_integration_tests/ping_pong_test.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you go over the remaining require.Equal
's etc. to make sure the correct argument ordering is followed?
core/services/ocr3/plugins/ccip_integration_tests/ping_pong_test.go
Outdated
Show resolved
Hide resolved
core/services/ocr3/plugins/ccip_integration_tests/ping_pong_test.go
Outdated
Show resolved
Hide resolved
Setting up a basic test that have basic OCR3 Nodes. Each Node can access 3 EVM chains that are created and connected to each others. Check [PR](#1148) for more details on creating the chains and connecting them. As JobSpecs for CCIP are not ready. The main goal of this PR is to have the nodes and AddDon on capability registry for these nodes for each chain. Once JobSpec is ready we'll be able to test that the nodes picks up the changes and deploys the plugins, start sending, receiving,..etc.
This is first phase of setting up full integration tests for the new setup.
Test is setting up 3 chains (let's call them A, B, C), each chain deploys and starts 2 ping pong contracts for the other 2.
A ---deploy+start---> (pingPongB, pingPongC)
B ---deploy+start---> (pingPongA, pingPongC)
C ---deploy+start---> (pingPongA, pingPongB)
and then checks that each ping pong contract emitted
CCIPSendRequested
event from the expected source to destination.Test fails if any wiring between contracts is not correct.
Main part of helpers that's important to check is the setupInitialConfigs function. This makes sure that all configs are in place to be able to start sending between contracts.
Note: This setup is missing token pools to simplify it a little bit. It will be added in future PR when we start testing sending tokens.
https://smartcontract-it.atlassian.net/browse/CCIP-2698