Conversation
40d4cb1 to
882c034
Compare
📝 WalkthroughWalkthroughAdds storage and propagation of an origin transaction hash: DB APIs and RocksDB persist/retrieve H512 by message ID; relayer retrieves and includes origin_tx_hash in CCIP-read offchain requests; TypeScript CCIP service accepts and prefers a provided origin_tx_hash for attestation lookup. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant TSService as TypeScript Service
participant Relayer as Rust Relayer
participant DB as RocksDB
participant Scraper as Scraper/Fallback
rect rgba(100, 200, 150, 0.5)
Note over Client,TSService: Client may send origin_tx_hash to service
end
Client->>TSService: POST /getCctpAttestation (message, origin_tx_hash?)
TSService->>TSService: Validate origin_tx_hash
alt origin_tx_hash provided
TSService->>TSService: Use provided origin_tx_hash
else no origin_tx_hash
TSService->>Relayer: request origin tx hash by message id
Relayer->>DB: retrieve_dispatched_tx_hash_by_message_id(message_id)
DB-->>Relayer: Option<H512>
Relayer->>Relayer: Convert H512 → hex string
Relayer-->>TSService: origin_tx_hash (or none)
alt origin_tx_hash returned
TSService->>TSService: Use relayer-provided origin_tx_hash
else
TSService->>Scraper: fallback scraper lookup
Scraper-->>TSService: tx_hash (or none)
end
end
TSService->>TSService: Resolve attestation with tx_hash
TSService-->>Client: Attestation response
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8517 +/- ##
=======================================
Coverage 77.21% 77.21%
=======================================
Files 130 130
Lines 3533 3533
Branches 294 294
=======================================
Hits 2728 2728
Misses 788 788
Partials 17 17
🚀 New features to boost your workflow:
|
|
@claude review |
|
Claude finished @paulbalaji's task in 4m 2s —— View job PR Review: fix: skip scraper lookup for txHash
Review submitted as a consolidated PR review with inline comments. Summary: Solid PR overall. The |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@rust/main/agents/relayer/src/msg/metadata/ccip_read/mod.rs`:
- Around line 296-300: The debug logging currently dumps sensitive payloads via
the tracing::debug call that includes ?body (and similarly the raw response body
around the other tracing::debug), so replace those direct dumps with
non-sensitive metadata: log interpolated_url as before but change ?body to a
size or presence indicator (e.g., body.len() or "present"/"empty") and for the
response log record response length/status or a short hex hash (not full
content); update the tracing::debug invocations in the offchain lookup POST send
(the call that references interpolated_url and body) and the subsequent response
logging (the later tracing::debug that logs the raw response body) to use
size/presence or hash instead of dumping raw payloads.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 953501d0-8c37-469e-8ae2-18c83efc116f
📒 Files selected for processing (2)
rust/main/agents/relayer/src/msg/metadata/ccip_read/mod.rstypescript/ccip-server/src/services/CCTPService.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- typescript/ccip-server/src/services/CCTPService.ts
Description
This PR improves relaying speed for cctp fast transfers by storing the origin tx hash for each message id and submitting it to the ccip-server so it does not need to make an expensive scraper lookup.
Drive-by changes
Related issues
Backward compatibility
The origin_tx_hash is optional and therefore fully backwards compatible
Testing
Deployed on testnet cctp fast transfer route and updated the testnet relayer and offchain lookup server for testing, it is confirmed that the scraper is being skipped now