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​

πŸ” click to expand

Peer Discovery​

Distributed Hash Table (DHT)​

ULedgerNET uses a Distributed Hash Table for peer discovery:

πŸ” click to expand

Discovery Flow​

πŸ” click to expand

Messaging System​

Pub/Sub (Gossip Protocol)​

The primary mechanism for broadcasting messages across the network:

πŸ” click to expand

Message Propagation​

πŸ” click to expand

Direct Streams​

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

πŸ” click to expand

Network Message Structure​

Message Format​

πŸ” click to expand

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:

πŸ” click to expand

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:

πŸ” click to expand

Sync Request Types​

πŸ” click to expand

Peer Management​

Peer Store​

πŸ” click to expand

Peer Lifecycle​

πŸ” click to expand

Connection Handling​

New Connection Flow​

πŸ” click to expand

Disconnection Handling​

πŸ” click to expand

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​

πŸ” click to expand

Next: Smart Contracts & Tokens