Kian Paimani
ba229c629f
Refactor CurrencyToVote ( #6896 )
...
* Refactor CurrencyToVote to avoid calls to total_issuance.
* Update frame/support/src/traits.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Some grumbles
* Fix last grumbles.
* Fix comment
* Final fix
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2020-10-08 14:50:54 +00:00
Kian Paimani
4d036e0053
Fix offchain election to respect the weight ( #7215 )
...
* Mockup
* Fix offchain election to respect the weight
* Fix builds a bit
* Update frame/staking/src/offchain_election.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/staking/src/offchain_election.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
* Make it build, binary search
* Fix a number of grumbles
* one more fix.
* remove unwrap.
* better alg.
* Better alg again.
* Final fixes
* Fix
* Rollback to normal
* Final touches.
* Better tests.
* Update frame/staking/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
* Proper maxExtWeight
* Final fix
* Final fix for the find_voter
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com >
2020-10-02 13:45:17 +00:00
Bastian Köcher
86594727d9
Rename ModuleToIndex to PalletRuntimeSetup ( #7148 )
...
* Rename `ModuleToIndex` to `PalletRuntimeSetup`
Besides the renaming it also adds support getting the name of a pallet
as configured in the runtime.
* Rename it to `PalletInfo`
* Remove accidentally added files
2020-09-22 13:39:56 +00:00
Shawn Tabrizi
9aa8698cfc
WeightInfo for Vesting Pallet ( #7103 )
...
* WeightInfo for Vesting Pallet
* clean up weight docs
* Update lib.rs
* try to pipe max locks
* Update for new type
* add warning when locks > MaxLocks
* Update lib.rs
* fix compile
* remove aliasing, fix trait def
* Update
2020-09-16 19:48:10 +00:00
Gavin Wood
cad18b0fae
identity: Don't let subs be re-registered ( #6667 )
...
* 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 >
2020-07-17 11:11:03 +02:00
Shawn Tabrizi
2302898b8a
Add WeightInfo to all pallets with benchmarks. ( #6575 )
...
* Start adding weight info
* More weightinfo
* finish weight info
* more fixes
* inital update of node runtime
* fix the rest of the compilation
* update balances
* add docs
* fix balances tests
* Fix more tests
* Fix compile
* Fix pallet-evm tests
2020-07-08 18:22:01 +02:00
Guillaume Thiolliere
c2ad27271b
Introduce in-origin filtering ( #6318 )
...
* impl filter in origin
* remove IsCallable usage. Breaking: utility::batch(root, calls) no longer bypass BasicCallFilter
* rename BasicCallFilter -> BaseCallFilter
* refactor code
* Apply suggestions from code review
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* remove forgotten temporar comment
* better add suggestion in another PR
* refactor: use Clone instead of mem::replace
* fix tests
* fix tests
* fix tests
* fix benchmarks
* Make root bypass filter in utility::batch
* fix unused imports
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2020-06-15 17:05:41 +02:00
Kian Paimani
0eec4bb795
Accept new Phragmén solutions if they are epsilon better + Better pre-inclusion checks. ( #6173 )
...
* part1: Accept inly epsilon better solutions
* Fix pre-dispatch check
* Fix build
* review grumbles
* Epsilon -> Threshold
2020-06-02 17:22:56 +02:00
Tomasz Drwięga
f74a7171be
Maximum extrinsic weight limit ( #6067 )
...
* 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
2020-05-20 15:05:16 +02:00
Benjamin Kampmann
be8c96adec
Relax substrate licensing scheme ( #5947 )
2020-05-15 13:21:56 +02:00
Kian Paimani
ee54eff488
Enable Offchain Equalise ( #5683 )
...
* Master.into()
* Remove debug stuff
* Better license
* Migrate away from SimpleDispatchInfo
* Fix test
* Revert "Migrate away from SimpleDispatchInfo"
This reverts commit dbdd27fa19948f16bd17defdc01d3dd32986df11.
* Move to offchain randomness
* Fix tests
* Fix tests more
2020-04-27 18:51:46 +02:00