Skip to content

Comments

feat(network)!: require PeerId in persistent peers configuration#1485

Open
melekes wants to merge 3 commits intocirclefin:mainfrom
melekes:CCHAIN-976/require-peer-ids
Open

feat(network)!: require PeerId in persistent peers configuration#1485
melekes wants to merge 3 commits intocirclefin:mainfrom
melekes:CCHAIN-976/require-peer-ids

Conversation

@melekes
Copy link
Contributor

@melekes melekes commented Feb 17, 2026

Closes: #1486

Requires `PeerId` in every persistent peer address (e.g. `/ip4/1.2.3.4/tcp/9000/p2p/12D3KooW...`). Config and API now require the `/p2p/<peer_id>` component.

Changes

  • Validation: `spawn()` and `add_persistent_peer()` validate that each address includes a PeerId; return `PersistentPeerError::PeerIdRequired` otherwise.
  • Identity verification: On connection, if the address matches a persistent peer, the connected peer's PeerId is checked against the expected one; on mismatch the peer is rejected and disconnected.
  • Discovery: Bootstrap addresses can carry an optional PeerId; it is extracted when present.

Breaking change

Documented in `BREAKING_CHANGES.md`: persistent peer addresses must include `PeerId` (e.g. `/ip4/1.2.3.4/tcp/9000/p2p/12D3KooW...`).


PR author checklist

Contribution eligibility

  • I am a core contributor, OR I have been explicitly assigned to the linked issue
  • I have read CONTRIBUTING.md and my PR complies with all requirements
  • I understand that PRs not meeting these requirements will be closed without review

For all contributors

For external contributors

Persistent peer addresses must include `PeerId`. Config and API now
require the `/p2p/<peer_id>` component in every persistent peer address
(e.g. `/ip4/1.2.3.4/tcp/9000/p2p/12D3KooW...`)
@github-actions

This comment was marked as outdated.

@github-actions github-actions bot added the need-triage This issue needs to be triaged label Feb 17, 2026
@github-actions github-actions bot closed this Feb 17, 2026
@melekes melekes changed the title feat(network)!: require PeerId in persistent_peers feat(network)!: require PeerId in persistent peers configuration Feb 17, 2026
@melekes melekes reopened this Feb 17, 2026
@github-actions

This comment was marked as outdated.

@github-actions github-actions bot closed this Feb 17, 2026
@romac romac reopened this Feb 17, 2026
@romac romac removed the need-triage This issue needs to be triaged label Feb 17, 2026
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.

network: Require PeerId in persistent peers configuration

2 participants