Skip to content

Conversation

@geoff-vball
Copy link
Contributor

Why this should be merged

How this works

How this was tested

How is this documented

uint256 length = teleporterMessage.receipts.length;
for (uint256 i; i < length; ++i) {
_markReceipt(blockchainID_, warpMessage.sourceChainID, teleporterMessage.receipts[i]);
_markReceipt(blockchainID, message.sourceBlockchainID, teleporterMessage.receipts[i]);

Check notice

Code scanning / Semgrep PRO

Semgrep Finding: solidity.performance.state-variable-read-in-a-loop.state-variable-read-in-a-loop Note

Replace state variable reads and writes within loops with local variable reads and writes.
) {
blockchainID = bytes32(0); // TODO decide how to set this for external chains
messageVerifier = IMessageVerifier(verifierSender);
messageSender = IMessageSender(verifierSender);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't messageVerifier and messageSender result from different contract addresses rather than verifierSender?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So... If we use Nick's method (and I strongly think we should), then the message sender and verifier should be in the same contract, that way they're located at the same address. Otherwise we need to do initialization which is messy. I just have these interfaces copied from Jacob's spec, because I haven't thought of a better name than verifierSender for the unified contract.

}

struct ICMMessage {
TeleporterMessage unsignedMessage;
Copy link

@mdelle1 mdelle1 Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TeleporterMessage is always unsigned right? I think this can just be left as message (or unattested Message) since the attestation field is what is used to authenticate it. A signature would just be a specific case of an attestation, e.g. in Warp it is a BLS aggregate signature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants