-
Notifications
You must be signed in to change notification settings - Fork 902
chore(docs): add priority mempool docs #1128
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
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a3b82c5
add priority mempool docs
2bf4ba1
fix evmosd config path in validators/setup/configuration.md
f7d08e8
address linter comments
57ec845
rename to mempool.md
90dcac1
address first review comments
404c09f
add EIP-1559 infos and remove implementation details
126438a
address linter comments
fa1cc0f
disable markdown link check for reference to feemarket files (copied …
2568946
address more review comments
3a3d04f
Merge branch 'main' into malte/add-priority-mempool-docs
MalteHerrmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<!-- | ||
order: 5 | ||
--> | ||
|
||
# Mempool | ||
|
||
Learn about the available mempool options in Tendermint.{synopsis} | ||
|
||
## FIFO Mempool | ||
|
||
The mempool holds uncommitted transactions, which are not yet included in a block. | ||
The default mempool implementation for Tendermint blockchains follows a first-in-first-out (FIFO) principle, | ||
which means the ordering of transactions depends solely on the order in which they arrive at the node. | ||
The first transaction to be received will be the first transaction to be processed. | ||
This is true for gossiping the received transactions to the rest of the peers as well as including them in a block. | ||
|
||
## Prioritized Mempool | ||
|
||
Starting with [Tendermint v0.35](https://github.com/tendermint/tendermint/blob/v0.35.0/CHANGELOG.md) | ||
(has also been backported to [v0.34.20](https://github.com/tendermint/tendermint/blob/17c94bb0dcb354c57f49cdcd1e62f4742752c803/UPGRADING.md?plain=1#L54)) | ||
it is possible to use a prioritized mempool implementation. | ||
This allows validators to choose transactions based on the associated fees or other incentive mechanisms. | ||
It is achieved by passing a `priority` field with each [`CheckTx` response](https://github.com/tendermint/tendermint/blob/17c94bb0dcb354c57f49cdcd1e62f4742752c803/proto/tendermint/abci/types.proto#L234), | ||
which is run on any transaction trying to enter the mempool. | ||
|
||
Evmos supports [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559#simple-summary) EVM transactions through its | ||
<!-- markdown-link-check-disable-next-line --> | ||
[feemarket](../../modules/feemarket/01_concepts.md) module. | ||
This transaction type uses a base fee and a selectable priority tip that add up to the total transaction fees. | ||
The prioritized mempool presents an option to automatically make use of this mechanism regarding block generation. | ||
|
||
When using the prioritized mempool, transactions for the next produced block are chosen | ||
by order of their priority (i.e. their fees) from highest to lowest. | ||
Should the mempool be full, the prioritized implementation allows | ||
to remove the transactions with the lowest priority until enough disk space is available for | ||
an incoming, higher-priority transaction (see [v1/mempool.go](https://github.com/tendermint/tendermint/blob/17c94bb0dcb354c57f49cdcd1e62f4742752c803/mempool/v1/mempool.go#L505C2-L576) implementation for more details). | ||
|
||
::: tip | ||
Even though the transaction processing can be ordered by priority, the gossiping of transactions will always be according to FIFO. | ||
::: | ||
|
||
## Configuration | ||
|
||
To use the a prioritized mempool, adjust `version = "v1"` in the node configuration at `~/.evmosd/config/config.toml`. | ||
The default value `"v0"` indicates the traditional FIFO mempool. | ||
|
||
See the relevant excerpt from `config.toml` here: | ||
|
||
```toml | ||
####################################################### | ||
### Mempool Configuration Option ### | ||
####################################################### | ||
[mempool] | ||
|
||
# Mempool version to use: | ||
# 1) "v0" - (default) FIFO mempool. | ||
# 2) "v1" - prioritized mempool. | ||
version = "v1" | ||
``` | ||
|
||
## Resources | ||
|
||
More detailed information can be found here: | ||
|
||
- [Tendermint ADR-067 - Mempool Refactor](https://github.com/tendermint/tendermint/blob/main/docs/architecture/adr-067-mempool-refactor.md). | ||
- [Blogpost: Tendermint v0.35 Announcement](https://medium.com/tendermint/tendermint-v0-35-introduces-prioritized-mempool-a-makeover-to-the-peer-to-peer-network-more-61eea6ec572d) | ||
- [EIP-1559: Fee market change for ETH 1.0 chain](https://eips.ethereum.org/EIPS/eip-1559) | ||
- [EIP-1559 FAQ](https://notes.ethereum.org/@vbuterin/eip-1559-faq) | ||
- [Blogpost: What is EIP-1559? How will it change Ethereum?](https://consensys.net/blog/quorum/what-is-eip-1559-how-will-it-change-ethereum/) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.