Invariants - #1841
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new set of protocol “invariants” markdown documents under chains/evm/contracts/invariants/ to describe CCIP v2 behaviors and constraints (message lifecycle, encoding, finality/FTF, CCVs, lanes, fees, token pools, and authorization). These docs appear intended as a reference/spec for implementations and reviews (noted as demo-only in the PR description).
Changes:
- Introduces invariant/spec documents for core CCIP v2 subsystems (encoding, finality, CCVs, fees, lanes, token pools, message lifecycle).
- Adds a small “context” document describing legacy support, zero-address sentinel, and instant-finality chain exceptions.
- Adds authorization/cryptographic safety invariants.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| chains/evm/contracts/invariants/TOKEN_POOL_INVARIANTS.md | Defines token pool interface/behavior invariants incl. fees, decimals, rate limiting, and configuration rules. |
| chains/evm/contracts/invariants/MESSAGE_LIFECYCLE_INVARIANTS.md | Specifies sequencing, identity, source/dest flows, execution semantics, token-only transfers, and no-exec address behavior. |
| chains/evm/contracts/invariants/LANE_INVARIANTS.md | Documents lane configuration, pausing/disable semantics, RMN curse behavior, reentrancy, and upgrade/replay invariants. |
| chains/evm/contracts/invariants/FINALITY_INVARIANTS.md | Defines finality/FTF encoding and validation rules and opt-in requirements across the stack. |
| chains/evm/contracts/invariants/FEE_INVARIANTS.md | Defines fee composition, caps, quoting consistency, distribution, and pricing requirements. |
| chains/evm/contracts/invariants/ENCODING_INVARIANTS.md | Specifies MessageV1 / TokenTransferV1 / ExtraArgsV3 wire encoding and strict decoding rules. |
| chains/evm/contracts/invariants/CONTEXT.md | Adds cross-cutting context on legacy support, zero-address sentinel, and instant-finality exceptions. |
| chains/evm/contracts/invariants/CCV_INVARIANTS.md | Documents CCV configuration, merge rules, fee receipts, quorum enforcement, and address stability patterns. |
| chains/evm/contracts/invariants/AUTHORIZATION_INVARIANTS.md | Adds cryptographic safety invariants (key uniqueness, domain separation). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0xsuryansh
approved these changes
May 6, 2026
RensR
enabled auto-merge
May 6, 2026 12:21
|
KodeyThomas
approved these changes
May 6, 2026
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.
[not all approved yet, only usable for demo purposes]