Oliver Tale-Yazdi
ff5c46c510
Scheduler is already at V4 ( #13105 )
...
* Scheduler is already at V4
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix Referenda log target
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-01-11 16:16:56 +00:00
Oliver Tale-Yazdi
888dac25e8
Migration should be pub ( #12996 )
...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-12-21 22:00:27 +00:00
Muharem Ismailov
4dc62d7e71
Scheduler: remove empty agenda on cancel ( #12989 )
...
* Scheduler: remove empty agenda on cancel
* use iter any
* fix benches
* remove trailing None
* Add CleanupAgendas migration
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fix ci
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Count non-empty agendas in migration
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-12-21 15:25:46 +00:00
Oliver Tale-Yazdi
31f5119ecd
Use explicit call indices ( #12891 )
...
* frame-system: explicit call index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use explicit call indices
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* pallet-template: explicit call index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* DNM: Temporarily require call_index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Revert "DNM: Temporarily require call_index"
This reverts commit c4934e312e12af72ca05a8029d7da753a9c99346.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-12-12 14:32:41 +00:00
Gavin Wood
6f3d1a8143
General Message Queue Pallet ( #12485 )
...
* The message queue
* Make fully generic
* Refactor
* Docs
* Refactor
* Use iter not slice
* Per-origin queues
* Multi-queue processing
* Introduce MaxReady
* Remove MaxReady in favour of ready ring
* Cleanups
* ReadyRing and tests
* Stale page reaping
* from_components -> from_parts
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Move WeightCounter to sp_weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add MockedWeightInfo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Deploy to kitchensink
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use WeightCounter
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Small fixes and logging
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add service_page
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Typo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Move service_page below service_queue
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add service_message
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use correct weight function
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Overweight execution
* Refactor
* Missing file
* Fix WeightCounter usage in scheduler
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix peek_index
Take into account that decoding from a mutable slice modifies it.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add tests and bench service_page_item
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add debug_info
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add no-progress check to service_queues
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add more benches
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Bound from_message and try_append_message
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add PageReaped event
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Rename BookStateOf and BookStateFor
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update tests and remove logging
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove redundant per-message origins; add footprint() and sweep_queue()
* Move testing stuff to mock.rs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add integration test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix no-progress check
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix debug_info
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fixup merge and tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix footprint tracking
* Introduce
* Formatting
* OverweightEnqueued event, auto-servicing config item
* Update tests and benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Provide change handler
* Add missing BookStateFor::insert and call QueueChangeHandler
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update benchmarks and weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* More tests...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use weight metering functions
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* weightInfo::process_message_payload is gone
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add defensive_saturating_accrue
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Rename WeightCounter to WeightMeter
Ctr+Shift+H should do the trick.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Test on_initialize
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add module docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove origin from MaxMessageLen
The message origin is not encoded into the heap and does
therefore not influence the max message length anymore.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add BoundedVec::as_slice
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Test Page::{from_message, try_append_message}
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fixup docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Docs
* Do nothing in sweep_queue if the queue does not exist
... otherwise it inserts default values into the storage.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Test ring (un)knitting
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Upgrade stress-test
Change the test to not assume that all queued messages will be
processed in the next block but split it over multiple.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* More tests...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Beauty fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Rename BoundedVec::as_slice to as_bounded_slice
Conflicts with deref().as_slice() otherwise.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix imports
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove ReadyRing struct
Was used for testing only. Instead use 'fn assert_ring' which also
check the service head and backlinks.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Beauty fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix stale page watermark
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Cleanup
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix test feature and clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* QueueChanged handler is called correctly
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update benches
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Abstract testing functions
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* More tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Cleanup
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 >
* Simplify tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Make stuff compile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Extend overweight execution benchmark
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove TODOs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Test service queue with faulty MessageProcessor
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update pallet ui tests to 1.65
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* More docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review doc fixes
Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com >
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add weight_limit to extrinsic weight of execute_overweight
* Correctly return unused weight
* Return actual weight consumed in do_execute_overweight
* Review fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Set version 7.0.0-dev
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Make it compile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Switch message_size to u64
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Switch message_count to u64
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Make CI green
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Docs
* Update tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* ".git/.scripts/bench-bot.sh" pallet dev pallet_message_queue
* Dont mention README.md in the Cargo.toml
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove reference to readme
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: parity-processbot <>
Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2022-12-09 10:38:24 +00:00
Oliver Tale-Yazdi
bd2166de79
Move WeightCounter to sp-weights ( #12603 )
...
* Move WeightCounter to sp_weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Rename to WeightMeter and test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix pallet-scheduler for new usage
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update primitives/weights/src/weight_meter.rs
Co-authored-by: David <dvdplm@gmail.com >
* More tests for can_accrue
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove defensive_accrue and fixup consumed_ratio
I dont think there is a good use-case for defensive_accrue
without saturation. Only in tests maybe, will remove for now
until we have a use-case.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Test
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: David <dvdplm@gmail.com >
Co-authored-by: Gavin Wood <gavin@parity.io >
2022-11-11 11:26:47 +00:00
zjb0807
8aedd25619
Keep the same name ( #12616 )
...
Co-authored-by: x <x@localhost.localdomain >
2022-11-09 07:42:30 +01:00
Shawn Tabrizi
78cddd7631
New Weights for All Pallets ( #12325 )
...
* new weights for everything
* fix
* fmt
* new batch
* fmt
* new batch
* Update run_all_benchmarks.sh
* add headers
* update weights
* Update lib.rs
* block and extrinsic weight
2022-11-08 18:50:28 +00:00
Gavin Wood
93e8ffed55
Bound uses of Call ( #11649 )
...
* Introduce preimages module in traits
* Multisize Preimages
* Len not actually necessary
* Tweaks to the preimage API
* Fixes
* Get Scheduler building with new API
* Scheduler tests pass
* Bounded Scheduler 🎉
* Use Agenda holes and introduce IncompleteSince to avoid need to reschedule
* Tests pass with new weight system
* New benchmarks
* Add missing file
* Drop preimage when permenantly overeight
* Drop preimage when permenantly overeight
* Referenda uses latest preimage API
* Testing ok
* Adding tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add preimage migration
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Docs
* Remove dbg
* Refactor Democracy
* Refactor Democracy
* Add final MEL
* Remove silly maps
* Fixes
* Minor refactor
* Formatting
* Fixes
* Fixes
* Fixes
* Update frame/preimage/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Add migrations to Democracy
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Resolve conflicts
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Revert "Resolve conflicts"
This reverts commit 734d66d69e54553471ffa54fa52e3e304dc8f106.
* Undo wrong resolves...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Make compile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* massage clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* More clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* clippy annoyance
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* clippy annoyance
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* add missing file
* Test <Preimage as QueryPreimage>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* More tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Clippy harassment
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fixup tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove old stuff
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Test <Scheduler as Anon> trait functions
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update pallet-ui tests
Why is this needed? Should not be the case unless master is broken...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* More scheduler trait test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* More tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Apply review suggestion
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Beauty fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add Scheduler test migration_v3_to_v4_works
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Merge fixup
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Keep referenda benchmarks instantiatable
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use new scheduler weight functions
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use new democracy weight functions
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use weight compare functions
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update pallet-ui tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* More renaming…
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* More renaming…
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add comment
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Implement OnRuntimeUpgrade for scheduler::v3_to_v4 migration
Put the migration into a proper `MigrateToV4` struct and implement
the OnRuntimeUpgrade hooks for it. Also move the test to use that
instead.
This should make it easier for adding it to Polkadot.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Handle undecodable Agendas
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove trash
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use new OnRuntimeUpgrade functions
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fix test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix BoundedSlice::truncate_from
Co-authored-by: jakoblell
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix pre_upgrade hook return values
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add more error logging
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Find too large preimages in the pre_upgrade hook
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Test that too large Calls in agendas are ignored
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use new OnRuntimeUpgrade hooks
Why did the CI not catch this?!
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* works fine - just more logs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix staking migration
Causing issues on Kusama...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix UI tests
No idea why this is needed. This is actually undoing an earlier change.
Maybe the CI has different rustc versions!?
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove multisig's Calls (#12072 )
* Remove multisig's Calls
* Multisig: Fix tests and re-introduce reserve logic (#12241 )
* Fix tests and re-introduce reserve logic
* fix benches
* add todo
* remove irrelevant bench
* [Feature] Add a migration that drains and refunds stored calls (#12313 )
* [Feature] Add a migration that drains and refunds stored calls
* migration fixes
* fixes
* address review comments
* consume the whole block weight
* fix assertions
* license header
* fix interface
Co-authored-by: parity-processbot <>
Co-authored-by: parity-processbot <>
Co-authored-by: Roman Useinov <roman.useinov@gmail.com >
* Fix test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix multisig benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* ".git/.scripts/bench-bot.sh" pallet dev pallet_democracy
* ".git/.scripts/bench-bot.sh" pallet dev pallet_scheduler
* ".git/.scripts/bench-bot.sh" pallet dev pallet_preimage
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: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: parity-processbot <>
Co-authored-by: Roman Useinov <roman.useinov@gmail.com >
2022-10-05 19:21:37 +01:00
Keith Yeung
a4fb1d7096
Properly set the max proof size weight on defaults and tests ( #12383 )
...
* Properly set the max proof size weight on defaults and tests
* cargo fmt
* Set proper max proof size for contracts pallet tests
* Properly set max proof size for node
* Properly set max proof size for frame system mock
* Update test expectations
* Update test expectations
* Properly set max proof size for balances mock
* Update test expectations
* Update test expectations
* Properly set max proof size for democracy mock
* Properly set max proof size for scheduler mock
* Properly set max proof size for fast unstake mock
* Properly set max proof size for tx payment mock
* Properly set max proof size for elections phragmen mock
* Properly set max proof size for node template
2022-09-29 15:48:10 +00:00
Sergej Sakac
e4b6f4a66d
BREAKING: Rename Origin ( #12258 )
...
* BREAKING: Rename Origin
* more renaming
* a bit more renaming
* fix
* more fixing
* fix in frame_support
* even more fixes
* fix
* small fix
* ...
* update .stderr
* docs
* update docs
* update docs
* docs
2022-09-20 22:13:09 +00:00
Keith Yeung
30e7b1e8cd
Create sp-weights crate to store weight primitives ( #12219 )
...
* Create sp-weights crate to store weight primitives
* Fix templates
* Fix templates
* Fixes
* Fixes
* cargo fmt
* Fixes
* Fixes
* Use deprecated type alias instead of deprecated unit types
* Use deprecated subtraits instead of deprecated hollow new traits
* Fixes
* Allow deprecation in macro expansion
* Add missing where clause during call macro expansion
* cargo fmt
* Fixes
* cargo fmt
* Fixes
* Fixes
* Fixes
* Fixes
* Move FRAME-specific weight files back to frame_support
* Fixes
* Update frame/support/src/dispatch.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/support/src/dispatch.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/support/src/dispatch.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Add missing header
* Rewrite module docs
* Fixes
* Fixes
* Fixes
* Fixes
* cargo fmt
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2022-09-13 13:23:44 +00:00
Sergej Sakac
6e8795afe6
BREAKING: Rename Call & Event ( #11981 )
...
* rename Event to RuntimeEvent
* rename Call
* rename in runtimes
* small fix
* rename Event
* small fix & rename RuntimeCall back to Call for now
* small fixes
* more renaming
* a bit more renaming
* fmt
* small fix
* commit
* prep for renaming associated types
* fix
* rename associated Event type
* rename to RuntimeEvent
* commit
* merge conflict fixes & fmt
* additional renaming
* fix.
* fix decl_event
* rename in tests
* remove warnings
* remove accidental rename
* .
* commit
* update .stderr
* fix in test
* update .stderr
* TRYBUILD=overwrite
* docs
* fmt
* small change in docs
* rename PalletEvent to Event
* rename Call to RuntimeCall
* renamed at wrong places :P
* rename Call
* rename
* rename associated type
* fix
* fix & fmt
* commit
* frame-support-test
* passing tests
* update docs
* rustdoc fix
* update .stderr
* wrong code in docs
* merge fix
* fix in error message
* update .stderr
* docs & error message
* .
* merge fix
* merge fix
* fmt
* fmt
* merge fix
* more fixing
* fmt
* remove unused
* fmt
* fix
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-09-12 22:03:31 +00:00
Boluwatife Bakre
3ec4d13e9f
Use parameter_types instead of thread_local for test-setup ( #12036 )
...
* Edit to Assets. parameter_types
* fixes
* Test Fixes. WIP
* Edits to pallet-aura
* Camel Case
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Implementation of mutate fn
* update to pallet-aura
* Update to frame-system. Fixes
* Update to frame-support-test. CamelCases
* Updates to frame- contracts, offences, staking, bounties, child bounties
* Edit to mutate fn. Changes to frame-contracts. CamelCase pallet-aura
* Edits to frame-contracts & executive
* cargo +nightly fmt
* unused import removed
* unused import removed
* cargo +nightly fmt
* minor adjustment
* updates
* updates
* cargo +nightly fmt
* cargo +nightly fmt
* take fn implemented
* update
* update
* Fixes to CallFilter
* cargo +nightly fmt
* final fixes
* Default changed to $value
* Update frame/support/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2022-09-08 10:46:25 +00:00
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
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
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
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
Shawn Tabrizi
2fd028156e
Fix Origins Used in Runtime Benchmarks ( #12037 )
...
* fix identity benchmark origin
* fix benchmarking macro
* bounties
* democracy
* scheduler
* tips and treasury
* unused
* dunno, this is causing issues
2022-08-16 10:36:34 +00:00
Squirrel
a68a80fbae
declone and close the door ( #12035 )
...
* declone and close the door
* cargo fmt
* remove brackets
2022-08-15 19:38:36 +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
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
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
Keith Yeung
208be86934
Allow pallet error enum variants to contain fields ( #10242 )
...
* Allow pallet errors to contain at most one field
* Update docs on pallet::error
* Reword documentation
* cargo fmt
* Introduce CompactPalletError trait and require #[pallet::error] fields to implement them
* cargo fmt
* Do not assume tuple variants
* Add CompactPalletError derive macro
* Check for error type compactness in construct_runtime
* cargo fmt
* Derive CompactPalletError instead of implementing it directly during macro expansion
* Implement CompactPalletError on OptionBool instead of Option<bool>
* Check for type idents instead of variant ident
* Add doc comments for ErrorCompactnessTest
* Add an trait implementation of ErrorCompactnessTest for ()
* Convert the error field of DispatchError to a 4-element byte array
* Add static check for pallet error size
* Rename to MAX_PALLET_ERROR_ENCODED_SIZE
* Remove ErrorCompactnessTest trait
* Remove check_compactness
* Return only the most significant byte when constructing a custom InvalidTransaction
* Rename CompactPalletError to PalletError
* Use counter to generate unique idents for assert macros
* Make declarative pallet macros compile with pallet error size checks
* Remove unused doc comment
* Try and fix build errors
* Fix build errors
* Add macro_use for some test modules
* Test fix
* Fix compilation errors
* Remove unneeded #[macro_use]
* Resolve import ambiguity
* Make path to pallet Error enum more specific
* Fix test expectation
* Disambiguate imports
* Fix test expectations
* Revert appending pallet module name to path
* Rename bags_list::list::Error to BagError
* Fixes
* Fixes
* Fixes
* Fix test expectations
* Fix test expectation
* Add more implementations for PalletError
* Lift the 1-field requirement for nested pallet errors
* Fix UI test expectation
* Remove PalletError impl for OptionBool
* Use saturating operations
* cargo fmt
* Delete obsolete test
* Fix test expectation
* Try and use assert macro in const context
* Pull out the pallet error size check macro
* Fix UI test for const assertion
* cargo fmt
* Apply clippy suggestion
* Fix doc comment
* Docs for create_tt_return_macro
* Ensure TryInto is imported in earlier Rust editions
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Fix up comments and names
* Implement PalletError for Never
* cargo fmt
* Don't compile example code
* Bump API version for block builder
* Factor in codec attributes while derving PalletError
* Rename module and fix unit test
* Add missing attribute
* Check API version and convert ApplyExtrinsicResult accordingly
* Rename BagError to ListError
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Use codec crate re-exported from frame support
* Add links to types mentioned in doc comments
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* cargo fmt
* cargo fmt
* Re-add attribute for hidden docs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2022-03-24 08:11:14 +00:00
Gavin Wood
a6891951fb
Referenda and Conviction Voting pallets ( #10195 )
...
* Initial draft of new referendum state machine.
* Docs
* Fixes
* Fixes
* Add conviction-voting pallet
* Basic build
* Building
* Some TODOs
* Tests building
* Add missing file
* Basic lifecycle test
* Add couple of tests
* Another test
* More tests
* Fixes
* Fixes
* Formatting
* Fixes
* Tests
* Fixes
* Fixes
* More tests
* Formatting
* First few benchmarks
* First few benchmarks
* Defered queue servicing
* More testing
* Benchmarks
* Fiddly benchmark
* Final nudge benchmarks
* Formatting
* Formatting
* Finished up benchmarks
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_referenda --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/referenda/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Events finished
* Missing file
* No GenesisConfig for Referenda
* Formatting
* Docs
* Docs
* Docs
* Per-class conviction voting
* New test & mock utils
* More tests
* Tests
* Tests finished 🎉
* Benchmarking stuff
* Fixes
* Test harness
* Test harness
* Benchmarks for Conviction=Voting
* Benchmarking pipeline complete
* Docs
* Formatting
* Remove unneeded warning
* Fix UI tests
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_conviction_voting --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/conviction-voting/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Docs
* Update frame/conviction-voting/src/vote.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* update sp-runtime version
* MEL Fixes for Referenda and Conviction Voting (#10725 )
* free maxencodedlen
* more maxencodedlen
* more MEL
* more mel
* disable storage info
* More Referenda Patches (#10760 )
* basic fixes
* fix benchmarking
* fix license
* prevent panic in curve math
* fmt
* bump crate versions
* Update mock.rs
Co-authored-by: Parity Bot <admin@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2022-02-06 12:51:12 +01:00
Alexander Theißen
f3168c3fa0
Add production profile to substrate-wasm-builder ( #10747 )
...
* Add production profile to wasm builder
* Fix profile detection
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Replace panic! by println! + exit
* Default to `release` for wasm on debug builds
* Replaced unwrap by expect
* Update all weights
Rerun on the bm2 server.
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 --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
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Parity Bot <admin@parity.io >
2022-01-31 14:16:26 +00:00
Bastian Köcher
21d5573b25
pallet-scheduler: Fix migrations V2 to V3 ( #10757 )
...
* pallet-scheduler: Fix migrations V2 to V3
V2 already supported origins, so we need to move them over instead of setting it to `Root`. Besides
that it also removes the custom `Releases` enum and moves it over to `StorageVersion`.
* Fixes
* Fixes
* 🤦
2022-01-31 11:43:42 +00:00
Oliver Tale-Yazdi
9daea28085
Optimized weights ( #10692 )
...
* Add optimization flags to 'release' profile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Optimized weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add missing pallets
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add `production` profile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* pallet-collective: fix tests
the weight of System.remark went to 0, the collective test uses a
remark call to trigger an out-of-gas condition so I replaced it
with a `remark_with_event` call.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-01-24 12:35:25 +00:00
Oliver Tale-Yazdi
362a6d9b28
Require MaxEncodedLen per default ( #10662 )
...
* Remove generate_storage_info
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add without_storage_info where needed
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update doc tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add more without_storage_info
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fix TryBuild
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fix TryBuild tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2022-01-20 11:16:04 +00:00
Bastian Köcher
f3662b4bba
Happy new year 2022 ( #10573 )
2022-01-03 09:22:14 +01:00
dharjeezy
1b0be8ae06
Replace parameter_types with ConstU32 &c. ( #10402 )
...
* remove parameter types and use const type
* remove parameter types and use const type
* Delete {
* Delete count,
* refractor for beefy, benchmarking, child bounties, and collective pallets
* refractor for pallet contracts
* refractor for elections
* refractor for more pallets
* fix CI issues
* fix CI issues
* fix CI issues
* fix CI issues
* remove warning to fix CI issue
* remove warning to fix CI issue
refractor for pallet preimage
* remove warning to fix CI issue
refractor for pallet proxy
* remove warning to fix CI issue
refractor for pallet recovery
refractor for pallet randomness-collective-flip
* remove warning to fix CI issue
refractor for pallet scored-pool
refractor for pallet scheduler
refractor for pallet session
* remove warning to fix CI issue
refractor for pallet society, support, system, timestamp, tips
* remove warning to fix CI issue
refractor for pallet transaction_payment, transaction_storage, treasury, uniques, utility
* remove warning to fix CI issue
* cargo +nightly fmt
* CI fix
* more param refractor on beefy-mmr
* refractor for beefy
* Update frame/babe/src/mock.rs
* Update frame/babe/src/mock.rs
* Update frame/bounties/src/tests.rs
* Update frame/tips/src/tests.rs
* Delete mock.rs
* Update frame/examples/basic/src/tests.rs
* Apply suggestions from code review
* Update frame/im-online/src/mock.rs
* Update frame/im-online/src/mock.rs
* Update frame/offences/benchmarking/src/mock.rs
* Update frame/session/benchmarking/src/mock.rs
* Update frame/support/test/tests/pallet_compatibility.rs
* Update frame/support/test/tests/pallet_compatibility_instance.rs
* Update frame/treasury/src/tests.rs
* Update test-utils/runtime/src/lib.rs
* some cleanup
* fmt
* remove unused
Co-authored-by: Damilare <dakinlose@teamapt.com >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-12-16 03:06:11 +00:00
Gavin Wood
5e50e0bc2c
Preimage registrar and Scheduler integration ( #10356 )
...
* initial idea
* more
* fix compile
* add clear and request logic
* improve some docs
* Add and implement trait
* continuing to improve
* refcount type
* infallible system preimage upload
* fmt
* fix requests
* Make it simple
* Make it simple
* Formatting
* Initial draft
* request when scheduled
* Docs
* Scheduler good
* Scheduler good
* Scheduler tests working
* Add new files
* Missing stuff
* Repotting, add weights.
* Add some tests to preimage pallet
* More tests
* Fix benchmarks
* preimage benchmarks
* All preimage benchmarks
* Tidy cargo
* Update weights.rs
* Allow hash provision in benchmarks
* Initial work on new benchmarks for Scheduler
* Tests working, refactor looks good
* Tests for new Scheduler functionality
* Use real weight, make tests work with runtimes without Preimage
* Rename
* Update benchmarks
* Formatting
* Formatting
* Fix weird formatting
* Update frame/preimage/src/lib.rs
* Fix try-runtime build
* Fixes
* Fixes
* Update frame/support/src/traits/tokens/currency.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/support/src/traits/tokens/currency/reservable.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/support/src/traits/tokens/imbalance.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/preimage/src/mock.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Update frame/scheduler/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Update frame/preimage/src/lib.rs
* Fixes
* Fixes
* Formatting
* Fixes
* Fixes
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/scheduler/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=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/preimage/src/weights.rs --template=./.maintain/frame-weight-template.hbs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
Co-authored-by: Parity Bot <admin@parity.io >
2021-12-11 15:55:23 +01:00
Gavin Wood
3dd8f83a3a
Insufficient asset quota and deposits ( #10382 )
...
* Allow asset accounts to exist by deposit
* Place limit on consumers (and therefore freebie asset accounts)
* Maximum number of assets
* Fixes
* Fixes
* Formatting
* Docs
* Formatting
* Destroyed assets are properly tidied
* Update frame/assets/src/types.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Docs
* Docs
* Formatting
* Docs
* Docs
* Fixes
* Fixes
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2021-12-09 13:22:54 +01: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
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
dharjeezy
e0c47c48b2
remove base weight annotations ( #10373 )
...
* remove base weight annotations
* Update frame/scheduler/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Damilare <dakinlose@teamapt.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-11-26 04:38:21 +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
ucover
f8ce186496
Test each benchmark case in own #[test] ( #9860 )
...
* Generate one #[test] fn per bench case.
* Update benchmark macro syntax in frame pallets.
* Explain new benchmark macro syntax in example pallet.
* support with and without a semicolon
* update pallets to use individual tests
* migrate staking too
* migrate more pallets
* fix up democracy and use individual tests
* Fix comment
* Put println message in panic
* Remove `another_set_dummy` from doc
`another_set_dummy` is not present in the benchmarking.rs (anymore).
* Update doc for benchmarks macro
* Update doc for impl_benchmark_test_suite macro
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2021-10-01 08:17:26 +00:00
Andrew Jones
49b6dfd2e5
Enrich metadata with type information ( #8615 )
...
* Cargo.lock after merge
* Restore scale-info feature
* Fully qualify TypeInfo derive
* Skip PendingSwap T
* Add missing skip_type_params attr
* metadata docs features
* Reduce pallet event attribute to struct
* Cargo.lock
* Update frame/balances/src/tests_composite.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Line widths check
* Cargo.lock
* Add scale-info/std
* Update frame/system/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Use `skip_type_params` to remove `TypeInfo` requirements on checks
* Revert "Remove unused Call metadata stuff"
This reverts commit 41311f85
* Skip BalanceSwapAction type parameter
* Remove unused event metadata macro
* Update frame-metadata
* Update primitives/npos-elections/compact/src/codec.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Manual TypeInfo for Header
* Remove TypeInfo requirement for consts in BoundedVec etc.
* Another TypeInfo bound removed
* review: fix indentation
* TypeInfo impls for Identity types
* Add some todos to add custom TypeInfo impls
* Update frame/support/procedural/src/pallet/expand/pallet_struct.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Add some todos to add custom TypeInfo impls
* Add a test for manual Data TypeInfo impl
* Add custom TypeInfo impl for Vote
* Era custom TypeInfo crimes
* Revert finality-grandpa version to 0.14.z
* review: renamed module to pallet_constants_metadata
* New line at end of file
* Add missing scale-info/std
* Update frame/support/src/storage/types/mod.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Remove StorageEntryType::Map unused flag
* Add missing scale-info dependency after merge
* SignedExtension::AdditionalSigned metadata
* Update frame-metadata, use abbreviated docs and args fields
* Update frame/example/Cargo.toml
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Add scale_info/std and remove unused scale-info dependency
* Remove scale-info dependency
* Remove treasury pallet::metadata
* Remove redundant Event test
* Add back scale-info as dev dependency
* fix error metadata when no error defined in decl_module
* Add Module3 to tests
* Fix metadata test
* Add docs feature to frame-support test
* WIP fixing pallet metadata test
* Remove redundant FunctionMetadata, FunctionArgumentMetadata as per https://github.com/paritytech/frame-metadata/pull/20
* Use main branch of frame-metadata
* Use patch of scale-info for latest changes
* Use latest patched scale-info
* Manual TypeInfo for DigestItem
* Manual TypeInfo for DigestItem
* Update scale-info
* Skip __Ignore variants for Error, depends on https://github.com/paritytech/scale-info/pull/117
* Named fields for FRAME v2 pallet Call variants
* Named fields for FRAME v1 pallet Call variants
* Add missing scale-info dependency
* WIP expand benchmark call variant
* fix benchmark with new function
create a new function for each variant of a pallet call.
This function is called by benchmarking macro in order not to break call
creation with unnamed argument
* fix tests
* more fix
* Fix staking tests
* Fix offchain workers calls
* Cherry pick rustfmt.toml from master
* cargo +nightly-2021-06-22 fmt --all
* Update to new call variant structs
* More call variant struct updates
* Remove unused import
* More call variant structs
* More call variant structs
* Even more call variant structs
* Mooar variant structs
* Evermore variant structs
* Call variant structs ad infinitum
* Fmt
* More call variants
* Last call variant
* Call variants all done?
* Fix SS58Prefix type
* Potential workaround for BitFlags<IdentityFields> TypeInfo
* Enable docs capturing for Call, Event, and Error types
* Fix IdentityFields TypeInfo
* Remove metadata-docs feature
* Add capture_docs = true for legacy Call, Event and Error types
* Fmt
* Fix metadata test type
* Update benchmarks with call struct variants
* Fmt
* More test fixes
* Fmt
* Fix benches
* Use latest capture_docs attr
* Latest scale_info
* Fmt
* review: change &Vec to &[]
* Remove pallet metadata attr
* review: remove commented out test code
* review: skip_type_params trailing comma suggestion
* Update to scale-info 0.10.0
* Update construct_runtime ui tests, different because of metadata TypeInfo impls
* Add some TypeInfo derives for UI tests
* Update storage ensure span ui stderrs
* Update call argument bound ui tests
Possibly changed because change from tuple to struct variants?
* Add scale-info dev dependency
* Update to latest finality-grandpa release
* review: missing newline
* review: missing scale-info/std
* review: remove duplicate scale-info/std
* review: remove fully qualified TypeInfo
* review: add missing scale-info/std
* review: remove unnecessary imports.
* Fmt
* Use crates.io RC version of frame-metadata
* Remove scale-info/std because it is a dev dependency
* Add missing scale_info dev-dependency for test
* Delete empty metadata folder
* Fix sp_std import
* review: improve manual UncheckedExtrinsic TypeInfo impl
* review: use full scale-info for dev-dependency
* Remove DefaultByteGetter impl
* review: derive TypeInfo for generic header
* Fmt
* Update primitives/runtime/src/generic/unchecked_extrinsic.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Update primitives/runtime/src/generic/unchecked_extrinsic.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* Update bin/node/executor/Cargo.toml
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/identity/src/types.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/support/src/dispatch.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Remove redundant derive
* Simplify scale-info dependency
* Strip underscore prefix from call variant struct names
* Another underscore field
* More underscore fields
* Another underscore field
* Update to frame-metadata 14.0.0-rc.2 with combined StorageEntryType::Map
* Fmt
* Revert weights formatting
* Fix up some tests
* Fix up some tests for StorageEntryTypeMetadata
* scale-info dev dependency
* Fix test error
* Add missing TypeInfo derives
* Add back missing scale-info dependency
* Add back missing scale-info dependency
* Fix npos compact impls
* Cargo.lock
* Fmt
* Fix errors
* Fmt
* Fix renamed raw_solution field
* Fix error
* Fmt
* Fix some benchmarks
* Fmt
* Stray R
* Fix
* Add missing TypeInfos
* ui test fix
* Fix line widths
* Revert "ui test fix"
This reverts commit 2d15ec058a216e3f92d713f1174603a2bb1eac65.
* Upgrade to scale-info 0.11.0
* Revert "Upgrade to scale-info 0.11.0"
This reverts commit 047bb179085a0059c36cd20ab405f55cf0867e28.
* Add Runtime type
* Update to scale-info 0.12
* Update to scale-info 1.0
* Update frame-metadata to version 14.0.0
* Patch finality-grandpa until release available
* Fix metadata tests
* Fix metadata tests
* Fmt
* Remove patched finality-grandpa
* Fix tests, use scale_info imports
* Fix pallet tests
* Add BlockNumber TypeInfo bound
* ui test fix
* Cargo.lock
* Remove pallet metadata
* Cargo.lock
* Add missing scale-info dependency
* Remove pallet event metadata
* Fix error
* Fix collective errors
* Semicolol
* Fmt
* Remove another metadata attribute
* Add new variant to custom digest TypeInfo
* Fmt
* Cargo.lock from master
* Remove comma lol
* Fix example call error
* Fix example call error properly
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 >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-09-15 11:40:41 +00:00
Kian Paimani
abd08e29ce
Rewrap all comments to 100 line width ( #9490 )
...
* reformat everything again
* manual formatting
* last manual fix
* Fix build
2021-08-11 14:56:55 +00:00
Gavin Wood
bdda3ed612
Remove Filter and use Contains instead ( #9514 )
...
* Remove Filter and use Contains instead
* Fixes
* Formatting
* Update docs/Upgrading-2.0-to-3.0.md
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Typo
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2021-08-07 19:26:40 +00:00
Shawn Tabrizi
0489c1768c
FRAME Weights with Storage Metadata ( #9471 )
...
* weights with metadata
* fix
* fix contract test
* skip metadata tag
* special handling for `frame_system`
* cargo run --quiet --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
* add skip metadata to contracts
* 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
* fix contract test
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/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=pallet_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* expose component information
* fix test generation
* refactor list benchmarks
* move component selection out of runtime
* add benchmark verification
* missing feature
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/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=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* add internal repeats
* update weights with internal repeats
* fix warning
* return error with pov
* try without tracking
* Revert "return error with pov"
This reverts commit 44c36cbbd3c6818f36f377e3e291f1df156e40f7.
* Revert "try without tracking"
This reverts commit f401c44aebff2232389d8d307b20924891e5d77d.
* Revert "Revert "try without tracking""
This reverts commit 4b4e05929802ad3e8154e107359447634e5fb21b.
* state without tracking
* fix build
* temp test
* split db and timing benchmarks
* extend db results?
* default repeat is internal
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fix warning
* bump linked hash map
* use linked hash map for storage tracker
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* remove conflicting short command
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_democracy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/democracy/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* missed one linked hashmap
* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/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=pallet_bounties --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/bounties/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=pallet_election_provider_multi_phase --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/election-provider-multi-phase/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* new weights with latest changes
* Update frame/benchmarking/src/utils.rs
Co-authored-by: Parity Benchmarking Bot <admin@parity.io >
2021-08-07 16:05:12 +00:00
Squirrel
aafe64315a
Remove extra commas made redundent after rustfmt ( #9404 )
...
* Remove extra commas made redundent after rustfmt
2021-07-22 11:06:17 +01:00
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
Falco Hirschenberger
76a289ebd8
Add missing #[pallet::constant] annotations to pallets ( #9367 )
...
fixing #9306
2021-07-18 18:27:39 +00:00
Guillaume Thiolliere
1e8035a273
Fix invalid link in doc ( #9351 )
...
* fix invalid link
* Update client/executor/common/src/runtime_blob/globals_snapshot.rs
* more fix
2021-07-16 07:24:26 +00:00
Shawn Tabrizi
e5831c3db3
New Weights for All Pallets ( #9148 )
...
* Create run_benchmarks.sh
* Update run_benchmarks.sh
* new weights
* Delete run_benchmarks.sh
* wrong folder
* remove grandpa weight
* Update weights.rs
2021-06-21 09:57:43 +00:00
Guillaume Thiolliere
d31e607bda
Enforce pub calls in pallets ( #9085 )
...
* make all extrinsics public so they are available from outside
* Impl
* fix
* more fix
* more pub
* few more
* merge fix
* fix ui test
* fix ui test
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-06-12 16:15:21 +00:00