Closed mdyring closed 5 years ago
In the examples above, muon
is mispelled.
Possible answer?
I see nothing wrong with the semantics of scenario 2 -- I cannot reproduce this locally.
I see nothing wrong with the semantics of scenario 4 -- you don't have enough funds for the tx; nothing to do with fees it seems.
In the examples above,
muon
is mispelled.
Ooops. Must be testnet fatigue setting in. :-)
Using "muon" solved Scenario 4.
Scenario 2 should AFAICS accept any fee token (also --fees 100yada), since minimum-gas-prices is empty. In case it only accepts "well known" denoms, a better error message would be nice, like "unknown coin denom: denom".
@alexanderbez I can reproduce Scenario 2 by commenting out any settings in gaiad.toml (no command line arguments to gaiad either, except --home)
gaiacli tx staking create-validator --chain-id gaia-11001 --amount 40000000muon --min-self-delegation 3333 ... --fees 1yada
Response:
TxHash: 6A9377069640C9AD0D011654144065745BD3C409E0BC60D8A085149A8342DB75
ERROR: {"codespace":"sdk","code":5,"message":"10000000000muon,10000000000photino \u003c 1yada"}
I guess since the error message contains both muon and photino, they are the only "well known" and accepted denoms. I do wonder where the amounts "10000000000" come from, though.
@mdyring this comes from DeductFees
in the ante handler. This is stating that your coins (spendable) < givenFee
. In other words, the fee denom you gave exists at a lesser amount in your account.
Ah, yeah make sense in a way. I have (implicitly) a 0yada balance.
Not a major issue, but think it would be nice to have (post launch perhaps?) a better error message in case of non-existing denoms - just in case of the odd typo.
@mdyring yes I can improve the error message. However, in this case we dont know which case is the result -- do you not have the denom or do you not have enough.
sudo gaiacli tx staking create-validator --address-delegator
--amount 10000000000muon --commission-max-change-rate 1 --commission-max-rate 1 --commission-rate 1 --fees 200000photino --from bharvest --min-self-delegation 100 --moniker bharvest --chain-id gaia-11001 --pubkey $(sudo gaiad tendermint show-validator)This worked for me
@mdyring yes I can improve the error message. However, in this case we dont know which case is the result -- do you not have the denom or do you not have enough.
Right, after looking at code I can see it should work, if I tried to pay with "yada" denom coins and I actually had a yada balance.
Closing and thanks for your help @alexanderbez.