* add_handlebar_template_to_benchmark
- add benchmark-cli arg to take in a handlebar-template file
* update to always use template
* rewrite writer for handlebars
* polish
* pass cmd data
* update docs
* support custom filename output
* Update command.rs
* Create frame-weight-template.hbs
* use a vector to maintain benchmark order
* fix tests
* Custom string serializer, remove feature flag
* update docs
* docs on public objects
* small fix
Co-authored-by: Ezadkiel Marbella <zadkiel.m@gmail.com>
* Asyncify sign_with
* Asyncify generate/get keys
* Complete BareCryptoStore asyncification
* Cleanup
* Rebase
* Add Proxy
* Inject keystore proxy into extensions
* Implement some methods
* Await on send
* Cleanup
* Send result over the oneshot channel sender
* Process one future at a time
* Fix cargo stuff
* Asyncify sr25519_vrf_sign
* Cherry-pick and fix changes
* Introduce SyncCryptoStore
* SQUASH ME WITH THE first commit
* Implement into SyncCryptoStore
* Implement BareCryptoStore for KeystoreProxyAdapter
* authority-discovery
* AURA
* BABE
* finality-grandpa
* offchain-workers
* benchmarking-cli
* sp_io
* test-utils
* application-crypto
* Extensions and RPC
* Client Service
* bin
* Update cargo.lock
* Implement BareCryptoStore on proxy directly
* Simplify proxy setup
* Fix authority-discover
* Pass async keystore to authority-discovery
* Fix tests
* Use async keystore in authority-discovery
* Rename BareCryptoStore to CryptoStore
* WIP
* Remote mutable borrow in CryptoStore trait
* Implement Keystore with backends
* Remove Proxy implementation
* Fix service builder and keystore user-crates
* Fix tests
* Rework authority-discovery after refactoring
* futures::select!
* Fix multiple mut borrows in authority-discovery
* Merge fixes
* Require sync
* Restore Cargo.lock
* PR feedback - round 1
* Remove Keystore and use LocalKeystore directly
Also renamed KeystoreParams to KeystoreContainer
* Join
* Remove sync requirement
* Fix keystore tests
* Fix tests
* client/authority-discovery: Remove event stream dynamic dispatching
With authority-discovery moving from a poll based future to an `async`
future Rust has difficulties propagating the `Sync` trade through the
generated state machine.
Instead of using dynamic dispatching, use a trait parameter to specify
the DHT event stream.
* Make it compile
* Fix submit_transaction
* Fix block_on issue
* Use await in async context
* Fix manual seal keystore
* Fix authoring_blocks test
* fix aura authoring_blocks
* Try to fix tests for auth-discovery
* client/authority-discovery: Fix lookup_throttling test
* client/authority-discovery: Fix triggers_dht_get_query test
* Fix epoch_authorship_works
* client/authority-discovery: Remove timing assumption in unit test
* client/authority-discovery: Revert changes to termination test
* PR feedback
* Remove deadcode and mark test code
* Fix test_sync
* Use the correct keyring type
* Return when from_service stream is closed
* Convert SyncCryptoStore to a trait
* Fix line width
* Fix line width - take 2
* Remove unused import
* Fix keystore instantiation
* PR feedback
* Remove KeystoreContainer
* Revert "Remove KeystoreContainer"
This reverts commit ea4a37c7d74f9772b93d974e05e4498af6192730.
* Take a ref of keystore
* Move keystore to dev-dependencies
* Address some PR feedback
* Missed one
* Pass keystore reference - take 2
* client/finality-grandpa: Use `Arc<dyn CryptoStore>` instead of SyncXXX
Instead of using `SyncCryptoStorePtr` within `client/finality-grandpa`,
which is a type alias for `Arc<dyn SyncCryptoStore>`, use `Arc<dyn
CryptoStore>`. Benefits are:
1. No additional mental overhead of a `SyncCryptoStorePtr`.
2. Ability for new code to use the asynchronous methods of `CryptoStore`
instead of the synchronous `SyncCryptoStore` methods within
`client/finality-granpa` without the need for larger refactorings.
Note: This commit uses `Arc<dyn CryptoStore>` instead of
`CryptoStorePtr`, as I find the type signature more descriptive. This is
subjective and in no way required.
* Remove SyncCryptoStorePtr
* Remove KeystoreContainer & SyncCryptoStorePtr
* PR feedback
* *: Use CryptoStorePtr whereever possible
* *: Define SyncCryptoStore as a pure extension trait of CryptoStore
* Follow up to SyncCryptoStore extension trait
* Adjust docs for SyncCryptoStore as Ben suggested
* Cleanup unnecessary requirements
* sp-keystore
* Use async_std::task::block_on in keystore
* Fix block_on std requirement
* Update primitives/keystore/src/lib.rs
Co-authored-by: Max Inden <mail@max-inden.de>
* Fix wasm build
* Remove unused var
* Fix wasm compilation - take 2
* Revert async-std in keystore
* Fix indent
* Fix version and copyright
* Cleanup feature = "std"
* Auth Discovery: Ignore if from_service is cloed
* Max's suggestion
* Revert async-std usage for block_on
* Address PR feedback
* Fix example offchain worker build
* Address PR feedback
* Update Cargo.lock
* Move unused methods to test helper functions
* Restore accidentally deleted cargo.lock files
* Fix unused imports
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Revert stuff that shouldn't have been committed
* Revert stuff that shouldn't have been committed
* Fix parent relative link generation
* Manually remove this incorrect link for now.
* update benchmarks
* add automated weights
* Update benchmarking.rs
* use underscores for file out
* update some weights
* more weights
* finish weights
* add basic verification to benchmarks
* patch benchmarks
* Update benchmarking.rs
* final weights
* update for new type
* add weightinfo to node
* init_logger: switch from log-based to tracing-based and add compatibility layer
* Move tracing profiling subscriber related config realization
* sp-tracing: change profiling to be a layer instead of a subscriber
* Enable profiling layer in cli
* Change all test env_logger init to sp_tracing::try_init_simple
* Remove all local env_logger dependency
* Add missing tracing-subscriber dependency
* frame-sudo: fix tests
* frame-support: fix tests
* Fix frame/pallet and executor tests
* Fix the remaining tests
* Use subscriber's try_init as recommended by @davidbarsky
* Be explict that the tracing-log feature is needed
* Set subscriber writer to stderr
* Shorter line width
* Update cargo lock tracing version
* Fix sc_tracing crate compile
* Fix sc_authority_discovery crate test
* unremove default-features
* Leave enabled to default true
* Warn if global default cannot be set
* Fix unused import
* Remove unused PROXY_TARGET
* Change all reference from rc5 to rc6
* Change all reference of rc2 to rc6
* Fix styling
* Fix typo
* make logger init error'ing
* re-fixing the test issue
Co-authored-by: Benjamin Kampmann <ben@parity.io>
* Add `--verify` flag to benchmark execution
* make it so `--verify` can be used for getting the actual benchmarks
* undo manual testing
* oops
* use benchmark config struct
* verify is default on, docs update
* remove clone
* improve formatting
* fix test
* bump impl for ci
* Fix printing of subkey when using the `--network` override
This fixes a bug where `--network` did not printed the account ss58 address for the
requested network. Basically we now always print all account ss58 addresses using the
requested network.
* Review comments
* Fixes test
* Update client/cli/src/commands/inspect.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/cli/src/commands/utils.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Fix more tests
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Bump version
* update test-utils crates to be ready for publishing
* adding changelog
* Adding automaticly generated READMEs
* fixing versions
* another version mishap
* draft
* revert
* WIP
* all that remains is tests
* update Cargo.lock
* tests WIP
* WIP refactor node-template-runtime and node-runtime
* implments sc_cli::RuntimeAdapter for node_template_runtime::Runtime
* final draft
* fix update_config for subcommands
* proper AccountId decoding
* test-runtime tests
* revert
* move RuntimeAdapter to cli-utils
* use &'static str for TryFrom::<&'a str>::Error for Ss58AddressFormat
* tests
* add frame-system to sc-cli dev-dependencies
* add frame-system to sc-cli dev-dependencies
* fix ui test
* wip
* fixed inspect test
* bump impl version
* bump impl version, fixx spaces remove todos
* pallet-balances-cli, rustc for some reason cannot resolve pallet_balances_cli in node-cli 😩
* wip
* Subcommand::run takes &self
* can't believe i missed that 🤦🏾♂️
* bump wasm-bindgen for some reason
* adds key subcommand, rename generate-node-key to generate-node-id
* cargo update and crossed fingers 🤞🏽
* update ui test
* update more ui tests
* should be all good now
* revert subkey change
* revert subkey change
* adds frame-utilities-cli
* Apply suggestions from code review
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
* removes frame from sc-cli, fix license
* my editor and ci disagrees on line width
* bump spec version
* turn off default features for parity-scale-codec
* enable full_crypto feature for sp-core in cli-utils
* merge frame-utilities-cli with pallet-balances-cli
* remove full_crypto feature from sp_core in cli-utils
* bump Cargo.lock
* cli-utils -> frame-utils
* rename BlockNumber to GenericNumber, fix spaces
* fix spaces
* construct additional_signed manually
* sign test
* remove unused vars
* implement subkey with frame-utilities-cli and sc_cli
* fix moduleid test
* CI and clion disagree on line widths
* adds associated Params type to SignedExtensionProvider
* Apply suggestions from code review
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
* move some code around
* removes unneccesary generic params
* moves module_id back to frame_utilities_cli
* Apply suggestions from code review
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* remove print_ext
* remove MaybeDisplay from pallet_balances::Trait::Balance
* a lot of stuff tbh
* adds ExtrasParamsBuilder
* remove tests for ModuleIdCmd
* address comments from PR
* bump Cargo.lock
* manually insert key into keystore
* remove unnecessary SharedParams
* add validation to vanity pattern, remove unused arg
* remove SharedParams from Sign, Vanity, Verify
* remove SharedParams from ModuleIdCmd, remove expect from Verify, new line to Cargo.toml
* remove SharedParams from InsertCmd
* 🤦🏾♂️
* deleted prometheus.yml
* move a few things around
* fix vanity test
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Benjamin Kampmann <ben@parity.io>
* initial improvements
* better file management, ignore unused components
* Output warning when components unused
* update comment
* Write even when base weight is zero
* remove unwrap where possible
* Dont sort components to dedup
* undo delete
* improve clarity of unused components
* remove unused dep
* Update Process.json
* Update balance benchmarks
* Update weight functions
* Remove user component
* make componentless
* Add support for `#[extra]` tag on benchmarks
* Update balances completely
* Apply suggestions from code review
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
* Fix some tests
* Maybe fix to test. Need approval from @tomusdrw this is okay
* Make test better
* keep weights conservative
* Update macro for merge master
* Add headers
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Remove service components and add build_network, build_offchain_workers etc
* Improve transaction pool api
* Remove commented out line
* Add PartialComponents
* Add BuildNetworkParams, documentation
* Remove unused imports in tests
* Apply suggestions from code review
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* Remove unused imports in node-bench
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* Update benchmarking macro for no components
* Handle output when error
* skip when empty
* Update analysis for zero components
* add back trace logs
* Apply suggestions from code review
* remove mean value, and use median value
* Add note
* Use standard for loop
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Update lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Simplify a few chain components creation APIs related to the service
* Fix basic-authorship doc tests
* Remove DefaultQueue
* Update client/service/src/builder.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Move ExecutionExtensions comment around
* Remove unused BlakeTwo256
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Improve transaction submission
Before this pr the transaction pool validated each transaction, even if
the transaction was already known to the pool. This pr changes the
behavior to first check if we are already aware of a transaction and
thus, to only validate them if we don't know them yet. However, there is
still the possibility that a given transaction is validated multiple
times. This can happen if the transaction is added the first time, but
is not yet validated and added to the validated pool.
Besides that, this pr fixes the wrong metrics of gossiped transactions
in the network. It also moves some metrics to the transaction pool api,
to better track when a transaction actually is scheduled for validation.
* Make sure we don't submit the same transaction twice from the network concurrently
* Remove added listener call
* Feedback
* Ignore banned on resubmit
* initial mockup
* add and wipe
* track writes
* start to add to pipeline
* return all reads/writes
* Log reads and writes from bench db
* causes panic
* Allow multiple commits
* commit before ending benchmark
* doesn't work???
* fix
* Update lib.rs
* switch to struct for `BenchmarkResults`
* add to output
* fix test
* line width
* @kianenigma review
* Add Whitelist to DB Tracking in Benchmarks Pipeline (#6405)
* hardcoded whitelist
* Add whitelist to pipeline
* Remove whitelist pipeline from CLI, add to runtime
* clean-up unused db initialized whitelist
* Add regression analysis to DB Tracking (#6475)
* Add selector
* add tests
* debug formatter for easy formula
* initial idea
* use all benchmarks
* broken
* working without trait
* Make work for multiple pallets
* Fix merge issues
* writer appends to file
* implement () for balances weight trait
* update name of trait
* Weights to WeightInfo
* auto trait writer
* Heap pages are configurable
* clean out runtime changes
* more clean up
* Fix string generation
* Update comments
* Update bin/node/runtime/src/lib.rs
Co-authored-by: arkpar <arkady.paronyan@gmail.com>
* Bump jsonrpc pubsub, core, http, and ws
Right now these are the packages which _need_ to be updated
so I can just the latest `jsonrpc-pubsub` code. Once a release
it cut upstream the rest of the dependencies should be updated
as well.
* Use jsonrpc-pubsub's SubscriptionManager
This places sc-rpc-api::Subscriptions
* Bump jsonrpc-core outside of sc-rpc-*
* Update client/rpc tests
Right now one of the `author` tests is failing, I
need to think a bit about how best to fix it.
* Remove Subscriptions manager
There's no need for this implementation since we're
using the one from `jsonrpc-pubsub` now
* Fix author RPC test
This test used to check for a numerial subscription ID,
whereas now it uses a string based ID which is the default
provided by `jsonrpc-pubsub`'s subscription manager.
* Remove unused NumericIdProvider
* Add missing bracket
Removed one too many with that last one, lol
* Bump `jsonrpc` to v14.2
There's an exception though. `jsonrpc-derive` cannot be bumped
past v14.0.5 just yet since it has a dependency on `quote` pinned
to v1.0.1. This means that at the moment it won't build on Substrate
since it's using v1.0.3.
* Track `jsonrpc-derive` master branch
* Bump `quote` version to v1.0.6
* Bump `jsonrpc-derive` to v14.2.1
This includes support for `quote` v1.0.6
* Use exact version for jsonrpc crates
Doing this to make sure any updates in jsonrpc don't
accidently trickle down to Polkadot.
Co-authored-by: André Silva <andre.beat@gmail.com>
* 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>
* Make tx pool aware of retracted fork blocks
* Make it compile
* Update client/transaction-pool/src/lib.rs
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* Fix doc test
* Simplify the implementation
* Send tree route as arc to prevent heavy clones
* Switch to use `ExtrinsicHash` to make it more clear
* Fix benchmark
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* Bump jsonrpc pubsub, core, http, and ws
Right now these are the packages which _need_ to be updated
so I can just the latest `jsonrpc-pubsub` code. Once a release
it cut upstream the rest of the dependencies should be updated
as well.
* Use jsonrpc-pubsub's SubscriptionManager
This places sc-rpc-api::Subscriptions
* Bump jsonrpc-core outside of sc-rpc-*
* Update client/rpc tests
Right now one of the `author` tests is failing, I
need to think a bit about how best to fix it.
* Remove Subscriptions manager
There's no need for this implementation since we're
using the one from `jsonrpc-pubsub` now
* Fix author RPC test
This test used to check for a numerial subscription ID,
whereas now it uses a string based ID which is the default
provided by `jsonrpc-pubsub`'s subscription manager.
* Remove unused NumericIdProvider
* Add missing bracket
Removed one too many with that last one, lol
* Bump `jsonrpc` to v14.2
There's an exception though. `jsonrpc-derive` cannot be bumped
past v14.0.5 just yet since it has a dependency on `quote` pinned
to v1.0.1. This means that at the moment it won't build on Substrate
since it's using v1.0.3.
* Track `jsonrpc-derive` master branch
* Bump `quote` version to v1.0.6
* Bump `jsonrpc-derive` to v14.2.1
This includes support for `quote` v1.0.6
* Fist draft of offchain weights
* Round of review feedback
* Update frame/staking/src/lib.rs
* Fix fuzzer
* Remove some redundant comment
* Weight refund for submit solution -- potentially revert.
* First version with custom trimming of the result.
* Update frame/staking/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Update frame/staking/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
* Update frame/staking/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Update frame/staking/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Some improvements
* Benchmark submit solution without phragmen (PR for First draft of offchain phragmen weights) (#6073)
* implementation of new benchmark
* address comments
* replace test
* Update frame/staking/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* update weight
* Fix refund
* Clean and rady for final bench
* Fix line-wdith
* Fix gitlab build
* Fix line-wdith
* Fix test macro
* Update frame/staking/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Update frame/staking/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Better length check
* Update frame/staking/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Update final weight coefficients
* Update frame/staking/src/lib.rs
* Apply suggestions from code review
* Update frame/staking/src/testing_utils.rs
* Try and fix the line-width
* Revert "Try and fix the line-width"
This reverts commit b4e284727220085b9b3daf7682c4bbf29621da09.
* Try and fix the line-width the correct way
* Revert "Try and fix the line-width the correct way"
This reverts commit 04fce128e851c9584f9f0d708a5a73cae799d8c8.
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Gavin Wood <gavin@parity.io>