Skip to content
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

feat: update parachain templates #297

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

feat: update parachain templates #297

wants to merge 23 commits into from

Conversation

AlexD10S
Copy link
Collaborator

@AlexD10S AlexD10S commented Aug 28, 2024

This PR introduces updates to the templates.

[sc-1334]

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 87.41259% with 18 lines in your changes missing coverage. Please review.

Project coverage is 75.23%. Comparing base (17d3bd6) to head (a68dd5f).

Files with missing lines Patch % Lines
crates/pop-parachains/src/up/mod.rs 87.39% 2 Missing and 13 partials ⚠️
crates/pop-cli/src/commands/new/parachain.rs 40.00% 3 Missing ⚠️
@@            Coverage Diff             @@
##             main     #297      +/-   ##
==========================================
+ Coverage   75.11%   75.23%   +0.12%     
==========================================
  Files          63       63              
  Lines       13842    13970     +128     
  Branches    13842    13970     +128     
==========================================
+ Hits        10398    10511     +113     
- Misses       2118     2120       +2     
- Partials     1326     1339      +13     
Files with missing lines Coverage Δ
crates/pop-parachains/src/templates.rs 98.66% <100.00%> (+0.04%) ⬆️
crates/pop-cli/src/commands/new/parachain.rs 46.17% <40.00%> (-0.14%) ⬇️
crates/pop-parachains/src/up/mod.rs 87.60% <87.39%> (+0.04%) ⬆️

@evilrobot-01
Copy link
Contributor

A reminder that removals should be deprecated, if not already

@AlexD10S
Copy link
Collaborator Author

AlexD10S commented Sep 6, 2024

A reminder that removals should be deprecated, if not already

In this case, we had a message from the start indicating that the Parity templates were deprecated: https://github.com/r0gue-io/pop-cli/blob/main/crates/pop-cli/src/commands/new/parachain.rs#L132. I believe it would be reasonable to remove the deprecated template in the next release.

@evilrobot-01
Copy link
Contributor

Perfect!

@AlexD10S AlexD10S marked this pull request as ready for review September 12, 2024 12:25
Copy link
Contributor

@evilrobot-01 evilrobot-01 left a comment

Choose a reason for hiding this comment

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

Just an initial quick review.

crates/pop-parachains/src/templates.rs Outdated Show resolved Hide resolved
@evilrobot-01 evilrobot-01 changed the title feat: add new parachain template and remove outdated one from Parity feat: add new parachain template and remove outdated one from parity Sep 18, 2024
crates/pop-parachains/src/templates.rs Outdated Show resolved Hide resolved
crates/pop-parachains/src/templates.rs Outdated Show resolved Hide resolved
crates/pop-parachains/src/templates.rs Outdated Show resolved Hide resolved
crates/pop-parachains/src/templates.rs Outdated Show resolved Hide resolved
crates/pop-parachains/src/templates.rs Outdated Show resolved Hide resolved
crates/pop-parachains/src/up/mod.rs Show resolved Hide resolved
Copy link
Contributor

@brunopgalvao brunopgalvao left a comment

Choose a reason for hiding this comment

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

┌   Pop CLI : Launch a local network
│
▲  ⚠️ The following binaries required to launch the network cannot be found locally:
│     > polkadot-parachain
│  
◇  📦 Would you like to source them automatically now? It may take some time...
│     > polkadot-parachain v1.13.0
│  Yes 
│
⚙  ℹ️ Binaries will be cached at /Users/bruno/Library/Caches/pop
│  
◇  📦 Sourcing binaries...
│  ✅  polkadot-parachain
│
◐  🚀 Launching local network...                                                                                           
thread 'main' panicked at /Users/bruno/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zombienet-orchestrator-0.2.7/src/lib.rs:390:36:
removal index (is 0) should be < len (is 0)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Steps to reproduce:

I generated the Polkadot SDK Parachain Template using pop new parachain command, then ran pop build then pop up parachain -f zombienet.toml

crates/pop-cli/src/commands/new/parachain.rs Outdated Show resolved Hide resolved
crates/pop-parachains/src/templates.rs Outdated Show resolved Hide resolved
crates/pop-parachains/src/templates.rs Outdated Show resolved Hide resolved
@brunopgalvao
Copy link
Contributor

   Compiling polkadot-service v11.0.0
   Compiling cumulus-relay-chain-minimal-node v0.11.0
   Compiling cumulus-relay-chain-inprocess-interface v0.11.0
   Compiling cumulus-client-service v0.11.0
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 7m 42s
Error: Missing binary: contracts-node

Steps to reproduce

I generated the Parity substrate contracts node (v0.41.0) using pop new parachain then got this error when running pop build.

@AlexD10S
Copy link
Collaborator Author

┌   Pop CLI : Launch a local network
│
▲  ⚠️ The following binaries required to launch the network cannot be found locally:
│     > polkadot-parachain
│  
◇  📦 Would you like to source them automatically now? It may take some time...
│     > polkadot-parachain v1.13.0
│  Yes 
│
⚙  ℹ️ Binaries will be cached at /Users/bruno/Library/Caches/pop
│  
◇  📦 Sourcing binaries...
│  ✅  polkadot-parachain
│
◐  🚀 Launching local network...                                                                                           
thread 'main' panicked at /Users/bruno/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zombienet-orchestrator-0.2.7/src/lib.rs:390:36:
removal index (is 0) should be < len (is 0)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Steps to reproduce:

I generated the Polkadot SDK Parachain Template using pop new parachain command, then ran pop build then pop up parachain -f zombienet.toml

It looks like you're using the pop installed from the main branch, not from the current branch. The error you're seeing occurs because the parachain template contains [parachain.collator], which was addressed in the latest version of Zombienet. That's why we're updating the Zombienet version in this branch (Read description).

@AlexD10S
Copy link
Collaborator Author

   Compiling polkadot-service v11.0.0
   Compiling cumulus-relay-chain-minimal-node v0.11.0
   Compiling cumulus-relay-chain-inprocess-interface v0.11.0
   Compiling cumulus-client-service v0.11.0
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 7m 42s
Error: Missing binary: contracts-node

Steps to reproduce

I generated the Parity substrate contracts node (v0.41.0) using pop new parachain then got this error when running pop build.

I see... If you run pop up parachain -f zombienet.toml, it works, but the error message during the build looks bad. Could you open an issue in their repository instead? https://github.com/paritytech/substrate-contracts-node. Alternatively, we could decide to remove this template if it's not going to be fixed.

@AlexD10S AlexD10S mentioned this pull request Dec 19, 2024
3 tasks
@evilrobot-01
Copy link
Contributor

Why are OZ templates being added to a PR for Parity?

@AlexD10S AlexD10S marked this pull request as draft January 16, 2025 12:37
@AlexD10S AlexD10S changed the title feat: add new parachain template and remove outdated one from parity chore: update templates Jan 16, 2025
@AlexD10S AlexD10S marked this pull request as ready for review January 16, 2025 12:59
@AlexD10S
Copy link
Collaborator Author

Why are OZ templates being added to a PR for Parity?

Apologies if this PR automatically requested a review before I made updates in the PR description and name.

I’ve updated this PR to include a general update of the templates, with the OZ update as a minor version bump (I've created an issue to avoid having to do this update each time: #400).

@evilrobot-01
Copy link
Contributor

The PR title could be improved:

@AlexD10S AlexD10S changed the title chore: update templates feat: update parachain templates Jan 16, 2025
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.

pop new: Use latest paritytech templates
4 participants