* beefy-gadget: allow custom runtime api provider
* beefy-gadget: use mock runtime api in tests
* pallet-mmr: expose mmr root from state through runtime API
* beefy-gadget: get mmr root from runtime state
* pallet-beefy-mmr: remove MmrRoot from header digests
* frame/mmr: move mmr primitives out of frame
* frame/mmr: completely move primitives out of frame
* address review comments
* beefy-mmr: bring back mmr root from header digest
* clippy fixes for rustc 1.60
* address review comments
* Finality notification: Optimize calculation of stale heads
While looking into some problem on Versi where a collator seemed to be stuck. I found out that it
was not stuck but there was a huge gap between last finalized and best block. This lead to a lot
leaves and it was basically trapped inside some loop of reading block headers from the db to find
the stale heads. While looking into this I found out that `leaves` already supports the feature to
give us the stale heads relative easily. However, the semantics change a little bit. Instead of
returning all stale heads of blocks that are not reachable anymore after finalizing a block, we
currently only return heads with a number lower than the finalized block. This should be no problem,
because these other leaves that are stale will be returned later when a block gets finalized which
number is bigger than the block number of these leaves.
While doing that, I also changed `tree_route` of the `FinalityNotification` to include the
`old_finalized`. Based on the comment I assumed that this was already part of it. However, if
wanted, I can revert this change.
* FMT
* Update client/service/src/client/client.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Do not include the last finalized block
* Rename function
* FMT
* Fix tests
* Update figure
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Add new hardware and software metrics
* Move sysinfo tests into `mod tests`
* Correct a typo in a comment
* Remove unnecessary `nix` dependency
* Fix the version tests
* Add a `--disable-hardware-benchmarks` CLI argument
* Disable hardware benchmarks in the integration tests
* Remove unused import
* Fix benchmarks compilation
* Move code to a new `sc-sysinfo` crate
* Correct `impl_version` comment
* Move `--disable-hardware-benchmarks` to the chain-specific bin crate
* Move printing out of hardware bench results to `sc-sysinfo`
* Move hardware benchmarks to a separate messages; trigger them manually
* Rename some of the fields in the `HwBench` struct
* Revert changes to the telemetry crate; manually send hwbench messages
* Move sysinfo logs into the sysinfo crate
* Move the `TARGET_OS_*` constants into the sysinfo crate
* Minor cleanups
* Move the `HwBench` struct to the sysinfo crate
* Derive `Clone` for `HwBench`
* Fix broken telemetry connection notification stream
* Prevent the telemetry connection notifiers from leaking if they're disconnected
* Turn the telemetry notification failure log into a debug log
* Rename `--disable-hardware-benchmarks` to `--no-hardware-benchmarks`
* Prepare for rust stable 1.59
Besides preparing the UI tests this also adds a new script update-rust-stable.sh script for
simplifying the update of a rust stable version. This script will run all UI tests for the new
rust stable version and updating the expected output.
* Ensure we run the UI tests in CI
* use staging ci image
* More test updates
* Unignore test (#11097)
* empty commit for pipeline rerun
* empty commit for pipeline rerun
* Try to make clippy happy
* More clippy fixes
* FMT
* ci image production
Co-authored-by: alvicsam <alvicsam@gmail.com>
Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
* 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
These docs didn't mention how the removal works internally. This is important for the user to know
that calling such a method multiple times in the same block leads always to the same result.
This pr changes all default execution strategies to `Wasm`. This is basically a deprecation of the
native runtime. While the native runtime isn't removed and can still be used, it will not be used
anymore by default.
This will also improve the usage for people who want to run random commits, which most often forget
to run with `--execution wasm`. Otherwise they often run into storage root mismatches because of
using the native runtime.
* transactional: Fix some nitpicks
This fixes some nitpicks related to the transactional storage stuff from me. As everything was
merged too fast, here are some nitpicks from me. First, the entire functionality is moved into its
own file to have a clear separation. Secondly I changed the `set_transactional_level` to not take
`Layer` by reference. Besides that I have added some docs etc.
* Add some comment
* Move tests
* 🤦
* refactor beefy mmr
* use plain vector of bytes for leaf extra
* update comment
* update comments
* remove unused vars
* Use sp_std::vec::Vec
Co-authored-by: Adrian Catangiu <adrian@parity.io>
* make extra data generic
* fix tests
* refactor beefy-mmr
* Update frame/beefy-mmr/src/lib.rs
* minor fix
* fmt
* Update frame/beefy-mmr/src/lib.rs
Co-authored-by: Adrian Catangiu <adrian@parity.io>
* Fail if `MaxVoters` too small
* Fixing benchmarking test, better naming of error
* reverting accidental change
* use fully qualified syntax
no need to interate to calculate len
* Fail directly if too many voters
* `seal_origin` + tests added
* `seal_origin` benchmark added
* `seal_code_hash` + tests added
* `seal_code_hash` benchmark added
* `seal_own_code_hash` + tests added
* `seal_own_code_hash` benchmark added
* fmt lil fix
* akward accident bug fix
* Apply suggestions from code review
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* Apply suggestions from code review
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* benchmark fix
* `WasmModule::getter()` to take `module_name` arg
* test enhanced
* fixes based on review feedback
* Apply suggestions from code review
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* Hash left as const to return a ref to it from mock
* HASH test val to local const in mock
* Apply suggestions from code review
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* fixes to benchmarks according to review feedback
* 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
* removed `seal_origin` from API
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Parity Bot <admin@parity.io>