Clean up error messages and checks in CCIP Solana msghasher.go#22287
Clean up error messages and checks in CCIP Solana msghasher.go#22287vicentevieytes merged 2 commits intodevelopfrom
Conversation
|
👋 vicentevieytes, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
|
I see you updated files related to
|
|
✅ No conflicts with other open PRs targeting |
There was a problem hiding this comment.
Pull request overview
Risk Rating: MEDIUM — changes affect Solana CCIP message hashing inputs; incorrect parsing can cause hash mismatches or unexpected failures when running via LOOP/gRPC.
This PR addresses a security/robustness gap in parseExtraDataMap by preventing negative int64 values (coming from LOOP/gRPC type coercion) from being silently cast into uint64 for AccountIsWritableBitmap, and updates several type-mismatch errors to reflect the additional accepted LOOP representations.
Changes:
- Add a lower-bound check (
v < 0) before castingint64touint64forAccountIsWritableBitmap. - Improve error messages to reflect accepted types for
ComputeUnits,AccountIsWritableBitmap,Accounts, andTokenReceiver.
Scrupulous human review recommended (targeted areas):
parseExtraDataMapnumeric casting behavior forAccountIsWritableBitmap(int64 → uint64) when running through LOOP/gRPC, to confirm this matches the intended “valid range” semantics for the bitmap and won’t break any legitimate payloads.
5b00ef2 to
a5aef28
Compare
|




Requires
Supports