Skip to content

Add routeAddrType filter to path-finding API#3307

Open
rorp wants to merge 2 commits intoACINQ:masterfrom
rorp:route_addr_type_filter
Open

Add routeAddrType filter to path-finding API#3307
rorp wants to merge 2 commits intoACINQ:masterfrom
rorp:route_addr_type_filter

Conversation

@rorp
Copy link
Copy Markdown
Contributor

@rorp rorp commented May 11, 2026

This PR adds routeAddrType parameter to findroute*, pay* and sendtotnode API calls. It allows to filter the nodes during path finding by their address types.

Possible filter values

Value Eligible intermediate nodes
clearnet nodes with clearnet addresses only (no Tor)
hybrid nodes with clearnet addresses (clearnet-only or hybrid)
tor nodes with Tor addresses only (no clearnet)
routeAddrType is not specified no restrictions

The rationale for this PR is that empirically Tor-only nodes tend to be unreliable. Excluding them from path finding could improve payment success rate. On the other hand filtering out clearnet nodes could increase payment privacy.

Note that this filter apllies only to intermediary nodes, source and destination nodes are unaffected.

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