Conversation
liqdmetal
force-pushed
the
feature/verify-proof-poc
branch
from
August 23, 2026 03:26
b857f36 to
84eccbb
Compare
This was referenced Aug 23, 2026
liqdmetal
force-pushed
the
feature/verify-proof-poc
branch
from
August 25, 2026 01:32
1f0acb2 to
e808dd5
Compare
Author
|
Folded local maturity: verify_proof now rejects a statement whose Roothash != executing BLID when Chain_inputs is set. TestVerifyProofRoothashBind + BenchmarkVerifyProof (~85ms/op ring-16). Still a PoC — gas is a policy number. |
Rebuilt on DEROFDN community-dev (post-DEROFDN#129 func_table refactor). verify_proof(tx_hex, scid_index, ctx_hex) -> 0/1: native hook into Proof.Verify. Chain binding: when Chain_inputs set, rejects statements whose Roothash != Chain_inputs.BLID. Anti-sybil ownership wargame locks the recent-self-spend gate pattern. Gas 2,000,000 (policy number, PoC). Tests: TestVerifyProof, TestVerifyProofRoothashBind, TestWargameVerifyProofAntiSybil*, full dvm suite green.
liqdmetal
force-pushed
the
feature/verify-proof-poc
branch
from
August 31, 2026 12:12
31d0f4c to
30b0f62
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
PoC implementation of the P1-1
verify_proofintrinsic — ZK proof verification inside the DVM, as a native hook into the audited GoProof.Verify(NOT VM-interpreted group arithmetic). Follows the design in issue #92.The intrinsic
tx_hex— a fully-serialized transaction (carries the statement's C/D/pointers/roothash + the proof)ctx_hex— the expanded statement material DERO's serialization deliberately omits (ring/CLn/CRn are "expanded from graviton store"): per ring member[ring key (33B) | CLn (33B) | CRn (33B)]concatenated, 99·N bytesProof.Verifynodes run on every tx (transaction_verify.go:482)Chain binding (shipped in this revision)
Executing-block roothash bind. When
Chain_inputsis set (the real on-chain path), the handler rejects any statement whoseRoothash != Chain_inputs.BLID. A fabricated-but-self-consistent proof carrying a roothash that is not the current block's BLID now returns 0.TestVerifyProofRoothashBind: same-BLID → 1, mismatched-BLID → 0.Chain_inputs == nilskip the bind (so the low-level verification vectors still run standalone); a production contract gate MUST set the chain context.Anti-sybil / proof-of-ownership pattern (wargame)
verify_proofalso works as an ownership gate against one-GPU-many-wallets sybil: a contract can require proof of a recent self-spend anchored to the current BLID before allowing aClaim/submit.TestWargameVerifyProofAntiSybilOwnershiplocks it: valid recent self-spend → 1, stale/spoofed-chain proof → 0, tampered → 0, absent → 0. A production gate MUST setChain_inputs.BLIDfor the freshness bind.Why this serialization format
DERO's tx serialization strips the expanded statement (ring, CLn, CRn) to truncated pointers + C/D — the verifier needs the real points, which nodes normally reconstruct from the graviton balance tree. The context blob is the contract's way of supplying exactly what it expects. These are public values; nothing secret enters SCDATA.
Safety
>= 10.0.0, gas 2,000,000.Tests
TestVerifyProof: valid tx + correct context → 1; wrong context / context-size mismatch / tampered tx / malformed hex / bad index → 0; version-gated.TestVerifyProofRoothashBind: executing-block bind enforced when Chain_inputs set.TestWargameVerifyProofAntiSybil*: ownership-gate pattern vs sybil.BenchmarkVerifyProof: ~85 ms/op ring-16 on a 5900X (3 iterations).Honest scope
Relationship
Branch:
feature/verify-proof-pocin the forkliqdmetal/derohe-improvements-by-liqdmetal. Carries the build fixes. Flat oncommunity-dev.