David
92dc635f3c
Release sp-core 4.0.0 ( #10447 )
...
* Bump versions of sp-core and dependencies to v4.0.0
* Update references from `4.0.0-dev` –> `4.0.0`
* Funny whitespace
* Funny whitespace 2
2021-12-08 21:06:50 +01:00
Gavin Wood
4b34b041b8
Introduce CheckNonZeroSender ( #10413 )
...
* Introduce CheckNonZeroSender
* Missing file
* Formatting
* Fixes
* Formatting
* some fixes to compile
* Update frame/system/src/extensions/check_non_zero_sender.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Fixes
* Fixes
* another fix
* Formatting
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-12-08 11:28:03 +01:00
Gautam Dhameja
752e050cf4
Add child-bounties pallet. ( #10309 )
...
* Extract child-bounties as a separate pallet.
* Initial tests added.
* More tests.
* Tests complete. Fixed curator fee issue.
* Fixed comments.
* Added benchmarks for child-bounties pallet.
* Added weights.
* Fixed formatting.
* Fixed comments.
* Re-run benchmarks for bounties pallet.
* Make cargo fmt happy again
* add max encoded len
* use event structs
* fmt
* fix compile
* Addressed review comments.
* Use config type instead of const in benchmarking.
* Addressed more review comments.
* Use ensure_can_withdraw instead of just checking min balance.
* fmt.
* Introduce ChildBountyCuratorDepositBase to avoid zero curator deposits for child bounties.
* Fix unassign curator logic for child-bounties.
* Added more tests for unassign curator.
* Reduce bounty description max length in node runtime.
* Updated weights for child bounties pallet.
* reduce indentation of unassign_curator
* more indentation reduction
* deduplicate slashing arms
* reintroduce ensure check
* add assertion to check that bad unassign origin fails
* formatting
* Updated comments.
Co-authored-by: Ricardo Rius <ricardo@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2021-12-07 18:40:47 -04:00
Alexander Theißen
6863476603
contracts: Add storage deposits ( #10082 )
...
* Frame no longer needs to be mutable (refactoring artifact)
* Remove Contract/Tombstone deposit
* Add StorageMeter
* cargo fmt
* Fix weight annotation
* cargo run --quiet --release --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
* Simplify keep check for contract accounts
- Make sure that the "base deposit" for each contract >= ed
- Remove now obsolete checks when sneding away free balance
* Remove unused imports and functions
* Rename storage_limit to storage_deposit_limit
* cargo fmt
* Fix typo
Co-authored-by: Michael Müller <michi@parity.io >
* Finish up rename of storage_limit
* Fix rpc tests
* Make use of `StorageDepositLimitTooHigh`
* Add tests and fix bugs discovered by tests
* Add storage migration
* Don't use u128 in RPC
* Fix weight of migration
* Rename `endowment` to `value`
* Fix bug where contract couldn't get funded by a storage deposit
- Make sure that contract gets funded from deposits before value is transferred
- Don't reserve value at origin because otherwise funding isn't possible
- Just transfer free balance and reserve it after the transfer
- When refunding make sure that this refund can't dust the contract
- Can only happen after a runtime upgrade where costs where upped
- Add more tests
* Apply suggestions from code review
Co-authored-by: Andrew Jones <ascjones@gmail.com >
* Remove unused `fn storage_meter`
* Fix copy pasta doc error
* Import `MaxEncodeLen` from codec
* Beautify RPC trait bounds
* Add re-instrument behaviour to dispatchable doc
* Make sure a account won't be destroyed a refund after a slash
* Apply suggestions from code review
Co-authored-by: Andrew Jones <ascjones@gmail.com >
* Update `Storage::write` docs
* Improve doc
* Remove superflous conditional
* Typos
* Remove superflous clone (refactoring artifact)
* Apply suggestions from code review
Co-authored-by: Andrew Jones <ascjones@gmail.com >
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Michael Müller <michi@parity.io >
Co-authored-by: Andrew Jones <ascjones@gmail.com >
2021-12-07 12:19:30 +00:00
Alex Pozhylenkov
1d19c7dc7f
Move EnsureOneOf into the dispatch.rs, make an interface more general ( #10379 )
...
* move EnsureOneOf into the dispatch.rs, make an interface more general
* Update frame/support/src/traits/dispatch.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-12-01 21:31:57 +00:00
Guillaume Thiolliere
db28ba9dfd
Fix order of hook execution ( #10043 )
...
* fix order
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* format
* more accurate description
* format
* better explicit types
* fix tests
* address feedback
* add a type to ease non breaking implementation
* add comment about constraint
* fix test
* add test for generated types
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2021-12-01 00:59:09 +00:00
Enoch Chejieh
d58aeb040a
Add pallet names to Events ( #10296 )
...
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: add pallet names to events
* chore: formatted pallet name changes in events
* chore: formatted pallet name changes in events
* chore: formatted pallet name changes in events
* chore: formatted pallet name changes in events
* chore: formatted pallet name changes in events
* chore: formatted pallet name changes in events
* chore: formatted pallet name changes in events
* chore: formatted pallet name changes in events
* chore: formatted pallet name changes in events
* fix: add fix to tests for event variants
* chore: modified comments for event variants
* chore: modified comments for event variants
* chore: modified comments for event variants
* chore: modified comments for event variants
* chore: modified system pallet event variants
* chore: modified system pallet event variants
* chore: modified system pallet event variants
* chore: modified system pallet event variants
* chore: modified system pallet event variants
* chore: modified system pallet event variants
* chore: modified system pallet event variants
* chore: modified system pallet event variants
* chore: modified system pallet event variants
* chore: updated transaction-storage pallet event variants
* chore: updated transaction-storage pallet event variants
* chore: formatted contracts pallet
* chore: update treasury event variants
2021-11-30 21:03:06 +01:00
zjb0807
b5ed64684d
Add runtime-benchmarks for frame-benchmarking ( #10324 )
...
* update frame/benchmarking/src/baseline.rs
* add runtime-benchmarks feature
* add runtime-benchmarks for frame-benchmarking
* update frame-benchmarking/runtime-benchmarks
* trigger GitHub actions
2021-11-30 14:15:52 +01:00
Kian Paimani
2fafb9546e
Reduce the execution time of some tests ( #10377 )
...
* Reduce the execution time of some tests
* Fix
* Fix build
* fmt
2021-11-28 12:47:33 +00:00
Bastian Köcher
d94027edb4
Enable wasmtime for aarch64 as well ( #10367 )
2021-11-24 20:46:28 +01:00
Xavier Lau
f9122a870e
Support MMR Pruning ( #9700 )
...
* Use `0.3.2`
* Replace `u64` with `NodeIndex`
* Fix Typo
* Add Pruning Logic
* Fix Some Tests
* Remove Comment
* Log Only Under STD
* Return while No Element to Append
* Optimize Pruning Algorithm
* Update Doc
* Update Doc
* Zero Copy Algorithm
* Import Missing Type
* Fix Merge Mistake
* Import Missing Item
* Make `verify` Off-Chain
* `cargo fmt`
* Avoid using NodeIndex in incorrect places.
* Simplify pruning.
* Format
Co-authored-by: Tomasz Drwięga <tomasz@parity.io >
2021-11-23 13:04:05 +00:00
dependabot[bot]
a085e2f213
Bump serde_json from 1.0.68 to 1.0.71 ( #10321 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.68 to 1.0.71.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.68...v1.0.71 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-22 12:57:50 +00:00
dependabot[bot]
7f4b954274
Bump platforms from 1.1.0 to 2.0.0 ( #10331 )
...
Bumps [platforms](https://github.com/rustsec/rustsec ) from 1.1.0 to 2.0.0.
- [Release notes](https://github.com/rustsec/rustsec/releases )
- [Commits](https://github.com/rustsec/rustsec/commits/platforms/v2.0.0 )
---
updated-dependencies:
- dependency-name: platforms
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-22 11:12:59 +00:00
dependabot[bot]
16f6a3b74d
Bump derive_more from 0.99.11 to 0.99.16 ( #10282 )
...
Bumps [derive_more](https://github.com/JelteF/derive_more ) from 0.99.11 to 0.99.16.
- [Release notes](https://github.com/JelteF/derive_more/releases )
- [Changelog](https://github.com/JelteF/derive_more/blob/master/CHANGELOG.md )
- [Commits](https://github.com/JelteF/derive_more/compare/v0.99.11...v0.99.16 )
---
updated-dependencies:
- dependency-name: derive_more
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-20 23:08:49 +00:00
Georges
439af98e55
Moving pallet-asset-tx-payment from cumulus to substrate ( #10127 )
...
* Moving `pallet-asset-tx-payment` from cumulus
* move pallet-asset-tx-payment into transaction payment directory
* cargo +nightly fmt
* Adding `pallet-asset-tx-payment` to node runtime
I had to change the Balance type to u128.
Also harmonised that pallet's version
* Updating cargo.lock after merge
* forgot this
* Adding tx-payment signature
* Missed one more
* `transaction-payment` replaced in`SignedExtension`
by `asset-tx-payment` and not added
* Fixing benches
* add test to verify that we don't charge on post-dispatch if we didn't on pre-dispatch
* add (failing) test for asset tx payment of unsigned extrinsics
* fix test by removing debug_assert
* cargo +nightly fmt
* typo in `Cargo.lock`
* Object defined twice in lock file
* cargo update
* remove todo
* Apply formatting suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Refactoring `post_dispatch` of `asset-tx-payment`
to reuse `post_dispatch` of `transaction-payment` if the fee asset is
native
Removing unneeded imports.
* Removing redundant `TODO`
* Reverting an accidental bump of `impl-serde`
from `0.3.1` to `0.3.2`
* Revert unneeded changes to `cargo.lock`
* Update frame/transaction-payment/asset-tx-payment/src/payment.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Fixing cargo fmt
Reverting changes which broke cargo fmt
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2021-11-19 09:29:12 +00:00
Alexander Theißen
363dbbe8da
Forward wasmer-sandbox feature to sp-sandbox ( #10268 )
2021-11-16 06:52:27 +00:00
David Salami
120894fdb7
Add field names to pallet Event variants ( #9993 )
...
* convert pallet-assets events to struct types
* updated events of a couple pallets
* updated pallet event field names
* update pallet event field names
* updated events in test files
* cargo fmt
* minorfixes
* fix assertion error
* minor fix
* formatting fix
* fmt
2021-11-16 01:56:00 +00:00
dependabot[bot]
4a4284a08b
Bump tokio from 1.12.0 to 1.13.0 ( #10265 )
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.12.0...tokio-1.13.0 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-15 19:39:11 +00:00
dependabot[bot]
e57dd4845e
Bump nix from 0.19.1 to 0.23.0 ( #10254 )
...
Bumps [nix](https://github.com/nix-rust/nix ) from 0.19.1 to 0.23.0.
- [Release notes](https://github.com/nix-rust/nix/releases )
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nix-rust/nix/compare/v0.19.1...v0.23.0 )
---
updated-dependencies:
- dependency-name: nix
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-13 19:56:41 +01:00
dependabot[bot]
bae12f41b8
Bump structopt from 0.3.23 to 0.3.25 ( #10253 )
...
* Bump structopt from 0.3.23 to 0.3.25
Bumps [structopt](https://github.com/TeXitoi/structopt ) from 0.3.23 to 0.3.25.
- [Release notes](https://github.com/TeXitoi/structopt/releases )
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.23...v0.3.25 )
---
updated-dependencies:
- dependency-name: structopt
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* cargo fmt
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2021-11-13 02:35:07 +00:00
dependabot[bot]
423cde8ad0
Bump hex-literal from 0.3.3 to 0.3.4 ( #10246 )
...
Bumps [hex-literal](https://github.com/RustCrypto/utils ) from 0.3.3 to 0.3.4.
- [Release notes](https://github.com/RustCrypto/utils/releases )
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.3.3...hex-literal-v0.3.4 )
---
updated-dependencies:
- dependency-name: hex-literal
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-13 00:32:44 +00:00
Arkadiy Paronyan
4cbbf0cf43
Kill the light client, CHTs and change tries. ( #10080 )
...
* Remove light client, change tries and CHTs
* Update tests
* fmt
* Restore changes_root
* Fixed benches
* Cargo fmt
* fmt
* fmt
2021-11-12 14:15:01 +01:00
Doordashcon
112b7dac47
tuple to struct event variants ( #10206 )
...
* update sudo pallet
* Update mock.rs
* cargo +nightly fmt
* frame-support remote-externalities
* AFNPEV tips
* AFNPEV bin & update sudo
* cargo +nightly fmt
* optional dependency remote-test feature
* fmt
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-11-11 23:48:37 +00:00
sandreim
fdb3c64243
Add group name in task metrics ( #10196 )
...
* SpawnNamed: add new trait methods
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* Implement new methods
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* cargo fmt
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* SpawnNamed: add new trait methods
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* Implement new methods
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* cargo fmt
Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com >
* New approach - spaw() group param
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Update traits: SpawnNamed and SpawnNamed
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Update TaskManager tests
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Update test TaskExecutor
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Fix typo
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* grunt work: fix spawn() calls
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* cargo fmt
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* remove old code
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* cargo fmt - the right version
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
* Implement review feedback
- use Option group name in SpawnNamed methods
- switch to kebab case
- implement default group name
- add group name to some tasks
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io >
2021-11-11 17:15:09 +00:00
dependabot[bot]
d9d4a59dc2
Bump parity-util-mem from 0.10.0 to 0.10.2 ( #10236 )
...
Bumps [parity-util-mem](https://github.com/paritytech/parity-common ) from 0.10.0 to 0.10.2.
- [Release notes](https://github.com/paritytech/parity-common/releases )
- [Commits](https://github.com/paritytech/parity-common/compare/parity-util-mem-v0.10.0...parity-util-mem-v0.10.2 )
---
updated-dependencies:
- dependency-name: parity-util-mem
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-11 12:02:39 -03:00
David
eeb80f9e0b
Upgrade jsonrpsee to v0.4.1 ( #10022 )
...
* Upgrade jsonrpsee to v0.4.1
* remove needless BlockT trait bound
* use default wss port in URL
* Fix try_runtime build
* Partially fix for "remote-tests" feature
* Review feedback
* fmt
* Sort out trait bounds for benches
* Fmt
* fmt again?
* fmt with nightly-2021-09-13
* Upgrade try-runtime as well
* fmt
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2021-11-11 11:29:28 +00:00
sander2
bb6aecee7a
expose substrate-cli service ( #10229 )
...
* expose substrate-cli service
* chore: undo change to new_full (since new_full_base is exposed already)
2021-11-11 08:23:34 +00:00
Kian Paimani
60a50dabed
use CountedMap in pallet-bags-list ( #10179 )
...
* use CountedMap in pallet-bags-list
* Fix build
* Update frame/bags-list/src/list/mod.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* add a check as well
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2021-11-10 09:33:14 +00:00
Koute
59078fcf94
Add a block production benchmark ( #10104 )
...
* Add a block production benchmark
* Simplify the block production benchmark
* Cleanups; switch execution strategy to WASM
* Switch WASM execution to `Compiled`
* Reduce the setup cost of the benchmark
Creating all of those extrinsics takes up *a lot* of time, up to the point
where the majority of the time is actually spent *outside* of the code
which we want to benchmark here. So let's only do it once.
* Add a variant of the block production benchmark with proof recording
2021-11-09 13:38:31 +00:00
David
3c624174ff
Remove the RPC client example ( #10217 )
...
* Remove the RPC client example
Might be slightly contentious but I think we want to migrate this example to `subxt` and redirect the community to use that for things like this.
* Remove rpc-client example code from workspace
2021-11-08 21:06:53 +00:00
Bastian Köcher
b08d3017a8
Switch to Rust 2021 ( #10170 )
...
* Switch to Rust 2021
* Update trybuild to fix errors
2021-11-04 19:54:48 +01:00
Xiliang Chen
58a3ab2813
implement dispatch_as ( #9934 )
...
* implement dispatch_as
* fix
* fix
* weight for dispatch_as
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fix
* Update frame/utility/src/benchmarking.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* fix issues
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-11-04 15:34:29 +01:00
Guillaume Thiolliere
4292e18e50
Automatic pallet parts in construct_runtime ( #9681 )
...
* implement automatic parts
* ui tests
* rename
* remove unnecessary exclude
* better doc
* better doc
* fix genesis config
* fix UI tests
* fix UI test
* Revert "fix UI test"
This reverts commit a910351c0b24cfe42195cfd97d83a416640e3259.
* implemented used_parts
* Update frame/support/procedural/src/construct_runtime/mod.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* doc + fmt
* Update frame/support/procedural/src/construct_runtime/parse.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* add doc in the macro
* remove yet some more parts
* fix ui test
* more determnistic error message + fix ui tests
* fix ui test
* Apply suggestions from code review
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* do refactor + fix ui tests
* fmt
* fix test
* fix test
* fix ui test
* Apply suggestions from code review
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* refactor
* remove even more part in node-runtime
* fix test
* Add flow chart for the construct_runtime! execution flow
* Fix typo
* Ignore snippets that don't contain code
* Refactor some code in expand_after
* Rename expand_after to match_and_insert
* cargo fmt
* Fix rename
* Remove frame_support argument to construct_runtime_parts
* Make use of tt-call to simplify intermediate expansions
* cargo fmt
* Update match_and_insert documentation
* Reset cursor to 0 when no matching patterns are found
* Reorder struct fields on MatchAndInsertDef
* Add test for dependency renames and fix frame-support import
* Add more doc comments
* Update frame/support/test/compile_pass/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-10-31 13:55:10 +00:00
Shawn Tabrizi
2d556c4429
Add Baseline FRAME Benchmarks ( #9691 )
...
* create and add baseline
* fix import
* try a different name
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* increase repeats
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Update baseline.rs
* Update baseline.rs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* improve hash benchmark
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=frame_benchmarking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/benchmarking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Co-authored-by: Parity Bot <admin@parity.io >
2021-10-30 13:02:09 +00:00
Squirrel
744bc44de2
Removal of light client from substrate ( #9684 )
...
* Removal of light client from substrate
* add missing import
* These tests relate to there being light and non light clients.
* removing lightnodes from test
* cargo fmt
* not needed
* LightDataChecker not needed any longer
* cargo fmt
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* cargo fmt
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-30 12:38:27 +00:00
Bastian Köcher
95b8fd61c3
pallet-scheduler: Introduce OriginPrivilegeCmp ( #10078 )
...
* pallet-scheduler: Introduce `OriginPrivilegeCmp`
When a scheduled task should be canceled, the origin that tries to
cancel the task is compared to the origin the task should be executed
with. Before this pr this check only allowed that both origins are
equal. However, this is problematic as this means that for example a
council origin it needs to be have the same amount of yes votes to
cancel the scheduled task. While a council origin with more yes votes
should be able to cancel this task. This happened recently on Kusama and
lead to a failed cancelation of a scheduled task. With this pr the two
origins are compared and the cancelling origin needs to have greater or
equal privileges as the origin that scheduled the task. What a greater,
equal or less privilege is, can be configured in the runtime.
For simplicity, a `EqualPrivilegeOnly` implementation is provided that
only checks if two origins are equal. So, this mimics the old behaviour.
* FMT
* fix import
* Small optimizations
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-10-29 16:00:49 +00:00
Kian Paimani
e4f9213871
make the ws buffer size configurable ( #10013 )
...
* make the ws buffer size configurable
* Update client/cli/src/commands/run_cmd.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update client/cli/src/commands/run_cmd.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update client/cli/src/commands/run_cmd.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Final touches
* Apply suggestions from code review
* fix bench
* remove in buffer
* Apply suggestions from code review
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-14 11:44:07 +00:00
Dan Shields
8db7ec9cc9
Migrate to docs.substrate.io throughout ( #10007 )
...
* all reverences of substrate.dev replaced with *correct* docs.substrate.io links
* fix links in non-cargo files, errors in replace
* homepage https://substrate.io
* cargo +nightly fmt
* FMT
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-10-13 12:56:56 -06:00
Alexander Popiak
32900294ba
Add Deposit and Withdraw Events to Balances Pallet ( #9425 )
...
* add Deposit and Withdraw events to balances
+ add deposit_event() calls where appropriate to signal fund movement
+ adjust and extend tests
* line length
* move events to the end to avoid changing indices
* bump spec_version
* cargo fmt
* adjust block import bench to new event count
* fix node executor tests
* adjust import bench comment
* fix typo and formatting
* adjust event number
* fix copy pasta
* fix contracts pallets tests
* cargo fmt
* WIP fix events in tests
* fix offences tests
* fix tests
* cargo +nightly fmt
* fix contracts pallets tests
* cargo +nightly fmt
* fix offences tests
* formatting and compile fixes
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-10-11 14:23:10 +00:00
dependabot[bot]
ee7b4f06d7
Bump hex-literal from 0.3.1 to 0.3.3 ( #9974 )
...
Bumps [hex-literal](https://github.com/RustCrypto/utils ) from 0.3.1 to 0.3.3.
- [Release notes](https://github.com/RustCrypto/utils/releases )
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.3.1...hex-literal-v0.3.3 )
---
updated-dependencies:
- dependency-name: hex-literal
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-09 14:23:57 +00:00
Bastian Köcher
f4b287c7c4
Disable log reloading by default ( #9966 )
...
* Disable log reloading by default
This disables the log reloading that was enabled by default. The problem
is that the log reload implementation of `tracing` is using a lock to
make the layer replaceable. This lock needs to be locked every time we
need to check if a particular target is enabled (assuming the log level
is high enough). This kills the performance when for example
`sometarget=trace` logging is enabled.
* 🤦
* Remove unused parameter
* Fix test
* Fix
2021-10-08 11:46:08 +00:00
dependabot[bot]
36d25d4994
Bump assert_cmd from 2.0.1 to 2.0.2 ( #9972 )
...
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd ) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases )
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md )
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v2.0.1...v2.0.2 )
---
updated-dependencies:
- dependency-name: assert_cmd
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-08 11:18:05 +00:00
dependabot[bot]
5edb6fc224
Bump jsonrpsee-ws-client from 0.3.0 to 0.3.1 ( #9963 )
...
Bumps [jsonrpsee-ws-client](https://github.com/paritytech/jsonrpsee ) from 0.3.0 to 0.3.1.
- [Release notes](https://github.com/paritytech/jsonrpsee/releases )
- [Changelog](https://github.com/paritytech/jsonrpsee/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/jsonrpsee/compare/v0.3.0...v0.3.1 )
---
updated-dependencies:
- dependency-name: jsonrpsee-ws-client
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-08 09:01:04 +00:00
Bastian Köcher
451413f47e
Transaction pool: Adds benchmark and improves performance ( #9958 )
...
* Yep
* Make it compile
* Make the benchmark work
* Some stuff
* Optimize transaction pool `BestIterator`
* Some docs
* Fix more warnings
* Fix compilation
* FMT
2021-10-08 10:02:25 +02:00
Arkadiy Paronyan
e6ff531d0b
Warp sync part II ( #9284 )
...
* Gap sync
* Gap epoch test
* Simplified network requests
* Update client/db/src/utils.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
* Fixed v1 migration and added some comments
* Next epoch is always regular
* Removed fork tree change
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Added a comment and converted assert to error
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-07 09:31:39 +00:00
Squirrel
07761c22f7
remove dep on unmaintained difference crate ( #9946 )
2021-10-06 18:56:37 +02:00
André Silva
7e5c022aea
staking: only disable slashed validators and keep them disabled for whole era ( #9448 )
...
* session: remove disabled validators threshold logic
* staking: add logic to track offending validators
* staking: disable validators for the whole era
* frame: fix tests
* staking: add tests for disabling validators handling
* staking: fix adding offending validator when already slashed in era
* address review comments
* session, staking: add comments about sorted vecs
Co-authored-by: Andronik Ordian <write@reusable.software >
2021-10-06 16:22:34 +00:00
Shawn Tabrizi
2272a0ed25
Remove incorrect sanity check ( #9924 )
...
* causes issue
* remove the bad error check
2021-10-04 22:19:21 +00:00
Tomasz Drwięga
374fb6a921
Rework Transaction Priority calculation ( #9834 )
...
* Add transaction validity docs.
* Re-work priority calculation.
* Fix tests.
* Update frame/transaction-payment/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* cargo +nightly fmt --all
* Fix an obvious mistake :)
* Re-work again.
* Fix test.
* cargo +nightly fmt --all
* Make VirtualTip dependent on the transaction size.
* cargo +nightly fmt --all
* Update frame/transaction-payment/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Fix compilation.
* Update bin/node/runtime/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-04 14:25:18 +00:00
Tomasz Drwięga
085935dd0a
Quickly skip invalid transactions during block authorship. ( #9789 )
...
* Support skipping invalid transactions in the iterator.
* Expose concrete iterator.
* cargo +nightly fmt --all
* More consistent placement.
* Update Cargo.lock
* Pass transaction to 'report_invalid'
2021-10-01 14:25:13 +00:00