* switching to released wasmtime
* update depdencies in general
* Update fdlimit
* Update parity common deps
* Also update schnorrkel
* update kvdb-rocksdb
* update further dependents
* also update primitive types
* update cargo.lock
* update merlin
* Bumping evm version
* Version bump
* Split generate_changelog.sh into separate script
Can be run in the format `generate_changelog.sh $previous_version $version`.
* remove early exit from publish_draft_release.sh
* adding changelog
* ci: change last_github_release to also find pre-releases
Co-authored-by: Martin Pugh <pugh@s3kr.it>
* Use CLI to configure max instances cache
* Fix tests
* Move default value into CLI
* Use SmallVec
* Apply review comments
* Get rid of `SmallVec`
Co-authored-by: Bastian Köcher <git@kchr.de>
* Don't include `:code` by default in storage proofs (#5060)
* Adds test to verify that the runtime currently is always contained in
the proof
* Start passing the runtime wasm code from the outside
* Fix compilation
* More build fixes
* Make the test work as expected now :)
* Last fixes
* Fixes benchmarks
* Review feedback
* Apply suggestions from code review
Co-Authored-By: Sergei Pepyakin <sergei@parity.io>
* Review feedback
* Fix compilation
Co-authored-by: Sergei Pepyakin <s.pepyakin@gmail.com>
* Fix compilation and change the way `RuntimeCode` works
* Fix tests
* Switch to `Cow`
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
Co-authored-by: Sergei Pepyakin <s.pepyakin@gmail.com>
This reduces the usage of `Blake2Hasher` in the code base and replaces
it with `BlakeTwo256`. The most important change is the removal of the
custom extern function for `Blake2Hasher`. The runtime `Hash` trait is
now also simplified and directly requires that the implementing type
implements `Hashable`.
* Adds test to verify that the runtime currently is always contained in
the proof
* Start passing the runtime wasm code from the outside
* Fix compilation
* More build fixes
* Make the test work as expected now :)
* Last fixes
* Fixes benchmarks
* Review feedback
* Apply suggestions from code review
Co-Authored-By: Sergei Pepyakin <sergei@parity.io>
* Review feedback
* Fix compilation
Co-authored-by: Sergei Pepyakin <s.pepyakin@gmail.com>
This updates `parity-scale-codec` to `1.2.0`, which includes multiple
performance improvements and a fix that bounds the capacity of a vector
at decoding.
* setting first batch of descriptions
* fix what I just broke
* next batch
* and pallets, too
* last batch
* set cargo.lock
* keep'em dev-deps
* bump version to alpha.2
* setting versions to development pre-release
fixing version in dependencies
* unset already released wasm-builder
* do not publish test crates
* adding licenses
* setting homepage metadata
* set repository url
* Adds a test to ensure that we clear the heap between calls into runtime
The tests shows that we currently not clearing the heap in wasmtime.
For now we don't run the test for wasmtime.
* Fix compilation
* Migrate wasmtime backend to wasmtime-api
* Port to a newer version of wasmtime
* Update to the latest changes.
* Rejig the sandbox module a bit
* Materialze
* Fixes.
* executor wasm_runtime fix
* Refactor everything
* More refactoring
* Even more refactorings
* More cleaning.
* Update to the latest wasmtime
* Reformat
* Renames
* Refactoring and comments.
* Docs
* Rename FunctionExecutor to host.
* Imrpove docs.
* fmt
* Remove panic
* Assert the number of arguments are equal between wasmtime and hostfunc.
* Comment a possible panic if there is no corresponding value variant.
* Check signature of the entrypoint.
* Use git version of wasmtime
* Refine and doc the sandbox code.
* Comment RefCells.
* Update wasmtime to the latest-ish master.
This may solve a problem with segfaults.
* Apply suggestions from code review
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Use full SHA1 hash of wasmtime commit.
* Add a panic message.
* Add some documentation
* Update wasmtime version to include SIGSEGV fix
* Update to crates.io version of wasmtime
* Make it work.
* Move the creation of memory into `InstanceWrapper::new`
* Make `InstanceWrapper` !Send & !Sync
* Avoid using `take_mut`
* Update client/executor/wasmtime/Cargo.toml
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Limit maximum size of memory.
* Rename `init_state` to `with_initialized_state`
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* 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
This moves the wasm-allocator (`FreeingBumpHeapAllocator`) into its own
crate `sp-allocator`. This new crate can theoretically provide multiple
different allocators. Besides moving the allocator, this pr also makes
`FreeingBumpHeapAllocator` compile on `no_std`.
* 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
* Implement runtime version checks in `set_code`
Check that the new runtime code given to `set_code` fullfills some
requirements:
- `spec_name` matches
- `spec_version` does not decreases
- `impl_version` does not decreases
- Either `spec_version` and `impl_version` increase
* Make tests almost work
* Some fixes after master merge
* Fix tests
* Add missed file
* Make depedency check happy?
* Remove leftover `sc-executor`
* AHHHHH
* Reset debug stuff
* Remove some 'static
* More 'static
* Some docs
* Update `Cargo.lock`
* reset a couple of versions down from v0.2.0
* Unstablise browser-utils (very new) and grafana-data-source (going to be replaced with prometheus sometime)
* unmark a bunch more client crates for stabilization
* fix versions in Cargo.tomls
* Downgrade network-test
* Set frame-metadata version to `10.0.0`
* Hide and documented storage generator as internal api
* Downgrade `sp-externalities`
* Downgrade `sc-cli`
* Downgrade sc-executor et al to 0.8.0
* Downgrade sp-state-machine to 0.8.0
* Downgrade pallet-contracts et al to 0.8.0
* Downgrade sp-sandbox to 0.8.0
* downgrade pallet-evm to 0.8.0
* Downgrade pallet-staking to 0.8.0
2.0 should be implementation of lazy payout alongside all the fixes of
current module
* Downgrade node-transaction-factory to 0.8.0
* frame pallets are 2.0.0
Co-authored-by: Ashley <ashley.ruglys@gmail.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Sergei Pepyakin <s.pepyakin@gmail.com>
Co-authored-by: Wei Tang <accounts@that.world>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Marcio Diaz <marcio@parity.io>
* Clean imports in wasmi_execution
* Replace `interpret_runtime_api_result` with `pointer_and_len_from_u64`.
* Extract sc-executor-common crate
* Extract `sc-executor-wasmi` into its own crate
* Extract `sc-executor-wasmtime` into its own crate.
* Add missing headers.
* Clean and docs
* Docs for sc-executor-wasmi
* Expand a comment about sandboxing
* Fix assert_matches
* Rename (un)pack_ptr_and_len and move them into util module
* Remove wasmtime errors in sc-executor-common
* clean up cargo.toml syntax
* bumping versions to 2.0
* bump networking to 0.8
* move consensus down to 0.8
* bump consensus pallets to 0.8.0, too
* Upping babe and aura pallets
* add remaining, missing version definitions
* missed some
* In progress, runtime io must switch to future proof root +
child_specific (unique id) + u32 type.
* Switch interface, sr-io seems ok, rpc could use similar interface to
sr-io, genesis json broken if there is child trie in existing encoding
genesis.
* test from previous implementation.
* fix proving test.
* Restore Keyspacedb from other branch, only apply to child trie.
* Removing unneeded child_info from child root (child info are stored
if things changed, otherwhise the root does not change).
* Switch rpc to use same format as ext: more future proof.
* use root from child info for trie backend essence.
* Breaking long lines.
* Update doc and clean pr a bit.
* fix error type
* Restore removed doc on merge and update sr-io doc.
* Switch child storage api to use directly unique id, if managed id
where to be put in place, the api will change at this time.
* Clean deprecated host interface from child.
* Removing assertion on child info (can fail depending on root
memoization).
* merging child info in the overlay when possible.
* child iteration by prefix using child_info.
* Using ChainInfo in frame support. ChainInfo gets redesign to avoid
buffers allocation on every calls.
* Add length of root to the data of child info.
* comments
* Encode compact.
* Remove child info with root.
* Fix try_update condition.
* Comment Ext child root caching.
* Replace tuples by struct with field
* remove StorageTuple alias.
* Fix doc tests, and remove StorageOverlay and ChildStorageOverlay
aliases.
* take test-client off sp-consensus
* use test primitives rather than test client in authority discovery tests
* move runtime-interface tests
* don't forget to remove the dev-dependency
* remove more unneeded dev deps
* add changes_trie_config to test prrimitives
* Separate network crates from its integration tests
* Fix up consensus crates for networking test changes
* remove unnecessary dependencies
* remove unused addition
* remove unnecessary dev-dependencies
* fixing finality grandpa tests
* removing unnecessary executor dependencies
* Adding script for rename, could be applicable for nodes on top of it, too
* add stderr and gitlab ci features
* apply script
* fix now minor details in expected stderr
* Update the Cargo.lock
* fix name: sc-transaction -> sc-tracing
* fix rename in script, too
* Check in block authoring that we can author with current authoring version
* Update client/consensus/pow/src/lib.rs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* Fix compilation
* The storage runtime interface should not enforce a hash type
Currently the runtime interface enforces `H256` as hash type, but in the
future people could use whatever they want as hash type. The hash type
always needs to match between the runtime and the node, but that is
already required.
* Update primitives/externalities/src/lib.rs
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>