Skip to content

Commit d2716a6

Browse files
jeswrclaude
andauthored
feat(proof-methods): disclosed-credential re-evaluation method and Q1-Q5 baseline (#6788)
* feat(proof-methods): disclosed-credential re-evaluation method and Q1-Q5 baseline Adds a detached proof-methods workspace with urn:sparq:vcq:method:disclosed-reevaluation v1: the holder discloses the credentials and the salt, and the verifier runs the authenticated-RDF v5 relation natively. Its dataset commitment equals the zkVM method's, so one verifier-agreed commitment serves both. Includes synthetic signed payment credentials, the Q1-Q5 query set, tests and a measurement example. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CB7XiW3NDsggNCuDcuJJo * test(proof-methods): use the paper's payment credential and Q1-Q5 texts The first fixture credential is PAYMENT_DOCUMENT byte for byte (its signature equals the recorded PAYMENT_SIGNATURE); copies for n > 1 change subject, credential id and payment months. Queries are copied verbatim from zk/sparql-evaluator/fixtures/paper/. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CB7XiW3NDsggNCuDcuJJo * ci(proof-methods): check formatting of this workspace's own crate only --all also formats path dependencies in the root workspace. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CB7XiW3NDsggNCuDcuJJo * fix(proof-methods): bound disclosed evidence before copying it; scope the method claim - verify checks credential count, signature length and document sizes before cloning the disclosed credentials; decode_proof bounds the JSON encoding before parsing it. - Reject DESCRIBE and FROM / FROM NAMED, which the answer specification excludes from version 1 and the shared relation would otherwise evaluate. - Document how the method fixes the choice where SPARQL 1.1 permits more than one result, and that the crate does not yet implement the full section 9 proof-method profile. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CB7XiW3NDsggNCuDcuJJo * fix(proof-methods): holder checks request and credential capacities before copying present now checks the request's key table, the query form and the credentials' counts and sizes before building the witness, and moves the credentials into it instead of cloning them; verify checks the key table before copying the request. The README states that credential order does not affect the result and that the evidence is transferable. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CB7XiW3NDsggNCuDcuJJo --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent bd483cb commit d2716a6

11 files changed

Lines changed: 1966 additions & 0 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Tests for the detached proof-methods workspace.
2+
name: proof-methods
3+
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
types: [opened, synchronize, reopened, ready_for_review]
8+
paths:
9+
- "proof-methods/**"
10+
- "zk/sparql-evaluator/model/**"
11+
- "vendor/spargebra-shim/**"
12+
- ".github/workflows/proof-methods.yml"
13+
push:
14+
branches: [main]
15+
paths:
16+
- "proof-methods/**"
17+
- "zk/sparql-evaluator/model/**"
18+
- "vendor/spargebra-shim/**"
19+
- ".github/workflows/proof-methods.yml"
20+
21+
permissions:
22+
contents: read
23+
24+
concurrency:
25+
group: proof-methods-${{ github.ref }}
26+
cancel-in-progress: true
27+
28+
env:
29+
CARGO_TERM_COLOR: always
30+
CARGO_BUILD_JOBS: 2
31+
32+
jobs:
33+
test:
34+
name: proof-methods tests
35+
runs-on: ubuntu-latest
36+
timeout-minutes: 45
37+
steps:
38+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
39+
with:
40+
persist-credentials: false
41+
42+
- name: Activate pinned Rust
43+
run: |
44+
rustup show active-toolchain
45+
rustup component add clippy rustfmt
46+
47+
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
48+
with:
49+
key: proof-methods
50+
workspaces: proof-methods
51+
save-if: ${{ github.ref == 'refs/heads/main' }}
52+
53+
- name: Format
54+
run: cargo fmt --manifest-path proof-methods/Cargo.toml -p sparq-vcq-disclosed --check
55+
56+
- name: Tests
57+
run: cargo test --locked --release --manifest-path proof-methods/Cargo.toml --all-features
58+
59+
- name: Clippy
60+
run: cargo clippy --locked --release --manifest-path proof-methods/Cargo.toml --all-features --all-targets -- -D warnings
61+
62+
- name: Measurement example runs
63+
run: cargo run --locked --release --manifest-path proof-methods/Cargo.toml -p sparq-vcq-disclosed --example measure --features fixtures -- 3

‎proof-methods/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

0 commit comments

Comments
 (0)