docs: state the open-salt MUST NOT as agreement, not data provenance - #250
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 clause forbade only entry points taking caller-supplied initialization data, so one reaching the same effective-salt image while initializing from a constant, from storage, or not at all was conformant and still occupied the pinned address with a clone the address does not describe. The property is agreement between the `data` hashed into the salt and the bytes `initialize` receives. Closes #165 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…open-salt-must-not-property
|
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 #165
The obligation clause stated the rule as: the guarantee "holds only while no
OTHER entry point on the same factory can
CREATE2at an effective salt in thisderivation's image WITH CALLER-SUPPLIED INITIALIZATION DATA […] a factory
implementing this interface MUST NOT expose any entry point that does." The
trailing "that does" binds the whole qualified clause, so the MUST NOT reached
only entry points whose initialization bytes come from the caller.
The provenance of those bytes is irrelevant to the property the clause protects.
An entry point that reaches the image while initializing from a constant, from
storage, or from an oracle, and one that reaches it and calls nothing on the
proxy at all — the permanently-uninitialized hazard
ICloneableV2names — bothsupply no caller data, so neither was forbidden, and both leave the pinned
address holding a clone the address does not describe. Both outcomes are
unrecoverable in the way the section already says: the address is occupied and
nobody can redeploy over it.
The clause is now the property rather than a data-provenance test: every entry
point that can reach this derivation's image MUST initialize the clone with
exactly the
datahashed into that salt, wherever those bytes come from. Statingit as agreement rather than as bare reachability keeps a conforming wrapper —
one that hashes into the salt the very bytes it passes to
initialize—conforming. The inherited
cloneDeterministicstill fails it, for the reason italways did: its
datais outside its own derivation.Comment-only. No source, ABI or bytecode change.
QA
text. The disjointness the clause relies on is already pinned by
test/src/lib/LibICloneableFactoryV4.t.sol, which recomputes both effective-saltpreimages against the library.
to mutate.
src/lib/LibICloneableFactoryV4.sol—cloneAndInitialize(implementation, derivedSalt, data, salt)takes the derivedsalt and the data as separate
internalarguments, so a concrete can reach theopen-salt image with any bytes it likes in one line; the interface is the only
thing constraining that author.
exists to state". Read the other MUSTs in this interface — the salt derivation,
the caller-derived-value ban, the atomic-initialize chain and the tx.origin/gas
obligations are each stated as a property with no comparable qualifier.
src/interface/deprecated/**is frozen and has no equivalent clause. Distinctfrom ICLONEABLE_FACTORY_V4_OPEN_SALT_DOMAIN NatSpec credits the distinct tags with keeping every other entry point off open-salt addresses, which only the factory's MUST NOT provides #97/PR docs: scope the open-salt domain tag's NatSpec to what the tags give #101, which takes this clause as the correct statement of the rule
and sharpens the domain-tag NatSpec's reliance on it without touching it.
🤖 Generated with Claude Code