-
Notifications
You must be signed in to change notification settings - Fork 21
[CCIP-7723] Define & Implement ICrossChainVerifierResolver #1330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
chains/evm/contracts/interfaces/ICrossChainVerifierResolver.sol
Outdated
Show resolved
Hide resolved
|
|
||
| for (uint256 i = 0; i < ccvsToQuery.length; ++i) { | ||
| ICrossChainVerifierV1(ccvsToQuery[i]).verifyMessage({ | ||
| address ccvAddress = ccvsToQuery[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resolver requires the first 4 bytes of ccvData to encode a version, but the blobs we emit are whatever the underlying verifier returns (e.g. the
current committee verifier returns ""). When we attempt to route verification through the resolver will revert with InvalidCCVDataLength right ?
I think if we are going with this "versioning" approach then CommitVerifier should prepend the version in verifierReturnData
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, meant to add this in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source CCVData is not the same as what is sent on dest. Offchain is responsible for getting the dest data and consuming source. There is no requirement that the version comes from source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the DD I posed a couple options we can take for the CommitteeVerifier specifically:
- CommitteeVerifier returns version as part of forwardToVerifier return data. We will use bytes4 to represent the version, as we’ve established precedent here with USDC. This information is then included in CCIPMessageSent.receiptBlobs and subsequently parsed by each verifier node. The aggregator would then need to validate that each verifier node pulled the same version before it can prepend the version to the signatures and write to storage.
- The aggregator service stores the verifier version assigned to each destination chain and prepends it to the ccvData for a particular VerifierResult.
I prefer the first because option 2 creates duplicated config. I've got offchain sign off on it as well.
|
Regarding
Pre-resolution Thoughts on this edge case ? cc : @RensR |
|
@0xsuryansh good call-out in your top level comment, resolution generally needs to happen as immediately as possible. |
Thinking about it more, I actually don't think this is an issue. Different verifier addresses are effectively different entities. If they resolve to the same implementation, it shouldn't matter. They just happen to be using the same implementation. They should each still get their fee. |
|
Ticket: https://smartcontract-it.atlassian.net/browse/CCIP-7723