Skip to content

fix: treat a graph copy as finalized only when it carries committee pre-signatures - #529

Open
KSlashh wants to merge 1 commit into
devfrom
audit/7-finalized-copy
Open

KSlashh wants to merge 1 commit into
devfrom
audit/7-finalized-copy

Conversation

@KSlashh

@KSlashh KSlashh commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Audit item M7. Open against dev.

A node can hold only the operator's copy of a graph, without the committee pre-signatures. When Gateway's PostGraphData arrives, the watcher moves the copy to OperatorDataPushed anyway. Several places then judged "finalized" by status: the node served that copy to peers asking for the finalized one, and never pulled the real one. A verifier holding such a copy cannot build the peg-out transactions that need the committee signatures.

"Finalized" now means the stored definition has committee_pre_signed set. The store paths verify the signatures before they write a definition with that flag, so the flag is safe to read.

  • Serving: a GetGraph asking for the finalized copy is answered only from a definition with the flag set, whatever the status.
  • Posted on Goat: when a posted graph is stored locally without committee pre-signatures, the watcher records a finalized pull, for every role. Graphs that are not stored at all are still pulled only by verifiers and watchtowers, as before.
  • Pull: a finalized pull now runs while only the operator's copy is stored. Before, any stored row stopped it.

The flag is read from the raw JSON without rebuilding the graph (raw_definition_committee_pre_signed).

Review notes

  • Nodes that already hold an operator-only copy of a posted graph are not repaired here. With the no-compatibility redeploy they start clean.

Tests: an operator-only copy past OperatorPresigned is not served as finalized; a posted graph held only as the operator's copy is pulled by every role; a finalized pull runs while only the operator's copy is stored. Each fails without the fix. Node tests, workspace clippy with -D warnings and fmt pass.

The test coverage and validation notes above are from the zkm PR notes. Branch scope and diff formatting were checked locally; builds and tests were not rerun during publication.

This branch has not been deployed

No deployments
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