This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Store validator approval-stakes in TargetList, use for ranking validators. #11013
Closed
kianenigma
wants to merge
64
commits into
master
from
kiz-revamp-sorted-list-providers-2-approval-stake
Closed
Changes from 46 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
500bc9d
Implement the new validator-in-bags-list scenario + migration
kianenigma ddcc81b
Apply suggestions from code review
kianenigma 41540f2
some review comments
kianenigma 8ba2563
Merge branch 'kiz-validators-in-bags' of github.com:paritytech/substr…
kianenigma c293a0c
Merge branch 'master' of github.com:paritytech/substrate into kiz-val…
kianenigma 398cf70
guard the migration
kianenigma 66fc7d2
some review comments
kianenigma 75989de
Fix tests 🤦♂️
kianenigma db2a7b8
Fix build
kianenigma 53561cb
Merge branch 'kiz-validators-in-bags' of github.com:paritytech/substr…
kianenigma 18fb2f4
lay the groundwork to store validators in a bags-list instance
kianenigma ae8165f
add migration struct
kianenigma 3e0a25d
make node-runtime build fine
kianenigma 8f74872
Merge branch 'master' of github.com:paritytech/substrate into kiz-val…
kianenigma ac6473b
Merge branch 'master' of github.com:paritytech/substrate into kiz-rev…
kianenigma 5c48b57
make instantiable
Doordashcon 90d09f2
update
Doordashcon 7d6cb8d
cargo fmt
Doordashcon 0304977
Merge branch 'paritytech:master' into ddc-BPL-T1
Doordashcon dc7bd89
Most things work now
kianenigma 7a55fad
Master.into()
kianenigma 44d1281
Upstream.into()
kianenigma b3f93c5
most things wokr now
kianenigma 1ac8c34
Master.into()
kianenigma 8cdd144
Everything merged, tests need a lot of fixing
kianenigma 700141e
All tests work now
kianenigma 93d79a4
dead-end with restricted nominations
kianenigma 2f295b7
dead-end with restricted nominations
kianenigma 29071fc
most tests work again
kianenigma 34b1d8a
use balance as the type for TargetList
kianenigma 8a431dd
a little bit of self-review
kianenigma 0ce73d5
Merge branch 'master' of github.com:paritytech/substrate into kiz-val…
kianenigma f892d04
fix weight_of_fn
kianenigma 5640da7
reformat line width
kianenigma 3aefa00
make const
kianenigma 0923d5b
use weight of fn cached
kianenigma 2ea0769
SortedListProvider -> VoterList
kianenigma 4c9ef4b
Fix all build and docs
kianenigma b311d03
check post migration
kianenigma a4bbda1
better doc
kianenigma 4c275a6
Upstream.into()
kianenigma 19bd4cd
mostly stable and working stuff
kianenigma bfe5d2a
Master.into()
kianenigma 43cec35
some fixes to make node-runtime work
kianenigma 0d395bb
Master.into()
kianenigma 0c8a891
Update frame/bags-list/src/list/mod.rs
kianenigma dbae8a5
small fixes + add an important TODO about a potential leftover bug
kianenigma 96948e0
Merge branch 'kiz-revamp-sorted-list-providers-2-approval-stake' of g…
kianenigma 7837d07
Master.into()
kianenigma cc7ee91
Fix a few things in the bags-list pallet
kianenigma a10ff10
cleanup a few things
kianenigma 488362c
Merge branch 'master' into kiz-revamp-sorted-list-providers-2-approva…
shawntabrizi 10a7ced
Update frame/staking/src/pallet/impls.rs
shawntabrizi 20bc48e
Update frame/bags-list/src/list/tests.rs
shawntabrizi 4e7821d
Fix everything build related
kianenigma b3ac3c4
Merge branch 'kiz-revamp-sorted-list-providers-2-approval-stake' of g…
kianenigma 3381b4c
Update frame/staking/src/pallet/mod.rs
kianenigma b3aeb44
some feedback
kianenigma 3258cc4
Merge branch 'kiz-revamp-sorted-list-providers-2-approval-stake' of g…
kianenigma d60d2ab
some review feedback
kianenigma 8e54545
fix compile
shawntabrizi f93563f
Merge branch 'master' into kiz-revamp-sorted-list-providers-2-approva…
shawntabrizi 518ffb3
fix warning
shawntabrizi 8457800
Merge branch 'master' into kiz-revamp-sorted-list-providers-2-approva…
shawntabrizi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -233,3 +233,206 @@ pub const THRESHOLDS: [u64; 200] = [ | |
| 17_356_326_621_502_140_416, | ||
| 18_446_744_073_709_551_615, | ||
| ]; | ||
|
|
||
| pub const THRESHOLDS_BALANCE: [crate::Balance; 200] = [ | ||
| 100_000_000_000_000, | ||
| 106_282_535_907_434, | ||
| 112_959_774_389_150, | ||
| 120_056_512_776_105, | ||
| 127_599_106_300_477, | ||
|
Comment on lines
+237
to
+242
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file was auto-generated, and now you have copy pasted some reused code here. you should generate a new file or make this in a new file or whatever, but not modify an auto-generated file. |
||
| 135_615_565_971_369, | ||
| 144_135_662_599_590, | ||
| 153_191_037_357_827, | ||
| 162_815_319_286_803, | ||
| 173_044_250_183_800, | ||
| 183_915_817_337_347, | ||
| 195_470_394_601_017, | ||
| 207_750_892_330_229, | ||
| 220_802_916_738_890, | ||
| 234_674_939_267_673, | ||
| 249_418_476_592_914, | ||
| 265_088_281_944_639, | ||
| 281_742_548_444_211, | ||
| 299_443_125_216_738, | ||
| 318_255_747_080_822, | ||
| 338_250_278_668_647, | ||
| 359_500_973_883_001, | ||
| 382_086_751_654_776, | ||
| 406_091_489_025_036, | ||
| 431_604_332_640_068, | ||
| 458_720_029_816_222, | ||
| 487_539_280_404_019, | ||
| 518_169_110_758_247, | ||
| 550_723_271_202_866, | ||
| 585_322_658_466_782, | ||
| 622_095_764_659_305, | ||
| 661_179_154_452_653, | ||
| 702_717_972_243_610, | ||
| 746_866_481_177_808, | ||
| 793_788_636_038_393, | ||
| 843_658_692_126_636, | ||
| 896_661_852_395_681, | ||
| 952_994_955_240_703, | ||
| 1_012_867_205_499_736, | ||
| 1_076_500_951_379_881, | ||
| 1_144_132_510_194_192, | ||
| 1_216_013_045_975_769, | ||
| 1_292_409_502_228_280, | ||
| 1_373_605_593_276_862, | ||
| 1_459_902_857_901_004, | ||
| 1_551_621_779_162_291, | ||
| 1_649_102_974_585_730, | ||
| 1_752_708_461_114_642, | ||
| 1_862_822_999_536_805, | ||
| 1_979_855_523_374_646, | ||
| 2_104_240_657_545_975, | ||
| 2_236_440_332_435_128, | ||
| 2_376_945_499_368_703, | ||
| 2_526_277_953_866_680, | ||
| 2_684_992_273_439_945, | ||
| 2_853_677_877_130_641, | ||
| 3_032_961_214_443_876, | ||
| 3_223_508_091_799_862, | ||
| 3_426_026_145_146_232, | ||
| 3_641_267_467_913_124, | ||
| 3_870_031_404_070_482, | ||
| 4_113_167_516_660_186, | ||
| 4_371_578_742_827_277, | ||
| 4_646_224_747_067_156, | ||
| 4_938_125_485_141_739, | ||
| 5_248_364_991_899_922, | ||
| 5_578_095_407_069_235, | ||
| 5_928_541_253_969_291, | ||
| 6_301_003_987_036_955, | ||
| 6_696_866_825_051_405, | ||
| 7_117_599_888_008_300, | ||
| 7_564_765_656_719_910, | ||
| 8_040_024_775_416_580, | ||
| 8_545_142_218_898_723, | ||
| 9_081_993_847_142_344, | ||
| 9_652_573_371_700_016, | ||
| 10_258_999_759_768_490, | ||
| 10_903_525_103_419_522, | ||
| 11_588_542_983_217_942, | ||
| 12_316_597_357_287_042, | ||
| 13_090_392_008_832_678, | ||
| 13_912_800_587_211_472, | ||
| 14_786_877_279_832_732, | ||
| 15_715_868_154_526_436, | ||
| 16_703_223_214_499_558, | ||
| 17_752_609_210_649_358, | ||
| 18_867_923_258_814_856, | ||
| 20_053_307_312_537_008, | ||
| 21_313_163_545_075_252, | ||
| 22_652_170_697_804_756, | ||
| 24_075_301_455_707_600, | ||
| 25_587_840_914_485_432, | ||
| 27_195_406_207_875_088, | ||
| 28_903_967_368_057_400, | ||
| 30_719_869_496_628_636, | ||
| 32_649_856_328_471_220, | ||
| 34_701_095_276_033_064, | ||
| 36_881_204_047_022_752, | ||
| 39_198_278_934_370_992, | ||
| 41_660_924_883_519_016, | ||
| 44_278_287_448_695_240, | ||
| 47_060_086_756_856_400, | ||
| 50_016_653_605_425_536, | ||
| 53_158_967_827_883_320, | ||
| 56_498_699_069_691_424, | ||
| 60_048_250_125_977_912, | ||
| 63_820_803_001_928_304, | ||
| 67_830_367_866_937_216, | ||
| 72_091_835_084_322_176, | ||
| 76_621_030_509_822_880, | ||
| 81_434_774_264_248_528, | ||
| 86_550_943_198_537_824, | ||
| 91_988_537_283_208_848, | ||
| 97_767_750_168_749_840, | ||
| 103_910_044_178_992_000, | ||
| 110_438_230_015_967_792, | ||
| 117_376_551_472_255_616, | ||
| 124_750_775_465_407_920, | ||
| 132_588_287_728_824_640, | ||
| 140_918_194_514_440_064, | ||
| 149_771_430_684_917_568, | ||
| 159_180_874_596_775_264, | ||
| 169_181_470_201_085_280, | ||
| 179_810_356_815_193_344, | ||
| 191_107_007_047_393_216, | ||
| 203_113_373_386_768_288, | ||
| 215_874_044_002_592_672, | ||
| 229_436_408_331_885_600, | ||
| 243_850_833_070_063_392, | ||
| 259_170_849_218_267_264, | ||
| 275_453_350_882_006_752, | ||
| 292_758_806_559_399_232, | ||
| 311_151_483_703_668_992, | ||
| 330_699_687_393_865_920, | ||
| 351_476_014_000_157_824, | ||
| 373_557_620_785_735_808, | ||
| 397_026_512_446_556_096, | ||
| 421_969_845_653_044_224, | ||
| 448_480_252_724_740_928, | ||
| 476_656_185_639_923_904, | ||
| 506_602_281_657_757_760, | ||
| 538_429_751_910_786_752, | ||
| 572_256_794_410_890_176, | ||
| 608_209_033_002_485_632, | ||
| 646_419_983_893_124_352, | ||
| 687_031_551_494_039_552, | ||
| 730_194_555_412_054_016, | ||
| 776_069_290_549_944_960, | ||
| 824_826_122_395_314_176, | ||
| 876_646_119_708_695_936, | ||
| 931_721_726_960_522_368, | ||
| 990_257_479_014_182_144, | ||
| 1_052_470_760_709_299_712, | ||
| 1_118_592_614_166_106_112, | ||
| 1_188_868_596_808_997_376, | ||
| 1_263_559_693_295_730_432, | ||
| 1_342_943_284_738_898_688, | ||
| 1_427_314_178_819_094_784, | ||
| 1_516_985_704_615_302_400, | ||
| 1_612_290_876_218_400_768, | ||
| 1_713_583_629_449_105_408, | ||
| 1_821_240_136_273_157_632, | ||
| 1_935_660_201_795_120_128, | ||
| 2_057_268_749_018_809_600, | ||
| 2_186_517_396_888_336_384, | ||
| 2_323_886_137_470_138_880, | ||
| 2_469_885_118_504_583_168, | ||
| 2_625_056_537_947_004_416, | ||
| 2_789_976_657_533_970_944, | ||
| 2_965_257_942_852_572_160, | ||
| 3_151_551_337_860_326_400, | ||
| 3_349_548_682_302_620_672, | ||
| 3_559_985_281_005_267_968, | ||
| 3_783_642_634_583_792_128, | ||
| 4_021_351_341_710_503_936, | ||
| 4_273_994_183_717_548_544, | ||
| 4_542_509_402_991_247_872, | ||
| 4_827_894_187_332_742_144, | ||
| 5_131_208_373_224_844_288, | ||
| 5_453_578_381_757_959_168, | ||
| 5_796_201_401_831_965_696, | ||
| 6_160_349_836_169_256_960, | ||
| 6_547_376_026_650_146_816, | ||
| 6_958_717_276_519_173_120, | ||
| 7_395_901_188_113_309_696, | ||
| 7_860_551_335_934_872_576, | ||
| 8_354_393_296_137_270_272, | ||
| 8_879_261_054_815_360_000, | ||
| 9_437_103_818_898_946_048, | ||
| 10_029_993_254_943_105_024, | ||
| 10_660_131_182_698_121_216, | ||
| 11_329_857_752_030_707_712, | ||
| 12_041_660_133_563_240_448, | ||
| 12_798_181_755_305_525_248, | ||
| 13_602_232_119_581_272_064, | ||
| 14_456_797_236_706_498_560, | ||
| 15_365_050_714_167_523_328, | ||
| 16_330_365_542_480_556_032, | ||
| 17_356_326_621_502_140_416, | ||
| 18_446_744_073_709_551_615, | ||
| ]; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.