-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add consensus min_fee for gas #7
Comments
Simplest thing would be an AnteHandler indeed which load the min fee from params. The cosmos sdk has a param update proposal type so we are covered. |
Yup, there are heavy discussions on how to do this for Cosmos-SDK. Happy to use theirs when they figure it out. Let's keep it simple and stupid for now, but yeah, as a placeholder until an awesome solution is out there. I assume there is no need for paying fees in multiple tokens, which is one of the issues the hub is trying to resolve along with EIP-1559 |
(Possibly) relevant discussion here: cosmos/cosmos-sdk#8224 We just do "minfee in params" to get this going |
Update: this became very urgent to other sdk folks and they have a meta issue to track designs. Good to follow this for longer-term answers cosmos/cosmos-sdk#8917 |
For the simple param-based consensus min-fee, Marko started mocking up a demo to show how it can be done: https://github.com/marbar3778/fee/blob/main/app/ante.go Note it currently only handles CheckTx, but we want it to handle DeliverTx as well: https://github.com/marbar3778/fee/blob/main/app/feeParam.go#L72-L75 (This can be used to enforce consensus min fee in DeliverTx and added to the current subjective ones. Which allows validators to quickly raise the subjective min fee if there is a spam attack) |
Cosmos has an interesting idea to allow validators to quickly adjust the block gas by making it subjective - each validator sets the required gas to enter a block their produce. While it is quite flexible to allow responding to spam (raising min gas quickly and temporarily based on off-chain social coordination), it does a poor job providing a stable baseline for running the chain. Many validators forget and leave 0 gas. Trying to convince everyone to set a similar value is quite difficult (outside of an emergency).
We should add an "AnteHandler" that enforces a min-gas fee, which can be set in genesis and adjusted by governance proposals.
The text was updated successfully, but these errors were encountered: