* Add span recording to tracing implementation
* Add tracing proxy
* switch to rustc_hash::FxHashMap
* Replace lazy_static and hashmap with thread_local and vec.
* fix marking valid span as invalid while removing invalid spans
* refactor, add wasm_tracing module in `support`
* update registered spans
* tidy up
* typos
* refactor
* update flag name to signal lost trace - `is_valid_trace`
* update flag name to signal lost trace - `is_valid_trace`
* update docs
* update docs
* Use tracing Field recording to store the actual `name` and `target`
from wasm traces.
* fix debug log in subscriber + small refactor
* add tests
* handle misuse in case trying to exit span not held
* Implement filter for wasm traces, simplify field recording for primitive types
* remove superfluous warning
* update docs
* Update primitives/tracing/src/proxy.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* update docs, apply suggestions
* move Proxy from thread_local to `Extension`, rename macro
* fix test
* unify native & wasm span macro calls
* implement wasm tracing control facility in primitives and frame
* add cli flag `--wasm-tracing`
* fix
* switch to `Option<u4>` (possible performance degradation), switch
to static mut bool
* performance improvement using u64 vs Option<u64>
* performance improvement moving concat to client
* update docs
* Update client/cli/src/params/import_params.rs
Co-authored-by: Cecile Tonglet <cecile@parity.io>
* performance improvement
* Revert "performance improvement"
This reverts commit 55ff8817a86302cd93bb6197eb4ca5bc7f4fb524.
* small refactor
* formatting
* bump impl_version
* Update client/cli/src/config.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* update docs
* small fixes, remove pub static
* nit
* add integration tests and refactor Subscriber
* tests
* revert formatting
* try fix test that works locally but not in CI
* try fix test that works locally but not in CI
* debug test that works locally but not in CI
* fix test that works locally but not in CI
* remove pub visibility from bool in runtime
* make TracingSpanGuard #[cfg(not(feature = "std"))], update docs, comments
* make TracingProxy drop implementation conditional on !empty state
* add docs for TraceHandler
* remove blank line
* update expect message
* update tests
* rename cli option to tracing_enable_wasm
* rename cli option to tracing_enable_wasm
* fix
* ensure wasm-tracing features are wasm only
* bump impl_version
* bump impl_version
* add `"pallet-scheduler/std"` to `[features]` `std` in node/runtime
* refactor service to remove sp_tracing dependency
* refactor: line width, trait bounds
* improve LogTraceHandler output
* fix test
* improve tracing log output
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* swap wasm indication from trace name to a separate value
* Update client/tracing/src/lib.rs
* add docs
* remove runtime features
remove wasm_tracing option from CLI
remove wasm_tracing flag from ProfilingSubscriber
Co-authored-by: Matt Rutherford <mattrutherford@users.noreply.github.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Cecile Tonglet <cecile@parity.io>
* make all features explicit
* Change to -feature suffix to with- prefix
* Add newline at the end of the Cargo.toml file
* Remove rhd feature
* Remove some features from Cargo.toml
* Remove test-helpers feature in tx pool
* Return db_open_error("with-"..
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Rename subdb feature to with-subdb
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Remove 'strict' feature and cfg_attr
* Check for with-subdb feature instead of subdb
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* 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
* 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>