Bastian Köcher
7b56ab15b4
Run cargo fmt on the whole code base ( #9394 )
...
* Run cargo fmt on the whole code base
* Second run
* Add CI check
* Fix compilation
* More unnecessary braces
* Handle weights
* Use --all
* Use correct attributes...
* Fix UI tests
* AHHHHHHHHH
* 🤦
* Docs
* Fix compilation
* 🤷
* Please stop
* 🤦 x 2
* More
* make rustfmt.toml consistent with polkadot
Co-authored-by: André Silva <andrerfosilva@gmail.com >
2021-07-21 14:32:32 +00:00
Shawn Tabrizi
b42b8fc5fb
Include StorageInfo in Benchmarking Pipeline ( #9090 )
...
* extend storageinfo
* extend_storage_info
* use vec
* add storage info to pipeline
* get read and written keys
* undo storageinfo move
* refactor keytracker
* return read / write count
* playing with key matching
* add basic `StorageInfo` constructor
* add whitelisted to returned info
* fix some test stuff
* pipe comments into benchmark data
* add_storage_comments
* add comments to template
* track only storage prefix
* Update frame/benchmarking/src/lib.rs
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fix test
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* remove test logs
* add temp benchmark script
* Apply suggestions from code review
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* remove keytracker and use trackedstoragekey
* add comment for unknown keys
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_timestamp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/timestamp/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* remove duplicate comments with unknown keys
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_timestamp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/timestamp/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* refactor bench tracker, and fix results
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fix child tries in new tracker
* extra newline
* fix unused warning
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_timestamp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/timestamp/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fix master merge
* storage info usage refactor
* remove now unused
* fix refactor
* use a vec for prefix
* fix tests
* also update writer to use vec
* disable read and written keys for now
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/system/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Update frame/system/src/weights.rs
* fix test
* Delete weights.rs
* reset weights
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-07-07 22:06:06 +00:00
cheme
693b39f43b
Frame remove_all with size limit. ( #9106 )
...
* remove prefixed content with limit.
* test match
* factor comment and factor ext limit removal.
* fix benchmark
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-06-15 13:23:58 +00:00
Shawn Tabrizi
d25229bc89
Return number of keys removed when calling storage_kill on child trie ( #8166 )
...
* Initial piping of returning amount of keys killed
* One more test for `None` limit
* forgot to update
* fix return value
* use version 3
* Update to return `KillOutcome`
* Update name to KillChildStorageResult
2021-02-22 19:24:12 +00:00
Bastian Köcher
e3e651f72c
Happy new year ( #7814 )
...
* Happy new year
Updates the copyright years and fixes wrong license headers.
* Fix the template
* Split HEADER into HEADER-APACHE & HEADER-GPL
2021-01-04 09:03:13 +00:00
Alexander Theißen
ec2c70396e
Define ss58 prefix inside the runtime ( #7810 )
...
* Add SS58Prefix type to the frame_system config trait
* Remove unused chain_id runtime interface
2020-12-30 22:07:37 +00:00
Alexander Theißen
9ce24fe1f4
Allow capping the amount of work performed when deleting a child trie ( #7671 )
...
* Allow Backend::for_keys_in_child_storage to be aborted by the closure
* Ext::kill_child_storage now takes an upper limit for backend deletion
* Add Storage::storage_kill_limited() runtime interface
* review: Use a new version of kill_storage instead of a new interface
* review: Simplify boolean expression
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
* review: Rename for_keys_in_child_storage
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
2020-12-09 01:17:28 +00:00
Nikolay Volf
a062bc2f1d
Runtime worker threads ( #7089 )
...
* std variant
* principal work
* format and naming
* format and naming continued
* working nested fork
* add comment
* naming and tabs
* line width
* fix wording
* address review
* refactor dynamic dispatch
* update wasmtime
* some care
* move ext
* more refactor
* doc effort
* simplify
* doc effort
* tests and docs
* address review
* naming
* explain some args
* add example
* unwinding for native and tests
* rename stray
* fix refs
* fix tests
* fix warnings
* stray naming
* fixes and comments
* Update primitives/io/src/tasks.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
* make examples "compile"
* dyn_dispatch -> spawn_call
* fix impl
* address review
* Update primitives/io/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update primitives/io/src/tasks.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update primitives/io/src/async_externalities.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update primitives/io/src/tasks.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/example-parallel/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* fix compilation
* Update client/executor/common/src/wasm_runtime.rs
Co-authored-by: Sergei Shulepov <sergei@parity.io >
* address review
* Update client/executor/wasmtime/src/instance_wrapper.rs
Co-authored-by: Sergei Shulepov <sergei@parity.io >
* Update client/executor/src/native_executor.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update primitives/io/src/tasks.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/executor/src/native_executor.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update primitives/io/src/tasks.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/executor/wasmtime/src/instance_wrapper.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* address some issues
* address more issues
* wasm_only interface
* define sp_tasks
* avoid anyhow
* fix example
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Sergei Shulepov <sergei@parity.io >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-10-20 12:41:51 +00:00