Skip to content

Commit eff45bb

Browse files
authored
Merge pull request 0xPolygon#476 from 0xPolygon/edit-user-fees
Update zkEVM - effective gas price docs
2 parents 14fdd20 + 4e9888f commit eff45bb

File tree

13 files changed

+13
-945
lines changed

13 files changed

+13
-945
lines changed

docs/zkEVM/architecture/effective-gas/implement-egp-strat.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ Since the L1 gas price is likely to change between when a user signs a transacti
2727

2828
All transactions such that $\texttt{SignedGasPrice} > \texttt{L2MinGasPrice}$ are accepted for pre-execution.
2929

30+
The following parameters can be configured in the Polygon zkEVM node:
31+
32+
- $\texttt{DefaultMinGasPriceAllowed}$ which is the default minimum gas price to suggest.
33+
- $\texttt{MinAllowedGasPriceInterval}$, as explained above, is the interval within which to find the lowest suggested gas price and compare it with the user's gas price in the transaction.
34+
- $\texttt{PollMinAllowedGasPriceInterval}$ is the interval to poll L1 in order to find the suggested L2 minimum gas price.
35+
- $\texttt{IntervalToRefreshGasPrices}$ is the interval to refresh L2 gas prices.
36+
37+
More specifically, these are configured in the $\texttt{[Pool]}$ section of the [configuration file](https://github.com/0xPolygonHermez/zkevm-node/blob/b938572f138ba6cc40ef6736153c469afeb11c96/config/default.go#L37).
38+
39+
![Figure: ](../../../img/zkEVM/config-prev-parameter.png)
40+
3041
## How to avoid incurring losses in L2
3142

3243
There are three measures put in place to help avoid incurring gas price-induced losses in the L2 network:

docs/zkEVM/architecture/effective-gas/tx-prioritization-egp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,4 @@ Ultimately, the scheme is accurate and fair to both the users and the zkEVM netw
124124

125125
Check out this [repo](https://github.com/0xPolygonHermez/zkevm-rom/issues/316) for a detailed example of how the effective gas price is calculated.
126126

127-
A more elaborate and expanded documentation of the EGP scheme can be found in the specifications section [here](../../spec/user-fees/index.md).
127+
The content of this document series was sourced from the [User fees document](https://github.com/0xPolygonHermez/zkevm-techdocs/blob/main/knowledge-layer/architecture/PDFs/users-fees.pdf).

docs/zkEVM/architecture/effective-gas/user-tx-flow/index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ Next, we provide a concise description of Polygon zkEVM's approach to calculatin
22

33
It's an overview of the end-to-end flow of transactions, commencing from users signing transactions and submitting them at the RPC level, to when the sequencer executes them.
44

5-
It's a quicker way to go through all involved formulas or criteria, but without explanatory examples.
6-
7-
You will find more elaborate discussions, with ample examples, in the [Specifications section](../../../spec/user-fees/index.md).
5+
It's a quicker way to go through all involved formulas or criteria, as well as examining explanatory examples.
86

97
The end-to-end flow of transactions occurs in two phases: the RPC flow, and the sequencer flow.

docs/zkEVM/architecture/effective-gas/zkevm-egp-strat.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ This document presents an outline of Polygon zkEVM's strategy for executing tran
1212

1313
The polled gas prices are used to set the expected 'signed gas price', called $\texttt{MinL2GasPrice}$.
1414

15-
1615
- **Provide suggested gas prices**
1716

1817
The polled L1 gas price values are sent to users upon request individually.

docs/zkEVM/spec/user-fees/breakeven-technique.md

Lines changed: 0 additions & 192 deletions
This file was deleted.

docs/zkEVM/spec/user-fees/gas-price-suggest.md

Lines changed: 0 additions & 149 deletions
This file was deleted.

0 commit comments

Comments
 (0)