Skip to content

fix(tsp-js): raise MAX_HOPS to 64 so longer routes interoperate - #251

Merged
stormer78 merged 1 commit into
feat/tsp-rev2-rev3-dual-handlerfrom
fix/tsp-js-hop-limit
Sep 16, 2026
Merged

stormer78 merged 1 commit into
feat/tsp-rev2-rev3-dual-handlerfrom
fix/tsp-js-hop-limit

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

This PR targets feat/tsp-rev2-rev3-dual-handler, like #249 and #250.

MAX_HOPS was 10. It caps packRouted and decoding any hop list or reply path (decodeVidList, and the Rev 2 reader). The TSP specification sets no maximum; the ToIP reference has no limit, affinidi-tsp-go allows 64 and Dart 32. As a result, tsp-js refused 12-hop routes that every other implementation opens.

This raises the limit to 64, matching affinidi-tsp-go and the matching affinidi-tsp change. It still bounds a hostile hop count, and is still enforced on both pack and decode.

  • New test: a 64-hop route packs and opens with its hops intact. 65 is still rejected.
  • tsp-js npm test: 112 pass. core tests/tsp.*.mjs: 33 pass.
  • Conformance suite (OpenVTC/tsp-conformance) with this branch and the affinidi-tsp change: interop is 893 pass, 0 fail (previously 25 hop-limit failures).

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78
stormer78 merged commit 88fc7a5 into feat/tsp-rev2-rev3-dual-handler Sep 16, 2026
4 checks passed
@stormer78
stormer78 deleted the fix/tsp-js-hop-limit branch September 16, 2026 14:03
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