docs: state each effective-salt derivation once - #247
Open
thedavidmeister wants to merge 2 commits into
Open
thedavidmeister wants to merge 2 commits into
thedavidmeister wants to merge 2 commits into
Conversation
The two `keccak256(abi.encode(...))` formulas were written out three times in this file by hand, with nothing connecting the copies. The header code block is the statement; the `cloneDeterministicOpenSalt` MUST and the disjointness argument name it instead of repeating it. Closes #141 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…effective-salt-formula-dedup
|
Warning Review limit reachedNext included review available in 41 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
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. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #141
The two
keccak256(abi.encode(...))effective-salt derivations were written outas literal formulas three times in this one file: the header code block (both
derivations), the
cloneDeterministicOpenSaltMUST (open-salt), and thedisjointness argument (both). All three agreed, and nothing connected them —
test/src/lib/LibICloneableFactoryV4.t.solbindsLibICloneableFactoryV4.effectiveSalt/effectiveOpenSaltto the formula, sothe library cannot drift from the spec, but no test may read NatSpec text, so
each copy was maintained by hand.
The hazard is a third party computing a clone address offchain from a
restatement a later edit updated everywhere but there, and pinning an address
the factory will never deploy to. Deduplication is the only available structural
fix, since the duplication is what makes the drift possible.
The header code block is now the single statement of both derivations. The MUST
and the disjointness argument name it instead of repeating it; neither loses a
normative clause.
ICloneableFactoryV3.sol's fourth copy is insrc/interface/deprecated/**,which is frozen, and stays.
Comment-only. No source, ABI or bytecode change.
QA
text. The code side is already pinned by
testEffectiveSaltMatchesFormulaandtestEffectiveOpenSaltMatchesFormulaintest/src/lib/LibICloneableFactoryV4.t.sol, which recompute each formulainline against the library.
to mutate.
src/lib/LibICloneableFactoryV4.soleffectiveSalt/effectiveOpenSalt— the surviving header block matches them word for word.nothing enforces". Grepped the repo for
abi.encode(ICLONEABLE_FACTORY_V4: theremaining hits are the header block, the library's two implementations, and the
frozen
ICloneableFactoryV3restatement.README.mddescribes the shape(96-byte preimage, leading domain tag) without writing the formula out.
🤖 Generated with Claude Code