Repository navigation
Conversation
A node whose bootstrap-peers or persistent-peers list contains its own node ID failed to start with "can't add self ... to peer store". Shared seed lists (dashmate's stock list includes the evonodes themselves) put every listed evonode into a crash loop. Skip such entries with a WARN after address validation; the peer store still refuses self on any other add, and malformed addresses still fail startup. Co-Authored-By: GPT-6.2-Sol (Codex) <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ing self Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
lklimek
marked this pull request as ready for review
November 26, 2026 21:57
lklimek
marked this pull request as draft
November 26, 2026 21:57
|
🕓 Review not started yet because this PR is a draft.
Commit 6fdd3a0. Normal review starts when eligible; priority review starts as soon as a slot is available. |
4 of 13 tasks
Collaborator
Author
|
won't fix - we fix it in dashpay/platform#6349 , tenderdash behavior is correct. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR: A node whose seed or persistent peer list contains its own address now starts normally and logs a warning, instead of refusing to start.
User story
As a Dash Platform evonode operator, I want my node to start even when the shared seed list it receives includes my own node, so that a routine configuration refresh cannot take my evonode offline.
Scenario
Base flow
Actual behavior
When the list contains the node itself, Tenderdash stops during startup with
failed to add peer "<id>@<ip>:26656": can't add self (<id>) to peer store. The container restarts and fails again in a loop, and the evonode stays offline until someone edits the configuration by hand. This was seen on a mainnet evonode.Expected behavior
The node skips its own entry, logs one warning naming the setting and the address, and starts with the other peers. Every other way of adding the node itself as a peer is still refused, and an invalid address in either list still stops startup with a clear error, as before.
Detailed discussion
What was done
node/setup.gocreatePeerManagerreads bothp2p.persistent-peersandp2p.bootstrap-peersin one loop:WARN "skipping own node ID in configured peers"(config_key,address). It is added neither to the peer store nor toPeerManagerOptions.PersistentPeers, so it takes no persistent slot and is never dialled;PeerManager.Addis unchanged and still returnscan't add selffor PEX or any other add.dev.Testing
TestCreatePeerManagerSkipsConfiguredSelf(bootstrap and persistent sub-tests): self appears twice next to a valid peer, once under another address with the ID in upper case. Startup succeeds; only the other peer is stored and dialled, with the persistent score only forpersistent-peers; there are exactly two WARN lines naming the key and address; and a directAddof self is still refused. It fails without the fix:can't add selffor bootstrap, and the persistent self entry exceeding the connection limit.TestCreatePeerManagerRejectsMalformedConfiguredPeer: an invalid address still fails startup for both keys.go test -p 2 -race -count=1 -run '^(TestCreatePeerManager(SkipsConfiguredSelf|RejectsMalformedConfiguredPeer)|TestPeerManager_Dialed_Self)$' ./node ./internal/p2p: pass.make lint LINT_BASE=origin/master: 0 issues;gofmtclean.Out of scope / known limitations
persistent-peersis counted twice against the connection limit. This is pre-existing; a follow-up can deduplicate it.p2p.allowlist-only = trueand only the node's own address configured, the node starts isolated instead of failing fast, because the allowlist still includes self. This is pre-existing and fail-closed; a follow-up can address it.Breaking changes
None.
Prior work
Attribution
Implemented with Codex (GPT-6.2-Sol), and reviewed by Claude and Gemini.
🤖 Co-authored by Claudius the Magnificent AI Agent
🤖 Generated with Claude Code