Skip to content

Conversation

@Frando
Copy link
Member

@Frando Frando commented Dec 2, 2025

Description

Updates iroh-quinn to n0-computer/quinn#208 which has qlog updated to n0-qlog and changes to the latest qlog drafts and adds support for mulitpath in qlog.

Also added qlog support for a test that has multiple paths. Create the files with:
IROH_TEST_QLOG=1 cargo test -p iroh --lib --features qlog -- endpoint_two_relay_only_becomes_direct

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
    • List all breaking changes in the above "Breaking Changes" section.
    • Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are:

ramfox and others added 3 commits December 2, 2025 15:45
## Description

Whenever we insert a new path, trigger pruning paths.

We currently only prune IP paths, and pruning paths only occurs if we
have more than 30 IP paths.

We will prune any paths that did not successfully holepunch. 

If there are still over 30 IP paths left, then we order the "inactive"
paths (paths that have been closed, but at one point holepunched), and
prune the paths that were closed earliest.

## Notes and Questions

- Added constants:
    - `MAX_IP_PATHS` = 30 - maximum IP paths per endpoint
    - `MAX_INACTIVE_IP_PATHS` = 10 - maximum inactive IP paths to keep
- New `PathState` field:
    - `status` - tracks the `PathStatus` of the path
- New `PathStatus` enum:
    -  `PathStatus::Open` - is an open path
    - `PathStatus::Inactive(Instant)` - was opened once, but currently inactive
    - `PathStatus::Unusable` - we attempted to use it, but it never connected
    - `PathStatus::Unknown` - we don't know the status yet
- New methods on `RemotePathState`:
  - `abandoned_path` - marks a path as abandoned with timestamp, triggered when we get the `PathEvent::Abandoned` event
  - `prune_paths` - triggers path pruning, occurs whenever we insert a path to the `RemotePathState`
  - changed `insert` to `insert_open_path`
- New `prune_ip_paths` function with all the prune logic:
    - Only prunes if IP paths exceed `MAX_IP_PATHS`
    - Never prunes active paths or paths of unknown status
    - Always prunes failed holepunch attempts (PathStatus::Unusable)
    - Keeps 10 most recently inactive paths that were previously successful
- Special case: if all paths failed, keeps `MAX_IP_PATHS` instead of pruning everything
- Added tests for edge cases and the typical case
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3725/docs/iroh/

Last updated: 2025-12-04T11:32:26Z

@n0bot n0bot bot added this to iroh Dec 3, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

4 participants