Skip to content

Conversation

@nicholaspai
Copy link
Member

@nicholaspai nicholaspai commented Nov 25, 2025

This contract is designed to be used with ZkStack chains that migrate to the new ZkGateway system. For example, this will be required for ZkSync (chain ID 324) and Lens.

I don't know yet whether currently supported ZkStack chains like Lens will use this new architecture or the current one. Therefore, to deploy hot fixes to Lens we would need to checkout an older commit and deploy that version of the ZkSync_SpokePool.

The alternative is introducing a new contract, but I'd like to consolidate changes.

Lens will be upgraded with ZkSync, according to the ZkSync team.

@nicholaspai nicholaspai changed the title feat: Create ZkGateway_SpokePool feat: Update ZkSync_SpokePool to support new L2 ZkStack L2AssetRouter Nov 25, 2025
@nicholaspai
Copy link
Member Author

nicholaspai commented Dec 1, 2025

@nicholaspai nicholaspai marked this pull request as ready for review December 1, 2025 21:10
fusmanii
fusmanii previously approved these changes Dec 1, 2025
Copy link
Contributor

@fusmanii fusmanii left a comment

Choose a reason for hiding this comment

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

looks good, just one q

// are added, so that the total number of slots taken by this contract remains constant. Per-contract
// storage layout information can be found in storage-layouts/
// This is at bottom of contract to make sure it's always at the end of storage.
uint256[999] private __gap;
Copy link
Contributor

Choose a reason for hiding this comment

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

does this need to be updated given that new vars are added?

Copy link
Member Author

Choose a reason for hiding this comment

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

no because the new vars are constants or immutable so they don't add any storage slots

nicholaspai added a commit to across-protocol/relayer that referenced this pull request Dec 4, 2025
We need this code to finalize any withdrawals from ZkStack chains sent through the new `L2AssetRouter` contracts.

See across-protocol/contracts#1190 for more details on L2 contract changes that will initiate these new withdrawals

This PR is backwards compatible and can be merged today

[test finalization can be seen here.](https://etherscan.io/tx/0x88f21e9730a6586155de9f8e46a8f82a78fde09193e3de3d48a783cf94c2dc41#eventlog)
@nicholaspai nicholaspai added the need to audit This PR needs to be audited externally before deploying label Dec 5, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

@fusmanii what's our current plan for deploying elastic chain (zksync-like) contracts? Do we need any config changes to foundry or?

Copy link
Contributor

Choose a reason for hiding this comment

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

we have elastic chain deployment set up already, just need to install foundryup-zksync and it will pick up this config

@grasphoper grasphoper changed the base branch from master to audit-jan19 January 15, 2026 17:02
This contract is designed to be used with ZkStack chains that migrate to the new [ZkGateway](https://forum.zknation.io/t/zip-6-prepare-zksync-for-zk-gateway/490#p-1247-changes-to-bridging-architecture-9) system. For example, this will be required for ZkSync (chain ID 324).

The reason that I'm creating a new contract rather than updating the existing ZkSync_SpokePool is that I don't know yet whether currently supported (or future ones we plan to support) will use this new architecture or the current one, which might need to keep using ZkSync_SpokePool
@grasphoper grasphoper mentioned this pull request Jan 15, 2026
@grasphoper grasphoper deleted the branch master January 16, 2026 21:15
@grasphoper grasphoper closed this Jan 16, 2026
@grasphoper grasphoper reopened this Jan 16, 2026
@grasphoper grasphoper changed the base branch from audit-jan19 to master January 16, 2026 21:49
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​yargs@​17.0.331001007583100
Addedyargs@​17.7.29910010087100
Addedprettier@​2.8.8981009898100

View full report

@socket-security
Copy link

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn Critical
Critical CVE: npm cipher-base is missing type checks, leading to hash rewind and passing on crafted data

CVE: GHSA-cpq7-6gpm-g9rc cipher-base is missing type checks, leading to hash rewind and passing on crafted data (CRITICAL)

Affected versions: < 1.0.5

Patched version: 1.0.5

From: ?npm/cipher-base@1.0.4

ℹ Read more on: This package | This alert | What is a critical CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/cipher-base@1.0.4. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm safer-buffer is 94.0% likely obfuscated

Confidence: 0.94

Location: Package overview

From: ?npm/safer-buffer@2.1.2

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/safer-buffer@2.1.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@grasphoper grasphoper changed the base branch from master to audit-jan19 January 16, 2026 21:55
@grasphoper grasphoper changed the base branch from audit-jan19 to master January 16, 2026 21:55
@grasphoper grasphoper closed this Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need to audit This PR needs to be audited externally before deploying

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants