docs: drop the occupant-identity claim from CloneAddressOccupied - #261
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 error is declared at file scope, so it is in every factory's ABI, and `cloneAndInitialize` bubbles a failing `initialize`'s revert data verbatim. A caller cannot tell the library's own throw from one a clone authored, so neither the selector nor the `clone` it carries identifies the occupant of anything. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…occupied-error-scope
|
Warning Review limit reachedNext included review available in 29 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 #119
CloneAddressOccupied's NatSpec named the occupant: on the open-salt path "theexact clone asked for", on the namespaced path "the clone the same deployer
deployed at that salt". That identification only holds when the LIBRARY threw
the error.
cloneAndInitializebubbles the clone's revert data byte for byte(
src/lib/LibICloneableFactoryV4.sol:185-189) and the error is declared at filescope, so it is in every factory's ABI: an implementation whose
initializedoes
revert CloneAddressOccupied(attacker)produces revert data the call sitecannot tell from the library's own throw, and a caller that believed the NatSpec
would treat an attacker-chosen address as "the clone".
The fix is the deletion. What is true at the one site that throws it is the
first sentence, which stays: the clone address already has code.
No edit to
src/interface/ICloneableFactoryV4.sol. Its occupancy passage isalready scoped to a non-zero code size the CALLER reads, not to this error, and
that file belongs to a separate batch.
QA
Tests never assert NatSpec text.
green on this branch (78 passed, 0 failed) as the merge check.
src/lib/LibICloneableFactoryV4.sol:185-189, which bubblesreturnDataverbatim under areturnData.length > 0guard only, and thefile-scope error declarations at
:12-31, which put all five selectors in theABI of every factory built on the library.
that is only true when the library authored the revert". All five errors in
the file were read.
ZeroImplementationCodeSize,DelegatedImplementationand
CloneDeploymentFailedstate only the condition the library checks, whichis all their throw sites claim;
InitializationFailedstates its conditionplus the verbatim bubbling itself, which is the mechanism, not an inference
from it.
CloneAddressOccupiedwas the only one inferring an identity — whothe occupant is and what data deployed it — from the mere fact of the revert.
🤖 Generated with Claude Code