-
Notifications
You must be signed in to change notification settings - Fork 709
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
base: master
Are you sure you want to change the base?
Conversation
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 @EleisonC ! Left a few comments for now.
Looking forward to the README updates & btw, have you clarified how to make a rust test for the chain specs?
templates/minimal/zombienet.toml
Outdated
@@ -4,6 +4,7 @@ | |||
[relaychain] | |||
chain = "dev" | |||
default_command = "minimal-template-node" | |||
chain_spec_path = "./dev_chain_spec.json" |
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 isn't needed here. minimal-template-node
loads the chain spec based on the wasm binary blob, within the node itself.
templates/parachain/zombienet.toml
Outdated
@@ -14,6 +14,7 @@ ws_port = 9955 | |||
|
|||
[[parachains]] | |||
id = 1000 | |||
chain_spec_path = "./dev_chain_spec.json" |
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.
Not needed here either.
Hey @iulianbarbu that is what I am looking into today. Do you have any pointers you'd like me to know as I move forward? |
From the top of my head I thought about adding an integration test. You could build a |
Hey @iulianbarbu one last question it's okay if I placed the test folder/file under the nodes folder/file. if not is there a better place |
Hmm, thought about placing it under |
Hey @iulianbarbu regarding comparing the two I am a bit stuck on what to compare. From my research I would think it's other the code or value of top |
I figured out my problem was around decoding a Hex String to bytes. I can now properly traverse the values of the Top section and find the code for that spec file |
d load its content as a
Happy to hear you've sorted it out! I've noticed that in some tests we don't compare the code portions of the generated chain specs, and that's mainly because they are not super relevant for the test case. For this test though I think that it is relevant, to ensure generated chain specs correspond to the runtimes in the CI. Some other good news is that once we'll have these chain specs we'll be able to easily run in the CI the As usual, LMK in case of blockers, happy to take a look. |
Signed-off-by: EleisonC <[email protected]>
Hey @iulianbarbu, |
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 please regenerate the dev_chain_spec.json
for minimal (for now) after building the minimal/runtime
with cargo build
? I wonder if you built the runtime with --release
and then generated the dev_chain_spec.json
. It makes sense according to the README, but we run the tests with the testnet
profile, which enables the debug symbols, and I think the chain spec code
section differs based on the profile. I would be curious to run the test again after you regenerate the dev_chain_spec.json
, and also see if regenerating on my machine results in a different code section, or chain spec altogheter.
@@ -0,0 +1,84 @@ | |||
use codec::Decode; |
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 think having this file under /minimal/runtime
is possible too. You'll need to add a [dev-dependencies]
section under minimal/runtime/Cargo.toml
:
[dev-dependencies]
serde = { features = ["derive"], workspace = true, default-features = true }
sc-service = { workspace = true }
sc-chain-spec = { workspace = true }
codec = { features = ["derive"], workspace = true } | ||
docify = { workspace = true } | ||
clap = { features = ["derive"], workspace = true } | ||
futures = { features = ["thread-pool"], workspace = true } | ||
futures-timer = { workspace = true } | ||
serde = { features = ["derive"], workspace = true, default-features = true } |
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.
No need for these after moving the test to minimal/runtime
.
Co-authored-by: Iulian Barbu <[email protected]>
Co-authored-by: Iulian Barbu <[email protected]>
Description
This PR adds development chain specs for the minimal and parachain templates. #6334
Integration
This PR adds development chain specs for the minimal and para chain template runtimes, ensuring synchronization with runtime code. It updates zombienet-omni-node.toml, zombinet.toml files to include valid chain spec paths, simplifying configuration for zombienet in the parachain and minimal template.
Review Notes
NB: Follow the templates' READMEs from the polkadot-SDK master branch. Please build the binaries and runtimes based on the polkadot-SDK master branch.
parachain-template-runtime
andminimal-template-runtime
parachain-template-node
andminimal-template-node
cargo install --path polkadot
remember from the polkadot-SDK master branch.Zombienet with Omni Node
,Zombienet with minimal-template-node
orZombienet with parachain-template-node
Include your leftover TODOs, if any, here.