support token receiver in solana extra codec#17024
support token receiver in solana extra codec#17024prashantkumar1982 merged 18 commits intodevelopfrom
Conversation
…NONEVM-1497/support-tokenReceiver-in-solana-extra-data-codec
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌1 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌1 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌1 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
| Sender: msg.Sender, | ||
| Data: msg.Data, | ||
| TokenReceiver: solana.PublicKeyFromBytes(msg.Receiver), | ||
| TokenReceiver: ed.tokenReceiver, |
There was a problem hiding this comment.
The problem is though, msg.Receiver needs to be part of the hash too
| accounts := ed.accounts | ||
| // if logical receiver is empty, don't prepend it to the accounts list | ||
| if !msg.Receiver.IsZeroOrEmpty() { | ||
| accounts = append([]solana.PublicKey{solana.PublicKeyFromBytes(msg.Receiver)}, accounts...) |
There was a problem hiding this comment.
Ah I see, you're doing it here
There was a problem hiding this comment.
I'm not sure where this validation should live, but if the receiver is empty then the accounts list needs to be empty too. Maybe this already happens in CW (receiver execution is skipped?)
There was a problem hiding this comment.
Good point, we don't have that validation in CW. If logic receiver is empty, we just skip adding any accounts for messaging. We don't confirm that extraArgs.Accounts is empty
There was a problem hiding this comment.
I think that's the correct implementation though or we'll keep failing on these messages that were already committed. Validation should happen in the ccipSend logic somewhere here:
chainlink/contracts/src/v0.8/ccip/FeeQuoter.sol
Lines 1018 to 1020 in 6f42820
cdcc4f5
|




Jira
Update Solana execute codec and msg hasher to use tokenReceiver address from extraArgs, instead of Msg.Receiver.
Slack reference