Skip to content

[WIP / RFC] Core cleanup - Move codecs into its own cciplib go mod#778

Draft
ogtownsend wants to merge 1 commit into
mainfrom
ogt/extract-cciplib-module
Draft

[WIP / RFC] Core cleanup - Move codecs into its own cciplib go mod#778
ogtownsend wants to merge 1 commit into
mainfrom
ogt/extract-cciplib-module

Conversation

@ogtownsend

@ogtownsend ogtownsend commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What

  • Extracts the TON CCIP codec and its leaf dependency subtree into a new self-contained Go module github.com/smartcontractkit/chainlink-ton/cciplib so consumers can import the codec without pulling all of chainlink-ton.
  • Moves 10 packages into cciplib: ccip/codec, ccip/bindings/{common,ocr,feequoter,onramp,ownable2step}, ton/{tvm,hash,parser,tlbe}, plus the mocks/ccipocr3 test mocks.
  • Adds cciplib/go.mod (leaf module: tonutils-go, chainlink-common, go-ethereum, samber/lo, golang.org/x/sync; test-only sui-go-sdk, solana-go, chain-selectors) and cciplib/.mockery.yaml.
  • Rewrites ~185 import sites across the chainlink-ton main, deployment, integration-tests, and staging-monitor modules to the new cciplib paths.
  • Wires each chainlink-ton module to cciplib via require + intra-repo replace (mirroring the existing deployment submodule pattern).
  • Deletes the root .mockery.yaml (its only entry moved to cciplib).

Cross-repo changes (separate PRs)

  • mcms: repoints sdk/ton (+ e2e/tests/ton) imports of the 5 moved packages to cciplib, since mcms is an external consumer of them: [WIP] use new cciplib from cl-ton mcms#807
  • chainlink: swaps core/capabilities/ccip/ccipton/pluginconfig.go and deployment/ccip/shared/stateview/state.go to cciplib, and drops chainlink-ton from the main chainlink/go.mod entirely (only cciplib remains).

Verified (via local replace)

  • cciplib builds and unit tests pass; confirmed clean leaf (no back-edge into chainlink-ton).
  • chainlink-ton main + deployment modules build and test-compile.
  • mcms/sdk/ton builds and vets clean against cciplib.
  • chainlink core ccipton and deployment stateview build; chainlink-ton no longer in core's main module graph.

Blockers / not-yet-resolved

  • chainlink-ton/staging-monitor build is blocked by a chainlink-deployments-framework StateProvider.GetAddress variadic signature change dragged in by newer mcms (unrelated to this move).
  • chainlink-ton/integration-tests test-compile is blocked by the not-yet-published chainlink stateview change plus a pre-existing chainlink-sui version skew (unrelated to this move).
  • go.md and modgraph/gomods outputs have not been regenerated (needs repo nix tooling) and will fail the "up to date" CI check.

Next steps

  • All three repos currently rely on temporary local replace directives and cannot build standalone until the dependency chain is published in order (mcmschainlink-tonchainlink). Publish mcms PR, then bump chainlink-ton to the released mcms and remove the three mcms => ../../mcms replaces.
  • Tag/release cciplib, then bump the cciplib ref in chainlink core and remove its temporary replace in chainlink/go.mod and chainlink/deployment/go.mod.
  • Apply the one-line staging-monitor GetAddress variadic fix during version coordination.
  • Regenerate go.md / run modgraph before merging the chainlink-ton PR.

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.

1 participant