v2 (latest)
N2n

Node-to-Node

The Node-to-Node (N2N) source uses Ouroboros mini-protocols to connect to a local or remote Cardano node through a tcp socket bearer and fetches block data using the ChainSync mini-protocol instantiated to "headers only" and the BlockFetch mini-protocol for retrieval of the actual block payload.

Configuration

The following snippet shows an example of how to set up a typical N2N source:

[source]
type = "N2N"
peers = ["<hostname:port>"]

Section source:

  • type: this field must be set to the literal value N2N
  • peers: the location of the tcp endpoint It must be specified as a string with hostname and port number.

Examples

Connecting to a remote Cardano node through tcp sockets:

[source]
type = "N2N"
peers = ["relays-new.cardano-mainnet.iohk.io:3001"]

Public relays

Mainnet relays-new.cardano-mainnet.iohk.io:3001

Preprod preprod-node.world.dev.cardano.org:30000

Preview preview-node.world.dev.cardano.org:30002