* Fix std, runtime-benchmarks and try-runtime features
zepter lint propagate-feature --feature try-runtime --left-side-feature-missing=ignore --workspace --fix --feature-enables-dep="try-runtime:frame-try-runtime"
zepter lint propagate-feature --feature runtime-benchmarks --left-side-feature-missing=ignore --workspace --fix --feature-enables-dep="runtime-benchmarks:frame-benchmarking"
zepter lint propagate-feature --feature std --left-side-feature-missing=ignore --workspace --fix
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add propagate feature CI check
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Test CI by adding an error
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use --locked
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add help msg
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert "Test CI by adding an error"
This reverts commit cf4ff6cc0632269b0a109e547686e5e3314b02de.
* Test CI by adding an error
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* No newline in help msg
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert "Test CI by adding an error"
This reverts commit 5daa06ada8e01f5bebafb9d1c76804dd79bc1006.
* Test CI by adding an error
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert "Test CI by adding an error"
This reverts commit ca15de5729507a564f140a10ec2e87b19516ec4c.
* Fix msg
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert back to master
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Re-do with Zepter v0.7.4
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update Zepter to 0.7.4
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Disable rococo try-runtime check
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <git@kchr.de>
* More review fixes
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: Bastian Köcher <git@kchr.de>
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* wip
* remove index in lieu of nonce
* wip
* remove accountnonce in lieu of nonce
* add minor improvement
* rebase and merge conflicts
* HoldReason: Improve usage
`HoldReason` was switched recently to use the `composite_enum` attribute that will merge the enums
from all pallets in the runtime to `RuntimeHoldReason`. `pallet-nis` was still requiring that the
variant was passed as constant to call `hold`. The proper implementation is to use the `HoldReason`
from inside the pallet directly when calling `hold`. This is done by adding a `RuntimeHoldReason` as
type to the `Config` trait and requiring that `Currency` is using the same reason. Besides that the
pr changes the name `HoldIdentifier` in `pallet_balances::Config` to `RuntimeHoldReason`.
* Update frame/nis/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Review comment
* Fixes
---------
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Remove use of trait Store from staking pallet
* Remove use of trait Store from bounties pallet
* Remove use of trait Store from collective pallet
* Remove use of trait Store from babe pallet
* Remove use of trait Store from assets pallet
* Remove use of trait Store from grandpa pallet
* Remove use of trait Store from balances pallet
* Remove use of trait Store from authorship pallet
* Remove use of trait Store from authority-discovery pallet
* Remove use of trait Store from atomic-swap pallet
* Remove use of trait Store from sudo pallet
* Remove use of trait Store from scheduler pallet
* Remove use of trait Store from scored-pool pallet
* Remove use of trait Store from society pallet
* Remove use of trait Store from lottery pallet
* Remove use of trait Store from executive pallet
* Remove use of trait Store from democracy pallet
* Remove use of trait Store from elections-phragmen pallet
* Remove use of trait Store from indices pallet
* Remove use of trait Store from identity pallet
* Remove use of trait Store from multisig pallet
* Remove use of trait Store from merkle-mountain-range pallet
* Remove use of trait Store from im-online pallet
* Remove use of trait Store from membership pallet
* Remove use of trait Store from nicks pallet
* Remove use of trait Store from session pallet
* Remove use of trait Store from transaction-payment pallet
* Remove use of trait Store from utility pallet
* Remove use of trait Store from child-bounties pallet
* Remove use of trait Store from nis pallet
* Remove use of trait Store from nfts pallet
* Remove use of trait Store from conviction-voting pallet
* Remove use of trait Store from treasury pallet
* Remove use of trait Store from vesting pallet
* Remove use of trait Store from preimage pallet
* Remove use of trait Store from uniques pallet
* Remove use of trait Store from ranked-collective pallet
* Remove use of trait Store from beefy-mmr pallet
* Remove use of trait Store from referenda pallet
* Remove use of trait Store from whitelist pallet
* Remove use of trait Store from alliance pallet
* Remove use of trait Store from nomination-pools pallet
* Remove use of trait Store from state-trie-migration pallet
* Remove use of trait Store from message-queue pallet
* Remove use of trait Store from root-offences pallet
* Remove use of trait Store from root-testing pallet
* Remove use of trait Store from timestamps pallet
* Remove use of trait Store from system pallet
* Remove use of trait Store from offences pallet
* Remove use of trait Store from recovery pallet
* Remove use of trait Store from node-authorization pallet
* Remove use of trait Store from proxy pallet
* Remove use of trait Store from benchmarking pallet
* Remove use of trait Store from bags-list pallet
* Add deprecated warning in store_trait
* Change warning message
* Run cargo fmt
* Fix warning and update tests
* Remove unnecessary allow deprecated
* Remove use of trait Store
* Fix mismatch in expected output
* Minor update to warning message for deprecation of generate_store with Store trait attribute
* Fixes as per review comments
* Fixes as per review suggestions
* Remove use of Store trait from core-fellowship pallet
* Fix type in store_trait.rs
* Fixes as pre review comment
* Change copyright year to 2023 from 2022
* Fix incorrect update of copyright year
* Remove years from copy right header
* Fix remaining files
* Fix typo in a header and remove update-copyright.sh
Fixes broken links to `Config` and `Call`, for READMEs the link has
been fixed by adding the missing "/pallet" path, and for rust docs we
let the compiler figure out the type's link by itself
Signed-off-by: Jonathas-Conceicao <jonathasaoc@gmail.com>
* initial impl
* add template test
* linear fit proof size
* always record proof when tracking storage
* calculate worst case pov
* remove duplicate worst case
* 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_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* more comment output
* add cli for worst case map size
* update name
* clap does not support underscores
* rename
* expose worst case map values
* improve some comments
* 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_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* update template
* 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_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* fix fmt
* more fmt
* more fmt
* Dont panic when there is no proof
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix test features
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Whitelist :extrinsic_index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use whitelist when recording proof
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add logs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add PoV testing pallet
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Deploy PoV testing pallet
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Storage benches reside in the PoV pallet
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Linear regress PoV per component
Splits the PoV calculation into "measured" and "estimated".
The measured part is reported by the Proof recorder and linear
regressed over all components at once.
The estimated part is calculated as worst-case by using the max
PoV size per storage access and calculating one linear regress per
component. This gives each component a (possibly) independent PoV.
For now the measured size will always be lower than the PoV on
Polkadot since it is measured on an empty snapshot. The measured
part is therefor only used as diagnostic for debugging.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Put PoV into the weight templates
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Extra alanysis choise for PoV
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add+Fix tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Make benches faster
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Cleanup
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use same template comments
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* ".git/.scripts/bench-bot.sh" pallet dev pallet_balances
* ".git/.scripts/bench-bot.sh" pallet dev pallet_democracy
* Update referenda mock BlockWeights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Take measured value size into account
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* ".git/.scripts/bench-bot.sh" pallet dev pallet_scheduler
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* proof_size: None
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* ugly, but works
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* wup
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* WIP
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add pov_mode attribute to the benchmarks! macro
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use pov_mode attribute in PoV benchmarking
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Scheduler, Whitelist: Add pov_mode attr
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update PoV weights
* Add CLI arg: default-pov-mode
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fix
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert "Update PoV weights"
This reverts commit 2f3ac2387396470b118122a6ff8fa4ee12216f4b.
* Revert "WIP"
This reverts commit c34b538cd2bc45da4544e887180184e30957904a.
* Revert first approach
This reverts commit range 8ddaa2fffe5930f225a30bee314d0b7c94c344dd^..4c84f8748e5395852a9e0e25b0404953fee1a59e
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add extra benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_alliance
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_whitelist
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_scheduler
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Clippy 🤦
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add reference benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix doc comments
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Undo logging
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add 'Ignored' pov_mode
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Allow multiple attributes per benchmark
Turns out that the current benchmarking syntax does not support
multiple attributes per bench 🤦. Changing it to support that
since otherwise the `pov_mode` would conflict with the others.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Validate pov_mode syntax
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Ignore PoV for all contract benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Bump macro recursion limit
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update contract weights
They dont have a PoV component anymore.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fix test ffs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* pov_mode is unsupported in V2 syntax
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix pallet ui tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* update pallet ui
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix pallet ui tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update weights
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: Parity Bot <admin@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
Co-authored-by: Your Name <you@example.com>
* 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>
* 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
* 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>
* 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
* Fix benchmarks and adds CI to test them
Instead of waiting for benchmarks failing in Polkadot CI, we also can just test them in Substrate :P
* Do not overflow