Skip to content
This repository was archived by the owner on Apr 4, 2024. It is now read-only.

Commit 51a3d61

Browse files
imp (docs): Point to Evmos mempool docs for tx prioritization (#1536)
* Adjust priority tip docs to point to Evmos mempool docs * remove some typos and out of place commas in feemarket concepts * add missing "in" Co-authored-by: Federico Kunze Küllmer <[email protected]>
1 parent 9f23f29 commit 51a3d61

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

x/feemarket/spec/01_concepts.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,26 @@ Before EIP-1559 the transaction fee is calculated with
1414
fee = gasPrice * gasLimit
1515
```
1616

17-
, where `gasPrice` is the price per gas and `gasLimit` describes the amount of gas required to perform the transaction. The more complex operations a transaction requires, the higher the gasLimit (See [Executing EVM bytecode](https://docs.evmos.org/modules/evm/01_concepts.html#executing-evm-bytecode)). To submit a transaction, the signer needs to specify the `gasPrice`.
17+
where `gasPrice` is the price per gas and `gasLimit` describes the amount of gas required to perform the transaction.
18+
The more complex operations a transaction requires, the higher the gasLimit (See [Executing EVM bytecode](https://docs.evmos.org/modules/evm/01_concepts.html#executing-evm-bytecode)).
19+
To submit a transaction, the signer needs to specify the `gasPrice`.
1820

1921
With EIP-1559 enabled, the transaction fee is calculated with
2022

2123
```
2224
fee = (baseFee + priorityTip) * gasLimit
2325
```
2426

25-
, where `baseFee` is the fixed-per-block network fee per gas and `priorityTip` is an additional fee per gas that can be set optionally. Note, that both the base fee and the priority tip are a gas prices. To submit a transaction with EIP-1559, the signer needs to specify the `gasFeeCap` a maximum fee per gas they are willing to pay total and optionally the `priorityTip` , which covers both the priority fee and the block's network fee per gas (aka: base fee).
27+
where `baseFee` is the fixed-per-block network fee per gas and `priorityTip` is an additional fee per gas that can be set optionally.
28+
Note, that both the base fee and the priority tip are gas prices.
29+
To submit a transaction with EIP-1559, the signer needs to specify the `gasFeeCap`, which is the maximum fee per gas they are willing to pay in total.
30+
Optionally, the `priorityTip` can be specified, which covers both the priority fee and the block's network fee per gas (aka: base fee).
2631

2732
::: tip
28-
The Cosmos SDK uses a different terminology for `gas` than Ethereum. What is called `gasLimit` on Ethereum is called `gasWanted` on Cosmos. You might encounter both terminologies on Evmos since it builds Ethereum on top of the SDK, e.g. when using different wallets like Keplr for Cosmos and Metamask for Ethereum.
33+
The Cosmos SDK uses a different terminology for `gas` than Ethereum.
34+
What is called `gasLimit` on Ethereum is called `gasWanted` on Cosmos.
35+
You might encounter both terminologies on Evmos since it builds Ethereum on top of the SDK,
36+
e.g. when using different wallets like Keplr for Cosmos and Metamask for Ethereum.
2937
:::
3038

3139
## Base Fee
@@ -39,13 +47,17 @@ Instead of burning the base fee (as implemented on Ethereum), the `feemarket` mo
3947

4048
## Priority Tip
4149

42-
In EIP-1559, the `max_priority_fee_per_gas`, often referred to as `tip`, is an additional gas price that can be added to the `baseFee` in order to incentive transaction prioritization. The higher the tip, the more likely the transaction is included in the block.
50+
In EIP-1559, the `max_priority_fee_per_gas`, often referred to as `tip`,
51+
is an additional gas price that can be added to the `baseFee` in order to incentivize transaction prioritization.
52+
The higher the tip, the more likely the transaction is included in the block.
4353

44-
Until the Cosmos SDK version v0.46, however, there is no notion of transaction prioritization. Thus the tip for an EIP-1559 transaction on Ethermint should be zero (`MaxPriorityFeePerGas` JSON-RPC endpoint returns `0`). Have a look at [ADR 067](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-067-mempool-refactor.md) to read about future plans on transaction prioritization in the Cosmos SDK.
54+
Until the Cosmos SDK version v0.46, however, there is no notion of transaction prioritization.
55+
Thus, the tip for an EIP-1559 transaction on Ethermint should be zero (`MaxPriorityFeePerGas` JSON-RPC endpoint returns `0`).
56+
Have a look at the [mempool](https://docs.evmos.org/validators/setup/mempool.html) docs to read more about how to leverage transaction prioritization.
4557

4658
## Effective Gas price
4759

48-
For EIP-1559 transactions (dynamic fee transactions) the effective gas price descibes the maximum gas price that a transaction is willing to provide. It is derived from the transaction arguments and the base fee parameter. Depending on which one is smaller, the effective gas price is either the `baseFee + tip` or the `gasFeeCap`
60+
For EIP-1559 transactions (dynamic fee transactions) the effective gas price describes the maximum gas price that a transaction is willing to provide. It is derived from the transaction arguments and the base fee parameter. Depending on which one is smaller, the effective gas price is either the `baseFee + tip` or the `gasFeeCap`
4961

5062
```
5163
min(baseFee + gasTipCap, gasFeeCap)

0 commit comments

Comments
 (0)