Currently we have to parse the validator token value in order to handle decimals (See discussion).
According to @cwgoes, tokens are integers (i.e sdk.Dec) now that we changed the type from sdk.Rat.
DelegationWithoutRat structTokens are sdk.Int and never had decimals - but validator power is sdk.Dec, maybe that's what you're referring to?
@cwgoes validator tokens are sdk.Dec according to validator.go#L28
@cwgoes validator tokens are sdk.Dec according to validator.go#L28
Yup - regular tokens are sdk.Int, validator tokens are presently sdk.Dec, although @rigelrozanski is this still necessary?
Once fee distribution is implemented there will be no need for validator tokens to be decimal - only the fee-distribution mechanism will hold atom "pieces" (which is required for validator reward micro-payments like inflation)
Once fee distribution is implemented there will be no need for validator tokens to be decimal - only the fee-distribution mechanism will hold atom "pieces" (which is required for validator reward micro-payments like inflation)
Fantastic, that will simplify this point for Voyager too then. Note that we'll need to choose a rounding direction when slashing.
@cwgoes let's round to always slash more tokens
@cwgoes let's round to always slash more tokens
Agreed, and if we have fractional Atoms the impact will be pretty minor.
Didn't we get fractional atoms in?
Not yet -just opened an issue: https://github.com/cosmos/cosmos-sdk/issues/2483
Closing due to fee distribution being merged, and these are now Ints.
Most helpful comment
Not yet -just opened an issue: https://github.com/cosmos/cosmos-sdk/issues/2483