intermediate 2 min

Phase overview: Communication (RPC)

Your map of the Communication (RPC) phase: how the outside world talks to a node, and how to build, harden, and test your own command, in six modules.

Prerequisites

Complete these before starting this module:

Introduction

≈2 min · Phase overview · read this before diving in

Peers talk to peers on the overlay; everyone else, wallets, explorers, your own scripts, talks to a node through RPC. This phase follows a request from the HTTP or WebSocket port all the way to a handler and back, then has you build your own command.

First, understanding the path: the RPC architecture and request flow (ports, the handler table, contexts), then authentication, roles, and the error-handling contract every response follows. Then building your own: implement a custom handler from scratch, absorb the best practices that separate working code from production code, test it with the jtx framework, and finish with the advanced machinery, subscriptions, streaming, and the gRPC path.

The road through this phase

The road through Communication RPC: two modules to understand the request path, then four to build, harden, test, and extend your own handler, about five and a half hours.

Module Duration What it covers
Understanding the path
RPC architecture & request flow 45 min How rippled's RPC layer dispatches JSON-RPC / WebSocket / gRPC requests to handlers
RPC authentication & error handling 60 min Role-based access control and the RPC error-code system
Building your own
Building a custom RPC handler 60 min Implement a new RPC command end-to-end — the handler function, registration and conditions
RPC handler best practices 60 min Patterns and helpers for robust, consistent RPC handlers
Testing RPC handlers 60 min How to test RPC handlers with the jtx framework and debug them
Advanced RPC features 45 min Subscriptions, WebSocket streams and gRPC — beyond simple request / response

Total: about 6 hours of module time, plus your own exploration. The modules are ordered so each builds on the previous one; resist the temptation to skip ahead.

Where you will land

By the end of this phase you can trace any RPC command through the codebase, and you will have designed, hardened, and tested a command of your own, exactly the skill the capstone's RPC requirement calls for. Next, the heart of the system: consensus.

Unlocks

Finishing this module opens up:

XRPL Academy © 2026