-
Notifications
You must be signed in to change notification settings - Fork 740
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 development chain-spec file for minimal/parachain templates for Omni Node compatibility #6529
Open
EleisonC
wants to merge
68
commits into
paritytech:master
Choose a base branch
from
EleisonC:add-dev-chain-spec
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.
+392
−6
Open
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
3743b9f
Add development chain spec config
EleisonC 1e833b4
Add path chain_spec_path
EleisonC 3345130
Add path chain_spec_path
EleisonC 97a1cc2
Add development chain spec for parachain template
EleisonC 80669c1
Update chain spec path
EleisonC 7a060c5
Merge branch 'master' into add-dev-chain-spec
EleisonC 91e0ba8
Merge branch 'add-dev-chain-spec' of https://github.com/EleisonC/polk…
EleisonC d97247d
Revert "Update chain spec path"
EleisonC 301ab59
update chain_spec_path
EleisonC 541b524
Merge branch 'master' into add-dev-chain-spec
EleisonC 02e431e
Merge branch 'master' into add-dev-chain-spec
EleisonC 0146534
remove chain spec path not required
EleisonC 14a32f1
Add runtime test for minimal dev chain spec
EleisonC 2c318e3
Merge branch 'master' into add-dev-chain-spec
EleisonC cd66bbe
Update templates/minimal/node/tests/validate_dev_chain_spec.rs
EleisonC 419a9d8
Update templates/minimal/node/tests/validate_dev_chain_spec.rs
EleisonC 6197599
Add new spec file Change tests dir to runtime.
EleisonC 92c47be
Merge branch 'master' into add-dev-chain-spec
EleisonC 46b99d7
Merge branch 'master' into add-dev-chain-spec
EleisonC 172f411
added modified dev chain spec. build minimal/runtime without --release
EleisonC 4971b76
Merge remote-tracking branch 'origin/add-dev-chain-spec' into add-dev…
EleisonC 8342ccf
Merge branch 'master' into add-dev-chain-spec
EleisonC 94d1885
Merge remote-tracking branch 'origin/add-dev-chain-spec' into add-dev…
EleisonC d98b6f6
match test chain spec builder to exisitng one
EleisonC f748e0b
add new dev chain spec
EleisonC 04904b2
remove unused code
EleisonC 64303ef
Merge branch 'master' into add-dev-chain-spec
EleisonC 8564533
Merge branch 'master' into add-dev-chain-spec
EleisonC 5af21e6
add dev chain spec srtool-runtime
EleisonC a6ae597
automate spec chain validation for minimal template
EleisonC 1d0b042
Merge branch 'master' into add-dev-chain-spec
EleisonC d98a9c2
parachain template spec chain verification
EleisonC 94e4d62
Merge branch 'add-dev-chain-spec' of https://github.com/EleisonC/polk…
EleisonC 99c2084
Merge branch 'master' into add-dev-chain-spec
EleisonC d0a31f5
update the template/minimal/ readme.md file
EleisonC 82b5708
update the verification workflows
EleisonC cb3839e
refactor remove unused crates & crate-fts
EleisonC d783e47
refactor remove test
EleisonC bd09d21
refactor minimal readme.md
EleisonC 9b34aef
refactor minimal & parachain readme.md files
EleisonC 9d62db2
refactor dev spec verification files
EleisonC 960fc22
Merge branch 'master' into add-dev-chain-spec
EleisonC 0b84817
add custom workflow minimal/parachain templates
EleisonC 0e948e8
Merge branch 'master' into add-dev-chain-spec
EleisonC 860d655
remove seprate workflows
EleisonC a2804ae
Merge branch 'add-dev-chain-spec' of https://github.com/EleisonC/polk…
EleisonC dbad177
add fix for missing dep
EleisonC b2c44a8
fix download artifact version
EleisonC 6b7bf34
Update .github/workflows/veriy-minimal-parachain-dev-spec-chains.yml
EleisonC 402a0fe
Update .github/workflows/veriy-minimal-parachain-dev-spec-chains.yml
EleisonC 84d46da
Update .github/workflows/veriy-minimal-parachain-dev-spec-chains.yml
EleisonC 09eac57
implement feedback
EleisonC fda6b31
Merge branch 'master' into add-dev-chain-spec
EleisonC 2af2180
fix linter issues readme
EleisonC 4f385c8
add fix for workflow
EleisonC ef4c303
add fix for workflow
EleisonC a35001e
remove actions write
EleisonC 8d7a25b
minor fix
EleisonC 546ba56
timeout increase
EleisonC d04e9f6
Merge branch 'master' into add-dev-chain-spec
EleisonC 11053f9
Merge branch 'master' into add-dev-chain-spec
EleisonC 142f249
upload new parachain dev spec
EleisonC 318609b
concurency Prioritize CI Workflow Execution for Faster Feedback
EleisonC b66e6b4
Merge branch 'master' into add-dev-chain-spec
EleisonC 278324c
Merge branch 'master' into add-dev-chain-spec
EleisonC f0a3f18
Merge branch 'master' into add-dev-chain-spec
EleisonC 63ffef7
fix dev chain spec diff
EleisonC da812f5
Merge branch 'add-dev-chain-spec' of https://github.com/EleisonC/polk…
EleisonC 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
name: Verify Templates Dev Chain Spec | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
setup: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
template: | ||
- package_name: 'parachain-template-runtime' | ||
runtime_path: './templates/parachain/runtime' | ||
artifact_name: 'wasm-parachain-template-runtime' | ||
chain_spec_output: 'parachain_test_chain_spec.json' | ||
runtime_wasm_path: 'parachain-template-runtime/parachain_template_runtime.compact.compressed.wasm' | ||
relay_chain: 'rococo-local' | ||
- package_name: 'minimal-template-runtime' | ||
runtime_path: './templates/minimal/runtime' | ||
artifact_name: 'wasm-minimal-template-runtime' | ||
chain_spec_output: 'minimal_test_chain_spec.json' | ||
runtime_wasm_path: 'minimal-template-runtime/minimal_template_runtime.compact.compressed.wasm' | ||
relay_chain: 'dev' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set rust version from env file | ||
run: | | ||
RUST_VERSION=$(cat .github/env | sed -E 's/.*ci-unified:([^-]+)-([^-]+).*/\2/') | ||
echo $RUST_VERSION | ||
echo "RUST_VERSION=${RUST_VERSION}" >> $GITHUB_ENV | ||
|
||
- name: Install Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1 | ||
with: | ||
cache: false | ||
toolchain: ${{ env.RUST_VERSION }} | ||
components: cargo, clippy, rust-docs, rust-src, rustfmt, rustc, rust-std | ||
|
||
- name: Install srtool-cli | ||
run: | | ||
cargo install --git https://github.com/chevdor/srtool-cli | ||
echo "Using srtool-cli Version:" | ||
srtool --version | ||
|
||
- name: Pull srtool docker image | ||
run: | | ||
srtool pull | ||
|
||
- name: Prepare build directories | ||
run: | | ||
sudo mkdir -p ${{ matrix.template.runtime_path }}/target | ||
sudo chmod -R 777 ${{ matrix.template.runtime_path }}/target | ||
|
||
- name: Build runtime binary | ||
run: | | ||
srtool build --package ${{ matrix.template.package_name }} --runtime-dir ${{ matrix.template.runtime_path }} --root | ||
|
||
- name: Install staging-chain-spec-builder and deps | ||
run: | | ||
# Install protobuf compiler | ||
sudo apt-get update | ||
sudo apt-get install -y protobuf-compiler | ||
|
||
# Verify protoc installation | ||
protoc --version | ||
|
||
cargo install --path substrate/bin/utils/chain-spec-builder | ||
|
||
- name: Create chain spec | ||
run: | | ||
chain-spec-builder -c ${{ matrix.template.chain_spec_output }} create \ | ||
--relay-chain "${{ matrix.template.relay_chain }}" \ | ||
--para-id 1000 \ | ||
--runtime "${{ matrix.template.runtime_path }}/target/srtool/release/wbuild/${{ matrix.template.runtime_wasm_path }}" \ | ||
named-preset development | ||
|
||
- name: Upload chain spec artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ matrix.template.chain_spec_output }} | ||
path: ${{ matrix.template.chain_spec_output }} | ||
overwrite: true | ||
|
||
verify-template-chain-specs: | ||
if: success() | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
template: | ||
- runtime_path: './templates/parachain' | ||
chain_spec_output: 'parachain_test_chain_spec.json' | ||
- runtime_path: './templates/minimal' | ||
chain_spec_output: 'minimal_test_chain_spec.json' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download generated spec | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ matrix.template.chain_spec_output }} | ||
path: ./downloaded_spec | ||
|
||
- name: Compare chain specs | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y jq | ||
# Check if files exist | ||
if [ ! -f "${{ matrix.template.runtime_path }}/dev_chain_spec.json" ]; then | ||
echo "❌ Reference spec not found at ${{ matrix.template.runtime_path }}/dev_chain_spec.json" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -f "./downloaded_spec/${{ matrix.template.chain_spec_output }}" ]; then | ||
echo "❌ Generated spec not found at ./downloaded_spec/${{ matrix.template.chain_spec_output }}" | ||
exit 1 | ||
fi | ||
|
||
jq -S . ${{ matrix.template.runtime_path }}/dev_chain_spec.json > existing_spec_sorted.json | ||
jq -S . ./downloaded_spec/${{ matrix.template.chain_spec_output }} > generated_spec_sorted.json | ||
|
||
# Compare files and handle the exit condition properly | ||
if diff -C 3 existing_spec_sorted.json generated_spec_sorted.json | while read -r line; do | ||
echo "${line:0:200}..." | ||
done; then | ||
echo "✅ Spec files are identical." | ||
else | ||
echo "❌ Spec files differ. Exiting with failure." | ||
exit 1 | ||
fi |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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.
This file has a
#### Update
zombienet-omni-node.tomlwith a valid chain spec path
section. It would need to be updated given it can use directly thedev_chain_spec.json
. Same forparachain/README.md
file.