Manual private-key bounding duplicates boundPrivateKey from forge-std
The pattern (fuzzedKey % (SECP256K1_ORDER - 1)) + 1 appears 5 times across two test files:
test/src/concrete/Flow.expression.t.sol:59
test/src/concrete/Flow.signedContext.t.sol:27
test/src/concrete/Flow.signedContext.t.sol:28
test/src/concrete/Flow.signedContext.t.sol:60
test/src/concrete/Flow.signedContext.t.sol:61
forge-std's StdUtils (already inherited via Test → FlowTest) exposes boundPrivateKey(uint256) which computes the same modular bound and is the canonical helper. Each manual occurrence carries an identical comment: // Ensure the fuzzed key is within the valid range for secp256k1.
Fix: replace (fuzzedKey % (SECP256K1_ORDER - 1)) + 1 with boundPrivateKey(fuzzedKey). The comment becomes redundant and can be deleted.
Manual private-key bounding duplicates
boundPrivateKeyfrom forge-stdThe pattern
(fuzzedKey % (SECP256K1_ORDER - 1)) + 1appears 5 times across two test files:test/src/concrete/Flow.expression.t.sol:59test/src/concrete/Flow.signedContext.t.sol:27test/src/concrete/Flow.signedContext.t.sol:28test/src/concrete/Flow.signedContext.t.sol:60test/src/concrete/Flow.signedContext.t.sol:61forge-std's
StdUtils(already inherited viaTest→FlowTest) exposesboundPrivateKey(uint256)which computes the same modular bound and is the canonical helper. Each manual occurrence carries an identical comment:// Ensure the fuzzed key is within the valid range for secp256k1.Fix: replace
(fuzzedKey % (SECP256K1_ORDER - 1)) + 1withboundPrivateKey(fuzzedKey). The comment becomes redundant and can be deleted.