Skip to content

perf(crosschain): parse the gateway chain from calldata in CrosschainLinked - #170

Open
luiz-lvj wants to merge 3 commits into
masterfrom
perf/crosschain-linked-calldata-parse
Open

luiz-lvj wants to merge 3 commits into
masterfrom
perf/crosschain-linked-calldata-parse

Conversation

@luiz-lvj

Copy link
Copy Markdown
Collaborator

Summary

Ports OpenZeppelin/openzeppelin-contracts#6341 from openzeppelin-contracts 5.7.0.

_isAuthorizedGateway extracts the chain via a new calldata helper (parseV1Calldata) instead of first copying sender into memory, avoiding an unnecessary memory copy. The memory-based _extractChain is retained for its other caller.

No changeset, mirroring the upstream PR (which ships none).

…nLinked`

## Summary

Ports [OpenZeppelin/openzeppelin-contracts#6341](OpenZeppelin/openzeppelin-contracts#6341) from openzeppelin-contracts 5.7.0.

`_isAuthorizedGateway` extracts the chain via a new calldata helper (`parseV1Calldata`) instead of first copying `sender` into memory, avoiding an unnecessary memory copy. The memory-based `_extractChain` is retained for its other caller.

No changeset, mirroring the upstream PR (which ships none).

@pepebndc pepebndc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The check job fails: no changeset. Add a changeset with npx changeset add or apply the ignore-changeset label. The code change is correct. A test that exercises _isAuthorizedGateway with a valid and a malformed sender would also help, since no test covers that path today.

@luiz-lvj
luiz-lvj requested a review from pepebndc September 16, 2026 18:32
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.

2 participants