Nazar Mokrynskyi
dccef86edb
Only use substrate-wasm-builder when std feature is enabled. ( #12790 )
...
Co-authored-by: parity-processbot <>
2023-01-06 10:24:12 +00:00
Alexander Theißen
32578cb010
Remove sandboxing host function interface ( #12852 )
...
* Remove sandboxing interface
* Remove unused struct
2022-12-07 12:48:30 +00:00
Koute
4214bc527c
Remove the wasmtime feature flag ( #12684 )
...
* Remove the `wasmtime` feature flag
* rustfmt
2022-11-18 14:21:44 +01:00
Niklas Adolfsson
2b8af8cb1a
release sp-core 7.0.0 and sp-runtime 7.0.0 ( #12599 )
...
* chore(release): sp-core v7.0.0
* chore(release): sp-runtime v7.0.0
* fix bad merge
2022-11-15 14:54:14 +00:00
Koute
5c7ec6909d
Remove sp_tasks::spawn API and related code + host functions ( #12639 )
...
* Remove `sp_tasks::spawn` API and related code
* Remove `RuntimeTasks::{spawn, join}` host functions
* remove unused
* Remove a few more tests that I forgot to remove
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-11-10 12:23:56 +00:00
Qinxuan Chen
ad6630ed71
Update some dependencies to prune duplicated crates with different version ( #12560 )
...
* sc-client-babe/sp-arithmetic-fuzzer: update num-bigint and num-rational to v0.4
* update lru 0.7.5 ==> v0.8.1
* pallet-example-offchain-worker: update lite-json v0.1.3 ==> v0.2.0
* update hyper 0.14.16 ==> 0.14.20, num-fromat 0.4.0 ==> 0.4.3
* pallet-mmr: update ckb-merkle-mountain-range v0.3.2 ==> v0.5.2
* update handlebars v4.2.2 ==> v4.3.5
* `runtime_cache_size` must always be at least 1
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* default cache size with .min(1)
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* update hyper 0.14.20 ==> 0.14.22
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* update lru 0.8.0 ==> 0.8.1
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* Apply suggestions from code review
* Apply suggestions from code review
* Fix Cargo.lock
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
Co-authored-by: Bastian Köcher <git@kchr.de >
Co-authored-by: Bastian Köcher <info@kchr.de >
2022-11-09 11:46:00 +00:00
dependabot[bot]
be6f51895b
Bump regex from 1.5.5 to 1.6.0 ( #12117 )
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.5.5 to 1.6.0.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.5.5...1.6.0 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: parity-processbot <>
2022-11-07 10:17:53 +00:00
s0me0ne-unkn0wn
24f0c3601c
Implement Clone and Default for Config ( #12397 )
...
* Implement `Clone` and `Default` for `Config`
* `cargo fmt`
* Remove default config implementation
2022-10-05 15:11:05 +00:00
Koute
d5c57ffcc1
Bump wasmtime to 1.0.0 ( #12317 )
2022-09-21 10:21:01 +00:00
Xavier Lau
86198c5471
Use array-bytes for All Array/Bytes/Hex Operations ( #12190 )
...
* Use `array-bytes` for All Array/Bytes/Hex Operations
Signed-off-by: Xavier Lau <xavier@inv.cafe >
* Reorder
* Self Review
* Format
* Fix Tests
* Bump `array-bytes`
* Optimize large test res
Signed-off-by: Xavier Lau <xavier@inv.cafe >
Co-authored-by: parity-processbot <>
2022-09-21 06:12:20 +00:00
Alexander Theißen
4a6e78b8df
Bump wasm-instrument ( #12234 )
...
* Bump wasm-instrument
* Fix benchmarks
2022-09-15 06:00:11 +00:00
Bastian Köcher
b356a5589a
Remove native call ( #12201 )
...
* Remove native call
With the recent introduction of staging runtime apis the native call wasn't supported anymore. This
removes the entire support for this as it is not used anymore.
* FMT
* Fix benchmarks
* FIX ui tests
2022-09-12 12:25:56 +02:00
Alexander Theißen
5afe00d89c
Upgrade wasm crate dependencies ( #12173 )
...
* Upgrade wasm crate dependencies
* New wasmi version changed error output a bit
* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts
* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts
Co-authored-by: command-bot <>
2022-09-08 12:48:19 +00:00
Bastian Köcher
bec123a50f
Upgrade wasmtime to 0.40.0 ( #12096 )
...
* Upgrade wasmtime to 0.40.0
* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts
* Update in the other Cargo.toml
* ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts
Co-authored-by: command-bot <>
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
2022-09-08 10:57:23 +02:00
Koute
b922a25ccd
Force rustix to use libc ( #12123 )
2022-08-29 15:30:37 +00:00
dependabot[bot]
5318bf53d4
Bump parking_lot from 0.12.0 to 0.12.1 ( #12098 )
...
Bumps [parking_lot](https://github.com/Amanieu/parking_lot ) from 0.12.0 to 0.12.1.
- [Release notes](https://github.com/Amanieu/parking_lot/releases )
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.0...0.12.1 )
---
updated-dependencies:
- dependency-name: parking_lot
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-25 23:52:19 +02:00
Bastian Köcher
7c465dfe6a
Fix wasm_export_functions when using a return statement ( #12107 )
...
When used a return statement before we directly returned from the function which is obviously wrong.
2022-08-25 13:18:53 +02:00
yjh
13fa566590
chore(executor): make allow_missing_host_functions could be configurable ( #12015 )
...
* make `with_instance` pub
* make `allow_missing_host_functions` could be configurable
* add method `allow_missing_host_functions`
* update usage
* update usage
* fix comments
* fix `with_instance`
2022-08-19 08:50:12 +00:00
Squirrel
a68a80fbae
declone and close the door ( #12035 )
...
* declone and close the door
* cargo fmt
* remove brackets
2022-08-15 19:38:36 +00:00
yjh
9a7ff9a3a0
chore: improve runtime docs and remove unused error ( #12000 )
2022-08-11 11:59:38 +02:00
Koute
9c56e79c43
Restore wasmtime's default stack size limit to 1MB ( #11993 )
...
* Restore `wasmtime`'s default stack size limit to 1MB
* Add extra comments
* Enforce different maximum call depth in release mode
* Split the call depth limit in two
2022-08-09 11:04:28 +00:00
Koute
c4b607d4c9
Prevent double allocation of the payload when calling sp_io::storage::get ( #11523 )
...
* Expose allocation stats in `FreeingBumpHeapAllocator`
* Return allocation stats when calling into the runtime
* Bump `parity-scale-codec` to 3.1.3 (fork)
* Prevent double allocation of the payload when calling `sp_io::storage::get`
* Fix tests
* Remove unnecessary `mut`
* Enable the `bytes` feature for `parity-scale-codec` in `sp-runtime-interface`
* Update client/allocator/src/freeing_bump.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Bump `parity-scale-codec` to 3.1.3
* Fix some of the UI tests
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-07-29 07:46:15 +00:00
Oliver Tale-Yazdi
e92a349749
Bump wasmtime default-pages ( #11864 )
...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-07-20 08:50:54 +00:00
Koute
8f6ba2e75e
Improve wasmtime error reporting ( #11856 )
...
* Improve `wasmtime` error reporting
* cargo fmt
2022-07-18 11:51:38 +00:00
Koute
3d89fa3605
Prevent unsoundness in environments with broken madvise(MADV_DONTNEED) ( #11722 )
...
* Prevend unsoundness in environments with broken `madvise(MADV_DONTNEED)`
* Add the `std` feature to `rustix` dependency
Apparently not having this breaks compilation on non-nightly toolchains.
* Autodetect the page size when checking whether `madvise` works
* Only make sure that the madvice check doesn't return `Err`
2022-06-28 06:54:56 +00:00
Koute
025e1d76f1
Bump wasmtime to 0.38.0 and zstd to 0.11.2 ( #11720 )
...
* Bump `wasmtime` to 0.37.0 and `zstd` to 0.11.2
* Bump `wasmtime` to 0.38.0
2022-06-24 11:25:21 +00:00
Zhenghao Lu
eba0396182
Simplified code using existing APIs ( #11702 )
...
Signed-off-by: Emison Lu <lzh1633856298@gmail.com >
2022-06-18 23:56:48 +00:00
Koute
4f393171d7
Adjust maximum memory pages hard limit for the pooling instantiation strategy ( #11482 )
...
* Run `sc-executor-wasmtime` unit tests for all instantiation strategies
* Adjust maximum memory pages hard limit for the pooling instantiation strategy
2022-05-24 05:37:04 +00:00
Koute
dd854c16e2
Switch to pooling copy-on-write instantiation strategy for WASM ( #11232 )
...
* Switch to pooling copy-on-write instantiation strategy for WASM
* Fix benchmark compilation
* Fix `cargo fmt`
* Fix compilation of another benchmark I've missed
* Cleanups according to review comments
* Move `max_memory_size` to `Semantics`
* Set `memory_guaranteed_dense_image_size` to `max_memory_size`
* Rename `wasm_instantiation_strategy` to `wasmtime_instantiation_strategy`
* Update the doc-comments regarding the instantiation strategy
* Extend the integration tests to test every instantiation strategy
* Don't drop the temporary directory until the runtime is dropped in benchmarks
* Don't drop the temporary directory until the runtime is dropped in tests
2022-05-19 07:32:53 +00:00
yjh
bf694d3c0e
remove unused error InvalidCode and improve docs ( #11383 )
2022-05-16 10:25:34 +02:00
dependabot[bot]
4a3758d9b8
Bump log from 0.4.16 to 0.4.17 ( #11369 )
...
* Bump log from 0.4.16 to 0.4.17
Bumps [log](https://github.com/rust-lang/log ) from 0.4.16 to 0.4.17.
- [Release notes](https://github.com/rust-lang/log/releases )
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/log/commits/0.4.17 )
---
updated-dependencies:
- dependency-name: log
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* Update Cargo.lock
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-05-15 22:21:04 -04:00
Shawn Tabrizi
7d5202341b
Basic TOML Lint ( #11348 )
...
* basic lint
* lint ordering
2022-05-04 13:38:54 +00:00
Falco Hirschenberger
b581604aa7
Apply some clippy lints ( #11154 )
...
* Apply some clippy hints
* Revert clippy ci changes
* Update client/cli/src/commands/generate.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/inspect_key.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/db/src/bench.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/db/src/bench.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/src/client/block_rules.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/src/client/block_rules.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/network/src/transactions.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/network/src/protocol.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* 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 <bkchr@users.noreply.github.com >
* Update client/state-db/src/noncanonical.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/state-db/src/noncanonical.rs
remove leftovers!
* Update client/tracing/src/logging/directives.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/fork-tree/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* 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 <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/pallet/command.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/pallet/command.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Giles Cope <gilescope@gmail.com >
2022-04-30 21:28:27 +00:00
yjh
130880754f
chore: remove unused scoped-tls ( #11286 )
...
* chore: remove unused scoped-tls
* rm irrelevant files
* rm sp-core
2022-04-26 20:21:30 +02:00
Qinxuan Chen
e9b69bc1b0
sp-sandbox: move the sandbox module of sp-core into sp-sandbox ( #11027 )
...
* sp-sandbox: move the sandbox module of sp-core into sp-sandbox
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* Fix
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* Fix
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
2022-04-26 11:25:41 +02:00
Dmitry Kashitsyn
a43b7bd3fa
Split SandboxInstance::get_global_val implementation per backend ( #11234 )
2022-04-21 09:06:04 +00:00
dependabot[bot]
5c4fa55f09
Bump log from 0.4.14 to 0.4.16 ( #11236 )
...
Bumps [log](https://github.com/rust-lang/log ) from 0.4.14 to 0.4.16.
- [Release notes](https://github.com/rust-lang/log/releases )
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/log/commits )
---
updated-dependencies:
- dependency-name: log
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-20 15:39:28 +02:00
Nazar Mokrynskyi
e5c33d8aa4
Update wasmtime to 0.35.3 ( #11058 )
...
* Update wasmtime to 0.35.2 and default `zstd` features in all crates
* Update wasmtime to 0.35.3
2022-04-14 15:07:36 +02:00
Koute
1411e028aa
Catch panics on the FFI boundary between the runtime and the host for wasmtime ( #11189 )
...
* Catch panics on the FFI boundary between the runtime and the host for `wasmtime`
* Use an already existing test runtime function
* Merge the tests together
2022-04-08 11:26:47 +00:00
dependabot[bot]
2a5c11e2cc
Bump lru from 0.7.3 to 0.7.5 ( #11190 )
...
Bumps [lru](https://github.com/jeromefroe/lru-rs ) from 0.7.3 to 0.7.5.
- [Release notes](https://github.com/jeromefroe/lru-rs/releases )
- [Changelog](https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/jeromefroe/lru-rs/compare/0.7.3...0.7.5 )
---
updated-dependencies:
- dependency-name: lru
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-08 10:18:25 +00:00
Alexander Theißen
14333e3074
Upgrade to wasmer 2.2 ( #11168 )
2022-04-05 17:01:45 +00:00
Zhenghao Lu
7a4d5b5ec6
Correct a spelling mistake ( #11167 )
2022-04-05 08:39:46 +00:00
Qinxuan Chen
41c84b0b41
Remove useless imports ( #11136 )
...
Because `TryInto`/`TryFrom` are in prelude by default from edition 2021
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
2022-04-03 21:44:29 +02:00
Koute
83d4be6151
Update lru, regex and thread_local ( #11135 )
...
* Update `lru` to 0.7.3
* Update `regex` to 1.5.5
* Update `thread_local` to 1.1.4
2022-03-29 14:19:19 +00:00
dependabot[bot]
6097f4f5ca
Bump libc from 0.2.119 to 0.2.121 ( #11127 )
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.119 to 0.2.121.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.119...0.2.121 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 23:43:30 +02:00
Koute
a4041add8a
Add extra WASM heap pages when precompiling the runtime blob ( #11107 )
...
* Add extra WASM heap pages when precompiling the runtime blob
* Fix compilation
* Fix rustdoc
* Fix rustdoc for real this time
* Fix benches compilation
* Improve the builder in `sc-executor-wasmtime`'s tests
2022-03-24 14:19:17 +01:00
Koute
17b1a58eef
Refactor WASM module instantiation ( #10480 )
...
* Refactor WASM module instantiation; enable WASM instance pooling
* Disable the `uffd` feature on `wasmtime`
* Restore the original behavior regarding the initial WASM memory size
* Adjust error message
* Remove unnecessary import in the benchmarks
* Preinstantiate the WASM runtime for a slight speedup
* Delete the asserts in `convert_memory_import_into_export`
* `return` -> `break`
* Revert WASM instance pooling for now
* Have `convert_memory_import_into_export` return an error instead of panic
* Update the warning when an import is missing
* Rustfmt and clippy fix
* Fix executor benchmarks' compilation without `wasmtime` being enabled
* rustfmt again
* Align to review comments
* Extend tests so that both imported and exported memories are tested
* Increase the number of heap pages for exported memories too
* Fix `decommit_works` test
2022-03-19 19:11:02 +00:00
Liu-Cheng Xu
6f59a8b183
Fix the undeterministic storage proof recorded for the same execution ( #10915 )
...
* Add a test case for the determinism of recorded proof
* Replace HashMap with BTreeMap for the actual proof records
* cargo +nightly fmt --all
* Store the trie nodes in BTreeSet for StorageProof
* Nit
* Revert the BTreeMap changes and sort when converting to storage proof
* Remove PartialEq from StorageProof
* Remove unnecessary change
* Add `compare` method to StorageProof
* FMT
* Dummy change to trigger CI
* Use `BTreeSet` for StorageProof and keep using `Vec` for CompactProof
* Update comment on `iter_nodes`
* Revert `PartialEq` removal
2022-03-05 07:51:19 +00:00
dependabot[bot]
e85016c557
Bump libc from 0.2.112 to 0.2.119 ( #10967 )
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.112 to 0.2.119.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.112...0.2.119 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-03 10:45:29 +01:00
Andrew Jones
a3a7fe9041
Release primitive crates ( #10937 )
...
* cargo set-version --bump major -p pallet-contracts-primitives
* cargo set-version --bump major -p sp-core
* cargo set-version --bump major -p sp-runtime-interface
* cargo set-version --bump major -p sp-wasm-interface
* cargo set-version --bump major -p sp-runtime
* cargo set-version --bump major -p sp-storage
* cargo set-version --bump major -p sp-rpc
* cargo set-version --bump major -p sp-io
* cargo set-version --bump major -p sp-trie
* cargo set-version -p sp-state-machine -- 0.12.0
* cargo set-version -p sp-externalities -- 0.12.0
* cargo set-version -p sp-keystore -- 0.12.0
* cargo set-version --bump major -p sp-keyring
* cargo set-version --bump major -p sp-version
* cargo set-version --bump major -p sp-tracing
* cargo set-version --bump major -p sp-application-crypto
* cargo set-version --bump major -p sp-arithmetic
* cargo unleash version bump-major -p sp-runtime-interface-proc-macro
* Add codec max-encoded-len feature to sp-arithmetic
* cargo unleash version bump-major -p sp-core-hashing-proc-macro
2022-03-01 14:35:23 +01:00