You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2024. It is now read-only.
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]>
Copy file name to clipboardExpand all lines: x/feemarket/spec/01_concepts.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,18 +14,26 @@ Before EIP-1559 the transaction fee is calculated with
14
14
fee = gasPrice * gasLimit
15
15
```
16
16
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`.
18
20
19
21
With EIP-1559 enabled, the transaction fee is calculated with
20
22
21
23
```
22
24
fee = (baseFee + priorityTip) * gasLimit
23
25
```
24
26
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).
26
31
27
32
::: 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.
29
37
:::
30
38
31
39
## Base Fee
@@ -39,13 +47,17 @@ Instead of burning the base fee (as implemented on Ethereum), the `feemarket` mo
39
47
40
48
## Priority Tip
41
49
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.
43
53
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.
45
57
46
58
## Effective Gas price
47
59
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`
0 commit comments