1. Apr 01, 2024
    • Alessandro Siniscalchi's avatar
      [parachain-template] pallet configurations into `mod configs` (#3809) · 8d305343
      Alessandro Siniscalchi authored
      
      
      This PR introduces a refactor of the parachain runtime configuration by
      consolidating all pallet configurations into a new module named
      `configs`. This change aims to improve the readability and
      maintainability of the runtime configuration by centralizing all
      configuration parameters.
      
      ## Changes
      - **Creation of `configs.rs`**: A new file `configs.rs` has been added
      under `templates/parachain/runtime/src/`, containing all the runtime
      configurations previously scattered across `lib.rs`.
      - **Refactoring of `lib.rs`**: The `lib.rs` file has been significantly
      slimmed down by removing the inline pallet configurations and importing
      them from `configs.rs` instead.
      - **Optimization of Import Statements**: Reorganized import statements
      to clarify the runtime's dependency structure.
      
      ### Benefits
      - **Improved Readability**: With configurations being centralized,
      developers can now easily locate and review runtime parameters without
      navigating through the `lib.rs` file.
      
      This refactor does not introduce any changes to the runtime logic but
      improves the project structure for better development experience.
      
      ---------
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      8d305343
  2. Mar 28, 2024
    • Sebastian Kunert's avatar
      Export unified ParachainHostFunctions (#3854) · 2e4e6571
      Sebastian Kunert authored
      
      
      This PR exports unified hostfunctions needed for parachains. Basicaly
      `SubstrateHostFunctions` + `storage_proof_size::HostFunctions`.
      
      Also removes the native executor from the parachain template.
      
      ---------
      
      Co-authored-by: default avatarMichal Kucharczyk <[email protected]>
      2e4e6571
    • Alessandro Siniscalchi's avatar
      [parachain-template] runtime API Implementations into `mod apis` (#3817) · 60846a08
      Alessandro Siniscalchi authored
      This PR significantly refactors the runtime API implementations to
      improve project structure, maintainability, and readability. Key changes
      include:
      
      1. **Enhancing Visibility**: Adjusts the visibility of
      `RUNTIME_API_VERSIONS` in `impl_runtime_apis.rs` to `pub`, making it
      accessible throughout the runtime module.
      2. **Centralizing API Implementations**: Introduces a new file,
      `apis.rs`, within the parachain template's runtime directory.
      3. **Streamlining `lib.rs`**: Updates the main runtime library file to
      reflect these structural changes. It removes redundant API
      implementations and points `VERSION` to the newly exposed
      `RUNTIME_API_VERSIONS` from `apis.rs`, simplifying the overall runtime
      configuration.
      
      ### Motivations Behind the Refactoring:
      - **Improved Project Structure**: Centralizing API implementations in
      `apis.rs` offers a clearer, more navigable project structure.
      - **Better Readability**: Streamlining `lib.rs` and reducing clutter
      enhance readability, making it easier for new contributors to understand
      the project layout and logic.
      
      ### Summary of Changes:
      - Made `RUNTIME_API_VERSIONS` public in `impl_runtime_apis.rs`.
      - Added `apis.rs` to centralize runtime API implementations.
      - Streamlined `lib.rs` to adjust to the refactored project structure.
      60846a08
  3. Mar 27, 2024
  4. Mar 19, 2024
    • Juan Ignacio Rios's avatar
      Add HRMP notification handlers to the xcm-executor (#3696) · 8b3bf39a
      Juan Ignacio Rios authored
      Currently the xcm-executor returns an `Unimplemented` error if it
      receives any HRMP-related instruction.
      What I propose here, which is what we are currently doing in our forked
      executor at polimec, is to introduce a trait implemented by the executor
      which will handle those instructions.
      
      This way, if parachains want to keep the default behavior, they just use
      `()` and it will return unimplemented, but they can also implement their
      own logic to establish HRMP channels with other chains in an automated
      fashion, without requiring to go through governance.
      
      Our implementation is mentioned in the [polkadot HRMP
      docs](https://arc.net/l/quote/hduiivbu
      
      ), and it was suggested to us to
      submit a PR to add these changes to polkadot-sdk.
      
      ---------
      
      Co-authored-by: default avatarBranislav Kontur <[email protected]>
      Co-authored-by: command-bot <>
      8b3bf39a
  5. Mar 18, 2024
  6. Mar 17, 2024
  7. Mar 15, 2024
  8. Mar 13, 2024
  9. Mar 08, 2024
  10. Mar 05, 2024
    • Kian Paimani's avatar
      Repot all templates into a single directory (#3460) · 4c810609
      Kian Paimani authored
      The first step towards
      https://github.com/paritytech/polkadot-sdk/issues/3155
      
      Brings all templates under the following structure
      
      ```
      templates
      |   parachain
      |   |   polkadot-launch
      |   |   runtime              --> parachain-template-runtime
      |   |   pallets              --> pallet-parachain-template
      |   |   node                 --> parachain-template-node
      |   minimal
      |   |   runtime              --> minimal-template-runtime
      |   |   pallets              --> pallet-minimal-template
      |   |   node                 --> minimal-template-node
      |   solochain
      |   |   runtime              --> solochain-template-runtime
      |   |   pallets              --> pallet-template (the naming is not consistent here)
      |   |   node                 --> solochain-template-node
      ```
      
      The only note-worthy changes in this PR are: 
      
      - More `Cargo.toml` fields are forwarded to use the one from the
      workspace.
      - parachain template now has weights and benchmarks
      - adds a shell pallet to the minimal template
      - remove a few unused deps 
      
      
      A list of possible follow-ups: 
      
      - [ ] Unify READMEs, create a parent README for all
      - [ ] remove references to `docs.substrate.io` in templates
      - [ ] make all templates use `#[derive_impl]`
      - [ ] update and unify all licenses
      - [ ] Remove polkadot launch, use
      https://github.com/paritytech/polkadot-sdk/blob/35349df993ea2e7c4769914ef5d199e787b23d4c/cumulus/zombienet/examples/small_network.toml
      instead.
      4c810609