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
Implement pallet-bags-list and its interfaces with pallet-staking
#9507
Merged
Merged
Changes from 4 commits
Commits
Show all changes
290 commits
Select commit
Hold shift + click to select a range
ee7959d
remove extra whitespace
coriolinus f58bb3a
only emit rebag event on success
coriolinus 1cd8730
Merge branch 'prgn-nominator-unsorted-bags' of github.com:paritytech/…
coriolinus 3c92eda
add doc explaining the term voter
coriolinus 22bc615
revamp/simplify rebag test
coriolinus 4092fa8
ensure genesis accounts are placed into the correct nodes/bags
coriolinus 2182abe
bond_extra implicitly rebags
coriolinus 472baa9
types at top; doc public type
coriolinus f1e7fe7
start sketching out adjustable thresholds
coriolinus 16e4774
add integrity test for voter bag threshold requirements
coriolinus 2a4ebf7
get rid of BagIdx
coriolinus cc6d0df
implement migration logic for when the threshold list changes
coriolinus 88195fe
start sketching out threshold proc macros
coriolinus 70848ea
further refine macro signatures
coriolinus b630321
WIP: implement make_ratio macro
coriolinus 8ce3bc0
start rethinking the process of producing threshold lists
coriolinus 202def0
write helper functions to emit voter bags module
coriolinus 4da8204
WIP: demo generating voter bags for a realistic runtime
coriolinus 498ab65
rm unnecessary arg_enum
coriolinus 734ea86
fix voter bags math
coriolinus 3cfa8cf
add computed voter bags thresholds to node
coriolinus a05df69
fixup some docs
coriolinus 2838b83
iter from large bags to small, fulfuilling the contract
coriolinus 3f17724
make tests compile
coriolinus b73fd7f
add VoterBagThresholds to some configs
coriolinus c719c5c
Merge remote-tracking branch 'origin/master' into prgn-nominator-unso…
coriolinus 4861789
ensure that iteration covers all voters even with implied final bag
coriolinus 59041b7
use sp_std::boxed::Box;
coriolinus 646f708
Merge remote-tracking branch 'origin/master' into prgn-nominator-unso…
coriolinus f5c8a4d
fix unused import
coriolinus 5e05e3f
add some more voter bags tests
coriolinus dbf3a84
file_header.txt
coriolinus 873005e
Merge remote-tracking branch 'origin/master' into prgn-nominator-unso…
coriolinus d5e0c8d
integrity test to ensure min bag exceeds existential weight
coriolinus dbfb951
add more debug assertions about node list length
coriolinus 06e69a8
rm unused imports
coriolinus df75e66
Merge branch 'master' of github.com:paritytech/substrate into prgn-no…
kianenigma 6f15cc3
Kian enters
kianenigma 1b545e4
Update frame/election-provider-support/src/onchain.rs
kianenigma e0a00fd
Suggestions for #9081 (Store voters in unsorted bags) (#9328)
emostov 008cacf
Merge master pre-fmt
emostov 48ccfc9
merge fallout
emostov 225eb47
Merge origin master with new formatting
emostov acc9183
Merge remote-tracking branch 'origin' into prgn-nominator-unsorted-bags
emostov 1c56016
Run cargo +nightly fmt
emostov 1f02cb4
Fix a bunch of stuff, remove not needed runtime arg of make-bags
kianenigma 2f83f16
add logs
kianenigma abb61c1
Merge branch 'master' of github.com:paritytech/substrate into prgn-no…
kianenigma 0df47b0
Glue the new staking bags to the election snapshot (#9415)
kianenigma c1c4fcd
Merge remote-tracking branch 'origin' into prgn-nominator-unsorted-bags
emostov 2c5a20c
Merge branch 'master' of https://github.com/paritytech/substrate into…
emostov 8706404
Update node runtime with VoterSnapshotPerBlock
emostov 98a4b1f
Merge remote-tracking branch 'origin' into prgn-nominator-unsorted-bags
emostov ced6077
Unit test for pallet-staking unsorted bags feature (targets #9081) (#…
emostov da4814c
Try prepare for master merge
emostov d20278a
Try merge origin master
emostov 530e4d2
Reduce diff
emostov 99bd08b
Try merge origin master
emostov df990d3
Add comment for test to add
emostov 1632747
Add in code TODO for update_position efficiency updates
emostov dc3328e
Try merge origin master
emostov 97ca105
Initial impl compiles
emostov 44538b6
impl StakingVoterListStub
emostov 44dcc1d
Sample impl<T: Config> VoterListProvider<T> for VoterList<T>
emostov 79b8dca
impl VoterListProvider for voter-bags
emostov b3d0330
WIP integrate pallet-voter-bags to staking mock
emostov 4790ad5
the trait `pallet_staking::pallet::pallet::Config` is not implemented…
emostov abfc1de
random
emostov 863e744
pushing my stuff
kianenigma 5543005
merrged.
kianenigma e40efff
Mock working
emostov 3d545a9
WIP voter list tests
emostov 61f9af9
Add bag insert, remove tests
emostov 8b273ad
Add test for bag insert and remove
emostov c6d41b5
Add remaining tests for VoterList
emostov bf65a34
Add tests for node
emostov 123776c
Add rebag works
emostov 2907816
Add rebag extrinsic tests
emostov 286d07f
Rename to bags-list and name the list .. list!
emostov 2b7dc5e
Rename VoterBagThresholds => BagThresholds
emostov 7d6f221
Add test count_works
emostov b1f98e7
Test on_update_works
emostov 6d1d77e
test sanity check
emostov 333052a
a round of test fixes
kianenigma 894da3f
push a lot of changes
kianenigma 8757ac9
my last changes
kianenigma 3ff99e1
all bags-list test work; fmt
emostov bf41958
Merge branch 'zeke-voter-bags-module' of https://github.com/paritytec…
emostov e7d40fc
Beautify some tests
emostov 93a26f6
Doc comment for bags-list
emostov 569064a
Add insert warnings
emostov c128ffd
Setup initial benchmark
emostov d093a72
Wire up WeightInfo
emostov 5758bd3
is_terminal wip; everything broken!
emostov bf9197e
Is terminal working
emostov 7510ac7
add TODOs for remove_node
emostov 316eeb5
clean up remoe_node
emostov d9540de
Fix all staking tests
kianenigma ce85c12
retire VoterBagFor
kianenigma 238bdd6
commit
kianenigma 2f4e62c
bring in stashed changes
kianenigma 30423d4
save
emostov b59ab38
Merge branch 'zeke-voter-bags-module' of https://github.com/paritytec…
emostov 794fce0
bench pipeline works now, but I can't run stuff
kianenigma f5d9dc8
sabe
emostov cf2d1e7
Try merge
emostov c22e3fa
benchmarks now run, but we have a failure
kianenigma da3e0d5
WIP: Wire up make_bags
emostov 49828f4
bags-thresholds compiles
emostov 3e06c16
Merge branch 'zeke-voter-bags-module' of https://github.com/paritytec…
emostov 5b1f237
Fix most build issues
kianenigma 4a4b915
Merged
kianenigma 8fa8e6d
This will fix all the tests
kianenigma 54c250a
move bag thresholds to bags-list
emostov 23fd0a5
Merge branch 'zeke-voter-bags-module' of https://github.com/paritytec…
emostov 6d7bf29
Move bag-thresholds bin to within pallet-bags
emostov fb79356
Remove some unnescary TODOs
emostov dc2b593
Impl tets wrong_rebag_is_noop
emostov e68a9f2
assert remove is a noop with bad data
emostov 16ff8ba
Assert integrity test panics
emostov 4ff4551
Return an error when inserting duplicates
emostov 89bdefb
Update to handle error in staking pallet when inserting to list
emostov 168295e
Test contains and on_insert error
emostov 4c3d689
Test re-nominate does not mess up list or count
emostov 216718c
Everything builds and works, only the benchmark...
kianenigma b3424ed
fuck yeah benchmarks
kianenigma 09e0106
more cleanup, more hardening.
kianenigma e3f5f91
use the bags list again
kianenigma 7d78aaf
fix benhc
kianenigma ceb7066
Some questions and changs for List::migration
emostov b41564f
Fix migration removed_bags and new_bags usage
emostov 93b4455
Some trivial aesthetic changes
emostov c086721
Some more trivial changes
emostov fa87906
tiny changes/
emostov 928fa95
mega rename
kianenigma fe214d5
Upstream.into()
kianenigma db222f7
fix all tests and ci build
kianenigma 70bfc53
nit
kianenigma f665ea3
Test and fix migration
emostov 56b6e23
nit
emostov c09a2c0
fmt
emostov b3121e8
Try merge origin master
emostov b81cd60
cargo run --quiet --release --features=runtime-benchmarks --manifest-…
ddfe3c7
Master.into()
kianenigma 9c7d77f
Try merge origin master
emostov 601521f
fmt
kianenigma 81b3aaa
remove unused
kianenigma 0ac8b20
Merge branch 'master' of github.com:paritytech/substrate into zeke-vo…
kianenigma 66f9eda
make a few things pub
kianenigma 864d348
make node also pub.. for remote-ext test
kianenigma 88b694c
Master.into()
kianenigma 4c65bde
Fix all tests again
kianenigma d1588bf
Merge remote-tracking branch 'origin' into zeke-voter-bags-module
emostov 16bcd61
Merge branch 'master' of github.com:paritytech/substrate into zeke-vo…
kianenigma 418bb85
Merge branch 'zeke-voter-bags-module' of github.com:paritytech/substr…
kianenigma bd835d4
Force bag changes in relevant benchmarks (targets #9507) (#9529)
emostov 01dbd02
Try merge origin master
emostov 65682bb
Build works
emostov 6d69956
Apply suggestions from code review
emostov fa4844f
Apply suggestions from code review
emostov 9166eed
Remove commented out debug assert
emostov e7052d9
Remove some unused deps and some unused benchmarking stuff
emostov c9263bc
Fix stakings ElectionDataProvider clear
emostov ecddb82
cargo run --quiet --release --features=runtime-benchmarks --manifest-…
ceace6c
Merge branch 'master' of https://github.com/paritytech/substrate into…
emostov ef604fd
Merge branch 'master' of https://github.com/paritytech/substrate into…
e69ad5d
cargo run --quiet --release --features=runtime-benchmarks --manifest-…
708672d
cargo run --quiet --release --features=runtime-benchmarks --manifest-…
bb41a29
cargo run --quiet --release --features=runtime-benchmarks --manifest-…
a3c9624
Improving staking pallet-bags-list migration
emostov 0b5de63
Merge branch 'zeke-voter-bags-module' of https://github.com/paritytec…
emostov f25a2e7
fix build and some comments;
emostov b83afc3
comment
emostov 9de3c56
Reduce visibility in bags list components
emostov 6610e2d
make node.bag_upper only accesible to benchmarks
emostov fa372b4
Merge remote-tracking branch 'origin' into zeke-voter-bags-module
emostov 627bb16
Address some feedback; comments updates
emostov dba6875
use nominator map comment
emostov 0ca98f9
fix vec capacity debug assert
emostov accfafa
Apply suggestions from code review
emostov 80ec27f
clarify VoterSnapshotPerBlock
emostov 0c3a081
Reduce diff on create_validators by wrapping with_seed
emostov a182f58
Some small improvements to staking benches
emostov a87a6c5
Soem comment updates
emostov d547cb4
fix vec capacity debug assert ... for real this time
emostov 0a97cdb
Reduce ListBags viz
emostov e05e465
Merge branch 'master' of https://github.com/paritytech/substrate into…
478adb6
cargo run --quiet --release --features=runtime-benchmarks --manifest-…
90fc443
Merge branch 'master' of https://github.com/paritytech/substrate into…
8da3202
cargo run --quiet --release --features=runtime-benchmarks --manifest-…
2c9ebdb
Merge remote-tracking branch 'origin' into zeke-voter-bags-module
emostov 9ade86d
Remove supports_eq_unordered & Support eq_unordered
emostov 16a5c87
Update utils/frame/generate-bags/src/lib.rs
emostov 2ee478c
Make total-issuance & minimium-balance CLI args; Dont use emptry ext
emostov 2933daa
Improve docs for generate bags CLI args
emostov c2daac5
Apply suggestions from code review
emostov 2cbedc0
Apply suggestions from code review
emostov 4c8c4eb
Don't use default bags weight in node runtime
emostov bb5f968
Merge branch 'zeke-voter-bags-module' of https://github.com/paritytec…
emostov cf4990c
Feature gating sanity_check not working
emostov 3594eab
Feature gate sanity check by creating duplicate fns
emostov fa674aa
Fix line wrapping
emostov 0eb7bf2
Document VoteWeightProvider
emostov 36dafaa
Make bags ext-builder not a module
emostov 6f4043b
Apply suggestions from code review
emostov 1951b2a
use pallet_bags_list instead of crate in mock
emostov 97459c5
Make get_bags test helper fn live in List
emostov 651148e
use remove_from_storage_unchecked for node removal
emostov 6d4b526
Remove count of ids removed in remove_many
emostov b39e1c0
Add node sanity check, improve list sanity check
emostov 161c691
Do a list sanity check after on_update
emostov 597e186
List::migrate: clean up debug assert, exit early when no change in th…
emostov 06a05c4
Improve public doc comments for pallet_bags_list::list::List
emostov 69ac8c1
Improve public doc comments for pallet_bags_list::list::List
emostov 35a9471
Update generate bags docs
emostov 5ece97c
Master.into()
kianenigma cf63c63
Merge remote-tracking branch 'origin' into zeke-voter-bags-module
emostov 02f607a
Fix grammar in bags-list benchmark
emostov 2f18113
Add benchmark case for `rebag` extrinsic
emostov d8f3c1c
Add count parameter to List::clear; WIP adding MaxEncodedLen to list'
emostov 3af2543
MaxEncodeLen + generate_storage_info not working for Bag or Node
emostov 1047756
Get MaxEncodeLen derive to work
emostov be2038f
Try to correctly feature gate SortedListProvider::clear
emostov 080f1b6
Use u32::MAX, not u32::max_value
emostov 14b9120
Get up to nominators_quota noms
emostov 385138f
SortedListProvider::clear takes an Option
emostov adcf4bf
Eplicitly ignore SortedListProvider return value
emostov ce85f91
Fix doc comment
emostov a2899e6
Update node-runtime voter snapshot per block
emostov 2e9e317
Add test get_max_len_voters_even_if_some_nominators_are_slashed
emostov e6dd68b
Add test only_iterates_max_2_times_nominators_quota
emostov 76d01d8
Fix generate bags cargo.toml
emostov aa8c0cc
use sp_std vec
emostov ca1b6dd
Remove v8 migration hooks from pallet-staking
emostov b670dc2
TypeInfo merge wip
emostov 0a5fa7b
Update npos trait
emostov 904e4a8
Try respect line width
emostov b91487d
cargo run --quiet --release --features=runtime-benchmarks --manifest-…
59ed5c5
Update frame/bags-list/src/benchmarks.rs
emostov a78477c
Unwrap try-runtime error; remove sortedlistprovider pre upgrade len …
emostov 7b802cb
Merge branch 'zeke-voter-bags-module' of https://github.com/paritytec…
emostov ffa3a93
trigger ci
emostov ff0f48c
restore
emostov e162c0f
trigger ci
emostov 43a57f9
restore
emostov d96f2c2
trigger ci
emostov 9c2c6d0
revert
emostov 998c5d0
Merge remote-tracking branch 'origin' into zeke-voter-bags-module
emostov a645fd5
trigger ci
emostov 8002234
revert
emostov 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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.