Package com.privatechain.network.rpc


package com.privatechain.network.rpc
Netty TCP server, client, and NDJSON message codec — the transport layer of the P2P networking stack (FR-NET-01, ADR-001).

Classes in this package:

  • NodeServer — Netty ServerBootstrap that accepts inbound peer connections on the configured port. Each accepted connection is checked against AllowlistManager before any message is dispatched (NFR-SEC-04).
  • NodeClient — manages outbound connections to remote peers; used by PeerManager during initial connection and reconnection.
  • MessageCodec — encodes and decodes wire-protocol messages using NDJSON framing (one JSON object per line, terminated by \n). Each message carries a type discriminator field for routing.

The proto/ subdirectory contains the Protobuf IDL (blockchain.proto) reserved for a future gRPC migration (T-B02).

Since:
1.0.0
  • Class
    Description
    Encodes and decodes wire-protocol messages exchanged between blockchain nodes.
    Discriminator enum identifying the kind of P2P message.
    Immutable envelope wrapping all P2P messages.
    Manages outbound TCP connections from this node to remote peers.
    TCP server that accepts inbound peer connections and dispatches received messages.