Skip to content

Conversation

@sukunrt
Copy link
Member

@sukunrt sukunrt commented Jul 29, 2025

There are two issues with the current implementation:

  1. Interface assertions for BasicHost methods don't work if the Routing option is selected.
  2. AddrsFactory deadlocks when it depends on host.AllAddrs or host.ConfirmedAddrs

Fox fixing two, I've simplified the addrs update procedure to always update the addrs from only the background goroutine. This ensures that we need no locks while updating, so addrsfactory is free to depend on ConfirmedAddrs. See: https://github.com/ipshipyard/p2p-forge/blob/main/client/acme.go#L741 for a usecase.

@sukunrt sukunrt requested a review from MarcoPolo July 29, 2025 10:40
@sukunrt sukunrt force-pushed the sukun/addrs-manager-deadlock branch 3 times, most recently from 8feca70 to d3d206b Compare July 29, 2025 11:27
There are two issues with the current implementation:

1. Interface assertions for BasicHost methods don't work if the Routing 
option is selected. 
2. AddrsFactory deadlocks when it depends on `host.AllAddrs` or 
`host.ConfirmedAddrs`. 

Fox fixing two, I've simplified the addrs update procedure to always 
update the addrs from only the background goroutine. This ensures that
we need no locks while updating, so addrsfactory is free to depend on 
`ConfirmedAddrs`. See: https://github.com/ipshipyard/p2p-forge/blob/main/client/acme.go#L741 
for a usecase.
@sukunrt sukunrt force-pushed the sukun/addrs-manager-deadlock branch from d3d206b to d2884bb Compare July 30, 2025 11:26
@sukunrt sukunrt merged commit 26a5710 into master Jul 30, 2025
11 checks passed
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.

3 participants