Network

How a node finds the network.

A bincoin-node is a normal internet daemon: it binds a TCP port, dials outbound peers, and speaks an encrypted P2P protocol. This page documents the real bootstrap and transport mechanics as they exist in the tree today.

Notice

Pre-mainnet: bootstrap peer addresses will be published alongside the client at launch. A node started today with no peers configured will not find a public network — because there is not yet one to find.

Bootstrap: How Seeds Resolve

The binary contains no network addresses. Nothing is compiled in: the node’s bootstrap peer set is exactly what its operator supplies.

  • The BCN_SEED_PEERS environment variable — a comma-separated list of ip:port entries (IPv6 as [addr]:port), deduplicated in order. A malformed entry fails the node’s startup loudly rather than being silently dropped; an unset variable is valid — a first node, or a listen-only node, needs no seeds.
  • Peer exchange from there — once one connection exists, nodes exchange addresses over the encrypted wire and persist them in an on-disk address book, so the seed entry is needed only for the first contact.

There are no hardcoded seed lists and no DNS-seed lookup — bootstrap rendezvous is out-of-band by design: peer addresses are published alongside the client, not inside it.

Default Ports
NetworkP2P bindNode RPC bind
Mainnet0.0.0.0:8335127.0.0.1:8337
Testnet0.0.0.0:18335127.0.0.1:18337
Regtest0.0.0.0:28335127.0.0.1:28337

Both binds are overridable via environment variables (BCN_P2P_BIND, BCN_NODE_RPC_BIND). RPC always requires cookie authentication — a base64 Authorization: Basic header against a random token the node writes to <data_dir>/node/.cookie on every start and deletes on clean shutdown. There is no anonymous RPC mode.

Wire Protocol
  • BIP-324 encrypted transport. Every peer connection negotiates an Elligator-Swift key exchange before a single plaintext byte crosses the wire — no unencrypted fallback.
  • BIP-155 addrv2 address gossip (negotiated by sendaddrv2). IPv4/IPv6 peers are stored in the on-disk address book and dialed; Tor v3, I2P, and CJDNS entries are recognized and relayed onward, but not yet stored or dialed — the address book is IP-keyed today.
  • BIP-152 compact blocks. Peers announce and reconstruct blocks from short transaction IDs against their own mempool instead of re-downloading full bodies.
  • BIP-157 / BIP-158 compact block filters. The node serves cfheaders/cfilter requests; the wallet ships a real light-client scanner that verifies each filter binds to the block it claims to match before trusting it — this is shipped, not a stub.
  • Wtxid relay and opt-in per-transaction RBF (BIP-125), Bitcoin-parity.
Further Reading