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

Add block_max_transactions and all gas price metadata to ConsensusParameters (creation of V3) #905

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

AurelienFT
Copy link
Contributor

@AurelienFT AurelienFT commented Jan 27, 2025

Request from : #899 (review) and #888

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests
  • If performance characteristic of an instruction change, update gas costs as well or make a follow-up PR for that
  • The specification matches the implemented behavior (link update PR if changes are needed)

Before requesting review

  • 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

@AurelienFT AurelienFT added breaking A breaking api change xxx labels Jan 27, 2025
@AurelienFT AurelienFT requested a review from a team January 27, 2025 10:38
@AurelienFT AurelienFT self-assigned this Jan 27, 2025
@AurelienFT
Copy link
Contributor Author

@xgreenx I saw #888 what do you think about adding this new parameter inside this ConsensusParametersV3 version ?

@xgreenx
Copy link
Collaborator

xgreenx commented Jan 29, 2025

Yes, we also can add this one to consensus parameters=)

@AurelienFT AurelienFT changed the title Add block_max_transactions to ConsensusParameters Add block_max_transactions and gas_price_metadata to ConsensusParameters (creation of V3) Jan 29, 2025
@AurelienFT AurelienFT changed the title Add block_max_transactions and gas_price_metadata to ConsensusParameters (creation of V3) Add block_max_transactions and all gas price metadata to ConsensusParameters (creation of V3) Jan 29, 2025
@AurelienFT AurelienFT marked this pull request as draft January 29, 2025 10:16
@AurelienFT AurelienFT marked this pull request as ready for review January 29, 2025 10:55
pub gas_price_factor: NonZeroU64,
pub min_da_gas_price: u64,
pub max_da_gas_price: u64,
pub max_da_gas_price_change_percent: u16,
Copy link
Collaborator

@xgreenx xgreenx Feb 12, 2025

Choose a reason for hiding this comment

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

We only need the field max_gas_price_increase_percent, all other fields shouldn't be part of the consensus

Copy link
Member

Choose a reason for hiding this comment

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

i want to disagree with this. while keeping just this one field is nice to ensure compatibility with all other operators, we have to make sure that all parameters with which the block producer determines the gas price (p, d, gas price factor etc) is included in the consensus parameters for transparency sake

Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't know what algorithm we want to use for the gas price on consensus level. Right now, only one entity - the block producer, decides how the gas price is calculated. On the consensus level, we just agree that gas price shouldn't increase more than X %.

It is done for flexibility and to avoid setting the algorithm in stone.

Copy link
Member

Choose a reason for hiding this comment

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

if that is the case then perhaps we should version this field in the consensus parameters. what do you think?

@AurelienFT AurelienFT requested a review from xgreenx February 13, 2025 10:58
/// The privileged address(user or predicate) that can perform permissioned
/// operations(like upgrading the network).
pub privileged_address: Address,
gas_price_metadata: GasPriceMetadata,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is it private?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Error, changed.

pub gas_price_factor: NonZeroU64,
pub min_da_gas_price: u64,
pub max_da_gas_price: u64,
pub max_da_gas_price_change_percent: u16,
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't know what algorithm we want to use for the gas price on consensus level. Right now, only one entity - the block producer, decides how the gas price is calculated. On the consensus level, we just agree that gas price shouldn't increase more than X %.

It is done for flexibility and to avoid setting the algorithm in stone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking api change xxx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants