feat: OffRamp-derived CCV selection for live CCIP 2.0 fork routing - #67
Closed
magiodev-cll wants to merge 1 commit into
Closed
magiodev-cll wants to merge 1 commit into
magiodev-cll wants to merge 1 commit into
Conversation
Adds V2VerificationMode.OFFRAMP_DERIVED: the required CCV list comes from the destination OffRamp (getCCVsForMessage) and the raw encoded message is executed through the permissionless execute entrypoint, so fork routing does not depend on the local MessageV1 codec. Keeps V2 fork tests working when the on-chain wire format moves ahead of the pinned chainlink-ccip (today: finality uint16 -> bytes4, chainlink-ccip #1898). - CCIPLocalSimulatorFork: new mode + _routeV2MessageOffRampDerived / _executeOffRampDerivedV2; destination chain resolved from the event topics with no MessageV1 decode; falls back across candidate OffRamps and marks processed only on success. - Fork-only test helpers ported onto V3: getOffRampForLane, setLaneDefaultCCVs, IOffRampSourceConfigV2Fork, plus the CCVNoOpVerifier test double. - IOffRampExecuteV2 gains the bytes-based execute entrypoint. - New e2e: test/e2e/ccip/CCIPv2Fork.t.sol (Sepolia -> Arb Sepolia message and token transfer over the live 2.0 lane with a no-op default CCV). - Unit 42/42; live e2e 2/2 with public RPCs.
Author
|
superseded by #68 |
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.
Context
Follow-up to #54. The refresh (#66) has landed on
devrel-205/cl-local-v3, and this branch is now rebased onto the resulting merge commit, so the diff is only this work. It supersedes the fork-side draft magiodev-cll#3.Why
#54's V2 routing decodes
MessageV1locally to derive the CCV list and to callexecuteSingleMessage(MessageV1, ...). Today's live lanes encodefinalityasbytes4(chainlink-ccip #1898, 2026-04-08) while the pinned dependency still decodesuint16, so live V2 fork tests fail withInvalidDataLength(MESSAGE_FINAL_OFFSET).This ports the approach we validated in production rehearsal: let the destination OffRamp select the CCVs (
getCCVsForMessage(encodedMessage)) and execute the raw encoded message through the permissionlessexecuteentrypoint. No local message decoding, so routing keeps working as the wire format evolves.What
V2VerificationMode.OFFRAMP_DERIVED(new, fork-only):CCIPMessageSenttopics, noMessageV1decodeexecute(encodedMessage, ccvs, verifierResults, 0), candidates tried in reverse router order, processed only on successIOffRampExecuteV2gains the bytes-basedexecuteentrypoint (next toexecuteSingleMessage).getOffRampForLane,setLaneDefaultCCVs,IOffRampSourceConfigV2Fork, and theCCVNoOpVerifiertest double (src/test/ccip/CCVNoOpVerifier.sol), so a lane's default CCV can be mocked with a no-op on a fork.test/e2e/ccip/CCIPv2Fork.t.sol— Sepolia → Arbitrum Sepolia message + token transfer over the live 2.0 lane, with the no-op CCV as the single counterfactual (validation, quorum walk, token release/mint, receiver call all production code).Evidence
forge test --match-path "test/unit/**"— 42/42forge test --match-path "test/e2e/ccip/CCIPv2Fork.t.sol"(public RPCs) — 2/2test/e2e/ccipstill fail on the pinned codec path (STRICT/SYNTHETIC_ONLYmodes); they pass once the dependency bump lands or once switched toOFFRAMP_DERIVED.917cd63to1a4c265).