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

Extra data based pricing #10

Merged
merged 18 commits into from
May 30, 2024
Merged

Extra data based pricing #10

merged 18 commits into from
May 30, 2024

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented May 10, 2024

Update the transaction profitability formula as specified in https://github.com/Consensys/protocol-misc/issues/899

Extract the values of the fixedGasCostKWei, variableGasCostKWei and minGasPriceKWei from the extra data field in the block header of imported blocks, converts them to wei and updated the profitability runtime parameters and update the minGasPrice, when the plugin-linea-extra-data-pricing-enabled flag is set to true.

On startup try to extract the values from the extra data field of the current chain head, otherwise used the values passed via CLI or config file, as fallback their defaults.

Add the following CLI options

  • plugin-linea-fixed-gas-cost-wei by default 0 wei
  • plugin-linea-variable-gas-cost-wei by default 1000000000 = 1Gwei
  • plugin-linea-extra-data-pricing-enabled set to true to enable pricing based on extra data field content (by default: false)

Remove the now unused CLI options:

  1. plugin-linea-verification-gas-cost
  2. plugin-linea-verification-capacity
  3. plugin-linea-gas-price-ratio
  4. plugin-linea-gas-price-adjustment

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
…tomically

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
…mpatibility mode on first valid extra data

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 changed the title Parse extra data Extra data based pricing May 23, 2024
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
…r not

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 marked this pull request as ready for review May 29, 2024 17:06
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 merged commit 3d56714 into main May 30, 2024
7 checks passed
@fab-10 fab-10 deleted the parse-extra-data branch June 26, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants