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

Gas Price Algorithm #1948

Merged
merged 62 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
ac1aa41
Add the algorithm code
MitchTurner Jun 7, 2024
bc9efa0
WIP
MitchTurner Jun 7, 2024
31ea5c4
Add some tests to define the updater behavior
Jun 8, 2024
7e6546a
Add a couple more tests, WIP getting the second to pass
MitchTurner Jun 8, 2024
6707c3e
Fix test, refactor out single update into two
MitchTurner Jun 9, 2024
09a0c95
Refactor
MitchTurner Jun 9, 2024
da3c887
WIP rewrite the chart generation stuff
MitchTurner Jun 9, 2024
cdfc206
Add profit stuff to chart, add rewards
MitchTurner Jun 9, 2024
15a45ed
Add some naive profit corrections
MitchTurner Jun 9, 2024
03c6a4a
Remove the old stuff that is not being used
MitchTurner Jun 9, 2024
459f8fd
Add actual algo that the updater generates, fix tests accordingly
MitchTurner Jun 10, 2024
b713739
Update gas price with l2 block data
MitchTurner Jun 10, 2024
91fe558
Use algo generation in simulation
MitchTurner Jun 10, 2024
5c3c277
Straighten out the profit chart to be aligned after every da_recording
MitchTurner Jun 10, 2024
da7ea98
Fix the noise
MitchTurner Jun 11, 2024
f05c594
Refactor to calculate exec gas price eagarly and calculate da gas pri…
MitchTurner Jun 11, 2024
644c2da
Refactor a bit to allow p and d values, rename some stuff
MitchTurner Jun 12, 2024
9c40f42
Add d value to tests
MitchTurner Jun 12, 2024
0783439
WIP
MitchTurner Jun 12, 2024
d7d7d55
Use real gas limit values stablize algo a bit.
MitchTurner Jun 12, 2024
106569d
Set params to somewhat steady state
MitchTurner Jun 12, 2024
6db37a6
Add average profit values
MitchTurner Jun 12, 2024
781424f
Cleanup, add naive optimisation
MitchTurner Jun 13, 2024
88793e9
Refactor
MitchTurner Jun 13, 2024
b7c10c6
Replace d value :), start adding max change
MitchTurner Jun 13, 2024
e245f98
Add change amount tests, remove unused params
MitchTurner Jun 13, 2024
95ed269
Remove avg window
MitchTurner Jun 13, 2024
95ab959
Refactor and cleanup
MitchTurner Jun 13, 2024
53eebfe
Merge remote-tracking branch 'origin' into feature/gas-price-algo
MitchTurner Jun 13, 2024
5d8d7bb
fix fields
MitchTurner Jun 13, 2024
8ecd034
Cleanup, refactor
MitchTurner Jun 13, 2024
72a4ff8
Appease Clippy-sama
MitchTurner Jun 13, 2024
2b29292
Update CHANGELOG
MitchTurner Jun 13, 2024
41ed222
Rename file
MitchTurner Jun 13, 2024
18019ba
Fix CHANGELOG
MitchTurner Jun 13, 2024
8625caa
Actually fix CHANGELOG
MitchTurner Jun 13, 2024
6677f03
Reorder test file
MitchTurner Jun 14, 2024
33fe1a3
Merge branch 'master' into feature/gas-price-algo
MitchTurner Jun 14, 2024
5ea4c26
Try to fix changelog again, minor adjustments
MitchTurner Jun 14, 2024
9d4cda7
Add consts for reused colors
MitchTurner Jun 14, 2024
20a8b11
Add more docs for algorithm
MitchTurner Jun 14, 2024
a28c653
Add more docs
MitchTurner Jun 14, 2024
37fa17d
Merge remote-tracking branch 'origin' into feature/gas-price-algo
MitchTurner Jun 14, 2024
220d5e4
Update lock file
MitchTurner Jun 14, 2024
19fe50b
Update version to match
MitchTurner Jun 14, 2024
507e12e
Merge branch 'master' into feature/gas-price-algo
MitchTurner Jun 15, 2024
a8bcab1
REmove all arithmetic side effects
MitchTurner Jun 16, 2024
54e48f4
Remove float, fix more clippy complaints
MitchTurner Jun 16, 2024
e228fa1
Add minimum gas price
MitchTurner Jun 16, 2024
cfc8538
Modulate percent rather than static amount for exec gas price
MitchTurner Jun 17, 2024
cc01db7
Move the analysis stuff into its own crate, fix insidious bug
MitchTurner Jun 18, 2024
a240657
Remove commented code
MitchTurner Jun 18, 2024
6e9dc0d
Merge remote-tracking branch 'origin' into feature/gas-price-algo
MitchTurner Jun 18, 2024
305ceaa
Update lock file
MitchTurner Jun 18, 2024
1f2be1c
Fix crate names, lint
MitchTurner Jun 18, 2024
ebae0f7
Update docs
MitchTurner Jun 18, 2024
0cc38cb
Move min gas price to exec to avoid error
MitchTurner Jun 18, 2024
209e3b8
Add minimum da gas price
MitchTurner Jun 18, 2024
395a91b
Update crates/fuel-gas-price-algorithm/src/lib.rs
MitchTurner Jun 18, 2024
31450f9
Update crates/fuel-gas-price-algorithm/src/lib.rs
MitchTurner Jun 18, 2024
158b663
Fix unchanged name, get anaysis running again
MitchTurner Jun 18, 2024
6caa7f7
Update bytecode version
MitchTurner Jun 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added
- [#1889](https://github.com/FuelLabs/fuel-core/pull/1889): Add new `FuelGasPriceProvider` that receives the gas price algorithm from a `GasPriceService`
- [#1948](https://github.com/FuelLabs/fuel-core/pull/1948): Add new `AlgorithmV1` and `AlgorithmUpdaterV1' for the gas price. Include tools for analysis

### Changed
- [#1942](https://github.com/FuelLabs/fuel-core/pull/1942): Sequential relayer's commits.
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ members = [
"crates/client",
"crates/database",
"crates/fuel-core",
"crates/fuel-gas-price-algorithm",
"crates/keygen",
"crates/metrics",
"crates/services",
Expand Down Expand Up @@ -81,6 +82,7 @@ fuel-core-tests = { version = "0.0.0", path = "./tests" }
fuel-core-upgradable-executor = { version = "0.30.0", path = "./crates/services/upgradable-executor" }
fuel-core-wasm-executor = { version = "0.30.0", path = "./crates/services/upgradable-executor/wasm-executor", default-features = false }
fuel-core-xtask = { version = "0.0.0", path = "./xtask" }
fuel-gas-price-algorithm = { version = "0.29.0", path = "crates/fuel-gas-price-algorithm" }

# Fuel dependencies
fuel-vm-private = { version = "0.54.1", package = "fuel-vm", default-features = false }
Expand Down
Binary file not shown.
17 changes: 17 additions & 0 deletions crates/fuel-gas-price-algorithm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "fuel-gas-price-algorithm"
authors = { workspace = true }
categories = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
keywords = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
version = { workspace = true }

[lib]
name = "fuel_gas_price_algorithm"
path = "src/lib.rs"

[dependencies]
thiserror = { workspace = true }
Loading
Loading