Skip to content

Conversation

@roman1e2f5p8s
Copy link
Contributor

@roman1e2f5p8s roman1e2f5p8s commented Apr 17, 2025

Description of change

This PR add a SuggestedGasPriceCalculator component that collects congestion data from a single commit in order to calculate a suggested gas price for transactions deferred/cancelled due to shared object congestion.

The component works similarly to SharedObjectCongestionTracker in the sense that a new instance of SuggestedGasPriceCalculator is created for each consensus commit round. The calculator supports suggested gas price calculations for both new (#5763) and old SharedObjectCongestionTracker (configured by the congestion_control_min_free_execution_slot feature flag), as well as for any currently available PerObjectCongestionControlMode mode.

Calculated suggested gas prices are intended for use in the gas price feedback mechanism #6280 for transactions cancelled due to shared object congestion.

Links to any relevant issues

Closes #6351.

How the change has been tested

cargo test -p iota-core authority::suggested_gas_price_calculator
  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Release Notes

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

cyberphysic4l and others added 28 commits April 16, 2025 14:11
@roman1e2f5p8s roman1e2f5p8s added enhancement New feature or request research labels Apr 17, 2025
Copy link
Contributor

@piotrm50 piotrm50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

…l-research/feat/calculate-suggested-gas-price-in-new-sequencer
@roman1e2f5p8s roman1e2f5p8s merged commit 537da19 into protocol-research/feat/gas-price-feedback Jul 21, 2025
54 of 59 checks passed
@roman1e2f5p8s roman1e2f5p8s deleted the protocol-research/feat/calculate-suggested-gas-price-in-new-sequencer branch July 21, 2025 10:42
roman1e2f5p8s added a commit that referenced this pull request Jul 28, 2025
…or gas price feedback mechanism (#6490)

This PR add a `SuggestedGasPriceCalculator` component that collects
congestion data from a single commit in order to calculate a suggested
gas price for transactions deferred/cancelled due to shared object
congestion.

The component works similarly to `SharedObjectCongestionTracker` in the
sense that a new instance of `SuggestedGasPriceCalculator` is created
for each consensus commit round. The calculator supports suggested gas
price calculations for both new (#5763) and old
`SharedObjectCongestionTracker` (configured by the
`congestion_control_min_free_execution_slot` feature flag), as well as
for any currently available `PerObjectCongestionControlMode` mode.

Calculated suggested gas prices are intended for use in the gas price
feedback mechanism #6280 for transactions cancelled due to shared object
congestion.

Closes #6351.

```console
cargo test -p iota-core authority::suggested_gas_price_calculator
```

- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have checked that new and existing unit tests pass locally with
my changes

- [x] Protocol:
- [x] Nodes (Validators and Full nodes):
- [ ] Indexer:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
- [ ] REST API:

---------

Co-authored-by: Andrew <[email protected]>
Co-authored-by: cuileri <[email protected]>
Co-authored-by: Andrew Cullen <[email protected]>
roman1e2f5p8s added a commit that referenced this pull request Jul 28, 2025
…or gas price feedback mechanism (#6490)

This PR add a `SuggestedGasPriceCalculator` component that collects
congestion data from a single commit in order to calculate a suggested
gas price for transactions deferred/cancelled due to shared object
congestion.

The component works similarly to `SharedObjectCongestionTracker` in the
sense that a new instance of `SuggestedGasPriceCalculator` is created
for each consensus commit round. The calculator supports suggested gas
price calculations for both new (#5763) and old
`SharedObjectCongestionTracker` (configured by the
`congestion_control_min_free_execution_slot` feature flag), as well as
for any currently available `PerObjectCongestionControlMode` mode.

Calculated suggested gas prices are intended for use in the gas price
feedback mechanism #6280 for transactions cancelled due to shared object
congestion.

Closes #6351.

```console
cargo test -p iota-core authority::suggested_gas_price_calculator
```

- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have checked that new and existing unit tests pass locally with
my changes

- [x] Protocol:
- [x] Nodes (Validators and Full nodes):
- [ ] Indexer:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
- [ ] REST API:

---------

Co-authored-by: Andrew <[email protected]>
Co-authored-by: cuileri <[email protected]>
Co-authored-by: Andrew Cullen <[email protected]>
roman1e2f5p8s added a commit that referenced this pull request Jul 28, 2025
…or gas price feedback mechanism (#6490)

This PR add a `SuggestedGasPriceCalculator` component that collects
congestion data from a single commit in order to calculate a suggested
gas price for transactions deferred/cancelled due to shared object
congestion.

The component works similarly to `SharedObjectCongestionTracker` in the
sense that a new instance of `SuggestedGasPriceCalculator` is created
for each consensus commit round. The calculator supports suggested gas
price calculations for both new (#5763) and old
`SharedObjectCongestionTracker` (configured by the
`congestion_control_min_free_execution_slot` feature flag), as well as
for any currently available `PerObjectCongestionControlMode` mode.

Calculated suggested gas prices are intended for use in the gas price
feedback mechanism #6280 for transactions cancelled due to shared object
congestion.

Closes #6351.

```console
cargo test -p iota-core authority::suggested_gas_price_calculator
```

- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have checked that new and existing unit tests pass locally with
my changes

- [x] Protocol:
- [x] Nodes (Validators and Full nodes):
- [ ] Indexer:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
- [ ] REST API:

---------

Co-authored-by: Andrew <[email protected]>
Co-authored-by: cuileri <[email protected]>
Co-authored-by: Andrew Cullen <[email protected]>
Signed-off-by: Roman Overko <[email protected]>
roman1e2f5p8s added a commit that referenced this pull request Jul 29, 2025
…or gas price feedback mechanism (#6490)

This PR add a `SuggestedGasPriceCalculator` component that collects
congestion data from a single commit in order to calculate a suggested
gas price for transactions deferred/cancelled due to shared object
congestion.

The component works similarly to `SharedObjectCongestionTracker` in the
sense that a new instance of `SuggestedGasPriceCalculator` is created
for each consensus commit round. The calculator supports suggested gas
price calculations for both new (#5763) and old
`SharedObjectCongestionTracker` (configured by the
`congestion_control_min_free_execution_slot` feature flag), as well as
for any currently available `PerObjectCongestionControlMode` mode.

Calculated suggested gas prices are intended for use in the gas price
feedback mechanism #6280 for transactions cancelled due to shared object
congestion.

Closes #6351.

```console
cargo test -p iota-core authority::suggested_gas_price_calculator
```

- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have checked that new and existing unit tests pass locally with
my changes

- [x] Protocol:
- [x] Nodes (Validators and Full nodes):
- [ ] Indexer:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
- [ ] REST API:

---------

Co-authored-by: Andrew <[email protected]>
Co-authored-by: cuileri <[email protected]>
Co-authored-by: Andrew Cullen <[email protected]>
Signed-off-by: Roman Overko <[email protected]>
roman1e2f5p8s added a commit that referenced this pull request Jul 29, 2025
…or gas price feedback mechanism (#6490)

This PR add a `SuggestedGasPriceCalculator` component that collects
congestion data from a single commit in order to calculate a suggested
gas price for transactions deferred/cancelled due to shared object
congestion.

The component works similarly to `SharedObjectCongestionTracker` in the
sense that a new instance of `SuggestedGasPriceCalculator` is created
for each consensus commit round. The calculator supports suggested gas
price calculations for both new (#5763) and old
`SharedObjectCongestionTracker` (configured by the
`congestion_control_min_free_execution_slot` feature flag), as well as
for any currently available `PerObjectCongestionControlMode` mode.

Calculated suggested gas prices are intended for use in the gas price
feedback mechanism #6280 for transactions cancelled due to shared object
congestion.

Closes #6351.

```console
cargo test -p iota-core authority::suggested_gas_price_calculator
```

- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have checked that new and existing unit tests pass locally with
my changes

- [x] Protocol:
- [x] Nodes (Validators and Full nodes):
- [ ] Indexer:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
- [ ] REST API:

---------

Co-authored-by: Andrew <[email protected]>
Co-authored-by: cuileri <[email protected]>
Co-authored-by: Andrew Cullen <[email protected]>
Signed-off-by: Roman Overko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task (core-protocol-research)]: Calculate suggested gas price in the new sequencer for gas price feedback mechanism

7 participants