* Enable the `runtime-wasm` for wasm builds
This enables the `runtime-wasm` feature for wasm builds. The feature is
not mandatory and will only be activated if it exists in the
`Cargo.toml`.
* Fix compilation
* Update docs
* Uprgade version
* Apply suggestions from code review
* Weight accounting for on_offence.
* Try to compute weight.
* Guesstimate upper bounds on db read/writes for slashing
* greater than or equal to
* add new trait
* Update mock.rs
* Add basic weight test
* one more test
* Update frame/staking/src/lib.rs
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
* Update frame/staking/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Add test for offences queue
Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Emit a PaymentParameters event once per block
This contains per-block paramaters need to calculate
fees off-chain.
* Add WeightToFee trait
* Add documentation to polynomial types
* Ignore pseudo code snippet for doc tests
* Use `Mul` implementation of Perbill
* Add tests for WeightToFeePolynomial
* Revert "Emit a PaymentParameters event once per block"
This reverts commit 6c4763baff3d8179676a3c1660fe7063fd56a8ca.
Co-authored-by: Gavin Wood <gavin@parity.io>
* Only check single extrinsics weight limit in validate_transaction.
* Add missing parameter to all pallets.
* Add tests, fix default configuration.
* Bump spec version.
* Use AvailableBlockRation to calculate MaxExtrinsicWeight
* Include post dispatch corrected weight in extrinsic events
* Drop the 'Post' from ApplyExtrinsicResultWithPostInfo to make it less verbose
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Use proper Event type in pallet_system tests
* Add test that the actual weight is returned by events
* Make fn extract_actual_weight cap at pre dispatch weight
* Bump spec version
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Gavin Wood <gavin@parity.io>
* Fist benchmark barely working
* Debug checkpoint
* add rest of benchmarks
* Add to runtime
* Fix build
* Update frame/elections-phragmen/src/benchmarking.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Update frame/elections-phragmen/src/benchmarking.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* major imp
* Make them run on release
* Help finish phragmen benchmarks (#5886)
* update caller, account, and member/runner-up creation
* remove stuff
* ocd
* make it work with real run
* relax the numbers a bit
* New and improved version
* Make elections-phragmen weighable and secure. (#5949)
* Make elections-phragmen weighable.
* Update frame/elections-phragmen/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Update frame/elections-phragmen/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Fix all tests
* Fix everything
* Add note
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Doc update
* Fix some complexity params
* Once more ready to benchmark
* ready for bench
* final tunes
* Update frame/elections-phragmen/src/lib.rs
* Fix fix
* Update frame/elections-phragmen/src/lib.rs
* Update frame/elections-phragmen/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Update frame/elections-phragmen/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Update to latest weights
* Some fixes
* Fix dual voter read from @thiolliere
* Remove todos
* review from @shawntabrizi
* Fix bench tests.
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Add ‘transaction_version’ to the signed transaction
This allows hardware wallets to know which transactions they can safely
sign. To reduce transaction size, I reduced it to a ‘u8’ from a ‘u32’.
Fixes#5951.
* Restore transaction_version to a u32
* Fix comments
`transaction_version` is not part of a tx, but is still signed.
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Fix the test suite
I had forgotten to change the production of transactions in the test
code.
* Fix benchmarks
* Improve docs for `CheckTxVersion` in `frame_system`
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Remove spurious cast
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Split operational and normal weight
* Update other parts of the code
* relatively minor changes to add/fix behavior
* Limit reported block weight for fee adjustment
* fix test
* explicit match
* Move common logic out
* Update frame/system/src/lib.rs
Co-authored-by: Gavin Wood <gavin@parity.io>
* API improvement @bkchr
Co-authored-by: Gavin Wood <gavin@parity.io>
* Update system weights
* Use maximum block weight for scheduler
* Update offences to use full block
* Move weight inside if statement
* Add one read to offences `on_initialize`
* Delete factory test
* Revert "Delete factory test"
This reverts commit 8f95aacd63a028ef1b415185b45367b4140d86fd.
* Revert "Add one read to offences `on_initialize`"
This reverts commit 7df7ebc73625ed79b14086f13c247d4058ee87d6.
* Revert "Move weight inside if statement"
This reverts commit 87277d07913a7d1868eeee85ef4673f51ee4013b.
* Revert "Update offences to use full block"
This reverts commit 0bbe0ce18e9419b032157f7d37dea6481078cdc0.
* Use scheduler in Sudo
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Revert "Use scheduler in Sudo"
This reverts commit 95bd2768dfea100bdf682cf4fe6c0f46e8e1f66e.
* remove max extrinsic weight (it does nothing useful)
* fix tests
* introduce `sudo_unchecked_weight`
* bump spec version
* scheduler 80 percent of maximum
* Update `set_changes_trie_config` weight
* Update bin/node/runtime/src/lib.rs
* Update frame/democracy/src/tests.rs
* Update tests.rs
* update based on feedback
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Move weight values to `frame_support`
* more accurate comment
* update balances
* vesting
* update util
* Add weight to time constants
* use weight constants in weights
* update tests
* Update chain spec for flaming fir 7
* Update sudo key
* Use fir7 for protocol
* Bump spec version
* Revert sudo change
* Rebuilt spec after all the changes. Flaming fir has been reset with this.
* start to try and implement noop
* txs as input
* better comment
* Add transfer reaping
* rename to avoid filter matching
* Update base weights based on results
* fix priority
* fix logic on reaping transfer
* Update bin/node/bench/src/import.rs
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* Update bin/node/bench/src/main.rs
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* add back size type (in-progress)
* bring back size type with custom
* update comment
* nit
* block type then size
* Use `transfer_keep_alive`
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* Add support for modules to require inherent to be present
* Bump node impl version
* Allow is_inherent_required itself to return error
This handles the case if runtime fails to check the inherent data (if the
inherent data is invalid, etc).
* typo: &module -> $module
* fix: iter