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
[Enhancement] Convert fast-unstake to use StakingInterface, decouplin… #12424
Merged
paritytech-processbot
merged 48 commits into
master
from
ru/feature/fast-unstake-istaking
Oct 29, 2022
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
3a11e89
[Enhancement] Convert fast-unstake to use StakingInterface, decouplin…
ruseinov 4f39589
Update primitives/staking/src/lib.rs
ruseinov 9b8e123
Update primitives/staking/src/lib.rs
ruseinov 25520d6
fix validator comment
ruseinov ad90903
remove todo
ruseinov 89b32b5
ideas from Kian (#12474)
ruseinov f51c073
Merge remote-tracking branch 'origin/master' into ru/feature/fast-uns…
41d04ad
Rename StakingInterface -> Staking for nomination-pools
ruseinov 7fc52f8
Staking fixes
ruseinov d3958ba
StakingInterface changes
ruseinov 2ff689c
fix fast-unstake
ruseinov 1fc6510
fix nomination-pools
ruseinov 28d15d7
Merge remote-tracking branch 'origin/master' into ru/feature/fast-uns…
0705029
Fix fast-unstake tests
ruseinov 39cf580
Fix benches for fast-unstake
ruseinov 8093567
fix is_unbonding
ruseinov 30a5882
fix nomination pools
ruseinov 37107ef
fix node code
ruseinov 097a9d1
add mock comments
ruseinov 613a701
fix imports
ruseinov e785dd5
remove todo
ruseinov 03586d7
more fixes
ruseinov 20a4f29
more fixes
ruseinov 9807cf2
bench fixes
ruseinov 3639af8
more fixes
ruseinov b7827d5
more fixes
ruseinov 5232b99
import fix
ruseinov f881456
more fixes
ruseinov c3cee71
more bench fix
ruseinov 068c565
refix
ruseinov ff36f90
refix
ruseinov 6f862e4
Update primitives/staking/src/lib.rs
ruseinov bff58a4
is_unbonding returns a result
ruseinov bdb525e
fix
ruseinov 4bd57b1
review fixes
ruseinov f6040ec
more review fixes
ruseinov 8c5604d
more fixes
ruseinov 731fab2
more fixes
ruseinov b90082a
Update frame/fast-unstake/src/benchmarking.rs
ruseinov 1eee8a5
remove redundant CurrencyBalance from nom-pools
ruseinov 1f4fad2
remove CB
ruseinov 27530dc
Merge remote-tracking branch 'origin/master' into ru/feature/fast-uns…
90cec9f
rephrase
ruseinov b1560aa
Apply suggestions from code review
kianenigma 75a36bb
Update frame/nomination-pools/src/tests.rs
kianenigma b3e843e
finish damn renamed
kianenigma 963837b
clippy fix
ruseinov cbed2f9
fix
ruseinov 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
fix validator comment
- Loading branch information
commit 25520d60a5f5a56e40ab809a078d4be5dc87b668
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kianenigma We might want to get rid of those, seems redundant now.:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I see why the old code was not returning
StakingLedger. We cannot useStakingLedgerinpallet-nomination-poolsorpallet-fast-unstakebecause it is defined in pallet-stakin.Putting it in a shared crate is also too much of a stretch in my opinion, because these types are arguably an implementation detail.
I think we should keep these, not have
get_ledgerandget_exposureand instead create other API function that express a condition, a state or a behavior rather than the explicit type.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we introduce a special type that will take values out of StakingLedger? Like type
Ledger. It could even be an alias for now and then change if needed.This makes very little sense to keep as is, because:
We'd need to call three different methods that operate on exactly the same storage item. Actually no, 4!
At the very least that's not very dry and also a bit of overhead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my answer to this and many other aspects can be found in ru/feature/fast-unstake-istaking...kiz-ru/feature/fast-unstake-istaking