Skip to content

bug: webrtc circuit relay addresses not passing Circuit matcher #36

@SgtPooki

Description

@SgtPooki

i'm working on ipfs-shipyard/ipfs-share-files#138 and noticed that when I was trying to render the count of Circuit relay addresses, Circuit.matches(addr) was failing for some addresses that pass when checked with addr.toString().includes('p2p-circuit')

Looking at the tests, I see that some goodWebRTC in the tests include similar addresses, but those addresses do not pass the circuit matcher test when added to goodCircuit

I think this is a bug with this matcher and not js-libp2p because they exist in goodWebRTC but I am opening this issue to track my experience. I will open up a PR to fix the circuit checker to work pass with the ciruit-relay addresses in the goodWebRTC list

references:

'/dnsaddr/example.org/wss/p2p/12D3KooWAzabxK2xhwGQuTUYjbcFT9SZcNvPS1cvj7bPMe2Rh9qF/p2p-circuit/webrtc/p2p/12D3KooWA6L4J1yRwqLwdXPZBxz3UL4E8pEE6AEhFkqDH5LTQyfq',
'/ip4/127.0.0.1/tcp/59119/ws/p2p/12D3KooWAzabxK2xhwGQuTUYjbcFT9SZcNvPS1cvj7bPMe2Rh9qF/p2p-circuit/webrtc/p2p/12D3KooWA6L4J1yRwqLwdXPZBxz3UL4E8pEE6AEhFkqDH5LTQyfq',

https://github.com/multiformats/js-multiaddr-matcher/blob/3d8210d03356b2a0b6deaddee2b61e335bbc5e51/test/index.spec.ts#L160C9-L160C20

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions