This prs cleans up some of the frame benchmarking stuff:
- Move CLI into `frame-benchmarking-cli`. No frame related CLI should
exists in the default Substrate CLI.
- Move all traits and types related to frame benchmarking into the
`frame-benchmarking` trait. Frame types should be isolated in Frame.
* Initial inspect.
* WiP
* Add parsing tests.
* Finalize CLI.
* Update to latest substrate.
* Remove unused imports.
* Support ImportParams as well, to get the right pruning setting.
* Mention in docs that hash is no 0x.
* Move bytes above extrinsics.
* Switch to fill helper from sc_cli.
* Remove overwrite.
* Fix error.
* Fix error message.
* Remove extra allow.
* init_config
* Use noise and timeouts on wasm
* Don't use wasm-opt when compiling to wasm
* Forgot lockfile
* Add node about disabling wasm-opt
* Enable timeouts in telemetry on wasm
* babe_epochAuthorship
remove test-helpers from sp-keyring, bump spec_version, impl_version
* bump Cargo.lock
* add BabeRPC to node-rpc
* rename to BabeApi, remove err_derive
* pass &ServiceBuilder to with_rpc_extensions callback
* sc-consensus-babe-rpc
* Update client/consensus/babe/src/lib.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Better docs, code style chanegs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* new line at the end of Cargo.toml
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: André Silva <andre.beat@gmail.com>
* Add passthrough weight to Sudo
* Bump spec version
* Passthrough `pays_fee`
* Sudo always pays fee
* Use `FunctionOf`
* Add support for closure in dispatch classification
* Update docs
This removes the following syntactic sugar from `construct_runtime!`:
- Expansion of `default` to the default set of module parts
- Expansion of `System: system` to the default set of module parts
The macro now requires the user to provide all the module parts of a pallet.
* contracts: Allow to distinguish out of gas from other traps
When a contract encounters a runtime error a wasm trap is
triggered and the execution is halted. Currently, no matter
what was the cause for the trap it is always reported as:
DispatchError::Other("contract trapped during execution").
However, the trap that is triggered if a contract exhausts
its gas budget is particulary interesting. Therefore we add
a seperate error message for this cause:
DispatchError::Other("ran out of gas during contract execution").
A test is added hat executes a contract that never terminates.
Therefore it always exhausts is gas budget.
* fixup! contracts: Allow to distinguish out of gas from other traps
Remove overlong lines.
* fixup! contracts: Allow to distinguish out of gas from other traps
Rename Contract to Contracts
* Give perthigns the trait it always deserved.
* Make staking and phragmen work with the new generic per_thing
* Make everything work together 🔨
* a bit of cleanup
* Clean usage
* Bump.
* Fix name
* fix grumbles
* hopefully fix the ui test
* Some grumbles
* revamp traits again
* Better naming again.
* full block import benchmark
* try rocksdb cache
* add profiling helper
* use random keyring instead of zero caching
* update docs
* add more io stats
* remove last sentence
* add ci job to see
* Update primitives/keyring/src/sr25519.rs
Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
* switch to 100tx-block
* remove ci script
Co-authored-by: Marcio Diaz <marcio@parity.io>
`GossipEngine` spawns two tasks, one for a periodic tick, one to forward
messages from the network to subscribers. These tasks hold an `Arc` to a
`GossipEngineInner`.
To reduce the amount of shared ownership (locking) this patch integrates
the two tasks into a `Future` implementation on the `GossipEngine`
struct. This `Future` implementation can now be called from a single
owner, e.g. the `finality-grandpa` `NetworkBridge`.
As a side effect this removes the requirement on the `network-gossip`
crate to spawn tasks and thereby removes the requirement on the
`finality-grandpa` crate to spawn any tasks.
This is part of a greater effort to reduce the number of owners of
components within `finality-grandpa`, `network` and `network-gossip` as
well as to reduce the amount of unbounded channels. For details see
d9837d7dd, 5f80929dc and 597c0a6c4.
* Initial transfer bench
* Add best case
* Transfer keep alive
* Set balance benchmarks
* Bump impl
* Fix text
Co-authored-by: Gavin Wood <github@gavwood.com>
* Make WASM browser thing compile
* Fix
* updated exit-future (github repo)
* Switch to broadcast crate
* Migrate client/cli
* Switch exit-future to modernize branch
* Small changes
* Switch to cargo version and fix fg tests
* fix basic-authorship
* Fix crash on grafana macro
* Fix grafana macro
* Switch node python version
* Disable record_metrics_slice in grafana macro on wasm
* Update client/grafana-data-source/src/lib.rs
* Revert "Update client/grafana-data-source/src/lib.rs"
This reverts commit 888009a8e0b7051bd4bfbbfdb0448bcf2e2aae93.
* Add wasm support for state machine
* Switch to my own libp2p version
* Revert "Switch to my own libp2p version"
This reverts commit ce613871b59264b3165b45c37943e6560240daa7.
* Revert "Add wasm support for state machine"
This reverts commit de7eaa0694d9534fc3b164621737968e9a6a7c5f.
* Add sc-browser
* Squash
* remove sc-browser
* Fix keystore on wasm
* stubs for removed functions to make env compatible with old runtimes
* Add test (that doesn't work)
* Fix build scripts
* Revert basic-authorship due to no panics
* Revert cli/informant
* Revert consensus
* revert offchain
* Update utils/browser/Cargo.toml
Co-Authored-By: Benjamin Kampmann <ben@gnunicorn.org>
* export console functions
* Add new chainspec
* Fix ws in chain spec
* revert chainspec
* Fix chainspec
* Use an Option<PathBuf> in keystore instead of cfg flags
* Remove crud
* Only use wasm-timer for instant and systemtime
* Remove telemetry changes
* Assuming this is ok
* Add a KeystoreConfig
* Add stubs back in
* Update libp2p
* Revert "Add stubs back in"
This reverts commit 4690cf1882aa0f99f7f00a58c4080c8aa9b77c36.
* Remove commented js again
* Bump kvdb-web version
* Fix cli
* Switch branch on futures-timer
* Fix tests
* Remove sc-client test build in check-web-wasm because there isn't a good way to build futures-timer with wasm-bindgen support in the build
* Remove more things ^^
* Switch branch on futures-timer back
* Put DB io stats behind a cfg flag
* Fix things
* Don't timeout transports on wasm
* Update branch of futures-timer and fix bad merge
* Spawn informant
* Fix network test
* Fix delay resets
* Changes
* Fix tests
* use wasm_timer for transaction pool
* Fixes
* Switch futures-timer to crates
* Only diagnose futures on native
* Fix sc-network-test tests
* Select log level in js
* Fix syncing ;^)
* Allow disabling colours in the informant
* Use OutputFormat enum for informant
* MallocSizeOf impl on transaction pool broke stuff because wasm_timer::Instant doesnt impl it so just revert the transaction pool to master
* Update futures-diagnose
* Revert "MallocSizeOf impl on transaction pool broke stuff because wasm_timer::Instant doesnt impl it so just revert the transaction pool to master"
This reverts commit baa4ffc94fd968b6660a2c17ba8113e06af15548.
* Pass whole chain spec in start_client
* Get Instant::now to work in transaction pool again
* Informant dep reordering
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
Co-authored-by: Benjamin Kampmann <ben.kampmann@googlemail.com>
Co-authored-by: Demi Obenour <48690212+DemiMarie-parity@users.noreply.github.com>
* Wrap runtime_print! macro in its own scope
Before this fix runtime_print! can be used only once in a scope
because of the name pollution.
* Bump runtime impl versioin (no logic change)
* Fix CLI setup again
We need to set `config_dir` and `database_path` for almost every
command.
This fixes `purge-chain` and also adds a test to make sure we don't
break it again.
* Adds missing test files
* Split methods
* babe: pass epoch data via intermediates
* Switch to use Box<dyn Any> for intermediates
* Set intermediate.epoch to be Option
* Fix proposer should put out an empty intermediate
* Remove unnecessary encode/decode
* Add EpochData to block_import_params in slot worker
* Fix aura compile
* Fix integration test
* Init epoch changes module
* Initial integration of new epoch changes module for BABE
* Fix all initial compile errors
* rename: digest -> digests
* Fix babe tests
* Bump impl_version
* Fix more test issues
* Remove test flag for tree
It unfortunately won't work for multiple crates.
* Update cargo lock
* Fix duplicate parking_lot version
* Add missing license header
These are a few changes I missed during the refactoring.
1. Initialization issue and boilerplate
Most importantly: part of the `Configuration` initialization was done in `sc_cli::init`. This means the user can not benefit from this initialization boilerplate if they have multiple `Configuration` since `sc_cli::init` can only be called once.
2. Boilerplate for `VersionInfo` and `Configuration`
I'm also answering to the critic of @bkchr on the initialization using version: https://github.com/paritytech/substrate/pull/4692/files/bea809d4c14a2ede953227ac885e3b3f9771c548#r372047238 This will allow initializing a `Configuration` and provide the version by default.
3. Loading the `chain_spec` explicitly
In the past it was done automatically but in some cases we want to delay this. I moved the code to `Configuration.load_spec()` so it can be called later on. `chain_spec` can also be written directly to the `Configuration` without using this `load_spec` helper.
4. [deleted]
5. Fixing issue that prevents the user to override the port
In the refactoring I introduced a bug by mistake that could potentially prevent the CLI user to override the ports if defaults where provided for these ports (only on cumulus).
6. Change task_executor from Box to Arc
This is useful for cumulus where we have 2 nodes with 2 separate Configuration that need to spawn tasks to the same runtime.
7. Renamed TasksExecutorRequired to TaskExecutor
For consistency.
This is related to https://github.com/paritytech/cumulus/issues/24
This is the continuation (and hopefully the end of) #4692