Skip to content

use forge-std boundPrivateKey for fuzzed keys#458

Open
thedavidmeister wants to merge 1 commit into
mainfrom
2026-05-07-issue-420-bound-private-key
Open

use forge-std boundPrivateKey for fuzzed keys#458
thedavidmeister wants to merge 1 commit into
mainfrom
2026-05-07-issue-420-bound-private-key

Conversation

@thedavidmeister

Copy link
Copy Markdown
Contributor

Summary

forge-std's StdUtils (already inherited via TestFlowTest) exposes boundPrivateKey(uint256) — the canonical helper for clamping a fuzzed value into the secp256k1 valid private-key range. Five manual occurrences of (key % (SECP256K1_ORDER - 1)) + 1 and their identical "// Ensure the fuzzed key is within the valid range for secp256k1" comments are replaced.

Closes #420.

Test plan

  • full suite — 31/31

🤖 Generated with Claude Code

forge-std's StdUtils (already inherited via Test → FlowTest) exposes
boundPrivateKey(uint256) which is the canonical helper for clamping
a fuzzed value into the secp256k1 valid private-key range. Five
manual occurrences of `(key % (SECP256K1_ORDER - 1)) + 1` and their
identical "// Ensure the fuzzed key is within the valid range for
secp256k1" comments are replaced.

Closes #420.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@thedavidmeister has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 52 minutes and 23 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 35516357-9e97-4e11-a76b-79a803108945

📥 Commits

Reviewing files that changed from the base of the PR and between ceaea3c and e5313b6.

📒 Files selected for processing (2)
  • test/src/concrete/Flow.expression.t.sol
  • test/src/concrete/Flow.signedContext.t.sol
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-05-07-issue-420-bound-private-key

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@thedavidmeister thedavidmeister self-assigned this May 9, 2026
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.

[TEST-2] [LOW] Manual private-key bounding duplicates boundPrivateKey from forge-std

1 participant