Repository navigation
Per-network beacon for registry beacon proxy suites - #309
Open
thedavidmeister wants to merge 46 commits into
Open
thedavidmeister wants to merge 46 commits into
thedavidmeister wants to merge 46 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oxy tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The per-network beacon array cannot be copied from memory to storage under legacy codegen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove the single beacon field and RegistryBeaconProxyBeaconAmbiguous; one path handles every suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests read each suite's beacon from beaconPerNetwork, declare only the factory and registry as dependencies, and cover beaconOnNetwork's missing and duplicate chain refusals, checkBeacon's per-chain binding and code-hash refusals, and the address ignoring the beacon list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ode (WIP) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…try beacon proxy suites Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…expose expectedBytecodeHash lookup; lock rain-deploy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…test call sites Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roxy code hash Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…date's stored code against it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y without validating the code it generates Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l initialize Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… proxy step Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…acon proxy is read Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e and on another chain's Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…language/rain.factory into registry-beacon-per-network
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fix expectRevert ordering Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…language/rain.factory into registry-beacon-per-network
checkSuiteOnNetwork and appliedState take the resolved beacon's chain id instead of reading block.chainid, so offline checks hold suites to the derivation for the beacon's network. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LibRainDeployRegistryBeaconProxy.checkBeacon takes the chain id whose declared beacon to hold the binding to; checkOnChain passes the checked network's chain id instead of block.chainid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tests and refuse a twice-listed chain at the candidate Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…language/rain.factory into registry-beacon-per-network
… a state without its storage Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…twice Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
Registry beacon proxy suites declare their beacon only as a per-chain list of
RegistryBeaconOnNetwork{chainId, beacon, codeHash}, mirroring clone suites'initDataPerNetwork. A suite with one beacon lists it for each of its chains. One code path handles every suite: binding check, code-hash check, owner-key check and local simulation. Off-chain only: no contract, factory bytecode, proxy creation code or predicted address changes.Why
A consumer (S01-Issuer/st0x.deploy#656 ) needs one token suite to cover every chain, each on its own live beacon; Base's set differs from the others'.
Breaking API change
struct RegistryBeaconOnNetwork { uint256 chainId; address beacon; bytes32 codeHash; }.RegistryBeaconProxyDeployandRegistryBeaconProxyParamsdropaddress beaconand carryRegistryBeaconOnNetwork[] beaconPerNetworkin its place. Struct literals andabi.decodeof the params change shape; single-beacon declarations must list their beacon and its code hash per chain.LibRainDeployRegistryBeaconProxy.beaconOnNetwork(params, chainId)returns that chain's entry, refusingRegistryBeaconProxyNoBeaconOnNetworkfor none or a duplicate.checkBeaconchecks the binding and the beacon's code hash (RegistryBeaconProxyBeaconCodeHashMismatch) againstbeaconOnNetwork(params, block.chainid)for every suite. Fails closed.registryBeaconProxyParamsno longer checks a beacon among dependencies; the per-chain binding and code-hash check covers it.registryBeaconProxyRuntimeCode(vm, params, implementation, implementationCode)is removed. UseregistryBeaconProxyRuntimeCodeOnNetwork(vm, params, chainId, implementation, implementationCode), orregistryBeaconProxyRuntimeCode(vm, params, beacon, implementation, implementationCode)for an explicit beacon.checkBroadcastSeatreads the owner of that chain's beacon.Dependency
rain-deployis a temporary git dependency pinned to1ae4dcd0c357748fa3b3eaa8c6abf80cca099c33for rainlanguage/rain.deploy#415 . It returns to a versioned release once rain-deploy releases that change.QA
beaconfield and are the test agent's to port, with per-network binding, code hash and missing/duplicate chain id testsextcodehashon each network, independent of the declared params🤖 Generated with Claude Code