- 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`
-
- 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
-
- 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
-
- 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
-
- 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]>
-
- 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
-
- Nov 10, 2021
-
-
zjb0807 authored
* add TypeInfo for DispatchTime * upgrade wasm-builder to Rust 2021 * remove resolver * revert resolver in virtual workspace
-
- Oct 04, 2021
-
-
Koute authored
* Do not propagate host RUSTFLAGS when checking for WASM toolchain * Update utils/wasm-builder/src/prerequisites.rs * Update utils/wasm-builder/src/prerequisites.rs Co-authored-by: Bastian Köcher <[email protected]>
-
- Sep 24, 2021
-
-
Bastian Köcher authored
* Prepare UI tests for rust 1.54 * Delete wrong_page.stderr * CI: run with a staging CI image * Revert "CI: run with a staging CI image" This reverts commit 66f5b00d14b50fd9d8fbf773f7e884f380697591. * CI: debug, again * LOG_TARGET is only used in std * Remove unnecessary unsafe * Fixes * Use correct rustc locally * FMT * Compile with benchmarking * Review feedback * Some ui tests * I know... * Fix wasm tests Co-authored-by: Denis P <[email protected]> Co-authored-by: thiolliere <[email protected]>
-
- Aug 11, 2021
-
-
Kian Paimani authored
* reformat everything again * manual formatting * last manual fix * Fix build
-
- Jul 22, 2021
-
-
Squirrel authored
* Remove extra commas made redundent after rustfmt
-
- Jul 21, 2021
-
-
Bastian Köcher authored
* Run cargo fmt on the whole code base * Second run * Add CI check * Fix compilation * More unnecessary braces * Handle weights * Use --all * Use correct attributes... * Fix UI tests * AHHHHHHHHH *
🤦 * Docs * Fix compilation *🤷 * Please stop *🤦 x 2 * More * make rustfmt.toml consistent with polkadot Co-authored-by: André Silva <[email protected]>
-
- Jun 15, 2021
-
-
Ethan Brierley authored
-
- Jun 07, 2021
-
-
cheme authored
* validation extension in sp_io * need paths * arc impl * missing host function in executor * io to pkdot * decode function. * encode primitive. * trailing tab * multiple patch * fix child trie logic * restore master versionning * bench compact proof size * trie-db 22.3 is needed * line width * split line * fixes for bench (additional root may not be needed as original issue was with empty proof). * revert compact from block size calculation. * New error type for compression. * Adding test (incomplete (failing)). Also lacking real proof checking (no good primitives in sp-trie crate). * There is currently no proof recording utility in sp_trie, removing test. * small test of child root in proof without a child proof. * remove empty test. * remove non compact proof size * Missing revert. * proof method to encode decode.
-
- Apr 27, 2021
-
-
Michael Müller authored
* Upgrade `cargo_metadata` to 0.13.1 * Update utils/wasm-builder/src/wasm_project.rs Co-authored-by: Bastian Köcher <[email protected]>
-
- Apr 12, 2021
-
-
Chris D'Costa authored
-
- Apr 07, 2021
-
-
asynchronous rob authored
* begin maybe-compressed-blob * fix build * implement blob compression / decompression * add some tests * decode -> decompress * decompress code if compressed * make API of compresseed blob crate take limit as parameter * use new API in sc-executro * wasm-builder: compress wasm * fix typo * simplify * address review * fix wasm_project.rs * Update primitives/maybe-compressed-blob/Cargo.toml Co-authored-by: Andronik Ordian <[email protected]> Co-authored-by: Andronik Ordian <[email protected]>
-
- Mar 01, 2021
-
-
Bastian Köcher authored
* Init `RuntimeLogger` automatically for each runtime api call This pr change the runtime api in such a way to always and automatically enable the `RuntimeLogger`. This enables the user to use `log` or `tracing` from inside the runtime to create log messages. As logging introduces some extra code and especially increases the size of the wasm blob. It is advised to disable all logging completely with `sp-api/disable-logging` when doing the wasm builds for the on-chain wasm runtime. Besides these changes, the pr also brings most of the logging found in frame to the same format "runtime::*". * Update frame/im-online/src/lib.rs Co-authored-by: Guillaume Thiolliere <[email protected]> * Update test-utils/runtime/Cargo.toml * Fix test * Don't use tracing in the runtime, as we don't support it :D * Fixes Co-authored-by: Guillaume Thiolliere <[email protected]>
-
- Jan 04, 2021
-
-
Bastian Köcher authored
* Happy new year Updates the copyright years and fixes wrong license headers. * Fix the template * Split HEADER into HEADER-APACHE & HEADER-GPL
-
- Nov 24, 2020
-
-
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: Bastian 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: André Silva <[email protected]> * Update utils/wasm-builder/src/builder.rs Co-authored-by: André Silva <[email protected]> Co-authored-by: André Silva <[email protected]>
-
- Oct 19, 2020
-
-
Bastian Köcher authored
* Make `wasm-builder` print the rustc version This makes `wasm-builder` print the rustc version that is being used to compile the project. This is rather useful, because people can check faster if the used rustc version is maybe known for being broken with Substrate. * Apply suggestions from code review * Add some comments
-
- Oct 12, 2020
-
-
Bastian Köcher authored
* Fixes bug in wasm-builder with cargo publish There was a bug in wasm-builder which resulted in generating a `Cargo.lock` in the project directory because of running `cargo metadata`. This resulted in commands like `cargo publish` to fail (if there was no `Cargo.lock` before building), because it checks that the project directory isn't modified. * Update utils/wasm-builder/src/wasm_project.rs Co-authored-by: André Silva <[email protected]> Co-authored-by: André Silva <[email protected]>
-
- Sep 15, 2020
-
-
Bastian Köcher authored
This improves the error message of wasm-builder when the wasm toolchain isn't installed. Currently we print that the wasm toolchain is not installed, but the actual problem is that there is a bug in the packaging in rust. This will now be much easier to debug, by printing the full error message of the compiler.
-
- Sep 10, 2020
-
-
Bastian Köcher authored
Because apparently I can not speak properly ;)
-
- Sep 08, 2020
-
-
cheme authored
* Ignore gc for debug build. * alternate implementation * Update utils/wasm-builder/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * fix Co-authored-by: Bastian Köcher <[email protected]>
-
- Jul 22, 2020
-
-
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: Gavin Wood <[email protected]>
-