Skip to content

Conversation

@moliholy
Copy link
Collaborator

@moliholy moliholy commented Sep 29, 2025

Closes #654.
Closes #267.

This PR:

  • Allows the build-spec command to generate artifacts without the need of a node.
  • Automatically builds the runtime/node. The --skip-build flag has been added to avoid that, although it will be built regardless of the flag if the artifacts are not found.
  • Fetches the omni-node to generate the genesis wasm if using a runtime.
  • Allows to build the spec by passing features when compiling the node/runtime.
  • Allows to specify the chain properties when building the runtime.
  • Dynamically detects a runtime's presets and displays them to the user if not already specified.
  • Fixes a bug regarding non-semantic versions that did not get sorted properly.

@moliholy moliholy self-assigned this Sep 29, 2025
@moliholy moliholy force-pushed the feat/build-spec-runtime branch from f559377 to 317ce48 Compare September 29, 2025 13:32
@moliholy moliholy force-pushed the feat/build-spec-runtime branch from 317ce48 to e63db6e Compare September 29, 2025 16:30
@moliholy moliholy changed the title Feat/build spec runtime feat: build spec runtime Sep 29, 2025
@codecov
Copy link

codecov bot commented Sep 30, 2025

Codecov Report

❌ Patch coverage is 69.87741% with 344 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.46%. Comparing base (38c0fc0) to head (9d0fc58).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/pop-chains/src/build/mod.rs 73.23% 56 Missing and 31 partials ⚠️
crates/pop-cli/src/commands/build/spec.rs 37.60% 77 Missing and 1 partial ⚠️
crates/pop-cli/src/common/builds.rs 83.52% 1 Missing and 28 partials ⚠️
crates/pop-cli/src/commands/test/contract.rs 0.00% 16 Missing ⚠️
crates/pop-cli/src/common/omni_node.rs 89.43% 1 Missing and 14 partials ⚠️
crates/pop-contracts/src/call.rs 0.00% 12 Missing ⚠️
crates/pop-common/src/manifest.rs 92.81% 2 Missing and 9 partials ⚠️
...es/pop-cli/src/commands/test/on_runtime_upgrade.rs 10.00% 1 Missing and 8 partials ⚠️
crates/pop-cli/src/commands/up/contract.rs 20.00% 8 Missing ⚠️
crates/pop-cli/src/commands/bench/pallet.rs 22.22% 0 Missing and 7 partials ⚠️
... and 26 more
@@            Coverage Diff             @@
##             main     #647      +/-   ##
==========================================
+ Coverage   77.36%   77.46%   +0.09%     
==========================================
  Files         109      110       +1     
  Lines       25228    26008     +780     
  Branches    25228    26008     +780     
==========================================
+ Hits        19518    20146     +628     
- Misses       3728     3824      +96     
- Partials     1982     2038      +56     
Files with missing lines Coverage Δ
crates/pop-chains/src/bench/mod.rs 87.76% <ø> (+0.58%) ⬆️
crates/pop-chains/src/lib.rs 0.00% <ø> (ø)
crates/pop-chains/src/new_chain.rs 79.81% <100.00%> (ø)
crates/pop-cli/src/commands/bench/storage.rs 69.56% <100.00%> (ø)
crates/pop-cli/src/commands/call/mod.rs 84.53% <100.00%> (+1.03%) ⬆️
crates/pop-cli/src/common/mod.rs 100.00% <ø> (ø)
crates/pop-common/src/polkadot_sdk.rs 97.89% <100.00%> (+0.05%) ⬆️
crates/pop-common/src/sourcing/mod.rs 88.62% <ø> (ø)
crates/pop-contracts/src/test.rs 83.33% <100.00%> (+2.77%) ⬆️
crates/pop-cli/src/commands/bench/block.rs 42.85% <0.00%> (ø)
... and 35 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@moliholy moliholy force-pushed the feat/build-spec-runtime branch from d3ae327 to f5a1cef Compare October 3, 2025 09:47
@moliholy moliholy force-pushed the feat/build-spec-runtime branch from 9ccd703 to 64a6892 Compare October 7, 2025 09:52
Copy link
Collaborator

@tsenovilla tsenovilla left a comment

Choose a reason for hiding this comment

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

Everything looks overall good!

Thanks for addressing the comments we discussed offline, great job! This was a big one

Copy link
Collaborator

@AlexD10S AlexD10S left a comment

Choose a reason for hiding this comment

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

Amazing, the functionality is clean and well tested!

There are a few changes, like the path parameter or TestChildProcess in the contract crate, that seem slightly out of scope for this PR, but overall it’s a nice, clean refactor.

I just left a couple of small nitpicks in the review, but I am happy to approve after that.

Copy link
Collaborator

@AlexD10S AlexD10S left a comment

Choose a reason for hiding this comment

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

Thanks for making those changes. Approved, good to go!

@moliholy moliholy merged commit ccdc46d into main Oct 13, 2025
19 checks passed
@moliholy moliholy deleted the feat/build-spec-runtime branch October 13, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make pop build spec compatible with parachains without node pop build spec: customize properties

4 participants