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(sidecar): add max_committed_gas_per_slot to sidecar Limits #144

Closed
merklefruit opened this issue Jul 18, 2024 · 0 comments · Fixed by #150
Closed

feat(sidecar): add max_committed_gas_per_slot to sidecar Limits #144

merklefruit opened this issue Jul 18, 2024 · 0 comments · Fixed by #150
Assignees
Labels
C: bolt-sidecar Component: bolt-sidecar D-good-first-issue Difficulty: a great choice to get started! T: feature Type: Feature

Comments

@merklefruit
Copy link
Collaborator

merklefruit commented Jul 18, 2024

Bolt sidecar operators should have a way to limit both the number and the gas amount used for commitments in a single slot.
For this, we already have the Limits config struct that can be extended.

These limits are enforced in the execution state validation pipeline here:

if let Some(template) = self.get_block_template(target_slot) {
if template.transactions_len() >= self.max_commitments_per_slot.get() {
return Err(ValidationError::MaxCommitmentsReachedForSlot(
self.slot,
self.max_commitments_per_slot.get(),
));
}

it would also be ideal to place Limits inside the ExecutionState itself instead of copying the individual fields like this:

max_commitments_per_slot: NonZero<usize>,

@merklefruit merklefruit added C: bolt-sidecar Component: bolt-sidecar T: feature Type: Feature D-good-first-issue Difficulty: a great choice to get started! labels Jul 18, 2024
@merklefruit merklefruit changed the title feat(sidecar): add max_commitment_gas_per_slot to sidecar Limits feat(sidecar): add max_committed_gas_per_slot to sidecar Limits Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: bolt-sidecar Component: bolt-sidecar D-good-first-issue Difficulty: a great choice to get started! T: feature Type: Feature
Projects
None yet
2 participants