1. Apr 22, 2024
  2. 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
  3. Jan 06, 2023
  4. Nov 24, 2020
    • Bastian Köcher's avatar
      Wasm-builder 3.0 (#7532) · 923cb8ee
      Bastian Köcher authored
      
      
      * Build every wasm crate in its own project with wasm-builder
      
      Building all wasm crates in one workspace was a nice idea, however it
      just introduced problems:
      
      1. We needed to prune old members, but this didn't worked for old git
      deps.
      2. We locked the whole wasm workspace while building one crate. This
      could lead to infinitely locking the workspace on a crash.
      
      Now we just build every crate in its own project, this means we will
      build the dependencies multiple times. While building the dependencies
      multiple times, we still decrease the build time by around 30 seconds
      for Polkadot and Substrate because of the new parallelism ;)
      
      * Remove the requirement on wasm-builder-runner
      
      This removes the requirement on wasm-builder-runner by using the new
      `build_dep` feature of cargo. We use nightly anyway and that enables us
      to use this feature. This solves the problem of not mixing
      build/proc-macro deps with normal deps. By doing this we get rid off
      this complicated project structure and can depend directly on
      `wasm-builder`. This also removes all the code from wasm-builder-runner
      and mentions that it is deprecated.
      
      * Copy the `Cargo.lock` to the correct folder
      
      * Remove wasm-builder-runner
      
      * Update docs
      
      * Fix deterministic check
      
      Modified-by: default avatarBastian Köcher <[email protected]>
      
      * Try to make the ui test happy
      
      * Switch to `SKIP_WASM_BUILD`
      
      * Rename `SKIP_WASM_BINARY` to the correct name...
      
      * Update utils/wasm-builder/src/builder.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      * Update utils/wasm-builder/src/builder.rs
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      923cb8ee
  5. Oct 12, 2020
  6. Jul 22, 2020
    • Wei Tang's avatar
      Better handling of stable-only build (#6569) · ac8de557
      Wei Tang authored
      
      
      * Better handling of stable-only build
      
      * Fix node template build
      
      * Fix wasm builder node-template version mismatch
      
      * Fix load_spec error
      
      * Add , in parameter
      
      * Add descrptive panic messages in tests
      
      * Add descriptive tests in node/executor benches
      
      * Fix missing compact_code_unwrap
      
      * Add missing wasm_binary_unwrap function for executor integration test
      
      * Only define import_sp_io in no_std
      
      * Small Cargo.toml styling fix
      
      * Bump wasm-builder to 2.0.0
      
      * Fix all `with_wasm_builder_from_crates` version in Substrate
      
      * Use `with_wasm_builder_from_crates` for node-template
      
      Co-authored-by: default avatarGavin Wood <[email protected]>
      ac8de557
  7. May 28, 2020
    • Bastian Köcher's avatar
      Wasm-builder `runtime-wasm` feature (#6177) · c9cc46de
      Bastian Köcher authored
      * Enable the `runtime-wasm` for wasm builds
      
      This enables the `runtime-wasm` feature for wasm builds. The feature is
      not mandatory and will only be activated if it exists in the
      `Cargo.toml`.
      
      * Fix compilation
      
      * Update docs
      
      * Uprgade version
      
      * Apply suggestions from code review
      c9cc46de
  8. Jan 28, 2020
    • Bastian Köcher's avatar
      WASM runtime switch to import memory (#4737) · 793a1eb0
      Bastian Köcher authored
      * WASM runtime switch to import memory
      
      Up to now runtimes have exported their memory. To unify it with
      sandboxing, this pr switches runtimes to import memory as well.
      
      From a functional perspective, exporting/importing memory makes no
      difference to the runtime.
      
      To provide backwards compatibility, WASM exported memory is still supported.
      
      * Revert debug stuff
      
      * Revert some stuff
      793a1eb0
  9. Jan 21, 2020
    • Nikolay Volf's avatar
      9d556a69
    • Bastian Köcher's avatar
      Make debug builds more usable (#4683) · 85aa6322
      Bastian Köcher authored
      * Make debug builds more usable
      
      This pr makes debug builds more usable in terms of `cargo run -- --dev`.
      
      1. `--dev` activates `--execution native`, iff `--execution` is not
      given or no sub `--execution-*` is given.
      2. It was probably a mistake to compile WASM in debug for a debug build.
      So, we now build the WASM binary always as `release` (if not requested
      differently by the user). So, we trade compilation time for a better
      debug experience.
      
      * Make sure we only overwrite default values
      
      * Make it work
      
      * Apply suggestion
      85aa6322
  10. Jan 05, 2020
  11. Nov 14, 2019
    • Benjamin Kampmann's avatar
      Reorganising the repository - external renames and moves (#4074) · 60e5011c
      Benjamin Kampmann authored
      * Adding first rough ouline of the repository structure
      
      * Remove old CI stuff
      
      * add title
      
      * formatting fixes
      
      * move node-exits job's script to scripts dir
      
      * Move docs into subdir
      
      * move to bin
      
      * move maintainence scripts, configs and helpers into its own dir
      
      * add .local to ignore
      
      * move core->client
      
      * start up 'test' area
      
      * move test client
      
      * move test runtime
      
      * make test move compile
      
      * Add dependencies rule enforcement.
      
      * Fix indexing.
      
      * Update docs to reflect latest changes
      
      * Moving /srml->/paint
      
      * update docs
      
      * move client/sr-* -> primitives/
      
      * clean old readme
      
      * remove old broken code in rhd
      
      * update lock
      
      * Step 1.
      
      * starting to untangle client
      
      * Fix after merge.
      
      * start splitting out client interfaces
      
      * move children and blockchain interfaces
      
      * Move trie and state-machine to primitives.
      
      * Fix WASM builds.
      
      * fixing broken imports
      
      * more interface moves
      
      * move backend and light to interfaces
      
      * move CallExecutor
      
      * move cli off client
      
      * moving around more interfaces
      
      * re-add consensus crates into the mix
      
      * fix subkey path
      
      * relieve client from executor
      
      * starting to pull out client from grandpa
      
      * move is_decendent_of out of client
      
      * grandpa still depends on client directly
      
      * lemme tests pass
      
      * rename srml->paint
      
      * Make it compile.
      
      * rename interfaces->client-api
      
      * Move keyring to primitives.
      
      * fixup libp2p dep
      
      * fix broken use
      
      * allow dependency enforcement to fail
      
      * move fork-tree
      
      * Moving wasm-builder
      
      * make env
      
      * move build-script-utils
      
      * fixup broken crate depdencies and names
      
      * fix imports for authority discovery
      
      * fix typo
      
      * update cargo.lock
      
      * fixing imports
      
      * Fix paths and add missing crates
      
      * re-add missing crates
      60e5011c
  12. Oct 20, 2019
  13. Sep 18, 2019
  14. Sep 12, 2019
  15. Aug 29, 2019
  16. Jul 25, 2019
    • Sergey Pepyakin's avatar
      Fair reusing of wasm runtime instances (#3011) · af914e9f
      Sergey Pepyakin authored
      * Add test from original bug report
      
      Original is from @pepyakin
      
       in 3d7b27f3421818e8d6de568e02fbc2947a06246b.
      I adapted it to work with the latest master.
      
      * No longer cleanup module instance
      
      * Replace runtime cache with synchronous clone
      
      * Fix test
      
      * Preserve initial runtime memory and restore it on fetch
      
      * Remove leftover comment
      
      * Fix style
      
      * Improve variable naming
      
      * Replace get_into() with get()
      
      * Handle missing memory export better
      
      * Return earlier when creating runtime first time
      
      * Improve comments
      
      * fmt
      
      * Fix #2967.
      
      * Eradicate `code` from `Error::InvalidCode`
      
      * tidy
      
      * A state snapshot doc.
      
      * Store multiple runtimes by hash.
      
      * Get rid of deref.
      
      * Docs
      
      * Use Self for instantiate_module
      
      * REVERT ME
      
      * Should be ok
      
      * Commit
      
      * Remove dbg
      
      * Use fast-memory's erase
      
      * Clean and undo hacks.
      
      * Introduce a dedicated error for heap_base
      
      * Ban the start function.
      
      * Clean, docs and refactor
      
      * Add rustflags.
      
      * Update Cargo.lock
      
      * Apply Basti's suggestions
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Rename allocates_huge_stack_array
      
      * Extend TestClientBuilder with set_heap_pages
      
      * Update the test.
      
      * Update core/executor/src/wasm_executor.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Update core/executor/src/wasm_runtimes_cache.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Update core/executor/src/error.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Update core/executor/src/error.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Fix tests.
      
      * Update cargo-lock
      
      * Use wasmi master
      
      * Use master wasmi
      
      * Move tests.
      
      * Use wasmi crates.io
      
      * Update Cargo.lock
      
      * Fix build.rs
      
      * Bump runtime version
      
      * Revert initial_heap_pages renaming
      
      * Bump wasmi up to 0.5.0
      
      * Bump runtime version
      
      * Don't restore an instance every now and then
      
      * Update core/executor/src/wasm_runtimes_cache.rs
      
      Co-Authored-By: default avatarDemiMarie-parity <[email protected]>
      
      * Propagate error in CacheError
      
      * Clarify the get_heap_base call in instantiation
      
      * Supply --export=__heap_base
      
      See https://reviews.llvm.org/D62744
      
      
      
      Co-authored-by: default avatarJim Posen <[email protected]>
      
      * Bump version.
      
      * Use combinators for segments.
      
      * Fix build.rs
      
      * Fix build.rs for runtime-test
      af914e9f
  17. Jul 08, 2019
  18. Jul 05, 2019
  19. Jul 04, 2019
    • Bastian Köcher's avatar
      Make `wasm-builder` less spammy (#3020) · 7a2165cf
      Bastian Köcher authored
      * Don't clutter the output that much
      
      * Support building from `crates` or from `path`
      
      * Upgrade the versions
      
      * Update `Cargo.lock`
      7a2165cf
    • Bastian Köcher's avatar
      Build WASM binaries as part of cargo build (#2868) · fe082214
      Bastian Köcher authored
      
      
      * Introduce `wasm-builder` and `wasm-builder-runner` to retire `build.sh`
      
      Make use of `wasm-builder` in `test-runtime`.
      
      * Add build script and remove the wasm project
      
      * Port `node-runtime` to new wasm-builder
      
      * Make `substrate-executor` tests work with `wasm-builder`
      
      * Move `node-template` to `wasm-builder`
      
      * Remove `build.sh` :)
      
      * Remove the last include_bytes
      
      * Adds the missing build.rs files
      
      * Remove `build.sh` from CI
      
      * Debug CI
      
      * Make it work in CI
      
      * CI attempt 3
      
      * Make `substrate-runtime-test` compile on stable
      
      * Ahhh, some missed `include_bytes!`
      
      * AHH
      
      * Add suggestions
      
      * Improve search for `Cargo.lock` and don't panic if it is not found
      
      * Searching from manifest path was no good idea
      
      * Make the `wasm-builder` source better configurable
      
      * Expose the bloaty wasm binary as well
      
      * Make sure to rerun WASM recompilation on changes in dependencies
      
      * Introduce new `WASM_BUILD_TYPE` env and make sure to call `build.rs` on
      changes to env variables
      
      * Remove `build.sh` from READMEs
      
      * Rename the projects
      
      * Fixes CI
      
      * Update lock file
      
      * Fixes merge-conflict
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarTriplEight <[email protected]>
      
      * Try to make windows happy
      
      * Replace all back slashes in paths with slashes
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarPierre Krieger <[email protected]>
      
      * Use cargo from `CARGO` env variable
      
      * Fix compilation
      
      * Use `rustup` for running the nightly build
      
      * Make individual projects skipable
      
      * Fix compilation
      
      * Fixes compilation
      
      * Build all WASM projects in one workspace
      
      * Replace more back slashes!
      
      * Remove `inlcude_bytes!`
      
      * Adds some documentation
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * More review comments
      
      * Update `Cargo.lock`
      
      * Set license
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * More review comments + adds `TRIGGER_WASM_BUILD` env
      
      * Fix doc tests
      
      * Increase version + update README
      
      * Switch crates.io version of `wasm-builder`
      
      * Update README
      
      * Switch to released version of `wasm-builder-runner`
      fe082214
  20. Mar 06, 2019
  21. Jan 30, 2019
  22. Dec 19, 2018
  23. Oct 10, 2018
  24. Sep 12, 2018
    • Gav Wood's avatar
      Phase 1 of repo reorg (#719) · 1e011625
      Gav Wood authored and Arkadiy Paronyan's avatar Arkadiy Paronyan committed
      * Remove unneeded script
      
      * Rename Substrate Demo -> Substrate
      
      * Rename demo -> node
      
      * Build wasm from last rename.
      
      * Merge ed25519 into substrate-primitives
      
      * Minor tweak
      
      * Rename substrate -> core
      
      * Move substrate-runtime-support to core/runtime/support
      
      * Rename/move substrate-runtime-version
      
      * Move codec up a level
      
      * Rename substrate-codec -> parity-codec
      
      * Move environmental up a level
      
      * Move pwasm-* up to top, ready for removal
      
      * Remove requirement of s-r-support from s-r-primitives
      
      * Move core/runtime/primitives into core/runtime-primitives
      
      * Remove s-r-support dep from s-r-version
      
      * Remove dep of s-r-support from bft
      
      * Remove dep of s-r-support from node/consensus
      
      * Sever all other core deps from s-r-support
      
      * Forgot the no_std directive
      
      * Rename non-SRML modules to sr-* to avoid match clashes
      
      * Move runtime/* to srml/*
      
      * Rename substrate-runtime-* -> srml-*
      
      * Move srml to top-level
      1e011625
  25. Aug 27, 2018
    • Guanqun Lu's avatar
      rename Polkadot to Substrate in the license header via following four commands (#614) · 58bba898
      Guanqun Lu authored
      git grep -l 'This file is part of Polkadot' | xargs sed -i 's/This file is part of Polkadot/This file is part of Substrate/g'
          git grep -l 'Polkadot is free software' | xargs sed -i 's/Polkadot is free software/Substrate is free software/g'
          git grep -l 'Polkadot is distributed in the hope' | xargs sed -i 's/Polkadot is distributed in the hope/Substrate is distributed in the hope/g'
          git grep -l 'along with Polkadot' | xargs sed -i 's/along with Polkadot/along with Substrate/g'
      58bba898
  26. Feb 08, 2018
  27. Feb 07, 2018
  28. Feb 06, 2018