-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dapp staking v3 - Freeze Improvements #1164
dapp staking v3 - Freeze Improvements #1164
Conversation
/bench shiden-dev pallet_dapp_staking_v3,pallet_collator_selection |
Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/7798144646. |
Benchmarks have been finished. |
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.
LGTM. Maybe the two AccountCheck
trait definitions could be merged into one?
Initially I used |
Minimum allowed line rate is |
* dApp staking v3 & Tokenomics 2.0 - Shiden Integration * Full integration * Changes * Fix * Proper fix, really * Fix for ed issue * Fix formatting * Weights * Resolve TODOs * Minor changes * Fmt fix * Bump versions * Comment * dapp staking v3 - Freeze Improvements (#1164) * Init commit * Collator selection change * Collator selection update * Integration tests * Update astar spec due to changes * Weight updates
It's all right. I don't have a strong opinion, just a small suggestion. Two distinct types help with readability. |
Overview
dApp staking v3 will now check for total balance when locking (freezing) some amount, instead of just free balance.
This is due to the freeze overlapping with the reserve/holds.
This PR addresses the collator selection issue, where slash can happen due to missed blocks.
There's still the remaining issue of
pallet-identity
but the call that can cause slash is privileged so for now we can consider it to be ok.Pallets
Runtime
For UI Team
There are essentially two changes to account for:
1. Available Lock Balance Change
total_balance(...)
of an account is the sum offree
andreserved
balances:2. Collator Not Allowed To Participate in dApp Staking
If the database entry
CollatorSelection::Candidates
contains the staker account,lock
operation will fail withAccountNotAvailableForDappStaking
error.Check list