* Fixes and tests
* Don't set subs be re-registered.
Also allow subs to de-register themselves and collect the deposit.
Also allow individual registering and removal of subs.
* Make it build
* Update frame/identity/src/lib.rs
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
* Tests
* Add benchmarks
* Add some reasonable weights
* Docs
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
* slots: create primitives crate for consensus slots
* offences: add method to check if an offence is unknown
* babe: initial equivocation reporting implementation
* babe: organize imports
* babe: working equivocation reporting
* babe: add slot number to equivocation proof
* session: move duplicate traits to session primitives
* babe: move equivocation stuff to its own file
* offences: fix test
* session: don't have primitives depend on frame_support
* babe: use opaque type for key owner proof
* babe: cleanup client equivocation reporting
* babe: cleanup equivocation code in pallet
* babe: allow sending signed equivocation reports
* node: fix compilation
* fix test compilation
* babe: return bool on check_equivocation_proof
* babe: add test for equivocation reporting
* babe: add more tests
* babe: add test for validate unsigned
* babe: take slot number in generate_key_ownership_proof API
* babe: add benchmark for equivocation proof checking
* session: add benchmark for membership proof checking
* offences: fix babe benchmark
* babe: add weights based on benchmark results
* babe: adjust weights after benchmarking on reference hardware
* babe: reorder checks in check_and_report_equivocation
* add normalize
* better api for normalize
* Some grumbles
* Update primitives/arithmetic/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* More great review grumbles
* Way better doc for everything.
* Some improvement
* Update primitives/arithmetic/src/lib.rs
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
* Fist draft of offchain weights
* Round of review feedback
* Update frame/staking/src/lib.rs
* Fix fuzzer
* Remove some redundant comment
* Weight refund for submit solution -- potentially revert.
* First version with custom trimming of the result.
* Update frame/staking/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Update frame/staking/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Apply suggestions from code review
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
* Update frame/staking/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Update frame/staking/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Some improvements
* Benchmark submit solution without phragmen (PR for First draft of offchain phragmen weights) (#6073)
* implementation of new benchmark
* address comments
* replace test
* Update frame/staking/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* update weight
* Fix refund
* Clean and rady for final bench
* Fix line-wdith
* Fix gitlab build
* Fix line-wdith
* Fix test macro
* Update frame/staking/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Update frame/staking/src/benchmarking.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Better length check
* Update frame/staking/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* Update final weight coefficients
* Update frame/staking/src/lib.rs
* Apply suggestions from code review
* Update frame/staking/src/testing_utils.rs
* Try and fix the line-width
* Revert "Try and fix the line-width"
This reverts commit b4e284727220085b9b3daf7682c4bbf29621da09.
* Try and fix the line-width the correct way
* Revert "Try and fix the line-width the correct way"
This reverts commit 04fce128e851c9584f9f0d708a5a73cae799d8c8.
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Gavin Wood <gavin@parity.io>
* 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>
* 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
* Optimize `decode_len`
Instead of reading the full storage value into the runtime, we only read
at maximum `5bytes` from the storage into the runtime. Furthermore this
drops any handling with regards to set default values in
`decl_storage!`. If the value does not exists or the decoding of the
length fails, it will return `None`. To prevent people from messing
stuff up, this feature relies on the `StorageDecodeLength` trait that is
sealed by `frame-support` (aka only implementable inside this crate).
* Some clean ups
* Update frame/support/src/storage/mod.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* remove old migration code
* Remove old staking
* Remove indices migration
* Remove upgrade test in transaction-payment
* oops
* Revert "Remove old staking"
This reverts commit 95262b1ac43c9b5bcf49d2ae80800feabcbbbaa0.
* remove migration test in staking
* fix warnings