Skip to content

Connect peers

Overview · Prerequisites · Run locally

Exchange peer records between Decentralization Manager nodes. Then verify that every node reaches every other node before you start a multi-party workflow.

Each organization needs:

  • A running Decentralization Manager node. All nodes of a Decentralized Party must run the same release.
  • A persistent data directory. The node keeps its Noise key and its database in this directory, as data/noise.key and data/decpm.db.
  • DECPM_PUBLIC_ADDRESS set to the host name or IP address that the other nodes use to reach this node.
  • The Noise port open to the other nodes over raw TCP. DECPM_NOISE_PORT sets the port. The default is 9000.
  • An operator account on the node. When DECPM_ADMIN_ROLE is set, only that role can save peers.
  • An authenticated channel to exchange peer records with the other operators.

Connecting peers does not create a Decentralized Party. Later workflows send their messages over these peer connections.

A peer record is one CSV line with these columns:

participant_id,name,address,port,public_key,party
ColumnContent
participant_idThe Canton participant ID of the node, in the form <prefix>::<68 hex characters>.
nameA display name. Any text works.
addressThe host name or IP address that peers connect to. The node takes it from DECPM_PUBLIC_ADDRESS.
portThe Noise port of the node.
public_keyThe Noise public key of the node, as a hex-encoded secp256k1 key.
partyOptional. The column can be empty.

A node accepts a Noise handshake only from a participant ID in its own peer list. The node derives the pre-shared key for the handshake from the stored public key of that peer. A wrong public key therefore makes the handshake fail.

Treat the participant ID and the public key as security-sensitive configuration. Verify both through the authenticated channel.

  1. Open Configuration.
  2. In the node card, under Identity, note the Participant ID.
  3. Under Peers:, find the row marked (You). A person icon marks this row in the Status column. The tooltip of the icon reads “This is your node”.
  4. Confirm that the address in that row is your public address. An address such as 0.0.0.0 means that DECPM_PUBLIC_ADDRESS is not set.

Under Peers:, click Share my data. Decentralization Manager copies your peer record to the clipboard as one CSV line.

To send several peer records in one file, click Export CSV. Select the rows, then click the Download button. The file starts with a header row and includes your own node.

Send your peer record to each operator through the authenticated channel. Receive the peer record of each operator the same way.

Do not accept a peer record that arrives through an unauthenticated chat, a public issue, or a forwarded message.

  1. Copy the peer record of the other node to your clipboard.
  2. Under Peers:, click the pencil icon (Edit peers).
  3. Click Paste from Clipboard. Decentralization Manager adds one row for each valid CSV line. It skips each invalid line and shows the reason.
  4. Compare the participant ID, address, port, and public key with the record that the operator sent.
  5. Click Save.

To add peers from a file, click Import CSV and then Choose CSV file. The dialog marks each row New, Update, or Unchanged. Clear the rows that you do not want, then click the Import button. The import keeps the existing peers that the file does not list.

Repeat these steps on both sides. A node accepts handshakes only from the peers in its own list. A one-sided entry therefore leaves the connection broken.

To create a Decentralized Party, every selected node must list every other selected node. Before onboarding starts, the coordinator asks each selected peer for its peer list. When an entry is missing, the coordinator does not start the workflow run. The Create a decentralized party dialog then shows the gaps:

  • Coordinator can’t reach these peers: The coordinator cannot query these peers. Fix the entry for each peer on the coordinator, or check that the peer is online.
  • Update network configs: A selected peer does not list another selected peer. On the named node, add each listed peer.

The API returns HTTP 422 with a missing_edges array. Each entry holds from, to, and kind. The kind is unreachable_from_coordinator or mesh_hole.

Set up the full mesh for every Decentralized Party, even when one workflow run needs fewer connections. A later workflow run can have a different coordinator.

The Status column of the peers table shows one dot for each peer. Hold the pointer over a dot to read the status.

StatusMeaningNext action
Connected via Noise protocolThe handshake works. The tooltip also shows the round-trip time.None.
Cannot reach peer (TCP connection failed)The node cannot open a TCP connection to the address and port of the peer.Check the address, the port, the firewall, the load balancer, DNS, and the peer process.
Noise handshake failed - check if the public key is correctThe TCP connection opens, but the handshake fails.Compare the public key with the peer record. Confirm that the peer lists your node with your current key.
This is your nodeThe row is your own node. A person icon replaces the dot.None.

Also check the Version column. It must show the same release on every node. A coordinator invites only peers that use the same Noise wire version and report version 0.1.9 or later. All nodes of a Decentralized Party must still run the same release.

On both sides, confirm that the participant ID and the public key of each peer match the record from its operator.

Send an operator access token in the Authorization header. See Authentication and operator roles.

POST /network-config replaces the whole peer list. Send every peer in the body, not only the new one. When DECPM_ADMIN_ROLE is set, the call requires that role.

Terminal window
# Read the current peer list
curl -sS http://localhost:8080/network-config \
-H "Authorization: Bearer $TOKEN"
# Replace the peer list
curl -sS -X POST http://localhost:8080/network-config \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '[
{
"participant_id": "participant2::1220...",
"name": "Participant 2",
"address": "peer2.example.com",
"port": 9000,
"public_key": "02ef34ab...",
"party": null
}
]'
EndpointReturns
GET /keys/statusThe Noise public key of this node.
GET /node-configThe participant ID, public address, and Noise port of this node.
GET /participants-statusThe connection status, latency, and version of each peer.

The node rejects a peer with an invalid Noise public key with HTTP 400. A saved change applies to the next handshake. The node does not need a restart.

A node creates a new Noise key at start when data/noise.key is missing. The other nodes then reject its handshakes until they store the new public key. To replace a peer record:

  1. Wait until no workflow run involves the affected peer.
  2. Get the new peer record through the authenticated channel.
  3. Compare the participant ID, address, and public key with the operator.
  4. Replace the old record on every node that lists the peer.
  5. Verify the connection on both sides before you start new workflow runs.
SymptomCheckNext action
Status reads “Cannot reach peer (TCP connection failed)”Address, port, firewall, load balancer, DNS, and the peer processTest the TCP connection from the network of the peer.
Status reads “Noise handshake failed”The stored public key, and whether the peer lists your nodeExchange the peer records again through the authenticated channel.
Logs show “Noise protocol version mismatch”The release on each nodeUpgrade every node to the same release. See Backup, recovery, and upgrades.
Onboarding does not start, and the dialog lists missing peersThe Coordinator can’t reach these peers and Update network configs listsAdd each missing peer on the named node, then start again.
Your own row shows 0.0.0.0DECPM_PUBLIC_ADDRESSSet the variable, then restart the node.
Handshakes fail after a restartThe persistent data directory and the Noise keyRestore the intended volume before you replace peer records.
Paste from Clipboard shows an errorThe CSV lineAsk the operator for the line again. A valid line has 5 or 6 columns.

Create the shared identity: Create a Decentralized Party.