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

Enforce new base fee in mempool after gas market base fee update #1183

Open
cryptoAtwill opened this issue Oct 24, 2024 · 5 comments
Open

Enforce new base fee in mempool after gas market base fee update #1183

cryptoAtwill opened this issue Oct 24, 2024 · 5 comments
Assignees

Comments

@cryptoAtwill
Copy link
Contributor

With the introduction of gas market, block gas limit and base fee rotation were introduced. However, there is a missing piece when the base fee is updated, it should be enforced in the mempool for message selections: i.e. message in mempool below the new base fee, should be deprioritised for message selection.

@cryptoAtwill
Copy link
Contributor Author

There are two main solutions proposed:

  • Give cometbft n * block_gas_limit or potentially -1 so that cometbft will feed more messages to fendermint and fendermint does the message selection instead. This is slightly difficult to determine what n should be and feeding more messages to fendermint could be wasteful.
  • Make use of cometbft's priority in check_tx. Basically the txns with higher base fee are given higher priorities. At the same time, cometbft will have recheck enabled so that priorities are not fixed. Ofc gas is just one factor of priority and priority calculation can be generalized.

Method 2 is preferred at the moment.

@cryptoAtwill cryptoAtwill self-assigned this Oct 24, 2024
@sanderpick
Copy link
Contributor

when you say,

i.e. message in mempool below the new base fee, should be deprioritised for message selection.

do this imply that during time of zero network usage (zero block gas utilization), that a user could set gas_fee_cap to 0 and get free block space? this is an edge case but just curious what the intention is.

@cryptoAtwill
Copy link
Contributor Author

cryptoAtwill commented Oct 25, 2024

@sanderpick zero network usage should not have cause base fee to 0, the current gas market actor has a minimal_base_fee setting (non-zero generally) that prevents this from happening. So even if a block is empty, there is no free ride.

@sanderpick
Copy link
Contributor

cool, makes sense. so instead of "message in mempool below the new base fee, should be deprioritised for message selection", it should just be rejected / dropped

@cryptoAtwill
Copy link
Contributor Author

@sanderpick Not sure if we should drop them, because base fee varies, so next block those txns might have reached the base fee requirement.

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

No branches or pull requests

2 participants