-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Feature: Implement algorithm to determine the base gas price #1624
Labels
epic
An epic is a high-level master issue for large pieces of work.
Comments
This was referenced Jun 5, 2024
Merged
MitchTurner
added a commit
that referenced
this issue
Jun 11, 2024
Closes: #1956 This is a subtask of #1624 In this PR we add the generic service that will post an algorithm for the providers to use. Not bothering with a _real_ algorithm, that will be implemented later. For now, just show that the provider can get the value generated by the service. ## Checklist - [ ] Breaking changes are clearly marked as such in the PR description and changelog - [ ] New behavior is reflected in tests - [ ] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [x] I have reviewed the code myself - [ ] I have created follow-up issues caused by this PR and linked them here ### After merging, notify other teams [Add or remove entries as needed] - [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/) - [ ] [Swhttps://github.com/FuelLabs/fuel-core/issues/1956ay compiler](https://github.com/FuelLabs/sway/) - [ ] [Platform documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+) (for out-of-organization contributors, the person merging the PR will do this) - [ ] Someone else? --------- Co-authored-by: Hannes Karppila <2204863+Dentosal@users.noreply.github.com> Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
MitchTurner
added a commit
that referenced
this issue
Jun 19, 2024
Closes: #1957 Part of #1624 Add the gas price algorithm with some tools for analyzing its behavior. The algorithm is made up of two portions: - `AlgorithmUpdaterV1` - `AlgorithmV1` The updater holds the state of the historical data and can generate new algorithms as its data is updated. The algorithm just takes the `block_bytes` and can calculate the price from that data. I've included a lot of docs on the actual code, so see that for more details. LMK if something is missing :) ## Checklist - [ ] Breaking changes are clearly marked as such in the PR description and changelog - [x] New behavior is reflected in tests - [ ] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [x] I have reviewed the code myself - [ ] I have created follow-up issues caused by this PR and linked them here ### After merging, notify other teams [Add or remove entries as needed] - [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/) - [ ] [Sway compiler](https://github.com/FuelLabs/sway/) - [ ] [Platform documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+) (for out-of-organization contributors, the person merging the PR will do this) - [ ] Someone else? --------- Co-authored-by: human <jamesturner@Zenobia.hsd1.wa.comcast.net>
9 tasks
MitchTurner
added a commit
that referenced
this issue
Jul 19, 2024
Part of #1624 The [previous PR](#1983) added all the code for working with the dynamic gas price, but didn't plug it into our services. This PR does the actual dep injection. It also adds gas price estimation to AlgoirthmV0. This change includes new flags for the CLI: - "starting-gas-price" - the starting gas price for the gas price algorithm - "gas-price-change-percent" - the percent change for each gas price update - "gas-price-threshold-percent" - the threshold percent for determining if the gas price will be increase or decreased And the following CLI flags are serving a new purpose - "min-gas-price" - the minimum gas price that the gas price algorithm will return ## Checklist - [ ] Breaking changes are clearly marked as such in the PR description and changelog - [ ] New behavior is reflected in tests - [ ] [The specification](https://github.com/FuelLabs/fuel-specs/) matches the implemented behavior (link update PR if changes are needed) ### Before requesting review - [x] I have reviewed the code myself - [ ] I have created follow-up issues caused by this PR and linked them here ### After merging, notify other teams [Add or remove entries as needed] - [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/) - [ ] [Sway compiler](https://github.com/FuelLabs/sway/) - [ ] [Platform documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+) (for out-of-organization contributors, the person merging the PR will do this) - [ ] Someone else? --------- Co-authored-by: human <jamesturner@Zenobia.hsd1.wa.comcast.net> Co-authored-by: Green Baneling <XgreenX9999@gmail.com> Co-authored-by: Hannes Karppila <2204863+Dentosal@users.noreply.github.com>
Completed with: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We want to move to something similar to Ethereum's EIP-1559 base fees. The idea being that the price of gas will fluctuate from block to block depending on the demand on the network. We also need to take into account demand on the DA layer.
This is related as well to the
estimate_gas_price
api endpoint that needs some rules for how much the price is allowed to change from one block to the next. This work is captured in this issue.This will require at least 3 inputs:
The text was updated successfully, but these errors were encountered: