This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Zombienet: paritydb test #5310
Merged
paritytech-processbot
merged 18 commits into
master
from
sandreim/zombienet_parity_db_test
Jul 18, 2022
+160
−0
Merged
Zombienet: paritydb test #5310
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b71bd6e
Add test
sandreim 73c9ca0
gitlab integration
sandreim 27e149a
tune test
sandreim 815814c
fix
sandreim 1660c19
Try waiting for nodes to be up before checks
sandreim d28774a
Use js check for paritydb folder
sandreim 9545fb9
Merge branch 'master' of github.com:paritytech/polkadot into sandreim…
sandreim c313748
artifacts true
sandreim dcc3cb7
change error message
sandreim b2d0fdc
debug
sandreim a7fa060
try again
sandreim 05f101d
use log line contains for test
pepoviola 4893b13
bump zombienet verision for test
pepoviola 5e13adf
Is approval checking lag 0 on rocksdb ?
sandreim a2578fd
Is approval checking lag 1 with paritydb ?
sandreim af3733c
update zombienet test for parityDb
pepoviola e13132a
Merge branch 'master' into sandreim/zombienet_parity_db_test
pepoviola b673621
Update zombienet_tests/misc/0001-check_paritydb.sh
pepoviola File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const fs = require('fs'); | ||
|
||
const { exec } = require("child_process"); | ||
|
||
// Check if we are running paritydb on a specified node. | ||
async function run(nodeName, networkInfo, jsArgs) { | ||
console.log(networkInfo); | ||
let node_path = networkInfo.tmpDir; | ||
// TODO: We need Zombienet to provide the chain spec name in networkInfo to un-hardcode this path. | ||
let dir = `/data/chains/rococo_local_testnet/paritydb/full`; | ||
|
||
const { exec } = require("child_process"); | ||
|
||
exec(`ls -lahR /data`, (error, stdout, stderr) => { | ||
if (error) { | ||
console.log(`error: ${error.message}`); | ||
return; | ||
} | ||
if (stderr) { | ||
console.log(`stderr: ${stderr}`); | ||
return; | ||
} | ||
console.log(`stdout: ${stdout}`); | ||
}); | ||
|
||
// Check if directory exists | ||
if (!fs.existsSync(dir)) { | ||
console.log('ParityDB path not found!'); | ||
return -1; | ||
} | ||
|
||
return 0 | ||
} | ||
|
||
|
||
module.exports = { run } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
Description: Check that paritydb works without affecting finality lag and block production. | ||
Network: ./0001-paritydb.toml | ||
Creds: config | ||
|
||
validator-0: is up | ||
validator-1: is up | ||
validator-2: is up | ||
validator-3: is up | ||
validator-4: is up | ||
validator-5: is up | ||
validator-6: is up | ||
validator-7: is up | ||
validator-8: is up | ||
validator-9: is up | ||
|
||
# Check if we are using ParityDB. | ||
validator-0: js-script ./0001-check_paritydb.js return is 0 within 120 secs | ||
validator-1: js-script ./0001-check_paritydb.js return is 0 within 120 secs | ||
validator-2: js-script ./0001-check_paritydb.js return is 0 within 120 secs | ||
validator-3: js-script ./0001-check_paritydb.js return is 0 within 120 secs | ||
validator-4: js-script ./0001-check_paritydb.js return is 0 within 120 secs | ||
validator-5: js-script ./0001-check_paritydb.js return is 0 within 120 secs | ||
validator-6: js-script ./0001-check_paritydb.js return is 0 within 120 secs | ||
validator-7: js-script ./0001-check_paritydb.js return is 0 within 120 secs | ||
validator-8: js-script ./0001-check_paritydb.js return is 0 within 120 secs | ||
validator-9: js-script ./0001-check_paritydb.js return is 0 within 120 secs | ||
|
||
# Check authority status and peers. | ||
validator-0: reports node_roles is 4 | ||
validator-1: reports node_roles is 4 | ||
validator-2: reports node_roles is 4 | ||
validator-3: reports node_roles is 4 | ||
validator-4: reports node_roles is 4 | ||
validator-5: reports node_roles is 4 | ||
validator-6: reports node_roles is 4 | ||
validator-7: reports node_roles is 4 | ||
validator-8: reports node_roles is 4 | ||
validator-9: reports node_roles is 4 | ||
|
||
# Ensure parachains are registered. | ||
validator-0: parachain 2000 is registered | ||
validator-0: parachain 2001 is registered | ||
validator-0: parachain 2002 is registered | ||
validator-0: parachain 2003 is registered | ||
validator-0: parachain 2004 is registered | ||
validator-0: parachain 2005 is registered | ||
validator-0: parachain 2006 is registered | ||
validator-0: parachain 2007 is registered | ||
validator-0: parachain 2008 is registered | ||
validator-0: parachain 2009 is registered | ||
|
||
# Check if network is fully connected. | ||
validator-0: reports peers count is at least 19 within 20 seconds | ||
validator-1: reports peers count is at least 19 within 20 seconds | ||
validator-2: reports peers count is at least 19 within 20 seconds | ||
validator-3: reports peers count is at least 19 within 20 seconds | ||
validator-4: reports peers count is at least 19 within 20 seconds | ||
validator-5: reports peers count is at least 19 within 20 seconds | ||
validator-6: reports peers count is at least 19 within 20 seconds | ||
validator-7: reports peers count is at least 19 within 20 seconds | ||
validator-8: reports peers count is at least 19 within 20 seconds | ||
validator-9: reports peers count is at least 19 within 20 seconds | ||
|
||
# Ensure parachains made some progress. | ||
validator-0: parachain 2000 block height is at least 3 within 30 seconds | ||
validator-0: parachain 2001 block height is at least 3 within 30 seconds | ||
validator-0: parachain 2002 block height is at least 3 within 30 seconds | ||
validator-0: parachain 2003 block height is at least 3 within 30 seconds | ||
validator-0: parachain 2004 block height is at least 3 within 30 seconds | ||
validator-0: parachain 2005 block height is at least 3 within 30 seconds | ||
validator-0: parachain 2006 block height is at least 3 within 30 seconds | ||
validator-0: parachain 2007 block height is at least 3 within 30 seconds | ||
validator-0: parachain 2008 block height is at least 3 within 30 seconds | ||
validator-0: parachain 2009 block height is at least 3 within 30 seconds | ||
|
||
# Check lag - approval | ||
validator-0: reports polkadot_parachain_approval_checking_finality_lag is 0 | ||
validator-1: reports polkadot_parachain_approval_checking_finality_lag is 0 | ||
validator-2: reports polkadot_parachain_approval_checking_finality_lag is 0 | ||
validator-3: reports polkadot_parachain_approval_checking_finality_lag is 0 | ||
validator-4: reports polkadot_parachain_approval_checking_finality_lag is 0 | ||
validator-5: reports polkadot_parachain_approval_checking_finality_lag is 0 | ||
validator-6: reports polkadot_parachain_approval_checking_finality_lag is 0 | ||
validator-7: reports polkadot_parachain_approval_checking_finality_lag is 0 | ||
validator-8: reports polkadot_parachain_approval_checking_finality_lag is 0 | ||
validator-9: reports polkadot_parachain_approval_checking_finality_lag is 0 | ||
|
||
# Check lag - dispute conclusion | ||
validator-0: reports parachain_candidate_disputes_total is 0 | ||
validator-1: reports parachain_candidate_disputes_total is 0 | ||
validator-2: reports parachain_candidate_disputes_total is 0 | ||
validator-3: reports parachain_candidate_disputes_total is 0 | ||
validator-4: reports parachain_candidate_disputes_total is 0 | ||
validator-5: reports parachain_candidate_disputes_total is 0 | ||
validator-6: reports parachain_candidate_disputes_total is 0 | ||
validator-7: reports parachain_candidate_disputes_total is 0 | ||
validator-8: reports parachain_candidate_disputes_total is 0 | ||
validator-9: reports parachain_candidate_disputes_total is 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[settings] | ||
timeout = 1000 | ||
bootnode = true | ||
|
||
[relaychain.genesis.runtime.runtime_genesis_config.configuration.config] | ||
max_validators_per_core = 1 | ||
needed_approvals = 3 | ||
|
||
[relaychain] | ||
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}" | ||
chain = "rococo-local" | ||
chain_spec_command = "polkadot build-spec --chain rococo-local" | ||
default_command = "polkadot" | ||
|
||
[relaychain.default_resources] | ||
limits = { memory = "4G", cpu = "2" } | ||
requests = { memory = "2G", cpu = "1" } | ||
|
||
[[relaychain.node_groups]] | ||
name = "validator" | ||
count = 10 | ||
args = ["-lparachain=debug", "--db=paritydb"] | ||
|
||
{% for id in range(2000,2010) %} | ||
[[parachains]] | ||
id = {{id}} | ||
addToGenesis = true | ||
genesis_state_generator = "undying-collator export-genesis-state --pov-size={{10000*(id-1999)}} --pvf-complexity={{id - 1999}}" | ||
[parachains.collator] | ||
name = "collator" | ||
image = "{{COL_IMAGE}}" | ||
command = "undying-collator" | ||
args = ["-lparachain=debug", "--pov-size={{10000*(id-1999)}}", "--parachain-id={{id}}", "--pvf-complexity={{id - 1999}}"] | ||
|
||
{% endfor %} | ||
|
||
[types.Header] | ||
number = "u64" | ||
parent_hash = "Hash" | ||
post_state = "Hash" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hi @sandreim, this will not works since the
custom-js
script will be ran in the pod that run zombienet and not in thenodes
. I can add the feature to runcommands
in thepods
throughkubectl/podman
as a new feature to validate this.Thanks!
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.
Thanks for pointing that out. I made this assumption after so much local testing where this made sense. I think it would be helpful to have the ability to run commands inside the pod. Makes testing rely on more than just metrics and logs. We could also run a CPU profiler for example using this same interface.
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.
paritytech/zombienet#246