Repository navigation
fix(zk-tls): keep witness pins and prover errors honest - #248
Closed
nicolasLuduena wants to merge 10 commits into
Closed
nicolasLuduena wants to merge 10 commits into
nicolasLuduena wants to merge 10 commits into
Conversation
nicolasLuduena
force-pushed
the
fix/211-zk-tls-cleanup
branch
from
November 12, 2026 19:32
6061a02 to
7231db8
Compare
7 tasks
Resolve conflicts with the @txpipe/thoth-* rename and the main-side zk-tls changes: keep EvidenceTooDeepError in proveWith's @throws, keep both the empty-redaction and slot-name rules in zkFetchPolicySchema's doc, and use @txpipe/thoth-zk-tls in the attestor guide and witness-pin test.
This was referenced Nov 24, 2026
Member
Author
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
Closes #211: six zk-tls fixes found while reviewing #201, #202 and #209.
Prover errors no longer carry the witness's text
proveReqused to pass a prover's error through unchanged, so text from the witness or the source reached the caller.collectalready dropped it. The check now lives inproveWith, which both share:A prover can't edit the client's policy
copyRequestnow also copiespublicHeadersand eachresponseMatchesandresponseRedactionsentry. A custom prover that mutated those objects used to change the policy for every later prove. Nestedcontextvalues are still shared; that is #236.Empty redactions are refused
zkFetchPolicySchemarefuses a redaction with no non-emptyregex,jsonPathorxPath.{}and{ regex: '' }used to pass the schema, and Reclaim's attestor-core then threwExpected either xPath, jsonPath or regex for redactionon every prove with a 2xx response. I checked that offline against the installed attestor-core 5.1.6.The witness script reinstalls when the pin moves
Changing the ref used to start the new source on the old
node_modules. Deletingnode_modulesdeletes the stamp, so the next run installs from scratch.One pinned commit, checked by a test
witness-pin.test.tsgets aVERIFIED_PINStable: attestor-core version → the commit verified with the live check. The test now fails unless the script'sPINNED_REFis that commit, no two versions share a commit, and the attestor guide checks the same commit out.The guide's manual setup used to run
git clone --depth 1, which takes whatever upstream's default branch is. It now clones with--filter=blob:noneand runsgit checkout --detach f451eb3c3038efcf7c11b2497d7540d8f1e95752, the script's pin.Docs
The dApp guide shows
*as the JSON escape for a literal*; it used to show a bare*.Review findings outside #211 are filed as #231 to #236.
Evidence
New offline tests.
live.test.tsstays opt-in.Before: the reinstall test, run against main's
start-witnesses.sh, fails. The script checks out the new commit, skips the install and starts witnesses without the new commit's dependency.After: it passes. The script reinstalls, the dependency is there, and the stamp records the new commit. A failed
npm installleaves the stamp alone, so the next run tries again.Before: a Dependabot bump that set
PINNED_VERSIONbut notPINNED_REFpassedwitness-pin.test.ts.After: each kind of pin drift fails:
PINNED_REFoff by one character@txpipe/thoth-zk-tlsdepends onmainVERIFIED_PINSlists another commitThe guide's clone and checkout, run against upstream:
5.1.4 is expected: upstream never bumped
package.json, and this commit is the source of the npm 5.1.6 release, as the script's header says.No verification skill in this repo.
Merge Danger
Door: two-way
Library code, a dev script and docs. Nothing deployed or stored.
Blast Radius: zk-tls consumers
causeof aproveReqerror now gets only the reason, or the id of the attestor whose prover failed.npm run witnessesafter this merges reinstalls once.