Cosmos-sdk: Self delegation flag should be marked required

Created on 12 Feb 2019  Â·  7Comments  Â·  Source: cosmos/cosmos-sdk

Summary of Bug

/Users/fabo/Development/voyager/builds/Gaia/darwin_amd64/gaiacli tx staking create-validator --home /Users/fabo/Development/voyager/builds/testnets/local-testnet/cli_home_2 --from local_2-operator --amount=10000000stake --pubkey=cosmosvalconspub1zcjduepqq0qh8keu8wcc2dn0zy7kk4238mufh43x86x2u4ryrly0u0p426hq3mvl9x --address-delegator=cosmos1ce32g8ysh4kzxmvyp7mtcgtns3vxcqcks6xr0a --moniker=local_2 --chain-id=local-testnet --commission-max-change-rate=0 --commission-max-rate=0 --commission-rate=0 --output=json

produces:

ERROR:
Codespace: staking
Code: 101
Message: "minimum self delegation must be a positive integer"
/Users/fabo/Development/voyager/builds/Gaia
/darwin_amd64/gaiacli version
0.31.1-10-gfe548c08

Steps to Reproduce


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

Most helpful comment

Most certainly I do not think we should have a default! But we should mark it required, yes :)

All 7 comments

@faboweb yes you must provide a --min-self-delegation which must be positive.

Should we make this flag required or set a sane default?

Most certainly I do not think we should have a default! But we should mark it required, yes :)

Quicky: Why does a validator set a "minimum self delegation". He is the only one who can self delegate right?!

Precisely @faboweb. The validator states, "This is the minimum amount of staking tokens I shall have self-bonded at all times (or else I'll be slashed), instilling confidence (or worry) in my delegates".

ahhhhh. why is this mandatory then?!

@faboweb it has to be set to some non-zero value and we don't want a default which would screw over validators if they're lazy/don't know any better, hence it's required -- it's no different to why commission is required :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cwgoes picture cwgoes  Â·  3Comments

ValarDragon picture ValarDragon  Â·  3Comments

ValarDragon picture ValarDragon  Â·  3Comments

ValarDragon picture ValarDragon  Â·  3Comments

faboweb picture faboweb  Â·  3Comments