Skip to content
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

Fee Model Revision #3248

Closed
2 of 4 tasks
alexanderbez opened this issue Jan 8, 2019 · 4 comments · Fixed by #3258
Closed
2 of 4 tasks

Fee Model Revision #3248

alexanderbez opened this issue Jan 8, 2019 · 4 comments · Fixed by #3258

Comments

@alexanderbez
Copy link
Contributor

alexanderbez commented Jan 8, 2019

Summary

Let's face it, the current fee model/structure is pretty rigid, confusing, and bit error prone. As it stands right now:

  • Validators set their minimum fees via a flag or config
  • Clients specify gas and fees
  • The ante handler ensures:
    • fees >= (gas / 10000) + minFees (why are we adding on top of minFees???)
    • fees are deducted from user's account

Proposal

  • A validator specifies minimum gas price (as suggested by @sunnya97)
  • A client/user provides gas and fees, where fees / gas = gasPrice
  • The ante handler ensures:
    • gasPrice >= minGasPrice
    • fees are deducted from user's account

e.g. gaiacli tx send ... --gas=200000 --fees="2stake"

/cc @sunnya97 @ValarDragon @cwgoes @zmanian

ref: #3044


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@sunnya97
Copy link
Member

sunnya97 commented Jan 8, 2019

--gas-price=0.00001stake

Coins amounts can't be decimals.

This gets into question about nano-atom UX. Should we allow users to type --gas-price="0.00001stake" in the CLI, but in the background turn it into 10000natom?

On a related note, I still don't get why we can't have sdk.Coin use sdk.Dec?

@rigelrozanski
Copy link
Contributor

rigelrozanski commented Jan 8, 2019

@sunnya97

Should we allow users to type --gas-price="0.00001stake" in the CLI, but in the background turn it into 10000natom?

correct

On a related note, I still don't get why we can't have sdk.Coin use sdk.Dec?

the use of nano atoms should be entirely in the client (CLI/REST) as determined by numerous previous discussions - by the time the requests are hitting abci they should already be in nano-atoms. The CLI will process input from atoms with decimals to nano-atoms before broadcasting any message (as you've said).

we should probably create an ADR for using nano-atoms instead of decimals. I'm going to open up another issue to organize my thoughts on this matter in the meanwhile

Let's please move this discussion to this new issue #3251

@alexanderbez
Copy link
Contributor Author

Yes, all great points @rigelrozanski and @sunnya97. I have revised the description to revert back to --fees. In any case, the model will still hold that the client should do any parsing/translation before moving onto the ABCI.

@jackzampolin
Copy link
Member

Related to: #1008

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants