Skip to content

dashmate 5.1: default seed refresh can put a node's own ID into tenderdash seeds, and Tenderdash 2.0 refuses to start ("can't add self ... to peer store") #6307

Done

Description

@DashBot-0001

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.js replaces a config's seeds with tenderdashSeeds[network].seeds when the current list hashes to one of previousSeedSetHashes (i.e. the operator never customised it).
  • tenderdash-seeds.json is 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 true

With 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

  1. Remove the entry whose id equals platform.drive.tenderdash.node.id from platform.drive.tenderdash.p2p.seeds (backup config.json first).
  2. dashmate config render --config <cfg> — note dashmate restart --platform alone did not re-render tenderdash/config.toml; the old bootstrap-peers (still containing the node itself) stayed in place until render was run.
  3. 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

  1. lklimek commented on Nov 27, 2026

    @lklimek
    Contributor

    fixed in #6349

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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