Skip to content

Update contract sizes benchmark#1674

Merged
ericnordelo merged 1 commit intomainfrom
update/contract-sizes-24722302823
Apr 21, 2026
Merged

Update contract sizes benchmark#1674
ericnordelo merged 1 commit intomainfrom
update/contract-sizes-24722302823

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 21, 2026

This PR updates the contract size benchmarks after a recent merge to main.

Summary by CodeRabbit

  • Chores
    • Updated contract size benchmark metrics to reflect current measurements.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Walkthrough

This PR updates recorded size metrics in the contract sizes benchmark file for multiple OpenZeppelin test contracts, adjusting felts values in the bytecode section and bytes values in the contract_class section. No structural changes to the JSON schema were made—only numeric metric values were updated.

Changes

Cohort / File(s) Summary
Benchmark Metrics Update
benches/contract_sizes.json
Updated numeric size metrics (felts and bytes values) for multiple contract classes including DualCaseAccountMock, LegacyAccountMock, SRC9AccountMock, SnakeAccountMock, Attacker, and CounterMock across both bytecode and contract_class sections.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • #1641: Updates the same benches/contract_sizes.json benchmark file with numeric size metric adjustments for compiled contract classes.
  • #1644: Modifies the same benchmark data file with recorded size metric updates for contract entries.
  • #1661: Updates benches/contract_sizes.json contract size metrics by adjusting byte and felt values for contract entries.

Suggested reviewers

  • ericnordelo
  • bidzyyys
  • immrsd

Poem

🐰 Metrics dance and numbers shift,
Contracts shrink—a developer's gift!
Bytes and felts in harmony bloom,
Benchmarks updated, clearing the room! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update contract sizes benchmark' accurately reflects the main change—updating numeric metrics in the contract sizes benchmark file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update/contract-sizes-24722302823

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
benches/contract_sizes.json (1)

1-492: Benchmark structure is intact.

The JSON structure is well-formed with no schema changes. This is a pure data refresh as described in the PR objectives. Since this is an automated update, consider adding a CI check that validates benchmark freshness and accuracy as part of your merge process.

💡 Optional: Add CI validation for benchmark freshness

Consider adding a CI step that:

  1. Regenerates benchmarks from scratch
  2. Compares with committed values
  3. Fails if there's a mismatch

This would catch cases where benchmarks become stale or are incorrectly generated.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@benches/contract_sizes.json` around lines 1 - 492, Add a CI job that
validates the benchmark data refresh by regenerating the benchmarks and
comparing the produced output to the committed benches/contract_sizes.json;
implement a workflow that (1) runs the repository's benchmark/regeneration
command/script to produce a fresh contract_sizes.json, (2) diffs that output
against the committed benches/contract_sizes.json and fails the job if they
differ, and (3) prints a helpful error explaining how to update
benches/contract_sizes.json when mismatched so maintainers can refresh the data;
reference benches/contract_sizes.json in the check so it locates the updated
file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@benches/contract_sizes.json`:
- Around line 1-492: Add a CI job that validates the benchmark data refresh by
regenerating the benchmarks and comparing the produced output to the committed
benches/contract_sizes.json; implement a workflow that (1) runs the repository's
benchmark/regeneration command/script to produce a fresh contract_sizes.json,
(2) diffs that output against the committed benches/contract_sizes.json and
fails the job if they differ, and (3) prints a helpful error explaining how to
update benches/contract_sizes.json when mismatched so maintainers can refresh
the data; reference benches/contract_sizes.json in the check so it locates the
updated file.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 850c7aa4-baca-4e66-a3ac-b6bdad1b14aa

📥 Commits

Reviewing files that changed from the base of the PR and between a0c22c6 and a28c6ac.

📒 Files selected for processing (1)
  • benches/contract_sizes.json

@ericnordelo ericnordelo merged commit c5d1f5e into main Apr 21, 2026
7 checks passed
@ericnordelo ericnordelo deleted the update/contract-sizes-24722302823 branch April 21, 2026 13:27
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