-
Notifications
You must be signed in to change notification settings - Fork 98
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
Staking fixes #912
Staking fixes #912
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #912 +/- ##
===========================================
+ Coverage 95.15% 96.03% +0.87%
===========================================
Files 82 81 -1
Lines 1487 1489 +2
Branches 78 78
===========================================
+ Hits 1415 1430 +15
+ Misses 59 49 -10
+ Partials 13 10 -3
|
I can't reproduce the remaining bugs in #842 with my local testnet (it would probably be easier if the testnet was up). We should probably merge the changes we have in the PR so far, then put the remaining problems into their own ticket(s). |
Pulling in @nylira and @jolesbi for design |
The only thing added is the Did we solve the question of what delegators can do if they delegated tokens to revoked validator? |
@rigelrozanski What can delegators do if they delegated tokens to revoked validator? |
@faboweb When a validator is revoked it begins the unbonding process. During the unbonding process a delegator can either instantaneously redelegate, OR commit to unbonding. During this unbonding process if the validator is unrevoked and becomes bonded again (if they are in the top 100 validators) then they will automatically bond all the stake associated with that validator as well as all their delegators stake who haven't redelegated or who have NOT committed to unbonding. The same mechanisms apply after the validator has been unbonding enough and it now fully unbonded, delegators can then opt to commit to unbonding, but since the unbonding period has already passed they will simply get their funds instantaneously |
Nice. Thank you for the clarification. |
Added the warning. For simplicity I added the warning once, if there are any revoked validators. |
@@ -41,13 +39,15 @@ export default ({ dispatch, node }) => { | |||
async getDelegates({ state, dispatch, commit, rootState }) { | |||
commit("setDelegateLoading", true) | |||
let delegates = await node.candidates() | |||
let { validators } = await node.getValidators() |
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.
this is only happening once. can we use the rpc event to requery the validators when they change?
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.
Put this as a follow up #946
Posted errors are fixed. Note: Unbonding shares are currently not accessible but will be in future SDK versions. |
…yager into matt/842-staking-fixes
---EDIT---- Using local testnet i import my new account and go to staking page.
|
ok, landing back in the updated app i still had this strange decimal balance of atoms delegated to myself. Trying to increase them resulted in the In the list of all validators (where I am the only one) I now have 0 votes, but also 100% of the votes (because i am the only one i guess). It says NaN under total votes with a full bar. Click next again I raise my delegation to the full 150 and click submit and get this huge error:
|
Apparently the SDK sends staked shares in some weir rational format i.e. |
I am seeing similar problems with the stake calculation: Data:
/stake/cosmosaccaddr1znx55r09uks9kreft3rrn22j3cpf6mh5s6yymt/bonding_status/cosmosvaladdr1znx55r09uks9kreft3rrn22j3cpf6mh5kt3n4j
Pulling in @rigelrozanski for debugging. |
so we decided to merge this and make a new issue right? |
If you approve the code. ;) |
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.
😅
Closes #842
Closes #880
Hide grey bar when we previously had 0 bonded to a validator
Show inline errors when user tries to bond too much
Indicate if a validator is revoked
Fetch validator set when fetching candidates, so we can indicate which candidates are currently validators (closes Validator status still faked by utility script #880)