Skip to main content

ULedgerNET Network Architecture

Overview

ULedgerNET implements a decentralized peer-to-peer network using a modular P2P networking stack. This provides robust peer discovery, secure communication, and efficient message propagation.

Network Stack

Peer Discovery

Distributed Hash Table (DHT)

ULedgerNET uses a Distributed Hash Table for peer discovery:

Discovery Flow

Messaging System

Pub/Sub (Gossip Protocol)

The primary mechanism for broadcasting messages across the network:

Message Propagation

Direct Streams

For point-to-point communication (e.g., data sync, timestamp requests):

Network Message Structure

Message Format

Message Types

TypeDirectionPurpose
MSG_PUBLISHBroadcastGeneral pub/sub messages
MSG_REQUEST_DATADirectRequest specific data
MSG_RESPOND_DATADirectResponse to data request
MSG_REQUEST_TIMESTAMPDirectGet peer's timestamp
MSG_RESPOND_TIMESTAMPDirectReturn current timestamp
MSG_REQUEST_TOPICSDirectExchange topic subscriptions
MSG_RESPOND_TOPICSDirectReturn subscribed topics

Timestamping Protocol

Distributed Timestamp Agreement

ULedgerNET uses peer timestamps to establish transaction ordering:

Time Parameters

ParameterValueDescription
Max Peers5Maximum peers queried for timestamps
Timeout10sTimestamp request timeout
Max Median Diff5sMaximum allowed time difference

Node Synchronization

Reconciliation Process

When a new node joins or recovers from a partition:

Sync Request Types

Peer Management

Peer Store

Peer Lifecycle

Connection Handling

New Connection Flow

Disconnection Handling

Network Security

Transport Security

FeatureImplementation
EncryptionTLS 1.3 / Noise Protocol
AuthenticationPeer ID derived from public key
IdentityEd25519 network keys

Protocol Security

FeatureImplementation
Message SigningAll blockchain messages signed
Replay ProtectionUnique request IDs
Spam PreventionMessage validation at protocol layer

Configuration

P2P Configuration

{
"p2pConfig": {
"port": 4001,
"bootstrapPeers": [
"/ip4/x.x.x.x/tcp/4001/p2p/QmXXX...",
"/dnsaddr/bootstrap.uledger.io/p2p/QmYYY..."
],
"dhtServer": true,
"enableRelay": false
}
}

Configuration Parameters

ParameterDescriptionDefault
portP2P listening port4001
bootstrapPeersInitial peers for discovery[]
dhtServerAct as DHT servertrue
enableRelayEnable relay for NAT traversalfalse

Network Topology

Typical Deployment


Next: Smart Contracts & Tokens