Enhance Groth16 verifier and part_stark_vk handling with versioning#396
Merged
eigmax merged 14 commits intoGOATNetwork:devfrom Apr 19, 2026
Merged
Conversation
…and adapt Groth16 verifier updates
…RPC client to use Alloy's reqwest client
…tness verification logic
…part_stark_vk attestation
e7c9e0a to
6124748
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the per-graph
zkm_versionfield with an attestation-basedpart_stark_vkverification system. Instead of tying each BitVM2 graph to a specific ZKM circuit version,part_stark_vkvalues are now attested via a Merkle tree signed by a multi-sig publisher set, enabling transparent and upgradeable verifier key management without breaking existing graphs.Changes
New:
part_stark_vkAttestation System (bitcoin-light-client-circuit)attestation.rs: Merkle-tree-based attestation forpart_stark_vkvalues, including tree construction, multi-sig root signing with threshold publisher set, attestation bundle loading/snapshot persistence, and in-circuit witness verification.lib.rs: Updatedwatch_longest_chainandoperator_proveto accept attestation inputs, verify sub-proofpart_stark_vkagainst attested witnesses, and useverify_proof_with_part_stark_vk. Defined newWatchtowerPublicOutputsandOperatorPublicOutputsstructs. Addedpart_stark_vkto watchtower commitment format.Publisher Set Rotation (
commit-chain)next_publisher_public_keys/next_thresholdfields toCommitInfoandCircuitCommitwithactive_publisher_set()helper.CommitChainState::applyto verify spending witness against the previous publisher set and assert the next update connector locks to the new set.script_pubkeymismatch check inverify_p2wsh_multisig_witness.zkm_versionRemoval from Graphzkm_versionfromGraphstruct, INSERT/SELECT queries, andbuild_graph_params/convert_graph.ALTER TABLE graph DROP COLUMN zkm_version.zkm_versionfrom RPC API doc examples; added backward-compat serde test.Immutable Groth16 VK Transition (
node/src/vk.rs)get_vk()and artifact installation no longer take azkm_versionparameter.groth16-imm-wrap-vk.tar.gzURL andIMM_GROTH16_VK_BYTES.Operator & Watchtower Proof Handling (
node/src/utils.rs)gen_watchtower_commitmentnow includesproof_part_stark_vk.load_part_stark_vk_for_zkm_versionwithcatch_unwindfor graceful error handling.convert_ark_imm_wrap_vkwith explicitpart_stark_vk.Circuit Hosts (operator, watchtower, header-chain, state-chain, commit-chain)
zkm_versionfrom.zkm_version.binsidecar files.collect_requested_part_stark_vksto gather requiredpart_stark_vkvalues.New Binary:
part_stark_vk_attestbuild-treeandsign-rootsubcommands for managingpart_stark_vkattestation trees offline.Proof Builder RPC
Dependencies
zkm-sdk,zkm-verifier,zkm-primitives, etc.) tov1.2.5.Database Migration
Testing
test_load_part_stark_vk_for_zkm_version_accepts_known_versiontest_load_part_stark_vk_for_zkm_version_rejects_unknown_version_without_panictest_verify_p2wsh_multisig_witness_rejects_prevout_script_mismatchdbg_serde_ignores_legacy_graph_zkm_version