Repository navigation
Description
What happened
After upgrading a testnet node from dashmate 5.0.x to 5.1.0-rc.1 (install deb, stop --platform, update, start --platform), drive_tenderdash crash-looped:
ERROR: failed to create node: error="failed to create peer manager: failed to add peer \"mconn://<own node id>@<own host>:36656\": can't add self (<own node id>) to peer store"
platform.drive.tenderdash.p2p.seeds had been replaced by the new stock list from configs/defaults/tenderdash-seeds.json, and that list contains an entry whose id equals the node's own platform.drive.tenderdash.node.id.
Why (as far as we can read the code)
src/tenderdash/getDefaultSeedUpdates.jsreplaces a config's seeds withtenderdashSeeds[network].seedswhen the current list hashes to one ofpreviousSeedSetHashes(i.e. the operator never customised it).tenderdash-seeds.jsonis generated from the quorum servers (fix(dashmate): refresh quorum-server seeds and complete node identities #5290), so it lists real evonodes; any listed evonode that still has a stock seed list receives its own entry.- Tenderdash 2.0 (activated with protocol version 15) refuses to create the node when its own ID is among the peers.
So any evonode that appears in the generated list, on a stock seed config, would crash-loop after upgrading to 5.1 — on testnet that is exactly the moment PV15 activation forces 5.0.x nodes onto 5.1. The mainnet list has the same property, so the same will happen to the evonodes it lists when mainnet moves to 5.1.
Reproduction (no node needed)
With the dashmate 5.1.0-rc.1 package installed, run with its bundled node:
// run.mjs
import getDefaultSeedUpdates from '/usr/lib/dashmate/src/tenderdash/getDefaultSeedUpdates.js';
import fs from 'fs';
const list = JSON.parse(fs.readFileSync('/usr/lib/dashmate/configs/defaults/tenderdash-seeds.json', 'utf8')).testnet.seeds;
const me = list[0].id; // any evonode that appears in the generated list
const oldStock = [ /* the 3-entry testnet stock seed list shipped before 5.1 */ ];
const [[, seeds]] = getDefaultSeedUpdates({ testnet: { network: 'testnet',
platform: { drive: { tenderdash: { node: { id: me }, p2p: { seeds: oldStock } } } } } });
console.log(seeds.length, seeds.some((s) => s.id === me)); // → 20 trueWith the pre-5.1 stock list as input this prints 20 true: the replacement list contains the node itself. With a customised seed list nothing is replaced (as intended). On a real node the result is the Tenderdash error above on every start; removing the self entry (below) fixes it.
Workaround we used
- Remove the entry whose
idequalsplatform.drive.tenderdash.node.idfromplatform.drive.tenderdash.p2p.seeds(backup config.json first). dashmate config render --config <cfg>— notedashmate restart --platformalone did not re-rendertenderdash/config.toml; the oldbootstrap-peers(still containing the node itself) stayed in place until render was run.dashmate restart --platform --config <cfg>.
After that: protocol version 15, height advancing, no restarts.
Suggested fix
Filter out the node's own node.id when applying default seeds (in getDefaultSeedUpdates / when rendering bootstrap-peers), so the shared generated list is safe for the nodes it contains.
Versions
dashmate 5.1.0-rc.1 (deb), Tenderdash 2.0.0-dev.3, testnet.
Drafted with AI assistance (Claude).
Activity
lklimek commentedon Nov 27, 2026
fixed in #6349