Communications Stack
A Demos node speaks several protocols at once. They sit at different layers of the stack, from the binary node-to-node transport up to the WebSocket servers that relay end-to-end encrypted chat. This page is a map of those layers and links to the detailed pages for each subsystem.P2P transport (node-to-node)
Validators and full nodes talk to each other over the OmniProtocol, a binary, length-framed, TLS-secured transport. The protocol is implemented undersrc/libs/omniprotocol/:
- Server side (
src/libs/omniprotocol/server/):OmniProtocolServer,TLSServer,InboundConnection,ServerConnectionManager. - Client/transport side (
src/libs/omniprotocol/transport/):PeerConnection,TLSConnection,ConnectionPool,ConnectionFactory,MessageFramer. - Wire format: messages carry an
OmniOpcode(src/libs/omniprotocol/protocol/opcodes.ts) such asPING,HELLO_PEER,EXECUTE,BROADCAST,MEMPOOL_SYNC,BLOCK_SYNC, and the consensus opcodes. Authentication, rate limiting, and serialization live in the siblingauth/,ratelimit/, andserialization/folders.
src/libs/peer/PeerManager.ts— the registry of known peers.src/libs/network/manageHelloPeer.ts— theHELLO_PEERhandshake (HelloPeerRequest: a signedurl+publicKey+syncData).src/libs/network/manageP2P.ts—DemosP2P, a multiton that manages participant-to-participant message sessions (the node acts as a relayer).src/libs/communications/broadcastManager.ts—BroadcastManager, which broadcasts new blocks and transactions to the relevant peers.
JSON-RPC layer
Clients and the SDK reach the node through a JSON-RPC interface rather than the binary transport. Each RPC method maps to a routine handler undersrc/libs/network/routines/.
RPC Methods
The full list of JSON-RPC methods exposed by the node, including
web2ProxyRequest used by the Web2 proxy described below.Higher-level services
Web2 Proxy (DAHR)
Relay arbitrary HTTPS requests through a node via the
web2ProxyRequest
RPC method, with deterministic response hashing for attestation.Real-time Messaging
The WebRTC signaling server and the L2PS-backed messaging server that
relay end-to-end encrypted instant messages between peers.
Experimental: ActivityPub / Fediverse server. An experimental
ActivityPub-style store-and-serve server exists under
src/features/activitypub/ (fediverse.ts, fedistore.ts,
feditypes.ts). It is explicitly marked experimental in the source, the
handlers carry TODO Authentication markers, and it is not wired into node
startup. It is not production-ready and is listed here only for
completeness.