Skip to content

feat: RulesHooks.MinimumGasConsumption #185

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

Merged
merged 10 commits into from
Jun 11, 2025
Merged

feat: RulesHooks.MinimumGasConsumption #185

merged 10 commits into from
Jun 11, 2025

Conversation

ARR4N
Copy link
Collaborator

@ARR4N ARR4N commented Jun 5, 2025

Why this should be merged

Required for ACP-194 $\lambda$ bound on gas consumption.

How this works

Hook into core.StateTransition.TransitionDb() as this is the bottom of all execution paths (e.g. core.ApplyTransaction() as used in SAE, core.StateProcessor.Process(*Block,...), etc.). Once consumed gas is no longer changing (i.e. after all spends and refunds), the transaction limit is passed to the hook to determine the minimum consumption, which is applied.

How this was tested

Unit test via core.ApplyTransaction() as this is our entry point in SAE.

@ARR4N ARR4N changed the title feat: RulesHooks.MinimumGasSpend feat: RulesHooks.MinimumGasConsumption Jun 5, 2025
@ARR4N ARR4N marked this pull request as ready for review June 5, 2025 20:38
@ARR4N ARR4N requested a review from StephenButtolph June 5, 2025 20:38
ARR4N and others added 2 commits June 10, 2025 21:48
@ARR4N ARR4N requested a review from StephenButtolph June 11, 2025 06:05
ARR4N and others added 3 commits June 11, 2025 19:08
Co-authored-by: Stephen Buttolph <[email protected]>
Signed-off-by: Arran Schlosberg <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]>
Signed-off-by: Arran Schlosberg <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]>
Signed-off-by: Arran Schlosberg <[email protected]>
@ARR4N ARR4N enabled auto-merge (squash) June 11, 2025 18:17
@ARR4N ARR4N merged commit bedfd12 into main Jun 11, 2025
11 of 12 checks passed
@ARR4N ARR4N deleted the arr4n/min-gas-spend branch June 11, 2025 18:22
ARR4N added a commit that referenced this pull request Jun 11, 2025
## Why this should be merged

#185 was allowed to merge despite CI requiring the `lint` job.

## How this works

Fix linter issues.

## How this was tested

The first commit is an empty commit, expected to fail CI, to confirm
that the job is in fact required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants