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

Add in protocol min gas price #12269

Closed
4 tasks
robert-zaremba opened this issue Jun 15, 2022 · 16 comments
Closed
4 tasks

Add in protocol min gas price #12269

robert-zaremba opened this issue Jun 15, 2022 · 16 comments
Assignees

Comments

@robert-zaremba
Copy link
Collaborator

robert-zaremba commented Jun 15, 2022

Summary

Last year we had many discussions about gas price problems and a need for solid fee market model

Problem Definition

Chains need a more robust way to define minimum gas price to better protect against network spam. We agree that the ultimate solution will be something like eip1559. But nobody is building it so far, and everyone has other priorities until they will see a fire.
Crypto.com takes more responsible approach and contributed with the multi-layer gas fee proposal. Tgrade implemented what we were proposing a short term solution: gov controlled min gas price. It seams Gaia team is looking to do it as well.

Proposal

Implement gov controlled min gas price. We need to decide how this will be handled:

  1. new gov param
  2. new message in x/auth

Personally I prefer the first one, unless we are really deprecating params and moving away from them.

This will be implemented as antehandler unless we take other directions on how "middlewares" will evolve next.

We can reuse one of:

Related


For Admin Use

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

We just need to bring over https://github.com/cosmos/gaia/tree/yaru/rho-glob-fee/x/globalfee or the TGrade implementation. I don't see a need to re-invent the wheel.

@alexanderbez
Copy link
Contributor

Also, this seems to be a duplicate of the original global min fee issue I wrote, which @marbar3778 closed in favor of your issue #8917, which I personally think is too broad in scope and should be closed with more concrete proposals.

@robert-zaremba
Copy link
Collaborator Author

oh, #8917 is a meta issue.

Where is your original issue? I don't see it mentioned in #8917 ...unless you are think about #4527

We just need to bring ...

Sure! Let's decide. How about using the Gaia implementation?

@alexanderbez
Copy link
Contributor

Yes #4527. I think we should just adopt what Gaia has IMO as a versioned module ;)

@robert-zaremba
Copy link
Collaborator Author

OK, I can handle that. IMO #4527 is different than this task.

@robert-zaremba robert-zaremba self-assigned this Jun 16, 2022
@tac0turtle
Copy link
Member

im not sure if this should be a module, I was thinking it could be a base app param, that if an app wants to use they can set to > 0.

@robert-zaremba
Copy link
Collaborator Author

That was the original idea: to use the param, but I think we want to go to module owned logic.

@robert-zaremba
Copy link
Collaborator Author

@alexanderbez it looks that @yaruwangway used the TGrade solution in Gaia.

The provenance solution is more complex. They have a mechanism to assess additional fees for every possible message type and smart contract. TGrade does what we need. Question is if we want to handle it through new module or bundle it in an existing module.

@alexanderbez
Copy link
Contributor

Sorry! I never meant to mention Provenance -- I meant TGrade the entire time (I got the two mixed up) :)

Yes, Gaia already uses the TGrade approach (a simple module). I think they modified it slightly? Is that true @yaruwangway?

In any case, I would say get that module into the SDK and we can call it a day. It's extremely simple and addresses users needs. I don't think this needs to exist in BaseApp @marbar3778.

@robert-zaremba
Copy link
Collaborator Author

I'm rebuilding that module in Umee to:

  1. Use gov execution
  2. Use the latest module structure

@yaruwangway
Copy link
Contributor

@alexanderbez , sry for the late reply.(was on holiday). gaia will introduce global fee and we plan to propose the global fee by gov proposal later. It is same module as tgrade. except we will still let global fee to bypass some configured msg types.

@alexanderbez
Copy link
Contributor

alexanderbez commented Jun 21, 2022

Got it. I think we should bring this module into the SDK and sub-module version it.

cc @marbar3778

I would close this issue and open a new one that states we will integrate or bring in the Tgrade module.

@yaruwangway
Copy link
Contributor

could we also allow bypass fees like https://github.com/cosmos/gaia/pull/1447/files ? for both global fee and the node's min_gas setup in app.toml

@robert-zaremba
Copy link
Collaborator Author

so these are two different features. I think we should do it separately but in the same module.

@alexanderbez
Copy link
Contributor

Message filtering is app specific -- that wouldn't belong in the SDK. If we want, we can add a no-op/empty list message filter ante handler decorator that apps can use to extend.

@alexanderbez
Copy link
Contributor

I'm closing this issue. The hub already introduced a min-fee mechanism via x/globalfee, which is based off of the work done in TGrade.

If we deem it necessary, we can simply just include that module in the SDK.

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

No branches or pull requests

5 participants
@robert-zaremba @alexanderbez @tac0turtle @yaruwangway and others