- Oct 25, 2023
-
-
Liam Aharon authored
`wasm-builder` was adjusted to default to building wasm blobs in `release` mode even when cargo is in `debug` because `debug` wasm is too slow. A side effect of this was `.compact` and `.compact.compressed` getting built when the dev is running build in `debug`, adding ~5s to the build time of every wasm runtime. I think it's reasonable to assume if the dev is running `debug` build they want to optimise speed and do not care about the size of the wasm binary. Compacting a blob has negligible impact on its actual performance. In this PR, I adjusted the behavior of the wasm builder so it does not produce `.compact` or `.compact.compressed` wasm when the user is running in `debug`. The builder will continue to produce the bloaty wasm in release mode unless it is overriden with an env var. As suggested by @koute in review, also refactored the `maybe_compact_wasm_and_copy_blobs` into multiple funuctions, and renamed things to better support RISC-V in the future. --- There is no `T-runtime` label so @KiChjang told me to put `T1-FRAME` :) --------- Co-authored-by: Koute <[email protected]>
-
- Oct 24, 2023
-
-
Brian Anderson authored
Just keeping wasm-opt up to date. I don't see anything in the [binaryen changelog](https://github.com/WebAssembly/binaryen/blob/main/CHANGELOG.md) that should affect substrate. This release includes dwarf passes that were accidentally omitted from previous versions of the wasm-opt crate. I suspect this will not affect substrate as their omission hasn't been noticed until recently.
-
- Oct 23, 2023
-
-
aj3n authored
✄ ----------------------------------------------------------------------------- Thank you for your Pull Request!
🙏 Please make sure it follows the contribution guidelines outlined in [this document](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md) and fill out the sections below. Once you're ready to submit your PR for review, please delete this section and leave only the text under the "Description" heading. # Description *Please include a summary of the changes and the related issue. Please also include relevant motivation and context, including:* - What does this PR do? make 'substrate-wasm-builder' manually set 'CARGO_TARGET_DIR' to '$project_dir/target' while building instead of unset 'CARGO_TARGET_DIR'; - Why are these changes needed? If you using this in the `build.rs` with following content in your `~/.cargo/config.toml': [build] target-dir = "target" the build process will stuck because of dead lock -- two `cargo build` on same target directory in the same time. There is already an attempt to avoid such dead lock by unset the `CARGO_TARGET_DIR`, but for users with config above in his build enviroment (like me), this workaround won't work. - How were these changes implemented and what do they affect? Instead of unset 'CARGO_TARGET_DIR', we set 'CARGO_TARGET_DIR' to '$project/target/', which is already assumed to be true by rest of the code. *Use [Github semantic linking](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) to address any open issues this PR relates to or closes.* Fixes # (issue number, *if applicable*) Closes # (issue number, *if applicable*) # Checklist - [x] My PR includes a detailed description as outlined in the "Description" section above - [ ] My PR follows the [labeling requirements](CONTRIBUTING.md#Process) of this project (at minimum one label for `T` required) - [ ] I have made corresponding changes to the documentation (if applicable) - [ ] I have added tests that prove my fix is effective or that my feature works (if applicable) You can remove the "Checklist" section once all have been checked. Thank you for your contribution! ✄ ----------------------------------------------------------------------------- I have built my project with this fix, there's still some warnings with `build.target-dir` set but the building process won't hang. I haven't found related issue in this repo. But I did find one issue [here](https://github.com/substrate-developer-hub/substrate-node-template/issues/116).
-
- Sep 13, 2023
-
-
Bastian Köcher authored
This pull request changes the `wasm-builder` to skip building the wasm files when the build process is running on docs.rs.
-
- Sep 04, 2023
-
-
Chevdor authored
* Add markdown linting - add linter default rules - adapt rules to current code - fix the code for linting to pass - add CI check fix #1243 * Fix markdown for Substrate * Fix tooling install * Fix workflow * Add documentation * Remove trailing spaces * Update .github/.markdownlint.yaml Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Fix mangled markdown/lists * Fix captalization issues on known words
-
- Aug 29, 2023
-
-
Oliver Tale-Yazdi authored
* Fix build profiles Closes https://github.com/paritytech/polkadot-sdk/issues/1155 Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Manually set version to 1.0.0 Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Use workspace repo Signed-off-by: Oliver Tale-Yazdi <[email protected]> * 'Authors and Edition from workspace Signed-off-by: Oliver Tale-Yazdi <[email protected]> --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]>
-
- Aug 25, 2023
-
-
Alexander authored
Signed-off-by: alvicsam <[email protected]>
-
- Aug 16, 2023
-
-
Brian Anderson authored
-
- Jul 17, 2023
-
-
Arkadiy Paronyan authored
* Added ECIES encryption * tweaks * fmt * Make clippy happy * Use local keystore * qed
-
- Jul 03, 2023
-
-
Bastian Köcher authored
* wasm-builder: Make `hash` and `date` optional Apparently there are installations where the `hash` and `date` is optional. Closes: https://github.com/paritytech/substrate/issues/14335 * ".git/.scripts/commands/fmt/fmt.sh" --------- Co-authored-by: command-bot <>
-
- Jun 29, 2023
-
-
Bastian Köcher authored
* frame-benchmarking-cli: Remove native dispatch requirement No need for this, we can just use the `WasmExecutor` directly. * Fixes * Pass benchmarking host functions * Ensure we can pass custom host functions
-
- May 28, 2023
-
-
Bastian Köcher authored
* wasm-builder: Enforce `runtime_version` wasm section This pr changes the `wasm-builder` to enforce the `runtime_version` wasm section. This wasm section is being created by the `sp_version::runtime_version` attribute macro. This attribute macro now exists since quite some time and `runtime_version` also is the only way for parachains to support reading the `RuntimeVersion` from the runtime. \# Disabling the check By default the `WasmBuilder` will now check for this wasm section and if not found, exit with an error. However, there are situations where you may want to disable this check (like for tests). In this case there exists the `disable_runtime_version_section_check` function. ``` WasmBuilder::new() ... ... ... .disable_runtime_version_section_check() .build() ``` By using this method you get back the old behavior. * Review comment * Fix * Fix issue with `enum-as-inner`
-
- May 05, 2023
-
-
Brian Anderson authored
Co-authored-by: parity-processbot <>
-
- Apr 14, 2023
-
-
dependabot[bot] authored
Bumps [cargo_metadata](https://github.com/oli-obk/cargo_metadata) from 0.15.3 to 0.15.4. - [Release notes](https://github.com/oli-obk/cargo_metadata/releases) - [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md) - [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.15.3...0.15.4) --- updated-dependencies: - dependency-name: cargo_metadata dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
- Apr 13, 2023
-
-
dependabot[bot] authored
Bumps [toml](https://github.com/toml-rs/toml) from 0.5.11 to 0.7.3. - [Release notes](https://github.com/toml-rs/toml/releases) - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.5.11...toml-v0.7.3) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
- Apr 03, 2023
-
-
Koute authored
Co-authored-by: parity-processbot <>
-
- Mar 30, 2023
-
-
Alexander Theißen authored
-
- Mar 29, 2023
-
-
Bastian Köcher authored
* Support stable rust for compiling the runtime This pull request brings support for compiling the runtime with stable Rust. This requires at least rust 1.68.0 to work on stable. The code is written in a way that it is backwards compatible and should automatically work when someone compiles with 1.68.0+ stable. * We always support nightlies! *
🤦 * Sort by version * Review feedback * Review feedback * Fix version parsing * Apply suggestions from code review Co-authored-by: Koute <[email protected]> --------- Co-authored-by: Koute <[email protected]>
-
- Feb 21, 2023
-
-
Vivek Pandya authored
* Change copyright year to 2023 from 2022 * Fix incorrect update of copyright year * Remove years from copy right header * Fix remaining files * Fix typo in a header and remove update-copyright.sh
-
- Feb 06, 2023
-
-
Koute authored
* Bump `wasmtime` to 4.0.0 (and a few other deps) * Use `Error::msg` instead of `anyhow!` * Bump `wasmtime` to 5.0.0 * Update `Cargo.lock` * Add `wasmtime` feature to `sp-wasm-interface` dependency
-
- Jan 24, 2023
-
-
Brian Anderson authored
-
- Jan 06, 2023
-
-
Nazar Mokrynskyi authored
Co-authored-by: parity-processbot <>
-
- Dec 13, 2022
-
-
Bastian Köcher authored
* Fixup some wrong dependencies Dev dependencies should not appear in the feature list. If features are required, they should be directly enabled for the `dev-dependency`. * More fixups * Fix fix * Remove deprecated feature * Make all work properly and nice!! * FMT * Fix formatting
-
- Dec 07, 2022
-
-
João Paulo Silva de Souza authored
* implement crate publishing from CI * fix indentation * use resource_group for job exclusivity ensure that at most one instance of the publish-crates job is running at any given time to prevent race conditions * correct publish = false * Remove YAML anchors as GitLab's `extends:` doesn't need it * Temporarily force cache upload for the new jobs * Revert `RUSTY_CACHIER_FORCE_UPLOAD` * pin libp2p-tcp=0.37.0 for sc-telemetry * Revert "pin libp2p-tcp=0.37.0 for sc-telemetry" This reverts commit 29146bfad6c31e8cf0e2f17ad92a71bb81a373af. * always collect generated crates * increase timeout for publish-crates-template * Force upload the new job cache again * Revert "Force upload the new job cache again" This reverts commit 5a5feee1b2c51fdef768b25a76be4c3949ec1c99. * reformat * improve timeout explanation * s/usual/average Co-authored-by: Vladimir Istyufeev <[email protected]>
-
- Oct 30, 2022
-
-
Alexander Theißen authored
* Use wasm-opt on runtime * Optimize for size * Simplify fn compact_wasm_file * Run a lighter pass for non production builds * Disable optimizations and keep name section * Update wasm-opt * Remove dward sections * Update wasm-opt * Update wasm-opt
-
- Aug 02, 2022
-
-
Nikos Kontakis authored
* Rename node=runtime to kithensink-runtime * Undo md formatting
-
- Jul 25, 2022
-
-
Qinxuan Chen authored
* Update comfy-table v5.0.1 => v6.0.0 Signed-off-by: koushiro <[email protected]> * Update strum v0.23.0 => v0.24.1 Signed-off-by: koushiro <[email protected]> * Update h2 v0.3.9 => v0.3.13 Signed-off-by: koushiro <[email protected]> * Update file-per-thread-logger v0.1.4 => v0.1.5 Signed-off-by: koushiro <[email protected]> * Update mio v0.8.0 => v0.8.4 Signed-off-by: koushiro <[email protected]> * revert twox-hash Signed-off-by: koushiro <[email protected]> * Update secp256k1 v0.21.2 => v0.24.0 Signed-off-by: koushiro <[email protected]>
-
- Jun 22, 2022
-
-
Sebastian Kunert authored
* Support offline env variable in wasm builder * Clean up * Improve checks Co-authored-by: Bastian Köcher <[email protected]> * Update crate docs * Add docs to `lib.rs` and introduce helper method `offline_build` Co-authored-by: Bastian Köcher <[email protected]>
-
- Jun 14, 2022
-
-
Bastian Köcher authored
Recently we added the wasm binaries to the `rerun-if-changed` list. The problem with that is that they have a later mtime than the `invoked.timestamp` file and this file's mtime is used to determine if the `build.rs` script needs to be re-run. The solution to this is that we copy the mtime of this `invoked.timestamp` file and add it to the wasm binaries. Then cargo/rustc doesn't constantly wants to rerun the `build.rs` script.
-
- Jun 02, 2022
-
-
Bastian Köcher authored
-
- May 04, 2022
-
-
Shawn Tabrizi authored
* basic lint * lint ordering
-
- Apr 30, 2022
-
-
Falco Hirschenberger authored
* Apply some clippy hints * Revert clippy ci changes * Update client/cli/src/commands/generate.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/cli/src/commands/inspect_key.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/db/src/bench.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/db/src/bench.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/service/src/client/block_rules.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/service/src/client/block_rules.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/network/src/transactions.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/network/src/protocol.rs Co-authored-by: Bastian Köcher <[email protected]> * Revert due to missing `or_default` function. * Fix compilation and simplify code * Undo change that corrupts benchmark. * fix clippy * Update client/service/test/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/state-db/src/noncanonical.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/state-db/src/noncanonical.rs remove leftovers! * Update client/tracing/src/logging/directives.rs Co-authored-by: Bastian Köcher <[email protected]> * Update utils/fork-tree/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * added needed ref * Update frame/referenda/src/benchmarking.rs * Simplify byte-vec creation * let's just not overlap the ranges * Correction * cargo fmt * Update utils/frame/benchmarking-cli/src/shared/stats.rs Co-authored-by: Bastian Köcher <[email protected]> * Update utils/frame/benchmarking-cli/src/pallet/command.rs Co-authored-by: Bastian Köcher <[email protected]> * Update utils/frame/benchmarking-cli/src/pallet/command.rs Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Giles Cope <[email protected]>
-
- Mar 19, 2022
-
-
dependabot[bot] authored
Bumps [cargo_metadata](https://github.com/oli-obk/cargo_metadata) from 0.14.1 to 0.14.2. - [Release notes](https://github.com/oli-obk/cargo_metadata/releases) - [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.14.1...0.14.2) --- updated-dependencies: - dependency-name: cargo_metadata dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
- Feb 14, 2022
-
-
Bastian Köcher authored
* wasm-builder: Support latest nightly With latest nightly, aka rust version 1.60+ namespaced features are added. This changes the handling of optional dependencies. We currently have features that enable optional dependencies when `std` is enabled. This was before no problem, but now the wasm-builder detects them as enabled. To support the transition period until 1.60 is released as stable, this pr adds an heuristic to not enable these optional crates in the wasm build when they are enabled in the `std` feature. This heuristic fails when someones enables these optional dependencies from the outside as well as via the `std` feature, however we hope that no one is doing this at the moment. When namespaced features are enabled, these dependencies needs to be enabled using `dep:dependency-name` to solve this properly. https://doc.rust-lang.org/cargo/reference/unstable.html#namespaced-features * Remove accidentally added features
-
- Feb 02, 2022
-
-
Alexander Theißen authored
-
- Jan 31, 2022
-
-
Alexander Theißen authored
* Add production profile to wasm builder * Fix profile detection * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * Replace panic! by println! + exit * Default to `release` for wasm on debug builds * Replaced unwrap by expect * Update all weights Rerun on the bm2 server. Signed-off-by: Oliver Tale-Yazdi <[email protected]> * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Parity Bot <[email protected]>
-
- Jan 22, 2022
-
-
Bastian Köcher authored
This is required for projects like Cumulus that have dependencies on `westend-runtime`, but this runtime is only added when the `runtime-benchmarks` feature is enabled. By having all features "enabled" in `cargo metadata` we ensure that all crates can be found.
-
- Jan 21, 2022
-
-
Bastian Köcher authored
When building a wasm binary from a different repo inside a local workspace, we did not used the correct `Cargo.toml` to find the correct patches and features. The solution to this is to just walk up from the target directory until we find the workspace we are currently compiling. If this heuristic isn't working, we print a warning and let the user set an env variable `WASM_BUILD_WORKSPACE_HINT` to tell the `wasm-builder` where the actual workspace is.
-
- Jan 03, 2022
-
-
Bastian Köcher authored
-
- Nov 18, 2021
-
-
MOZGIII authored
* Set current dir at check_wasm_toolchain_installed * Add comments
-