Skip to content

Track and admit authenticated peer hash exchanges - #188

Closed
linroid wants to merge 1 commit into
torrent-v2-08-hash-prooffrom
torrent-v2-08-hash-exchange
Closed

linroid wants to merge 1 commit into
torrent-v2-08-hash-prooffrom
torrent-v2-08-hash-exchange

Conversation

@linroid

@linroid linroid commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Tracks hash requests under a connection owner and reserves shared exchange credit before issuing them. Responses must match an outstanding selector, meet its deadline and authenticate against the trusted file root before delivery. Successful results retain their reservation until the consumer closes them; rejection, invalid proof, expiry, cancellation and connection close release pending credit. Local ticket identity prevents stale cancellation callbacks from releasing replacement requests.

Stacked on #187; advances step 08 of #162. Root lookup must use authenticated metainfo, and callers must serialize operations on the connection event loop. Live routing/timers, reader admission for unsolicited frames, cache ownership and serving remain pending. A delayed wire reply for identical immutable coordinates may satisfy a new request only after proof verification; the wire protocol has no separate transaction ID.

Validation: all 407 JVM torrent tests pass with zero failures/errors/skips, including four new exchange ownership/admission tests, exact wire/proof tests and both pinned-client v1 conformance scenarios. The native-runtime guard and iOS test-source compilation pass. This slice does not claim executed v2 network interoperability or complete production resource gates.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T16:37:20.394597Z e18b978 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

  612 files  + 5    612 suites  +5   4m 2s ⏱️ +4s
2 600 tests +12  2 600 ✅ +12  0 💤 ±0  0 ❌ ±0 
3 412 runs  +20  3 412 ✅ +20  0 💤 ±0  0 ❌ ±0 

Results for commit e18b978. ± Comparison against base commit 1403f58.

@linroid

linroid commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #235 (V2 handshake, hash exchange and bounded transport) in the consolidated eight-PR stack for #162.

The replacement preserves this PR's code and subsequent fixes; its description links the original head and review discussions. The only additional consolidation fix is the CI-discovered listener cancellation regression, documented on the replacement. All eight replacements have passed their required CI checks.

Closing without merging. This branch and its discussions remain available for reference. Review index: #162 (comment)

@linroid linroid closed this Sep 20, 2026
@linroid
linroid deleted the torrent-v2-08-hash-exchange branch September 20, 2026 11:13
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