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

feat(consensus): calculate base gas price #2999

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

ayeletstarkware
Copy link
Contributor

@ayeletstarkware ayeletstarkware commented Dec 29, 2024

Calculate next base gas price and store it in the SequencerConsensusContext field for later use in build_proposal.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ayeletstarkware ayeletstarkware marked this pull request as ready for review December 29, 2024 12:58
Copy link
Contributor Author

@ayeletstarkware ayeletstarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion


crates/sequencing/papyrus_consensus_orchestrator/src/fee_market/mod.rs line 12 at r1 (raw file):

const MIN_GAS_PRICE: u64 = 100000; // In fri.
// TODO(Mohammad): Check the exact value for maximum block size in StarkNet.
/// The maximum block size in gas units: 40M gas steps * 100 units/step.

The compiler required a module-level documentation comment here.

Code quote:

///

@ayeletstarkware ayeletstarkware force-pushed the ayelet/consensus/calculate-gas-price branch from 1d633f3 to beef0a9 Compare December 29, 2024 14:34
Copy link
Collaborator

@alonh5 alonh5 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ayeletstarkware)


crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 131 at r2 (raw file):

    chain_id: ChainId,
    cende_ambassador: Arc<dyn CendeContext>,
    l2_gas_price: u64,

document.

@ayeletstarkware ayeletstarkware force-pushed the ayelet/consensus/calculate-gas-price branch from beef0a9 to 0381474 Compare December 29, 2024 15:32
Copy link
Contributor Author

@ayeletstarkware ayeletstarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @alonh5)


crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 131 at r2 (raw file):

Previously, alonh5 (Alon Haramati) wrote…

document.

Done.

Copy link
Collaborator

@alonh5 alonh5 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ayeletstarkware)

@ayeletstarkware ayeletstarkware added this pull request to the merge queue Dec 29, 2024
Merged via the queue into main with commit 2dfde9a Dec 29, 2024
14 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants