Skip to content

fix(security): harden zkSYS launch and settlement paths - #395

Open
sidhujag wants to merge 8 commits into
mainfrom
codex/zksys-launch-audit-fixes
Open

sidhujag wants to merge 8 commits into
mainfrom
codex/zksys-launch-audit-fixes

Conversation

@sidhujag

@sidhujag sidhujag commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

This is the base of the zkSYS pre-mainnet audit review series. It updates Core RPC credential handling, Gateway and prover ingress, native batch limits, replay and DA recovery, the V1 registry and keeper, explorer deployment, and release image publication. The separate verified-archive restore and V1 priority-admission PRs build on it.

Operator-facing changes

  • Use TLS for authenticated remote Core RPC. Cookie authentication requires a loopback IP. The shared archive recovery CLI supports explicit trusted writer sessions.
  • Generated Gateway RPC binds behind the proxy, and the prover proxy limits simultaneous buffered downloads. Existing deployments need to apply those settings.
  • Loadbase takes private signer inputs from files. V1 dispatchers read the complete eligible roster at one finalized block in pages of 32. The registry accepts subscriptions above 256 using its existing interface.
  • Concurrent Gateway admission requests for the same DA reference set share a lookup. Each caller validates its own signed commitment. rpc.max_concurrent_edge_da_checks controls distinct concurrent checks per node and defaults to four.
  • Receipt-relative issuance relies on configuring the approved deployer on each eligible edge sequencer during bootstrap.

Validation

The initial audit patch ran 705 Python checks with 702 passes and three skips. A focused follow-up suite of 84 Python checks passed. Rust and Solidity execution coverage on the review head is pending.

V1 dispatcher enrollment

The dispatcher now verifies the complete roster once per journal and records the result in private host storage. Each subsequent open checks the immutable snapshot, RPC chain ID and canonical registry policy at the original block hash. Automatic rollover pages all six member reads in groups of 32 and verifies both lane configurations against the same block. Wrappers and coordinators independently verify the enrollment evidence they consume.

With 3,000 eligible accounts in a synthetic registry, journal reopen used two HTTP requests, a normally routed work request used eight, and automatic two-lane rollover used 581. These counts include actual RPC serialization with mocked registry responses. Focused dispatcher, enrollment, rollover and bootstrap tests passed, including five new restart and integrity regressions.

Compatibility recheck

The follow-up restores local development fee defaults, keeps image aliases on one verified digest, retries busy Gateway DA admission, handles same-block revert and recommit ordering, and scopes archive listing to the selected writer prefixes.

Two service policy questions remain for review.

  • The per-batch priority limit guarantees adjacent pairs fit, but a closed three-batch recovery segment can still have no legal partition. The range planner must account for that boundary.
  • The reference Sentry signs each duty with one ECDSA operator key. A PQ smart account can enroll as the membership account and nominate that operator. The registry forwards 100,000 gas for a contract operator’s duty signature. In an isolated EVM with the zkSYS SLH precompile charge modeled at 45,000 gas, Pali’s single-SLH typed duty used 80,309 gas. Its 2-of-2 ECDSA and SLH policy used 127,408. Fresh contract work signatures require a separate off-chain adapter, and an over-budget operator can lose that duty’s credit permanently.

Direct version-tag publication still requires trusted qualification tooling. Authenticated loopback Core RPC still requires the host proxy configuration to bypass loopback. The source patches do not establish mainnet qualification.

The dependent review PRs cover archive verification and V1 priority admission.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-23T16:25:43.608157Z
We couldn’t complete this review. Comment @codex review to try again.
4271dfc Manual request
🔒 Security Review ❌ Failed 2026-11-23T16:22:40.393012Z
We couldn’t complete this review. Comment @codex security review to try again.
ba89687 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@sidhujag

Copy link
Copy Markdown
Member Author

@codex review

Please review compatibility for existing operator workflows, particularly native batch grouping, contract-operator credits, Gateway admission retries, archive startup and image publication.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

Copy link
Copy Markdown

Test results

1 587 tests   1 585 ✅  50m 41s ⏱️
   38 suites      0 💤
    1 files        2 ❌

For more details on these failures, see this check.

Results for commit 383e3e8.

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.

1 participant