-
Notifications
You must be signed in to change notification settings - Fork 924
Zombienet-SDK test for the happy path of the new staking-async flow #8317
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
Open
tdimitrov
wants to merge
24
commits into
master
Choose a base branch
from
tsv-ah-staking-tests-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
4ce41ba
zombienet-sdk test prep
tdimitrov 46ba5ca
Spawning network works
tdimitrov 68ba240
Add README
tdimitrov 5734fd0
Restructure the code a little
tdimitrov 94abf12
Happy case - initial code
tdimitrov c5caa43
remove duplicated file
tdimitrov f4a2e80
Test works, parsing is messy, code needs a cleanup
tdimitrov 91ea999
Comments, naming, formatting
tdimitrov 342554f
`happy_case` - final touches
tdimitrov 914fe17
`staking_next` -> `staking_async`
tdimitrov 2b3baa5
Fix formatting in Cargo files
tdimitrov 8694bef
Use subxt static interface for event parsing
tdimitrov 933eefd
Move the test in staking-async
tdimitrov 9255217
Move the test to staking-async
tdimitrov fbab0f6
comment
tdimitrov 5126842
Revert to dynamic interface to avoid handling metadata
tdimitrov 27d40e3
fmt
tdimitrov 6cb7089
fix feature propagation
tdimitrov d5b5a23
md lint
tdimitrov 5f3e93a
Add `pallet_root_offences` to the test runtime
tdimitrov b37e513
Extract utility function in a common module
tdimitrov 2054335
More code extraction
tdimitrov b450149
Add log target + some renames
tdimitrov b286c77
Merge branch 'master' into tsv-ah-staking-tests-2
tdimitrov 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,38 @@ | ||
# Staking Async test | ||
|
||
To run locally: | ||
|
||
1. Ensure you have got chainspecs for RC and AH-next in the crate root. | ||
2. Ensure you have got `polkadot`, `polkadot-execute-worker`, `polkadot-prepare-worker` and | ||
`polkadot-parachain` in your `PATH`. | ||
3. Run `ZOMBIE_PROVIDER="native" cargo test happy_case` | ||
|
||
## How to build the chainspecs | ||
|
||
Courtesy to @kianenigma for these instructions. | ||
|
||
1. Run `cargo build --release -p pallet-staking-async-rc-runtime -p | ||
pallet-staking-async-parachain-runtime -p staging-chain-spec-builder` | ||
2. For AH-Next run | ||
|
||
``` | ||
chain-spec-builder \ | ||
create \ | ||
-t development \ | ||
--runtime ../../target/release/wbuild/pallet-staking-async-parachain-runtime/pallet_staking_async_parachain_runtime.compact.compressed.wasm \ | ||
--relay-chain rococo-local \ | ||
--para-id 1100 \ | ||
named-preset development | ||
mv ./chain_spec.json ./parachain.json | ||
``` | ||
|
||
3. For RC run | ||
|
||
``` | ||
chain-spec-builder \ | ||
create \ | ||
-t development \ | ||
--runtime ../../target/release/wbuild/pallet-staking-async-rc-runtime/fast_runtime_binary.rs.wasm \ | ||
named-preset local_testnet | ||
mv ./chain_spec.json ./rc.json | ||
``` |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Let's move them to a separate crate
staking-async/zn-test
to not increase the compile time of the rust unit tests?