You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support Sui gRPC endpoints and improve fixtures rate limiting in SDK - #512
This pull request introduces improvements to test reliability and fixture management for the CCIP CLI and SDK, especially in environments where blockchain data is pruned or endpoints are unreliable. The changes ensure tests dynamically select fresh fixtures, improve endpoint selection logic, and add robust helper utilities for manual execution tests.
Test fixture selection and reliability:
The E2E tests for the show command now select a recent, single-message, successful transaction at runtime instead of relying on a pinned fixture. This prevents failures due to pruned history or outdated data and ensures tests remain stable in CI environments. (ccip-cli/src/commands/show.e2e.test.ts) [1][2][3][4][5][6][7]
A new helper (rankExecFixtures and tryExecFixtures) is added to select and attempt execution of failed messages for fork-based manual-execution tests, ranking candidates and handling transient errors gracefully. (ccip-sdk/src/evm/exec-fixtures.test.helpers.ts)
Endpoint selection and testing:
The integration tests now use the new reachableRpcEndpoint utility to select the best available RPC endpoint, improving resilience to endpoint failures and configuration issues. (ccip-sdk/src/evm/dest-liquidity.integration.test.ts) [1][2][3]
A dedicated test suite for reachableRpcEndpoint is added, verifying its behavior in various endpoint availability scenarios. (ccip-cli/src/providers/test-endpoints.test.ts)
Changelog and protocol support:
The changelog notes that Sui now supports gRPC endpoints, with auto-detection and fallback to JSON-RPC as needed. (CHANGELOG.md)
Sui's public fullnodes and keyless gateways no longer serve JSON-RPC.
SuiChain.fromUrl now probes an http(s) URL for gRPC-Web first and falls
back to JSON-RPC.
- SuiGrpcChainClient adapts SuiGrpcClient to the JSON-RPC-shaped
SuiClientLike surface the Sui implementation consumes
- SuiChain.fromClient builds a chain from any SuiClientLike (e.g. a
native-gRPC transport); network detection is shared with fromUrl
- memoized lookups key on the client, and getTransactionBlock on its
options
- getTokenPoolConfig throws when it can't resolve the pool's router
- recorded execution fixtures replace pruned live data in the
regression tests; the integration suite uses the public fullnode
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some keyless RPCs (e.g. sepolia.base.org, rpc.monad.xyz) answer
over-budget calls with HTTP 200 and a JSON-RPC -32007 error instead of
a 429. createRateLimitedFetch now treats it like a 429 without
rate-limit headers. Only JSON-RPC bodies up to 16 KB (by
content-length) are inspected, so large results keep streaming.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The public toncenter quota is per IP and shared by the v2 JSON-RPC, v3
index and seqno-oracle calls. Per-path limiters each paced alone, so
the v2 walk starved the v3 index fast path into its slow fallback. All
SDK-created TON fetches to one origin now share one limiter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- raceRpcEndpoint takes an `ordered` option (first reachable endpoint
wins, keeping archive-capable entries preferred), clears its probe
timers and stops retrying losing candidates
- keyless fallbacks trail the OP Sepolia, Arbitrum and Monad defaults
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pinned failed messages rot: they get executed on the live chain, or
public RPCs prune their source tx.
- fork exec tests try the pin, then the lane's newest failed messages
ready for manual execution (staging API); each tried message is used
once across tests, and the test fails with every candidate's error
- integration receipt tests pick recent Base -> OP messages from the
API and report each candidate's scan error
- suites use EVMChain.fromUrl, i.e. the SDK's rate-limited fetch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The `since` cursor comes from a recent CCIPMessageSent log via the SDK,
the scan window end is pinned once per suite, and one retry helper
replaces the copied retry blocks. Exhausted retries fail with the last
error instead of skipping.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-record the v2 send/execute fixtures after the 2026-10-22 staging
upgrade, so they match the deployed account layouts; the execute
fixture is an inline execute_v2 from Fuji (buffered executions carry no
execInputs). Override the rent sysvar with a plain JSON-RPC call to
surfpool instead of the private Connection._rpcRequest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pinned quiet-lane fixture fell past base-sepolia's retained
history. The suite now picks the newest single-message successful send
from the CCIP API, and fails clearly when the lane has none. The
invalid-hash test waits past the SDK's 90 s per-request cap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Update direct dependencies to the newest release at least ten days old,
and let npm re-resolve the transitive tree.
npm audit drops from 85 findings to 24. Nothing critical remains; the
two high findings are the OpenZeppelin 4.7.3 advisories, whose aliased
package names pin the version. dompurify 3.4.17, markdown-it 14.3.3,
launch-editor 2.14.2, http-cache-semantics 4.3.0 and toml 5.0.1 clear
the rest.
Overrides go from 21 to 18: http-cache-semantics, katex and
@changesets/cli are no longer needed, and the nested ws override
becomes one "ws@8" entry that also covers webpack-dev-server's pinned
ws@8.18.0. postcss, serialize-javascript and tmp move to their newest
safe release; postcss-selector-parser is pinned to 7.1.6.
oxlint-tsgolint 7.0.2004 anchors no-unnecessary-condition at the start
of the expression, so the disable directive in the Canton TAR resolver
moves up one line.
Both were skipped since toncenter was unreachable (2026-01), and their
fixtures belonged to a TON deployment retired in 2026-02.
- index integration: commits, receipts and messages are selected at
runtime from bounded scans on the router's current ramps; covers
decode and router discovery paths that no unit test reaches
- show e2e: each direction picks a recent single-message send from the
CCIP API, under the ton-testnet and sepolia locks
- exhausted retries fail with the last reason instead of skipping
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aptos-testnet restarted around 2026-10-08, and CCIP is not deployed on
it again: the EVM OffRamps still point to the old package 0xc748…ee45,
which has no modules, and the CCIP API and DB list no aptos-testnet ramp
or message after the restart. The suites stay skipped, now with the
reason shown in the test report.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds Sui gRPC-Web support to the SDK while retaining JSON-RPC fallback, and improves CLI and SDK test reliability around pruned history and unreliable endpoints.
Changes:
Introduces transport-neutral Sui clients, client injection, transport documentation, and regression tests.
Refreshes live fixtures and adds runtime fixture selection and endpoint probing.
Updates shared rate limiting, fork setup, and dependencies.
File
Description
scripts/test-endpoints.ts
Adds ordered endpoint probes and fallback endpoints.
package.json
Updates development dependencies and overrides.
docs/sdk/sui.md
Documents Sui transports and client injection.
docs/sdk/index.md
Links the Sui provider guide.
CHANGELOG.md
Announces Sui gRPC support.
ccip-sdk/src/ton/utils.ts
Adds an origin-scoped rate-limit profile.
ccip-sdk/src/ton/utils.test.ts
Tests shared TON pacing configuration.
ccip-sdk/src/ton/index.ts
Applies shared pacing across TON requests.
ccip-sdk/src/sui/objects.ts
Uses transport-neutral clients and isolates caches.
ccip-sdk/src/sui/integration.test.ts
Re-enables live tests with runtime fixtures.
ccip-sdk/src/sui/index.ts
Adds transport detection and client injection.
ccip-sdk/src/sui/index.test.ts
Tests injection, caching, and router metadata.
ccip-sdk/src/sui/grpc.test.ts
Tests adapter pagination, errors, and transports.
ccip-sdk/src/sui/grpc-shapes.test.ts
Tests gRPC response conversion.
ccip-sdk/src/sui/execution-regression.test.ts
Adds offline decode and execution regressions.
ccip-sdk/src/sui/exec.ts
Accepts transport-neutral execution clients.
ccip-sdk/src/sui/events.ts
Uses the shared client interface for streaming.
ccip-sdk/src/sui/discovery.ts
Uses the shared client interface for discovery.
ccip-sdk/src/sui/client.ts
Defines the SDK’s Sui client contract.
ccip-sdk/src/solana/fork.test.ts
Aligns fork rent settings and execution inputs.
ccip-sdk/src/solana/fork.test.data.ts
Refreshes staging transaction fixtures.
ccip-sdk/src/index.ts
Exports Sui client and adapter APIs.
ccip-sdk/src/fetch.ts
Adds in-band JSON-RPC rate-limit retries.
ccip-sdk/src/fetch.test.ts
Tests rate-limit response handling.
ccip-sdk/src/evm/integration.test.ts
Adds endpoint selection and recent receipt fixtures.
- createRateLimitedFetch resends a JSON-RPC batch only when every
member is rate-limited (-32007); a batch with an answered member,
e.g. eth_sendRawTransaction, is not replayed
- EVM integration suites do not probe endpoints at module load when
SKIP_INTEGRATION_TESTS is set
- Sui suite: a send captured at the tip no longer fails the tip check,
and a tx with several sends matches the captured message id
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Unresolved issues affect cross-chain retry behavior, compressed-response streaming, and browser compatibility of the Sui adapter.
No open issues 🎉
3 previously missed issues
In code that hasn't changed since last review
Bound decoded response size for compressed HTTP responses
ccip-sdk/src/fetch.ts:686
Content-Length measures the encoded HTTP body, not the decompressed body exposed by fetch. A gzip or Brotli JSON-RPC result can pass this 16 KiB check yet make response.text() buffer megabytes, defeating the inspection bound and streaming behavior. Skip inspection for encoded responses, as suggested below, or enforce the limit while reading decoded bytes and replay any consumed prefix with the remaining stream. Skipping encoded responses preserves streaming but leaves their in-band rate-limit errors to the caller.
Restrict -32007 rate-limit classification to EVM providers
ccip-sdk/src/fetch.ts:695
-32007 is not a transport-independent rate-limit code: Solana uses it for SlotSkipped. The Solana connection also installs this shared fetch wrapper, so a small HTTP-200 skipped-slot response with Content-Length now consumes the retry budget and reduces endpoint concurrency even though retrying cannot recover the slot. Restrict this classification to the relevant EVM providers or require a rate-limit-specific indication alongside the code. Add a regression test that returns Solana's skipped-slot error without retrying or penalizing the limiter.
Import Buffer for browser-safe gRPC conversions
ccip-sdk/src/sui/index.ts:429
The new default gRPC path calls Buffer.from(...) in grpc.ts and grpc-shapes.ts, but neither module imports Buffer. In browser bundles without a global Buffer polyfill, chain-identifier conversion fails; a network keyword in the URL can mask that failure during detection, but subsequent event and cursor conversions still fail. Import Buffer from the existing buffer dependency in both adapter modules, following sui/objects.ts, or replace these calls with browser-safe byte conversions.
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
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.
This pull request introduces improvements to test reliability and fixture management for the CCIP CLI and SDK, especially in environments where blockchain data is pruned or endpoints are unreliable. The changes ensure tests dynamically select fresh fixtures, improve endpoint selection logic, and add robust helper utilities for manual execution tests.
Test fixture selection and reliability:
The E2E tests for the
showcommand now select a recent, single-message, successful transaction at runtime instead of relying on a pinned fixture. This prevents failures due to pruned history or outdated data and ensures tests remain stable in CI environments. (ccip-cli/src/commands/show.e2e.test.ts) [1] [2] [3] [4] [5] [6] [7]A new helper (
rankExecFixturesandtryExecFixtures) is added to select and attempt execution of failed messages for fork-based manual-execution tests, ranking candidates and handling transient errors gracefully. (ccip-sdk/src/evm/exec-fixtures.test.helpers.ts)Endpoint selection and testing:
The integration tests now use the new
reachableRpcEndpointutility to select the best available RPC endpoint, improving resilience to endpoint failures and configuration issues. (ccip-sdk/src/evm/dest-liquidity.integration.test.ts) [1] [2] [3]A dedicated test suite for
reachableRpcEndpointis added, verifying its behavior in various endpoint availability scenarios. (ccip-cli/src/providers/test-endpoints.test.ts)Changelog and protocol support:
CHANGELOG.md)