pscott
046fda914a
Improve overall performance ( #6699 )
...
* Improve overall performance
* Clean up code
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Remove needless ::
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Remove needless ::
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: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2020-07-21 14:46:49 +02:00
Cecile Tonglet
a4427f3635
Clean exit when no space left on device ( #6339 )
...
Fixes #6305
2020-07-09 14:58:29 +02:00
David Craven
4d209543b9
Fix build when with-kvdb-rocksdb is disabled. ( #6546 )
2020-07-08 22:46:53 -04:00
André Silva
fb2fa25331
primitives: use generic Header in testing runtime ( #6561 )
...
* primitives: use generic Header in testing runtime
* frame: remove unused imports
* Remove warning
Co-authored-by: Bastian Köcher <git@kchr.de >
2020-07-03 17:07:46 +00:00
Shawn Tabrizi
935ee6f545
Add DB Read/Write Tracking to Benchmarking Pipeline ( #6386 )
...
* 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
* Update client/db/src/bench.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: arkpar <arkady.paronyan@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2020-06-24 21:03:55 +02:00
Cecile Tonglet
63793c8b97
impl Debug for sc_service::Configuration ( #6400 )
...
* Initial commit
Forked at: 252416d385
No parent branch.
* Make sc_service::Configuration derive Debug
* Replace task_executor fn's input by proper TaskExecutor type (cleaner)
* impl From<Fn> for TaskExecutor
* Update client/cli/src/runner.rs
* Add some doc, examples and tests
* Replace Deref by fn spawn as suggested
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-06-23 12:47:13 +02:00
Bernhard Schuster
3f30f69b5b
historical slashing w ocw w adhoc tree creation ( #6220 )
...
* draft
* steps
* chore: fmt
* step by step
* more details
* make test public
* refactor: split into on and offchain
* test stab
* tabs my friend
* offchain overlay: split key into prefix and true key
Simplifies inspection and makes key actually unique.
* test: share state
* fix & test
* docs improv
* address review comments
* cleanup test chore
* refactor, abbrev link text
* chore: linewidth
* fix prefix key split fallout
* minor fallout
* minor changes
* addresses review comments
* rename historical.rs -> historical/mod.rs
* avoid shared::* wildcard import
* fix: add missing call to store_session_validator_set_to_offchain
* fix/compile: missing shared:: prefix
* fix/test: flow
* fix/review: Apply suggestions from code review
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* fix/review: more review comment fixes
* fix/review: make ValidatorSet private
* fix/include: core -> sp_core
* fix/review: fallout
* fix/visbility: make them public API
Ref #6358
* fix/review: review changes fallout - again
Co-authored-by: Bernhard Schuster <bernhard@parity.io >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2020-06-16 13:14:49 +02:00
Subsocial
3e465a153b
Fix typo: eror -> error ( #6293 )
2020-06-08 21:32:42 +02:00
pscott
05ed129673
Make all features explicit ( #6267 )
...
* 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 >
2020-06-08 15:43:00 +02:00
Bernhard Schuster
95d73994c1
offchain storage lock ( #6010 )
...
* feat/offchain/storage: add remove interface method
* feat/offchain/storeage: add remote to StorageValueRef
* feat/offchain/storage: add storage lock
* fix/review: Apply suggestions from code review
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
* refactor/offchain/storage/lock: introduce `Lockable` trait part 1 of 2
* chore/offchain/rename: _remove -> clean
* feat/offchain/storage/lock: add TimeAndBlock based part 2 of 2
* fix/offchain/storage/lock: block and time expiry must be && not ||
* chore/offchain/storage: minor fmt doc comments
* doc/comment: prefer markdown emphasis over CAPS
* doc/comment: rewrap multiline module level docs
* doc/comment: rephrase
* impl sleep_until and use the actual time for the test env
* feat/test: add more tests, ignore some sample impl doctests
* fix/review: Apply suggestions from code review
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
* doc/comment: better description
* fix/review: Apply suggestions from code review
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
* chore/storage: lifetime cleanup
* fix/cleanup: trait bounds, cargo-spellcheck + extra explanations
* fix/doc: periods +-
* fix/review: Apply suggestions from code review
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* cleanup: remove explicit lifetime bound, copy -> clone
* fix/review: make trait Lockable contain only static, try_lock should not return Err(Option<L>),
* chore/lifetimes: remove a couple of lifetime bounds which the compiler can figure out
* refactor: migrate to an instant based
* fix/feedback: fix, reduce, rename, docs update pending
* docs/reword: adjust to changed code
* fix/offchain/testing: timestamp and sleep_until shall not block
* chore/lines: lines must < 100 chars
* fix/docs: add missing pub field doc comments
* refactor/x: try_lock does not need to return an Option<_>
* refactor/simplify: a better way of waiting for a lock to resolve
* docs: consistency
* fix/line: < 100
* fix/doctest/use: avoid crate::
* fix/doctest: *
* fix/review: remove unused trait bound
* fix/review: pretty by const fn
* fix/review: reduce default timeout to 20s
* docs: grammar
* fix/review: add with_block_deadline
* doc: revamp BlockNumberProvider documentation to be less frame centric
* chore: fmt
* docs: add missing doc comment
Co-authored-by: Bernhard Schuster <bernhard@parity.io >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com >
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
2020-05-28 14:26:11 +02:00
Bastian Köcher
82a832bc3a
Don't clone values when calculating storage root ( #6108 )
...
* Don't clone values when calculating storage root
Instead of cloning all the keys and values of the overlay when
calculating the storage root, we pass all the values by reference. This
should probably bring some performance improvements when calculating the
storage root.
* no cow version (#6113 )
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
2020-05-23 11:28:34 +02:00
Pierre Krieger
717fa95bc7
Restore the empty line after the license ( #6088 )
2020-05-20 13:08:27 +00:00
Nikolay Volf
d5411969ac
fix whitespace ( #6062 )
2020-05-18 13:51:28 +02:00
Benjamin Kampmann
be8c96adec
Relax substrate licensing scheme ( #5947 )
2020-05-15 13:21:56 +02:00
Bastian Köcher
7b19d3c4ce
Give more meaningful error on missing feature when opening a db ( #5999 )
2020-05-13 11:40:10 +01:00
Arkadiy Paronyan
427c33f16f
Use header cache for blockhain cache ( #5929 )
2020-05-07 12:49:30 +02:00
Arkadiy Paronyan
4151dc6bfe
Use header cache when creating state. ( #5868 )
...
* Use header cache for state_at
* Fixed warnings
* Update client/db/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-05-04 13:47:23 +00:00
Arkadiy Paronyan
c3a6d8a881
Fix purge-chain and print DB info on startup ( #5840 )
...
* purge-chain accepts --db option
* print DB info on startup
* Small refactoring
* Added back &self
* Add DatabaseParams for PurgeChain, ImportParams and ExportBlocks
* Don't force default value
* Remove unused fields
* Update client/cli/src/commands/export_blocks_cmd.rs
* Fix stuff
Co-authored-by: Cecile Tonglet <cecile@parity.io >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-30 14:53:04 +02:00
Seun Lanlege
4fa5941f44
Move sc-client into sc-service ( #5502 )
...
* Drop client from sc-network and sc-client-db, move LongestChain to sc-client-api
* move leaves, cht, in_mem to sc-client-api, drop client from sc-finality-grandpa
* drop sc-service from sc-rpc
* drop sc-service from sc-consensus-aura
* drop sc-client from manual-seal and babe
* drop sc-client from utils/frame/rpc/system and utils/frame/benchmarking-cli
* drop sc-client from bin/node and bin/node-template
* drop sc-client
* fix tests
* remove check -p sc-client from gitlab.yml
* fix warnings
* fixes ui test
* fix light client tests
* adds associated Client type to AbstractService
* adds UsageProvider to Client
* fixed ui test, again
* tried and failed to get node-cli to compile for wasm
* thanks to tomaka for helping me get node-cli to compile for wasmm
* ui test pls pas 🙏🏾
* all tests passing 🪄
* no_run documentation code
* rm -f documentation code
* ClientProvider
* fix mega trait
* move LongestChain to sc-consensus, use adds minimal bounds to AbstractService::Client
* adds license to sc-consensus
Co-authored-by: Benjamin Kampmann <ben@parity.io >
2020-04-28 11:59:31 +00:00
Arkadiy Paronyan
64ed36d093
Support reference-counting state backend. ( #5769 )
...
* Optimize pinning
* Ref counting state backend
* Style
Co-Authored-By: Wei Tang <hi@that.world >
* Update Cargo.lock
* Handle empty node
Co-authored-by: Wei Tang <hi@that.world >
2020-04-27 12:24:50 +02:00
Bernhard Schuster
72ee7d5797
feat/ocw/bookkeeping ( #5200 )
...
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2020-04-24 16:46:19 +02:00
cheme
4ffcf98d8d
Child trie api changes BREAKING ( #4857 )
...
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com >
2020-04-20 15:21:22 +02:00
Gavin Wood
91af5b6fcc
New database trait ( #5549 )
...
* Introduce trait
* The trait
* Generic
* Basic impls.
* Remove unneeded bounds
* Minor changes
* Switch over to the new DB trait
* Integrated parity-db and added CLI for db selection
* Default impl.
* Fix logs.
* Started integrating subdb
* Apply suggestions from code review
Co-Authored-By: Cecile Tonglet <cecile@parity.io >
* Apply suggestions from code review
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com >
* Enable subdb
* Bump parity-db
* Fixed CLI macro
* Fixed browser build
* Fixed features
* Sort out features
* Use parity-db from crates.io
* Typo
Co-authored-by: arkpar <arkady.paronyan@gmail.com >
Co-authored-by: Cecile Tonglet <cecile@parity.io >
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
2020-04-15 14:38:39 +02:00
Arkadiy Paronyan
92b39365e3
Benchmarks now use in-memory db & cache ( #5586 )
...
* in-mem state for benchmarks
* Use caching state
* Update Cargo.lock
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-04-09 11:27:39 +02:00
Nikolay Volf
2faabff007
Fix benchmarks: set cache_size to higher value ( #5585 )
...
* 128 -> 1024
* add trace and set = 512
* fix doc comment
2020-04-09 10:37:26 +02:00
Cecile Tonglet
3da069e359
CLI: refactoring: remove Options from sc_service::Configuration's fields ( #5271 )
...
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Rename IntoConfiguration to CliConfiguration
* Renamed into_configuration to create_configuration
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Move keystore params to its own module
* Use in-memory keystore even for build-spec
* Enforce proper value for node name
* dev_key_seed
* Telemetry endpoints
* rustfmt
* Converted all RunCmd
* rustfmt
* Added export-blocks
* Missed something
* Removed config_path in NetworkConfiguration (not used)
* Fixed warnings
* public_addresses is used but never set, keeping it
* Merge Configuration.node and NetworkConfiguration.node_name
...because they are the same thing
* Added: import-blocks
* Adding a proc_macro to help impl SubstrateCli
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Re-export spec_factory from sc_cli
* Re-added all the commands
* Refactored node_key_params
* Fixed previous refucktoring
* Clean-up and removed full_version()
* Renamed get_is_dev to not confuse with Configuration field
* Fixed sc-cli-derive example
* Fixing tests
* Fixing tests and removing some (will re-add later)
* Fixing more tests
* Removes the need of type parameter
* Converting bin/node and simplifying API
* Converting more
* Converting last command
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Fixing tests and added default for WasmExecutionMethod
* Fixing stuff
* Fixed something I broke oops
* Update Cargo.lock
* Moving things around
* Convert everything to Result
* Added new macros to simplify the impl of CliConfiguration
* Added a macro to generate CliConfiguration automatically for subcommands
* Revert... too many macros (this one is not really useful)
This reverts commit 9c516dd38b40fbc420b02c1f8e61d5b2b1a4e434.
* Renamed is_dev to get_is_dev
Good enough for now
* Fixed name roles (this is plural, not singular)
* Clean-up
* Re-export NodeKeyConfig and TelemetryEndpoints from sc_service
* Improve styling/formatting
* Added copyrights
* Added doc and fixed warnings
* Added myself to code owners
* Yes it is needed according to the history
* Revert formatting
* Fixing conflict
* Updated build.rs
* Cargo.lock
* Clean-up
* Update client/cli-derive/Cargo.toml
Co-Authored-By: Seun Lanlege <seunlanlege@gmail.com >
* Fail if using proc_macro and build.rs is not set properly
* Dropped all get_ in front of methods
* Clean-up
* Fixing proc macro missing env var
* Get the configuration inside the Runtime (needed for polkadot)
* Clean-up
* Get is_dev from argument like the others
* Get chain ID instead of chain spec from shared params
* &self is passed to spec_factory/load_spec
* Wrong text
* Fix example
* Officialize macro and made a cool doc
* Renamed spec_factory to load_spec (substrate_cli_configuration)
* Removed not so useful ChainSpec
* Renamed SubstrateCLI to SubstrateCli
* Added changelog for impl_version being full now
* Renamed Runtime to Runner
* Update changelog to show example
* Removed option on database cache size
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Fix on removal of option
* typo
* Clean-up imports
* Added info in Cargo.toml
* typo
* remarks
* Moved function for build.rs to substrate-build-script-utils
* Fixed example & test of cli-derive
* Moved function for build.rs to substrate-build-script-utils
* Renamed substrate_cli_configuration to substrate_cli oops
It implements SubstrateCli not CliConfiguration!
* Added documentation and wrapper macro
* Removed option on database cache size
* Removed option on database cache size
* Clean-up
* Reduce risk of errors due to typos
* Removed option on database cache size
* Added NOTE as suggested
* Added doc as suggested
* Fixed test
* typo
* renamed runtime to runner
* Fixed weird argument
* More commas
* Moved client/cli-derive to client/cli/derive
* Added 7 tests for the macros
* Improve error message
* Upgrade assert_cmd
* Fixing missing stuff
* Fixed unused import
* Improve SubstrateCli doc
* Applied suggestions
* Fix and clean-up imports
* Started replacing macros WIP
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Started removing substrate_cli
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* fixed bug introduced while refactoring
* Renamed NetworkConfigurationParams to NetworkParams for consistency sake
* Fixed test
* Update client/cli/src/commands/runcmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/runcmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/export_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/check_block_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update bin/node/cli/src/command.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update bin/node/cli/src/command.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/export_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Revert "Update client/cli/src/commands/export_blocks_cmd.rs"
This reverts commit 5906776953392c02beac6bc0bf50f8cbe1a12a01.
* Revert "Update client/cli/src/commands/check_block_cmd.rs"
This reverts commit f705f42b7f3d732be001141afee210fe46a1ef47.
* Revert "Update client/cli/src/commands/export_blocks_cmd.rs"
This reverts commit 8d57c0550164449e6eb2d3bacb04c750c714fcea.
* Revert "Update client/cli/src/commands/runcmd.rs"
This reverts commit 93e74cf5d2e1c0dc49cdff8608d59fc40fc59338.
* Revert "Update client/cli/src/commands/runcmd.rs"
This reverts commit 11d527ba345c0d79f0d3b5b071933d95474d0614.
* Update client/cli/src/commands/export_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/import_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Changed ::sc_cli to $crate in the macro
* fixed tests
* fixed conflicts
* Fixing test
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/pruning_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Remove comment as suggested
* Apply suggestion
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/command.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/runner.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/runner.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/runner.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/pruning_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/node_key_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/network_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/config.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Added doc
* Fixed error introduced after applying suggestion
* Revert "Update client/cli/src/params/pruning_params.rs"
This reverts commit 0574d06a4f1efd86e94c1214420a12e7a4be0099.
* Print error
* Apply suggestions from code review
* Remove useless Results
* Fixed CI failing on polkadot approval
Co-authored-by: Seun Lanlege <seunlanlege@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-07 11:38:07 +02:00
Benjamin Kampmann
247822bb33
Additional Metrics collected and exposed via prometheus ( #5414 )
...
This PR refactors the metrics measuring and Prometheus exposing entity in sc-service into its own submodule and extends the parameters it exposes by:
- system load average (over one, five and 15min)
- the TCP connection state of the process (lsof), refs #5304
- number of tokio threads
- number of known forks
- counter for items in each unbounded queue (with internal unbounded channels)
- number of file descriptors opened by this process (*nix only at this point)
- number of system threads (*nix only at this point)
refs #4679
Co-authored-by: Max Inden <mail@max-inden.de >
Co-authored-by: Ashley <ashley.ruglys@gmail.com >
2020-04-04 15:13:35 +02:00
cheme
58578af074
State metrics possible changes ( #5168 )
...
* Registering state from overlay.
* fix
* fix2
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-01 19:46:40 +02:00
Arkadiy Paronyan
433824511e
Reset benchmarks by removing post-genesis changes ( #5435 )
...
* Reset by removing pos-genesis changes
* CLI option for DB cache size
* Update Cargo.lock
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-04-01 14:08:23 +02:00
Nikolay Volf
372745705d
create parallel tasks extension ( #5249 )
2020-03-16 16:30:39 +01:00
Shawn Tabrizi
b57fd17998
Fix genesis bug in bench db ( #5253 )
2020-03-15 20:19:01 +01:00
Arkadiy Paronyan
dc0bf210fb
ChainSpec trait ( #5185 )
...
* ChainSpec trait
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Added docs
* Fixed build
* Fixed build
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-03-12 00:00:10 +01:00
Gavin Wood
a8441ff968
Remove Backend::destroy_state ( #5068 )
...
* Remove `Backend::destroy_state`
This removes the `destroy_state` function of `Backend` and instead moves
the functionality into the `Drop` implementation of the state. This
makes it much easier to work with the state, as the user no longer needs
to call` destroy_state` manually. However, it requires that we switch
from `RwLock` to `ReentrantMutex` as while importing a block we maybe
need to lock again in `drop`.
* Bring back the `RwLock` and some other clean ups
* Fix compilation
2020-03-05 17:01:52 +01:00
Gavin Wood
906e08ee2a
Pass Prometheus Registry into Client ( #5120 )
...
* Add a few metrics to Client
* Improve PrometheusConfig
* Fix client docs
2020-03-05 13:40:33 +01:00
Benjamin Kampmann
5a33228ea9
Reduce usage of Blake2Hasher ( #5132 )
...
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`.
2020-03-05 08:51:03 +01:00
Bastian Köcher
4f852d6922
Expose state-db memory info ( #5110 )
...
This exposes memory statistics from the state-db.
2020-03-03 10:24:26 +01:00
Cecile Tonglet
e8000e7429
Add tests & Service's Configuration has optional fields that shouldn't be optional ( #4842 )
...
Related to #4776
Related to https://github.com/paritytech/polkadot/pull/832
To summarize the changes:
1. I did not manage to validate with types the service's Configuration. But I did reduce the possibility of errors by moving all the "fill" functions to their respective structopts
2. I split params.rs to multiple modules: one module params for just CLI parameters and one module commands for CLI subcommands (and RunCmd). Every command and params are in their own file so things are grouped better together and easier to remove
3. I removed the run and run_subcommand helpers as they are not helping much anymore. Running a command is always a set of 3 commands: 1. init 2. update config 3. run. This still allow the user to change the config before arguments get parsed or right after.
4. I added tests for all subcommands.
5. [deleted]
Overall the aim is to improve the situation with the Configuration and the optional parameters, add tests, make the API more consistent and simpler.
2020-02-21 13:53:01 +01:00
Shawn Tabrizi
c7a14db792
Fix various spelling errors ( #4940 )
...
* meaningfull -> meaningful
* initialise -> initialize
* tokans -> tokens
* incentivise -> incentivize
* lenght -> length
* incentivisation -> incentivization
* doesnt't -> doesn't
* overwriten -> overwritten
* lifecycle -> life cycle
* lifecycle -> life cycle
* usefull -> useful
* noone -> no one
* spaming -> spamming
* defered -> deferred
* hieght -> height
* sumation -> summation
* ingore -> ignore
* registed -> registered
* Auxialary -> Auxiliary
* loggin -> logging
* independance -> independence
* trailling -> trailing
* responsability -> responsibility
* trunkated -> truncated
* Weither -> Whether
* informations -> information
* Runtume -> Runtime
* choosen -> chosen
* delcataion -> declaration
* Unchekced -> Unchecked
* defintion -> definition
* scrach -> scratch
* imput -> input
* transfered -> transferred
* endownment -> endowment
* Determinator -> Determiner
* relevent -> relevant
* emited -> emitted
* acocunt -> account
* proprotional -> proportional
* instantiaion -> instantiation
* commited -> committed
* tombstonedead -> tombstone
* uwnrap -> unwrap
* acount -> account
* specialised -> specialized
* existant -> existent
* requried -> required
* Anull -> Annul
* AUTHORITES -> AUTHORITIES
* underyling -> underlying
* recognisable -> recognizable
* Capitalise -> Capitalize
* reportfor -> report for
* hearbeat -> heartbeat
* onlineness -> being online
* creater -> creator
* Bytearray -> Byte array
* Despoit -> Deposit
* substratced -> subtracted
* Curent -> Current
* imbalanes -> imbalances
* countfown -> countdown
* inexisting -> inexistent
* additionaly -> additionally
* substracted -> subtracted
* auxilary -> auxiliary
* parital -> partial
* in't -> isn't
* compatability -> compatibility
* infomation -> information
* etected -> detected
* extrinsiscs -> extrinsics
* reprensentation -> representation
* coonfiguration -> configuration
* primtives -> primitives
* miscelanious -> miscellaneous
* VERISON -> VERSION
* endcoded -> encoded
* Genrates -> Generates
* miliseconds -> milliseconds
* occured -> occurred
* trully -> truely
* truely -> truly
* conjuction -> conjunction
* encouters -> encounters
* customised -> customized
* deterministicly -> deterministically
* finalisation -> finalization
* pluggable -> plugable
* wakeup -> wake-up
* interemdiate -> intermediate
* intepreting -> interpreting
* finalzied -> finalized
* throgh -> through
* extinsic -> extrinsic
* convient -> convenient
* allocater -> allocator
* propagateable -> propagatable
* succesfuly -> successfully
* finalising -> finalizing
* publically -> publicly
* phrasee -> phrase
* substration -> substractions
* substractions -> subtractions
* neccessarily -> necessarily
* Inlucde -> Include
* unefficient -> inefficient
* thay -> they
* funtion -> function
* datastructures -> data structures
* infromation -> information
* propagatable -> propagable
* ecountered -> encountered
* recognise -> recognize
* intergration -> integration
* lastet -> latest
* datatypes -> data types
* datatype -> data type
* Strongarming -> Strong Arming
* avaible -> available
* Commiting -> Committing
* Retreiving -> Retrieving
* shoud -> should
* canonicaliziation -> canonicalization
* comitted -> committed
* clonable -> cloneable
* Uknown -> Unknown
* reponse -> response
* arbitary -> arbitrary
* Capapbilities -> Capabilities
* responsbile -> responsible
* initialisation -> initialization
* cames -> came
* intemediate -> intermediate
* reqeust -> request
* intance -> instance
* explcitly -> explicitly
* neighor -> neighbor
* reolving -> resolving
* untill -> until
* Validte -> Validate
* deserailize -> deserialize
* literaly -> literally
* preceeding -> preceding
* abpve -> above
* chcecked -> checked
* numbet -> number
* Unknow -> Unknown
* halfs -> halves
* gossup -> gossip
* givent -> given
* immediatelly -> immediately
* slicable -> sliceable
* conensus -> consensus
* Mimicks -> Mimics
* acccept -> accept
* serialise -> serialize
* exstrinsics -> extrinsics
* panicks -> panics
* maintaince -> maintenance
* repeatidely -> repeatedly
* anecstor -> ancestor
* becasue -> because
* processer -> processor
* Prunning -> Pruning
* insterested -> interested
* unuseful -> not useful
* yeided -> yielded
* descendfing -> descending
* corresponts -> corresponds
* survivew -> survive
* keps -> keeps
* ligh -> light
* prerequisities -> prerequisites
* positiion -> position
* depedency -> dependency
* extrinisic -> extrinsic
* atomicaly -> atomically
* staticly -> statically
* resul -> result
* timestamb -> timestamp
* Utilites -> Utilities
* ammount -> amount
* pocess -> process
* exteral -> external
* Update client/finality-grandpa/src/tests.rs
* Update primitives/io/src/lib.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update primitives/blockchain/src/lib.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update frame/support/src/weights.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update bin/node/cli/tests/common.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/api/src/execution_extensions.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/cli/src/params.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/executor/common/src/sandbox.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/api/src/execution_extensions.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/finality-grandpa/src/communication/mod.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/state-db/src/pruning.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update frame/contracts/src/tests.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Update client/api/src/execution_extensions.rs
* bump impl
* timestamb -> timestamp
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
2020-02-17 15:07:24 +01:00
Nikolay Volf
e6454eb091
Full block import benchmark ( #4865 )
...
* 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 >
2020-02-13 14:09:00 +03:00
Tomasz Drwięga
05b3e1f654
Run offchain workers at hash, not number. ( #4878 )
...
* Run offchain workers at particular hash, not number.
* Don't run if not new best.
* Don't run if not new best.
* Update client/service/src/builder.rs
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com >
* Update client/service/src/builder.rs
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com >
* Update client/service/src/builder.rs
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
2020-02-11 00:41:59 +01:00
Shawn Tabrizi
e5a7fcc8ea
Create Benchmarking Setup for Identity Pallet #4695 ( #4818 )
...
* Starting
* closer
* Compiles!
* comments
* Create seperate mock
* Remove changes to test env
* Fix step calculation
* Add host function
* Add runtime api
* compiles
* Update to use offchain timestamp
* Gives a result
* added some CLI wip
* make generic
* Update instance
* Remove CLI stuff
* Remove last cli stuff
* undo more changes
* Update benchmarks
* Update Cargo.lock
* remove test
* Move loop out of runtime
* Benchmarking externalities
* Benchmarking state
* Implemented commit
* Make CLI work, move loop back into runtime
* Wipe resets to genesis
* Speedup benchmarks
* Use enum to select extrinsic within pallet
* CLI controls which module and extrinsic to call
* Select a pallet with cli
* Add steps and repeats to cli
* Output as CSV format
* Introduce benchmark pallet
* Append bench
* Use Results
* fix merge
* Clear Identity benchmark
* Bench request judgment and cancel request
* Add final benchmarks
* Fix CSV output
* Start cleaning up for PR
* Bump numbers in `wasmtime` integration tests.
* More docs
* Add rockdb feature to bench
* Fix formatting issues
* Add test feature to bench
* Add test feature to bench
* Add rocksdb feature flag
* Update bench.rs
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com >
Co-authored-by: Gavin Wood <github@gavwood.com >
2020-02-10 10:23:08 +01:00
Nikolay Volf
147155359f
Alter usage collection a bit ( #4863 )
...
* alter usage collection a bit
* replace with mutex
2020-02-09 13:11:22 +01:00
Benjamin Kampmann
3f9a05a0d3
clarify licensing ( #4755 )
...
* adding license fields to all crates
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-01-29 11:57:13 +01:00
Nikolay Volf
ba1d446b48
add missing bits ( #4660 )
2020-01-17 17:22:00 +03:00
Stanislav Tkach
482ca522cc
Add typedefs for storage types ( #4654 )
...
* Add typedefs for storage types
* Fix after merge
2020-01-17 09:20:20 +01:00
Svyatoslav Nikolsky
febf29390a
Allow updating configuration of changes tries ( #3201 )
...
* DigestItem::ChangesTrieSignal
* introduce changes_trie::State
* introduce config activation block
* ChangesTrieSignal::as_new_configuration
* moved well_known_cache_keys to client
* extracted DbChangesTrieStorage to separate file
* change meaning of none in blockchain cache
* changes trie config (FULL) cache draft
* eliminating const ChangesTrieConfiguration
* delay pruning
* continue elimination
* do not prune CT config from cache
* removed redundant code
* fix some TODOs
* introduce ConfigurationRange
* use Configuration range in build
* build skewed digest
* remove debug print
* extracted surface iterator
* key_changes works with skewed digests
* fix client build
* add test for NeverPrune
* fix TODO
* fixed some TODOs
* more tests
* fixing TODOs
* fixed compilation
* update runtime version
* git rid of large tuple
* too long lines
* config_activation_block -> zero
* obsolete TODO
* removed unjustified expect
* update TODOs with issue number
* new CT pruning algorithm
fixed cache + multiple blocks finalization
track CT configuraiton on light clients
support CT configuration change revert
revert CT config test
new CT pruning algorithm
fixed cache + multiple blocks finalization
track CT configuraiton on light clients
support CT configuration change revert
revert CT config test
* BlockIdOrHeader isn't really required
* removed debug leftovers + some docs
* more docs
* more post-merge fixes
* more post-merge fixes
* revertes some unnecessary changes
* reverted unnecessary changes
* fix compilation + unnecessary changes
* (restart CI)
* fix cache update when finalizing multiple blocks
* fixed tests
* collect_extrinsics -> set_collect_extrinsics
* restore lost test
* do not calculate block number twice
* Update primitives/blockchain/src/error.rs
Co-Authored-By: cheme <emericchevalier.pro@gmail.com >
* map_err -> unwrap_or
* document get_at Result
* delete abandoned file
* added weight for set_changes_trie_config
* prefer_configs -> fail_if_disabled
* Update client/api/src/backend.rs
Co-Authored-By: cheme <emericchevalier.pro@gmail.com >
* Update client/db/src/changes_tries_storage.rs
Co-Authored-By: cheme <emericchevalier.pro@gmail.com >
* CommitOperation+merge -> CommitOperations
* fixed test compilation
* merged two different CTRange structs
* lost file
* uggrade db from v0 to v1 (init CT cache + add column)
* fix after merge
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Gavin Wood <github@gavwood.com >
2020-01-16 17:38:24 +01:00
Bastian Köcher
ee5e8050c3
Take genesis_storage by ref ( #4617 )
...
Instead of having these weird implementation of `BuildStorage for
&ChainSpec` we should just take the `genesis_storage` by ref. The
`BuildStorage` trait changed some time ago to take a self ref anyway,
instead of a self value.
Also fixes warnings in frame-staking
2020-01-14 11:18:56 +01:00
Nikolay Volf
426c157076
State-db I/o metrics ( #4562 )
...
* add usage mod to sp-state-machine
* State usage tracking finalized.
* fix spaces
* add license preamble
* imporove output
* review suggestions
* update naming
* merge fixes
* Update client/db/src/light.rs
Co-Authored-By: Gavin Wood <gavin@parity.io >
Co-authored-by: Gavin Wood <github@gavwood.com >
2020-01-13 09:10:39 +01:00
Nikolay Volf
e00ddc5614
avoid timer in light client ( #4602 )
2020-01-11 18:22:40 +01:00
Bastian Köcher
fd6b29dd2c
Remove requirement on Hash = H256, make Proposer return StorageChanges and Proof ( #3860 )
...
* Extend `Proposer` to optionally generate a proof of the proposal
* Something
* Refactor sr-api to not depend on client anymore
* Fix benches
* Apply suggestions from code review
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Apply suggestions from code review
* Introduce new `into_storage_changes` function
* Switch to runtime api for `execute_block` and don't require `H256`
anywhere in the code
* Put the `StorageChanges` into the `Proposal`
* Move the runtime api error to its own trait
* Adds `StorageTransactionCache` to the runtime api
This requires that we add `type NodeBlock = ` to the
`impl_runtime_apis!` macro to work around some bugs in rustc :(
* Remove `type NodeBlock` and switch to a "better" hack
* Start using the transaction cache from the runtime api
* Make it compile
* Move `InMemory` to its own file
* Make all tests work again
* Return block, storage_changes and proof from Blockbuilder::bake()
* Make sure that we use/set `storage_changes` when possible
* Add test
* Fix deadlock
* Remove accidentally added folders
* Introduce `RecordProof` as argument type to be more explicit
* Update client/src/client.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update primitives/state-machine/src/ext.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Integrates review feedback
* Remove `unsafe` usage
* Update client/block-builder/src/lib.rs
Co-Authored-By: Benjamin Kampmann <ben@gnunicorn.org >
* Update client/src/call_executor.rs
* Bump versions
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Benjamin Kampmann <ben.kampmann@googlemail.com >
2020-01-10 10:48:32 +01:00