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

Add zombienet integration tests #706

Merged
merged 59 commits into from
Mar 16, 2022
Merged

Add zombienet integration tests #706

merged 59 commits into from
Mar 16, 2022

Conversation

wirednkod
Copy link
Contributor

@wirednkod wirednkod commented Feb 3, 2022

This PR replaces the one that @pepoviola opened before - mainly for keeping the history clean

.github/workflows/poc-zombienet.yml Outdated Show resolved Hide resolved
.github/workflows/poc-zombienet.yml Outdated Show resolved Hide resolved
.zombienet-tests/0001-custom.js Outdated Show resolved Hide resolved
.zombienet-tests/0001-smoke-test.feature Outdated Show resolved Hide resolved
wirednkod and others added 3 commits February 3, 2022 18:40
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
@wirednkod wirednkod requested a review from tomaka February 3, 2022 17:35
.zombienet-tests/utils.js Outdated Show resolved Hide resolved
@wirednkod wirednkod mentioned this pull request Feb 4, 2022
@pepoviola
Copy link
Contributor

Hi @wirednkod, I updated the version of zombienet and the feature file to just run the 0002 test without matching the output.

Thanks!

@tomaka
Copy link
Contributor

tomaka commented Feb 7, 2022

I suppose that the numbers, such as 0001 and 0002 are a convention so that we easily know which file belongs to which test. However we call 0002-getHeaders from 0001-..., so I'd like to understand

@pepoviola
Copy link
Contributor

I suppose that the numbers, such as 0001 and 0002 are a convention so that we easily know which file belongs to which test. However we call 0002-getHeaders from 0001-..., so I'd like to understand

Hi @tomaka/@wirednkod , I will clean the naming here and try to remove the sleep.
Thanks!

.github/workflows/poc-zombienet.yml Outdated Show resolved Hide resolved
Comment on lines 1 to 6
const { ApiPromise } = require("@polkadot/api")

async function connect(nodeName, networkInfo, isParachain) {
const { userDefinedTypes } = networkInfo.nodesByName[nodeName]
const customChainSpec = require(networkInfo.chainSpecPath)
const { createPolkadotJsScClient } = await import("@substrate/connect")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We seem to mix require and import here. Maybe decide on which one?

.zombienet-tests/utils.js Outdated Show resolved Hide resolved
.zombienet-tests/utils.js Outdated Show resolved Hide resolved
@@ -0,0 +1,17 @@
const { connect } = require("./utils")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe name the file 0002-checkSync.js or something, and not placeholder?

pepoviola and others added 2 commits March 9, 2022 07:56
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
@tomaka
Copy link
Contributor

tomaka commented Mar 9, 2022

Would be good to merge for me after my two comments (provided it works obviously)

pepoviola and others added 4 commits March 9, 2022 09:35
* change branch name

* change collators config

* add debug

* bumo zombienet version

* fmt

* use main branch

* remove debug
@pepoviola
Copy link
Contributor

pepoviola commented Mar 10, 2022

Hi @tomaka, can you give me some hints on this error:

[smoldot] Chain initialization complete for rococo_local_testnet. Name: "Rococo Local Testnet". Genesis hash: 0x756a…ada1. State root hash: 0x827e82a9f26f07f1425b494a48abb2780aea76cdefec899608c31e1d9dc34df7. Network identity: 12D3KooWH2fBjaVdPtAQ2r68euQMAEz2dywvdyvNZr5cJX9i2Zeh. Chain specification starting at: 0x756a…ada1 (#0)
[sync-service-rococo_local_testnet] GrandPa warp sync finished to #11 (0x1fa8…1b0c)
[runtime-rococo_local_testnet] Finalized block runtime ready. Spec version: 9140. Size of `:code`: 840 kiB.
[smoldot] Parachain initialization complete for local_testnet. Name: "Local Testnet". Genesis hash: 0x48d6…1b13. State root hash: 0x254d2a74d393c3fda33ca608540efa7c6b922be5a4a12a6fe2083f17dbc03134. Network identity: 12D3KooWP2YLfagqecQpjD6ji4CaZsgZgnnZocQphTqyZQB3Sf8E. Relay chain: rococo_local_testnet (id: 100)
[connections] Problem during discovery on local_testnet: NotConnected

We launch a relay-chain with 2 validator and a parachain with 2 collator:

  • The parachain is producing blocks ok
  • The relay-chain spec have 2 bootnodes
  • The parachain spec have 1 bootnode.

Thanks!!

@tomaka
Copy link
Contributor

tomaka commented Mar 11, 2022

As always, I need debug logs.
Debug logs really should be always enabled by default for the ZombieNet tests.

@tomaka
Copy link
Contributor

tomaka commented Mar 11, 2022

It seems that smoldot can't connect to the peer-to-peer network of the parachain, but also doesn't even try to connect. Are you sure that there are bootnodes in the parachain spec?

@pepoviola
Copy link
Contributor

Thanks for the feedback @tomaka

I checked the logs and there is a pending connection to the parachain bootnode.

2022-03-11T09:25:00.0891526Z ⚙ Added Boot Nodes: /ip4/127.0.0.1/tcp/37227/ws/p2p/12D3KooWLj7rSyPHpVp4zBf8S9nu7LM5eep8iFpWT8eMKgrrNF29

2022-03-11T09:26:13.8398266Z [connections] OutSlots(local_testnet) ∋ 12D3KooWLj7rSyPHpVp4zBf8S9nu7LM5eep8iFpWT8eMKgrrNF29
2022-03-11T09:26:13.8398963Z [connections] Pending(PendingId(0), 12D3KooWLj7rSyPHpVp4zBf8S9nu7LM5eep8iFpWT8eMKgrrNF29) started: /ip4/127.0.0.1/tcp/37227/ws
2022-03-11T09:26:13.8423458Z [connections] Pending(PendingId(0), 12D3KooWLj7rSyPHpVp4zBf8S9nu7LM5eep8iFpWT8eMKgrrNF29) => Connection(ConnectionId(0)) through /ip4/127.0.0.1/tcp/37227/ws

@tomaka
Copy link
Contributor

tomaka commented Mar 11, 2022

Sorry, didn't realize that the search in GitHub's logs viewer stops after 100 lines without even telling you. 😮‍💨

@tomaka
Copy link
Contributor

tomaka commented Mar 11, 2022

The problem is that you're passing --listen-addr on the relay chain side of the node, and not on its parachain side.
In other words /ip4/127.0.0.1/tcp/37227/ws/p2p/12D3KooWLj7rSyPHpVp4zBf8S9nu7LM5eep8iFpWT8eMKgrrNF29 would be appropriate for a relay chain bootnode but not a parachain bootnode.

@wirednkod wirednkod added the automerge Instructs Mergify to queue this pull request for automatic merging label Mar 16, 2022
@mergify mergify bot merged commit 49d43b5 into main Mar 16, 2022
@mergify mergify bot deleted the nik-zombienet branch March 16, 2022 13:32
@wirednkod wirednkod mentioned this pull request Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Instructs Mergify to queue this pull request for automatic merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants