Keith Yeung
6ce4d45175
Remove Ord impl for Weights V2 and add comparison fns ( #12183 )
...
* Remove Ord impl for Weights V2 and add comparison fns
* Remove TODO
* Update frame/multisig/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/election-provider-multi-phase/src/unsigned.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove unused import
* cargo fmt
* Fix tests
* Fix more tests
* cargo fmt
* Fix more tests
* Update frame/contracts/src/wasm/mod.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* Update weight benchmarking templates
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
2022-09-08 04:22:41 +00:00
Squirrel
2b80555902
drive by spelling fixes ( #12175 )
2022-09-05 16:04:14 +02:00
Shawn Tabrizi
23a81ee1e3
Remove RefTimeWeight ( #12157 )
...
* update api
* update
* remove unused
* remove `one` api
* fix unused
* fmt
* add saturating accrue
* remove `Weight::new()`
* use some macros
* div makes no sense
* Update weight_v2.rs
* missed some
* more patch
* fixes
* more fixes
* more fix
* more fix
* remove RefTimeWeight
* Update frame/contracts/src/storage.rs
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
* not needed
* Fixes
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-09-02 18:19:49 +00:00
Oliver Tale-Yazdi
2ff56f8bc8
Add StorageNoopGuard ( #12163 )
...
* Add StorageNoopGuard
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix import
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix feature gate
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix feature gate
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use sp-std
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-09-01 21:39:30 +00:00
Shawn Tabrizi
1df4561676
Weight v1.5 Follow Ups ( #12155 )
...
* update api
* update
* remove unused
* remove `one` api
* fix unused
* fmt
* add saturating accrue
* remove `Weight::new()`
* use some macros
* div makes no sense
* Update weight_v2.rs
* missed some
* more patch
* fixes
* more fixes
* more fix
* more fix
* Update frame/support/src/weights/weight_v2.rs
* not needed
* fix weight file
2022-09-01 17:48:03 +00:00
Kian Paimani
f67c06ce22
Runtime State Test + Integration with try-runtime ( #10174 )
...
* add missing version to dependencies
* Huh
* add features more
* more fixing
* last touches
* it all finally works
* remove some feature gates
* remove unused
* fix old macro
* make it work again
* fmt
* remove unused import
* ".git/.scripts/fmt.sh" 1
* Cleanup more
* fix and rename everything
* a few clippy fixes
* Add try-runtime feature
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* small fixes
* fmt
* Update bin/node-template/runtime/src/lib.rs
* fix build
* Update utils/frame/try-runtime/cli/src/lib.rs
Co-authored-by: David <dvdplm@gmail.com >
* Update utils/frame/try-runtime/cli/src/commands/execute_block.rs
Co-authored-by: David <dvdplm@gmail.com >
* address all review comments
* fix typos
* revert spec change
* last touches
* update docs
* fmt
* remove some debug_assertions
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: command-bot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: David <dvdplm@gmail.com >
2022-09-01 10:33:22 +00:00
Shawn Tabrizi
30951822ba
Weight v1.5: Opaque Struct ( #12138 )
...
* initial idea
* update frame_support
* update a bunch more
* add ord
* adjust RuntimeDbWeight
* frame_system builds
* re-export
* frame_support tests pass
* frame_executive compile
* frame_executive builds
* frame_system tests passing
* pallet-utility tests pass
* fix a bunch of pallets
* more
* phragmen
* state-trie-migration
* scheduler and referenda
* pallet-election-provider-multi-phase
* aura
* staking
* more
* babe
* balances
* bunch more
* sudo
* transaction-payment
* asset-tx-payment
* last pallets
* fix alliance merge
* fix node template runtime
* fix pallet-contracts cc @athei
* fix node runtime
* fix compile on runtime-benchmarks feature
* comment
* fix frame-support-test
* fix more tests
* weight regex
* frame system works
* fix a bunch
* more
* more
* more
* more
* more
* more fixes
* update templates
* fix contracts benchmarks
* Update lib.rs
* Update lib.rs
* fix ui
* make scalar saturating mul const
* more const functions
* scalar div
* refactor using constant functions
* move impl
* fix overhead template
* use compactas
* Update lib.rs
2022-08-31 11:26:13 +00:00
Keith Yeung
edc8f7b409
Implement ResultQuery ( #11257 )
...
* Implement ResultQuery
* Fix test expectations
* Add more tests
* Fix test expectations
* Clean up some names
* Silence warnings
* Specify error type when supplying error type to ResultQuery
* cargo fmt
* Add support for type parameters in parameter_types macro
* Reduce deeply indented code
* Fixes
* Update test expectation
* Rewrite and document formula for calculating max storage size
* More docs
* cargo fmt
* formatting
Co-authored-by: parity-processbot <>
2022-08-24 17:47:08 +00:00
Kian Paimani
2d988e5f60
Proposal: Flatten AllPallets and similar types ( #11813 )
...
* flratten AllPallets types
* feature flag it
* fix
* fix
* fmt
* remove todo
* Update frame/support/src/traits/metadata.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/support/src/migrations.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* fix
* mark as deprecated
* add docs
* fix ui test?
* fmt
Co-authored-by: parity-processbot <>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-08-14 19:06:02 +00:00
Shawn Tabrizi
6b0203c8c4
Further Improve Gov V2 Stuff ( #12028 )
...
* refactor and improve successful origin
* use appropriate origin for creating referendum
* fmt
* add setup tally feature for benchmarks
* feedback updates
* fmt
* Update frame/referenda/src/benchmarking.rs
Co-authored-by: Gavin Wood <gavin@parity.io >
* feedback on `setup` trait
* fix
Co-authored-by: Gavin Wood <gavin@parity.io >
2022-08-14 18:36:19 +00:00
Bastian Köcher
a558442416
Use correct length for Pallet and Storage prefix when calculating KeyLenOf ( #11994 )
...
* Use correct length for Pallet and Storage prefix when calculating `KeyLenOf`
* Add tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-08-11 16:53:40 +02:00
Shawn Tabrizi
a6c95cbb13
add decode with depth limit to opaque types ( #11947 )
...
Co-authored-by: parity-processbot <>
2022-08-11 14:39:56 +00:00
Bastian Köcher
aa5f68a827
transactional: Wrap pallet::calls directly in storage layers ( #11927 )
...
* transactional: Wrap `pallet::calls` directly in storage layers
Before this pr we only wrapped `pallet::calls` into storage layers when executing the calls with
`dispatch`. This pr is solving that by wrapping each call function inside a storage layer.
* Teach `BasicExternalities` transactions support
* Fix crates
* FMT
* Fix benchmarking tests
* Use correct span
* Support old decl macros
* Fix test
* Apply suggestions from code review
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/state-trie-migration/src/lib.rs
* Update frame/state-trie-migration/src/lib.rs
* Update frame/state-trie-migration/src/lib.rs
* Feedback
* Apply suggestions from code review
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
2022-08-10 22:27:01 +02:00
Shawn Tabrizi
043b1697c7
Use #[pallet::unbounded] tag in FRAME System ( #11946 )
...
* use unbounded in system
* update ui tests
2022-08-10 13:58:52 +00:00
Sacha Lansky
df07421904
Fix docs urls ( #11966 )
...
* Fix docs urls
* Update bin/node-template/README.md
* Update frame/aura/src/lib.rs
* Run cargo +nightly fmt
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-08-03 13:34:33 +02:00
Keith Yeung
d318a13b31
Add and implement MaxEncodedLen to token traits ( #11945 )
...
* Add and implement MaxEncodedLen bounds to token traits
* cargo fmt
* Update UI test expectations
2022-08-01 14:24:22 +00:00
Koute
c4b607d4c9
Prevent double allocation of the payload when calling sp_io::storage::get ( #11523 )
...
* Expose allocation stats in `FreeingBumpHeapAllocator`
* Return allocation stats when calling into the runtime
* Bump `parity-scale-codec` to 3.1.3 (fork)
* Prevent double allocation of the payload when calling `sp_io::storage::get`
* Fix tests
* Remove unnecessary `mut`
* Enable the `bytes` feature for `parity-scale-codec` in `sp-runtime-interface`
* Update client/allocator/src/freeing_bump.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Bump `parity-scale-codec` to 3.1.3
* Fix some of the UI tests
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-07-29 07:46:15 +00:00
Shawn Tabrizi
72522429a7
Make New Storage Layer Truly Default ( #11918 )
...
* with storage layer truly default
* fmt
Co-authored-by: parity-processbot <>
2022-07-26 17:49:11 +00:00
Kian Paimani
626140454d
remove FunctionOf ( #11897 )
...
* remove FunctionOf
* fix docs
Co-authored-by: parity-processbot <>
2022-07-25 15:20:19 +00:00
Branislav Kontur
b3bd5cee54
Fix for 'note_applied_extrinsic' - consider also 'extract_actual_pays_fee' ( #11849 )
2022-07-23 18:01:57 +00:00
lumir-mrkva
4c0b765980
assert noop notifies that storage has been mutated ( #11805 )
2022-07-17 19:28:32 +00:00
Bastian Köcher
acc8cf6e4c
WrapperOpaque: Use decode_all to decode from the Vec<u8> ( #11726 )
...
This ensures that there isn't any extra data attached that isn't used.
2022-06-22 11:02:59 +02:00
Ikko Ashimine
4285ad916d
Fix typo in weights.rs ( #11724 )
...
overriden -> overridden
2022-06-21 19:12:57 +00:00
Gavin Wood
c47431118b
MEL: Origin, Referenda, ConvictionVoting ( #11631 )
...
* Referenda & CV pallets ready
* Fix build
* Add mel_bound for Voting and Casting types
* Add mel_bound on Tally
* Add mel_bound on another Tally
* Add mel_bound for pallet_collective::RawOrigin
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-06-16 16:13:17 +00:00
Kian Paimani
ad1d171601
Allow nomination pools to chill + fix dismantle scenario ( #11426 )
...
* make pool roles optional
* undo lock file changes?
* add migration
* add the ability for pools to chill themselves
* boilerplate of tests
* somewhat stable, but I think I found another bug as well
* Fix it all
* Add more more sophisticated test + capture one more bug.
* Update frame/staking/src/lib.rs
* reduce the diff a little bit
* add some test for the slashing bug
* cleanup
* fix lock file?
* Fix
* fmt
* Update frame/nomination-pools/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/nomination-pools/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/nomination-pools/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/nomination-pools/src/mock.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix build
* fix some fishy tests..
* add one last integrity check for MinCreateBond
* remove bad assertion -- needs to be dealt with later
* nits
* fix tests and add benchmarks for chill
* remove stuff
* fix benchmarks
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* remove defensive
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Parity Bot <admin@parity.io >
2022-06-13 21:07:36 +00:00
Keith Yeung
2d6b0ecc21
Move bounded type definitions to sp-runtime ( #11645 )
...
* Move bounded type definitions to sp-runtime
* cargo fmt
* Fix compile error
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Move TryCollect to sp-runtime
* Write some docs
* Import missing types
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-06-13 12:31:42 +00:00
Oliver Tale-Yazdi
8c1865d2f2
MEL bound state-trie-migration ( #11639 )
...
* MEL bound state-trie-migration
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* wip
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use sp_std
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
* Add doc
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Set MaxKeyLen default to 512
Just to be sure that it will work. There is also no real penalty
from over-estimating it.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add more doc
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix assert_err_with_weight macro
Looks like I'm the only one using it anyway...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix tests that use env macro
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
2022-06-13 12:17:07 +00:00
Keith Yeung
0e3918d9fe
Implement more IntoIter traits for bounded types ( #11616 )
2022-06-07 14:32:30 +00:00
Koute
a8c1d430ef
Fix one-by-off in BoundedSlice::try_from ( #11600 )
2022-06-06 16:17:41 +00:00
Gavin Wood
838dbcbe91
Helper macro for Morph impls ( #11570 )
...
* Helper macro for Morph impls
* No need to deprecate for now
* Improved macro
* Doc tests
* Grumbles
2022-06-01 17:27:47 +01:00
Gavin Wood
d6ea0e4205
Introduce set function into storage maps ( #11564 )
2022-06-01 10:48:42 +01:00
Gavin Wood
5595f10245
Ranked Collective pallet ( #11548 )
...
* Ranked Collective pallet
* Fixes
* benchmarks
* Weights
* Allow class voting in rank
Use bare ayes for calculating support.
Allow only promotion/demotion by one rank only.
Allow removal of member with rank zero only.
Use new Tally API
* Index by rank, still O(1).
* Custom vote weights
* Formatting
* Update frame/ranked-collective/src/lib.rs
* Broken :(
* origin guard; cleanup uses new API
* Formatting
* Promote/demote by rank
* Formatting
* Use new API
* Remove code in another PR
* Remove code in another PR
* Formatting
* Remove code in another PR
* Docs
* Docs
* Bump
* Fixes
* Formatting
* Fixes
2022-06-01 10:23:47 +01:00
Gavin Wood
9107ae41fd
Introduce EnsureOrigin::try_successul_origin ( #11558 )
...
* Introduce `EnsureOrigin::try_successul_origin`
* Formatting
* Fixes
* Add Morph
* Fixes
* Formatting
2022-05-31 19:12:07 +01:00
Oliver Tale-Yazdi
442602ce3f
Clean up #[transactional] ( #11546 )
...
* Deprecate #[transactional] attribute
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove #[transactional] from nomination pools
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review fix
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Fix NOOP test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Suppress warnings
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-05-31 16:45:07 +00:00
mikolaichuk
c193fa9a60
change impl FnOnce() to generic type + trait bound ( #11534 )
...
* change impl FnOnce() to generic type + trait bound
with_transaction() function can not be used with explicit generic arguments because of this issue: https://github.com/rust-lang/rust/issues/83701
* make the same changes elsewhere
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-05-31 13:34:41 +00:00
Gavin Wood
7808b0c349
Several tweaks needed for Governance 2.0 ( #11124 )
...
* Add stepped curve for referenda
* Treasury SpendOrigin
* Add tests
* Better Origin Or-gating
* Reciprocal curve
* Tests for reciprical and rounding in PerThings
* Tweaks and new quad curve
* Const derivation of reciprocal curve parameters
* Remove some unneeded code
* Actually useful linear curve
* Fixes
* Provisional curves
* Rejig 'turnout' as 'support'
* Use TypedGet
* Fixes
* Enable curve's ceil to be configured
* Formatting
* Fixes
* Fixes
* Fixes
* Remove EnsureOneOf
* Fixes
* Fixes
* Fixes
* Formatting
* Fixes
* Update frame/support/src/traits/dispatch.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Grumbles
* Formatting
* Fixes
* APIs of VoteTally should include class
* Fixes
* Fix overlay prefix removal result
* Second part of the overlay prefix removal fix.
* Formatting
* Fixes
* Add some tests and make clear rounding algo
* Fixes
* Formatting
* Revert questionable fix
* Introduce test for kill_prefix
* Fixes
* Formatting
* Fixes
* Fix possible overflow
* Docs
* Add benchmark test
* Formatting
* Update frame/referenda/src/types.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Docs
* Fixes
* Use latest API in tests
* Formatting
* Whitespace
* Use latest API in tests
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-05-31 11:12:34 +01:00
Gavin Wood
ecbd65fb95
Safe and sane multi-item storage removal ( #11490 )
...
* Fix overlay prefix removal result
* Second part of the overlay prefix removal fix.
* Report only items deleted from storage in clear_prefix
* Fix kill_prefix
* Formatting
* Remove unused code
* Fixes
* Fixes
* Introduce clear_prefix host function v3
* Formatting
* Use v2 for now
* Fixes
* Formatting
* Docs
* Child prefix removal should also hide v3 for now
* Fixes
* Fixes
* Formatting
* Fixes
* apply_to_keys_whle takes start_at
* apply_to_keys_whle takes start_at
* apply_to_keys_whle takes start_at
* Cursor API; force limits
* Use unsafe deprecated functions
* Formatting
* Fixes
* Grumbles
* Fixes
* Docs
* Some nitpicks 🙈
* Update primitives/externalities/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Formatting
* Fixes
* cargo fmt
* Fixes
* Update primitives/io/src/lib.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Formatting
* Fixes
Co-authored-by: Bastian Köcher <info@kchr.de >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-05-29 12:56:26 +01:00
Shawn Tabrizi
8e7adaf283
Storage Layer for All FRAME Extrinsics ( #11431 )
...
* add new trait
* implement DispatchableWithStorageLayer
* at least one transactional
* all dispatch is at least transactional
* storage_layer api
* add test
* storage layer tests
* deprecate transactional tag
* i guess no reason to deprecate
* remove transactional from batch_all
* update tests
* extend trait
* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fix copy paste name
* cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Create run_all_benchmarks.sh
* uncomment build
* update number of steps and repeats
* add skip build
* Update run_all_benchmarks.sh
* Update run_all_benchmarks.sh
* new benchmarks
* Update frame/support/src/traits/dispatch.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/support/src/traits/dispatch.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/support/test/tests/storage_layers.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/support/test/tests/storage_layers.rs
* weights
* Update dispatch.rs
* doc link
* decl_macro support
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2022-05-26 19:28:32 +00:00
Nazar Mokrynskyi
0c25a2ee40
Introduce WeightToFee trait instead of WeightToFeePolynomial and make WeightToFeePolynomial implement it instead ( #11415 )
...
* Introduce `WeightToFee` trait instead of `WeightToFeePolynomial` and make `WeightToFeePolynomial` implement it instead
* Rename `WeightToFee::calc()` to `WeightToFee::wight_to_fee()`
* Fix typo
2022-05-25 05:32:11 +00:00
Kian Paimani
494167a05b
Optimize offchain worker memory usage a bit. ( #11454 )
...
* add missing events to elections fallback
* Merged
* add some logs and stuff
* undo a bunch of things
* undo lock file
* remove unused err
* fix build
2022-05-24 06:23:05 +00:00
Shawn Tabrizi
d9f33dc7e9
Create Script to Run All Benchmarks ( #11493 )
...
* Create run_all_benchmarks.sh
* Update run_all_benchmarks.sh
* Update run_all_benchmarks.sh
* Review fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update scripts/run_all_benchmarks.sh
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* typo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* add default for $1
* Typo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update run_all_benchmarks.sh
* new weights on benchmarking machine
* prefer `--chain=dev`
* fix compile
* fix command
* fmt
* dont use square brackets
* Extend doc
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove +nightly
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add error file an run execute everything optimistically
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2022-05-23 16:56:42 +00:00
Keith Yeung
8d3f692e0c
Introduce #[pallet::call_index] attribute to dispatchables ( #11381 )
...
* Introduce #[pallet::call_index] attribute to dispatchables
* cargo fmt
* Add more docs and prevent duplicates of call indices
* Add UI test for conflicting call indices
* cargo fmt
Co-authored-by: parity-processbot <>
2022-05-23 16:47:36 +00:00
Bastian Köcher
74428fa8ac
generate_storage_alias: Rewrite as proc macro attribute ( #11387 )
...
* generate_storage_alias: Rewrite as proc macro attribute
This rewrites the `generate_storage_alias!` declarative macro as proc-macro attribute. While doing
this the name is changed to `storage_alias`. The prefix can now also be the name of a pallet. This
makes storage aliases work in migrations for all kind of chains and not just for the ones that use
predefined prefixes.
* Fix compilation and FMT
* Moare fixes
* 🤦
* ......
* Rework the syntax and support instancing
* FMT
* Prefix variants with `Storage`
* Make it compile
* Fix where clause on rust stable
2022-05-17 18:45:56 -04:00
Qinxuan Chen
8bce841d70
frame_support::pallet_prelude: reexport StorageVersion ( #11408 )
...
* frame_support::pallet_prelude: reexport StorageVersion
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
* cargo fmt
Signed-off-by: koushiro <koushiro.cqx@gmail.com >
2022-05-17 20:28:34 +02:00
Jegor Sidorenko
ed7d1e7ac0
Use 'Items' and 'Collections' in uniques pallet ( #11389 )
...
* Rename class to collection
* Use "assets collection" instead of "asset collection"
* Rename 'instance' to 'asset'
* Change "asset `collection`" to "`collection`"
* A bit more clean up
* Rename Asset to Item
* Add a storage hack
* Typos
* fix compile
* fmt
* Fix
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Update frame/uniques/src/lib.rs
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Change 'items collection' to 'collection'
* Apply suggestions
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Parity Bot <admin@parity.io >
2022-05-16 13:38:12 +00:00
Dmitriy Shabanov
9d6a4c4dbd
serde::{Serialize, Deserialize} for BoundedVec ( #11314 )
...
* serde::{Serialize, Deserialize} for BoundedVec
* Apply suggestions from code review
* FMT
* 🤦
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <info@kchr.de >
2022-05-16 13:03:22 +02:00
Oliver Tale-Yazdi
0873e1703b
Whitelist Transactional key ( #11394 )
...
* Make constants public
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Whitelist the transactional layer
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/nomination-pools/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Co-authored-by: Parity Bot <admin@parity.io >
2022-05-12 01:34:38 +00:00
Kian Paimani
e30c18d61d
allow defensive operations to take a proof ( #11353 )
...
* allow defensive operations to take a proof
* Update frame/support/src/traits/misc.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/bags-list/src/list/mod.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Update frame/support/src/traits/misc.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Update frame/support/src/traits/misc.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Fix build
* fix build again
* fmt
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-05-06 13:25:07 +00:00
Roy Yang
084e0f37a4
Added RuntimeDebug derive to enums in frame_support::tokens::misc ( #11211 )
...
Co-authored-by: Roy Yang <roy@laminar.one >
2022-05-03 00:17:14 +02:00
Falco Hirschenberger
b581604aa7
Apply some clippy lints ( #11154 )
...
* Apply some clippy hints
* Revert clippy ci changes
* Update client/cli/src/commands/generate.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/inspect_key.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/db/src/bench.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/db/src/bench.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/src/client/block_rules.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/src/client/block_rules.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/network/src/transactions.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/network/src/protocol.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Revert due to missing `or_default` function.
* Fix compilation and simplify code
* Undo change that corrupts benchmark.
* fix clippy
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/state-db/src/noncanonical.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/state-db/src/noncanonical.rs
remove leftovers!
* Update client/tracing/src/logging/directives.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/fork-tree/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* added needed ref
* Update frame/referenda/src/benchmarking.rs
* Simplify byte-vec creation
* let's just not overlap the ranges
* Correction
* cargo fmt
* Update utils/frame/benchmarking-cli/src/shared/stats.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/pallet/command.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/pallet/command.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: Giles Cope <gilescope@gmail.com >
2022-04-30 21:28:27 +00:00