Skip to content

Invariants - #1841

Merged
RensR merged 15 commits into
mainfrom
invariants
May 6, 2026
Merged

Invariants#1841
RensR merged 15 commits into
mainfrom
invariants

Conversation

@RensR

@RensR RensR commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

[not all approved yet, only usable for demo purposes]

@RensR
RensR changed the base branch from develop-bak to main March 17, 2026 14:34
@RensR
RensR marked this pull request as ready for review May 6, 2026 10:52
@RensR
RensR requested a review from a team as a code owner May 6, 2026 10:52
Copilot AI review requested due to automatic review settings May 6, 2026 10:52
clnan
clnan previously approved these changes May 6, 2026

@clnan clnan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread chains/evm/contracts/invariants/CONTEXT.md Outdated
Comment thread chains/evm/contracts/invariants/CONTEXT.md Outdated
Comment thread chains/evm/contracts/invariants/CONTEXT.md Outdated
Comment thread chains/evm/contracts/invariants/ENCODING_INVARIANTS.md Outdated
Comment thread chains/evm/contracts/invariants/TOKEN_POOL_INVARIANTS.md
@RensR
RensR enabled auto-merge May 6, 2026 12:21
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Metric invariants main
Coverage 70.1% 69.9%

@RensR
RensR added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit 5812419 May 6, 2026
43 of 44 checks passed
@RensR
RensR deleted the invariants branch May 6, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants