Skip to content

Peer exchange response may override a metadata query #2524

@fryorcraken

Description

@fryorcraken

The relay shard information received in peer exchange response overrides existing relay shard information in the peer store if it differs:

https://github.com/waku-org/js-waku/blob/c7682ea67c54d2c26a68ce96208003fb1ffc915c/packages/discovery/src/peer-exchange/waku_peer_exchange_discovery.ts#L223

However, this may lead to a scenario where valid information is overridden:

sequenceDiagram
	Alice->>Bob: I am on shard 1
	Alice->>Alice: Changing to shard 2
	Carol->>Alice: metadata request
	Alice->>Carol: I am on shard2
	Carol->>Bob: peer exchange request
	Bob->>Carol: Alice is on shard 1
	Carol->>Carol: Alice is on shard 1
Loading

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions