Cosmos-sdk: Validator FAQ

Created on 30 Jul 2018  Â·  6Comments  Â·  Source: cosmos/cosmos-sdk

had some good conversations with @gamarin2 -> we should add this information to docs somewhere?

gamarin
6 questions related to staking module:

  • Is there a command for validators to increase their self-bond?
  • Is there a time limit after which a revoked validator is ejected from val set? (cause to my understanding being revoked only means you don't participate on consensus anymore, but you can still opt in at any moment, and you still take a spot in the val set)
  • Is there a way to notify the network that you delete your validator? Like if a validator is just a candidate not in the validator set and wants to quit being a candidate
  • Is there a way to query the entirety of validators AND validator candidates (declared candidates not in the val set)?
  • What type of shares do I get when I delegate to a validator candidate (not in val set). Is my delegation counted towards total delegation? If not, does it mean the app iterates over delegators when candidate enters val set?
  • If you delegate to a validator candidate (not in val set), can you undelegate immediately (without having to wait for unbonding period)? If yes, is there an associated command?

rigel
Great questions, feel like documenting these answers somewhere? FAQ in sdk? (@jbibla ) - Also I think this would have been good to ask on the cosmos-forum and then maybe link to it here and tag a few folks such as myself/chris/dev/etc.

Is there a command for validators to increase their self-bond?

Yes, the self bond is the self delegation so by sending more delegated tokens to the self delegation through the gaiacli stake delegate (where --address-validator is set to your validator) you increase your self-delegation

Is there a time limit after which a revoked validator is ejected from val set? (cause to my understanding being revoked only means you don’t participate on consensus anymore, but you can still opt in at any moment, and you still take a spot in the val set)

When you are revoked you are actually no-longer a validator, you straight-up get kicked out - you still keep your delegations, but the whole validator and delegators begin the unbonding process (Validator unbonding process currently unimplemented but to be implemented soon) - if you send an unrevoke transaction and you have enough tokens to be in the bonded-validator set, then you are re-added back into the bonded-validator set. - so to answer your question explicitly, there is no time limit you are removed immediately, then you are unbonded after the unbonding period. (note there sometimes is a timelimit on when you are permitted to send an “unrevoke” message aka if you’re a very bad-boy you maybe need to wait a day before the unrevoke message would be valid.

Is there a way to notify the network that you delete your validator? Like if a validator is just a candidate not in the validator set and wants to quit being a candidate

note on language - we’re only using validators now, the old word “candidate” effectively means non-bonded-validator. If you want to nolonger be a validator you must unbond your tokens from your validator with the unbond transaction. If the validator is not currently a part of the bonded-validator set then removing tokens should be instant.

Is there a way to query the entirety of validators AND validator candidates (declared candidates not in the val set)?

Candidates are no longer a thing, there are only validators, unbonded/unbonding/bonded - the current function gaiacli stake validators querys for ALL of these

What type of shares do I get when I delegate to a validator candidate (not in val set). Is my delegation counted towards total delegation? If not, does it mean the app iterates over delegators when candidate enters val set?

I’m not sure what you mean by total-delegation, your total delegated active power? if you are delegated to an unbonded-validator than those atoms cannot count towards voting, nor will they receive rewards. Your delegation to any validator simply holds delegation-shares indexed by the validator - no iteration of the delegators occurs when that validator enters the validator set - as a delegator your shares simply become eligible to redeem rewards at that point - all operations for delegators (besides slashing) are done passively.

If you delegate to a validator candidate (not in val set), can you undelegate immediately (without having to wait for unbonding period)? If yes, is there an associated command?

Yes, the regular unbond command should work instantly (gaiacli stake begin-unbond), I just opened up an issue to make sure that this is actually the case (i suspect it may put you in the unbonding period which would be a bug - https://github.com/cosmos/cosmos-sdk/issues/1877)

gamarin
Great questions, feel like documenting these answers somewhere? FAQ in sdk?

Yes, I think we should have product sections in the forum

Yes, the self bond is the self delegation so by sending more delegated tokens to the self delegation through the gaiacli stake delegate (where --address-validator is set to your validator) you increase your self-delegation

This should be documented on the testnet README. Is someone maintaining testnet READMe atm zaki

When you are revoked you are actually no-longer a validator, you straight-up get kicked out - you still keep your delegations, but the whole validator and delegators begin the unbonding process

So being revoked means begin unbonding? I think the whole revoked terminology should be better documented, at least in the testnet README. I can do it when I fully understand all the little details.

Btw, yesterday, when we reached max number of validator, a friend of mine got kicked out of the val set. First he tried to unrevoke, but the err message said he wasn't revoked (it should have been the case right? (getting kicked out = getting revoked = start unbonding). Also, he could not increase his delegation in this state, see https://github.com/cosmos/cosmos-sdk/issues/1872#issuecomment-408689458 and https://github.com/cosmos/cosmos-sdk/issues/1872#issuecomment-408712448

note on language - we’re only using validators now, the old word “candidate” effectively means non-bonded-validator.

Ok, but please keep me informed of this. I need to update all validator doc, which still contains many occurrence of "Validator candidate".

Candidates are no longer a thing, there are only validators, unbonded/unbonding/bonded - the current function gaiacli stake validators querys for ALL of these

I also feel we need a queries section somewhere

I’m not sure what you mean by total-delegation, your total delegated active power? if you are delegated to an unbonded-validator than those atoms cannot count towards voting, nor will they receive rewards. Your delegation to any validator simply holds delegation-shares indexed by the validator - no iteration of the delegators occurs when that validator enters the validator set - as a delegator your shares simply become eligible to redeem rewards at that point - all operations for delegators (besides slashing) are done passively

I see. So is there is a claim-reward tx? And when you unbond you automatically claim all your rewards? But that seems to be in contradiction with the fact that rewards are liquid (which is what I understood from latest convo). Maybe they're liquid but you still need to claim them? Otherwise I don't understand how we deal with computational complexity.

Yes, the regular unbond command should work instantly (gaiacli stake begin-unbond), I just opened up an issue to make sure that this is actually the case (i suspect it may put you in the unbonding period which would be a bug - https://github.com/cosmos/cosmos-sdk/issues/1877)

Understood. For now I will create a post somewhere in the forum to gather these answer, but we should think about how to document all of this properly going (edited)

Additional question (not sure you answered it) Can you delete your validator? Cause it seems that when you become unbonded, you are still in the validator set, and people might delegate to you. If you want to quit as a validator, how can you do this?

rigel

So being revoked means begin unbonding?

when you are revoked you begin unbonding -BUT you also are marked separately as “revoked until block/time XXX” meaning you can’t bond again until that block/time is reached

I think the whole revoked terminology should be better documented, at least in the testnet README. I can do it when I fully understand all the little details.

Agreed, awesome! much appreciated!

Btw, yesterday, when we reached max number of validator, a friend of mine got kicked out of the val set.

could you open up a bug report for these issues? I think they’re unrelated to the issue which you commented on - it would be valueable to have!

So is there is a claim-reward tx?

It’s in development

And when you unbond you automatically claim all your rewards?

Correct, any changes in delegation power simultaniously withdraw any rewards you have at that moment (needed for the passive accounting mechanism)

But that seems to be in contradiction with the fact that rewards are liquid (which is what I understood from latest convo)

it’s not in contradiction, they require a transaction to withdrawl but this transaction gives you the rewards instantly there is no unbonding period required.

Maybe they’re liquid but you still need to claim them?

correct

Can you delete your validator? Cause it seems that when you become unbonded, you are still in the validator set, and people might delegate to you. If you want to quit as a validator, how can you do this?

aha - just realized I don’t think this mechanism is working properly - opened an issue - https://github.com/cosmos/cosmos-sdk/issues/1883

  • when the final token is unbonded from the validator, it is permanently deleted from the new state - however, what should be happening is as soon as the validator unbonds it’s final self-delegated token, that validator should no-longer be able to accept new delegators - this mechanism is not yet implemented as per the opened issue
docs

Most helpful comment

I think a validator FAQ is an excellent idea - perhaps also one for delegators, who will likely have somewhat different questions.

All 6 comments

I think a validator FAQ is an excellent idea - perhaps also one for delegators, who will likely have somewhat different questions.

Oh yeah delegator faq! great idea!

We are currently running a blog series that has some of this content. We already shipped the validator Q&A and we are working on pushing out the delegator Q&A. cc @Michelle-L

@jbibla dope... maybe let's update for any relevant questions answered from this discussion

Was this page helpful?
0 / 5 - 0 ratings