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
pallet-vesting: Support multiple, merge-able vesting schedules #9202
Merged
Merged
Changes from all commits
Commits
Show all changes
167 commits
Select commit
Hold shift + click to select a range
fd523c8
Support multiple, mergable vesting schedules
emostov 73eb139
Update node runtime
emostov 100bca1
Remove some TODO design questions and put them as commennts
emostov 29898c4
Update frame/vesting/src/benchmarking.rs
emostov 5a41c95
Syntax and comment clean up
emostov c891107
Merge branch 'zeke-multi-vest-2' of https://github.com/paritytech/sub…
emostov 65eb0da
Create filter enum for removing schedules
emostov 4c95ba2
Dry vesting calls with do_vest
emostov fe24ab1
Improve old benchmarks to account for max schedules
emostov ce92a01
Update WeightInfo trait and make dummy fns
emostov 0f8fef8
Add merge_schedule weights
emostov 08d5475
Explicitly test multiple vesting scheudles
emostov ce18c07
Make new vesting tests more more clear
emostov 5e673b8
Apply suggestions from code review
emostov 1c1a56d
Update remove_vesting_schedule to error with no index
emostov 4ea964c
Try reduce spacing diff
emostov 48d0ec4
Apply suggestions from code review
emostov 1af7527
Use get on vesting for bounds check; check origin first
emostov fa3994d
Merge branch 'zeke-multi-vest-2' of https://github.com/paritytech/sub…
emostov b87b3c0
No filter tuple; various simplifications
emostov a429640
unwrap or default when getting user schedules
emostov bc35a10
spaces be gone
emostov ce49bc8
ReadMe fixes
emostov b0a7fed
Merge branch 'master' of https://github.com/paritytech/substrate into…
0a23437
Update frame/vesting/src/lib.rs
emostov 9225929
address some comments for docs
emostov 5b50b07
Try merge origin master
emostov 7fe0561
merge sched docs
emostov 6c864c7
Apply suggestions from code review
emostov 620535d
log error when trying to push to vesting vec
emostov 383ddb6
Merge branch 'zeke-multi-vest-2' of https://github.com/paritytech/sub…
emostov afe25d2
use let Some, not is_some
emostov 8abf51d
remove_vesting_schedule u32, not optin
emostov 23b35d4
new not try_new, create validate builder; VestingInfo
emostov cb5121d
Merge prep: break out tests and mock
emostov 1fa0abb
Try merge origin master (w/ move of tests and mock)
emostov 52ae49f
Add files forgot to include in merge
emostov 14510de
revert some accidental changes to merged files
emostov 0d28e03
Revert remaining accidental file changes
emostov 26ae627
More revert of accidental file change
emostov fed0878
Try to reduce diff on tests
emostov e60275d
namespace Vesting; check key when key should not exist;
emostov 089f5da
ending_block throws error on per_block of 0
emostov 3a3d227
Try improve merge vesting info comment
emostov 0b27654
Update frame/vesting/src/lib.rs
emostov 899859e
add validate + correct; handle duration > blocknumber
emostov 9924ddd
Move vesting_info module to its own file
emostov 4aaa158
Seperate Vesting/locks updates from writing
emostov 14cfd86
Add can_add_vesting schedule
emostov 482f1a5
Adjust min vested transfer to be greater than all ED
emostov f1a760e
Initial integrity test impl
emostov 7929278
merge_finished_and_yet_to_be_started_schedules
emostov 6b564d8
Make sure to assert storage items are cleaned up
emostov 279386a
Migration initial impl (not tested)
emostov 08da674
Correct try-runtime hooks
emostov 66c8fd2
Apply suggestions from code review
emostov aa88b65
header
emostov 62c3649
WIP: improve benchmarks
emostov 3f8c303
Merge branch 'zeke-multi-vest-2' of https://github.com/paritytech/sub…
emostov 652d3ee
Benchmarking working
emostov ec87a9a
benchmarking: step over max schedules
emostov 5e76128
Merge branch 'master' of https://github.com/paritytech/substrate into…
1b0eacb
cargo run --release --features=runtime-benchmarks --manifest-path=bin…
40fb449
Simplify APIs by accepting vec; convert to bounded on write
emostov 879a65d
Test: build_genesis_has_storage_version_v1
emostov 0b243e0
Test more error cases
emostov 1b6d3ec
Hack to get polkadot weights to work; should revert later
emostov a5299c7
Improve benchmarking; works on polkadot
emostov d885218
Merge branch 'master' of https://github.com/paritytech/substrate into…
d9c5488
cargo run --release --features=runtime-benchmarks --manifest-path=bin…
bd00ccc
WIP override storage
emostov bdeda40
Set storage not working example
emostov a42c8f6
Merge branch 'zeke-multi-vest-2' of https://github.com/paritytech/sub…
emostov 9c699e4
Remove unused tests
emostov e5af45f
Merge remote-tracking branch 'origin' into zeke-multi-vest-2
emostov f5aee3b
VestingInfo: make public, derive MaxEndcodedLen
emostov e67c6c5
Rename ending_block to ending_block_as_balance
emostov defb875
Superificial improvements
emostov 03e4399
Check for end block infinite, not just duration
emostov 848a4ad
More superficial update
emostov b202ff8
Update tests
emostov 38dfbcd
Test vest with multi schedule
emostov a9fca6d
Don't use half max balance in benchmarks
emostov 96af8dd
Use debug_assert when locked is unexpected 0
emostov 4d410f7
Implement exec_action
emostov c750bd8
Simplify per_block calc in vesting_info
emostov 24214ac
VestingInfo.validate in add_vesting_schedule & can_add_vesting_schedule
emostov 48dd1b5
Simplify post migrate check
emostov c3cae6b
Remove merge event
emostov 05bf0c5
Minor benchmarking updates
emostov e4493d7
Remove VestingInfo.correct
emostov ee6a75d
per_block accesor max with 1
emostov ba7bc83
Improve comment
emostov bd8fed2
Remoe debug
emostov ca727c6
Fix add schedule comment
emostov 366b93b
Apply suggestions from code review
emostov 01ecef5
no ref for should_remove param
emostov ace04cb
Merge branch 'zeke-multi-vest-2' of https://github.com/paritytech/sub…
emostov 09ef3e8
Remove unused vestingaction derive
emostov ce37a9e
Asserts to show balance unlock in merge benchmark
emostov 272d663
Remove unused imports
emostov 42a3fe1
Merge remote-tracking branch 'origin' into zeke-multi-vest-2
emostov 0b227c3
trivial
emostov 0630003
Fix benchmark asserts to handle non-multiple of 20 locked
emostov 03bbd59
Add generate_storage_info
emostov 22a1cae
migration :facepalm
emostov ff8c217
Remove per_block 0 logic
emostov ee82bf5
Update frame/vesting/src/lib.rs
emostov 5c02c57
Do not check for ending later than greatest block
emostov eae2fb0
Merge branch 'zeke-multi-vest-2' of https://github.com/paritytech/sub…
emostov af400f3
Apply suggestions from code review
emostov 6f2a618
Benchmarks: simplify vesting schedule creation
emostov e049325
Merge branch 'zeke-multi-vest-2' of https://github.com/paritytech/sub…
emostov b2109ff
Add log back for migration
emostov cb57017
Add note in ext docs explaining that all schedules will vest
emostov 1c0b8db
Make integrity test work
emostov dcdcda5
Improve integrity test
emostov 2ea52d2
Remove unnescary type param from VestingInfo::new
emostov 6d13d90
Remove unnescary resut for ending_block_as_balance
emostov 213a867
Remove T param from ending_block_as_balance
emostov fc094da
Reduce visibility of raw_per_block
emostov 9f1a90c
Remove unused type param for validate
emostov 28dab15
update old comment
emostov da79899
Make log a dep; log warn in migrate
emostov 7a05c71
VestingInfo.validate returns Err(()), no T type param
emostov 45726f7
Try improve report_schedule_updates
emostov 81a29af
is_valid, not validate
emostov 66bddb1
revert node runtime reorg;
emostov 83de83c
change schedule validity check to just warning
emostov 869103d
Simplify merge_vesting_info return type
emostov ab4cb46
Apply suggestions from code review
emostov b040038
Apply suggestions from code review
emostov adb28b0
Add warning for migration
emostov f3caa67
Fix indentation
emostov ee1b434
Delete duplicate warnings
emostov 83425fd
Reduce diff in node runtime
emostov 6db9f58
Fix benchmark build
emostov 985623e
Merge branch 'master' into zeke-multi-vest-2
emostov 5e4f653
Upgrade cargo.toml to use 4.0.0-dev
emostov 6e76ec0
Cleanup
emostov c524815
MaxVestingSchedulesGetter initial impl
emostov 830e04b
MinVestedTransfer getter inintial impl
emostov 2946f75
Test MaxVestingSchedules & MinVestedTransfer getters; use getters in …
emostov 94e50c5
Merge branch 'master' of https://github.com/paritytech/substrate into…
d5e6ac2
Merge branch 'master' into zeke-multi-vest-2
emostov 82e8061
Run cargo fmt
emostov a4b8061
Revert MinVestedTransfer & MaxVestingSchedules getters; Add integrity…
emostov 1af1708
Make MAX_VESTING_SCHEDULES a const
emostov db8c215
Merge remote-tracking branch 'origin' into zeke-multi-vest-2
emostov 884c150
fmt
emostov 2f6ba5e
WIP: benchmark improvements
emostov a94f0c9
Finish benchmark update
emostov dca7132
Add test for transfer to account with less than ed
emostov fd12e17
Rm min_new_account_transfer; move sp-io to dev-dep
emostov c471f9f
Reduce cargo.toml diff
emostov ed9878f
Explain MAX_VESTING_SCHEDULES choice
emostov 0c8c07e
Try merge origin master
emostov 7b82502
Fix after merge
emostov ca99a29
Try fix CI complaints
emostov bb3b591
cargo run --quiet --release --features=runtime-benchmarks --manifest-…
bb4138d
Merge branch 'master' of https://github.com/paritytech/substrate into…
23e15d9
cargo run --quiet --release --features=runtime-benchmarks --manifest-…
d5e5da7
Master.into()
kianenigma 0a11ab1
fmt
kianenigma 140af31
Merge remote-tracking branch 'origin' into zeke-multi-vest-2
emostov 81c064c
trigger
emostov 1b3c0c5
fmt
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
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.