Rippled II: Deep Dive into the Protocol and Codebase

Module Overview

The second module of the XRPL Core Dev Bootcamp Online Edition builds upon your foundational knowledge to explore the architecture of Rippled. Now that you can compile and run the software, it's time to understand how it works internally, from transaction processing to consensus mechanisms and peer-to-peer networking.

This module transforms you from someone who can operate Rippled into a developer who understands its inner workings. You'll learn to navigate the complex C++ codebase, trace transaction flows through the system, and comprehend the architectural decisions that make the XRP Ledger fast, secure, and decentralized.


Explore the Topics

This deep dive is organized into focused topics, each exploring a critical component of the Rippled architecture. Click on any topic below to dive deeper into the concepts, codebase structure, and practical implementations.


What You Will Learn

By completing this module, you will be able to:

  • Navigate the Rippled codebase and locate key components efficiently

  • Understand the architectural layers: Application, Transaction Processing, Consensus, and Networking

  • Trace transaction flows from submission to ledger inclusion

  • Comprehend the Transactor framework and how different transaction types are implemented

  • Explore peer-to-peer networking, message protocols, and peer discovery mechanisms

  • Use debugging tools, logging systems, and standalone mode for development

  • Read and interpret Rippled configuration files and runtime parameters

  • Understand protocol messages, RPC interfaces, and WebSocket subscriptions

These skills are fundamental for contributing to the XRPL core development, implementing protocol amendments, and building sophisticated blockchain applications.


🌐 Protocols

Communication and Interoperability in Distributed Systems

Learn how distributed nodes communicate, synchronize, and maintain consensus through peer-to-peer networking and protocol messages. Understand the overlay network, message types, and how Rippled nodes discover and interact with each other.

Key Topics: Peer-to-peer networking, Protocol Buffers, message propagation, connection lifecycle

Codebase: src/xrpld/overlay/

Explore Protocols →


⚙️ Transactors

Transaction Processing Framework

Understand the transaction processing framework and the three-phase validation process that ensures ledger integrity. Learn how different transaction types (Payment, Offer, Escrow) are implemented and how to create custom transactors.

Key Topics: Preflight, Preclaim, DoApply phases, transaction types, custom transactor creation

Codebase: src/xrpld/app/tx/detail/

Explore Transactors →


🏗️ Application Layer

Central Orchestration and Coordination

Explore how the Application class orchestrates all subsystems and manages the server lifecycle. Understand initialization sequences, job queue management, and how components interact.

Key Topics: Application class, subsystem coordination, job queues, initialization

Codebase: src/xrpld/app/main/

Explore Application Layer →


🤝 Consensus Engine

XRP Ledger Consensus Protocol

Discover how validators reach agreement on transaction sets and ledger state without proof-of-work. Learn about the consensus rounds, proposals, validations, and dispute resolution mechanisms.

Key Topics: Consensus algorithm, validator coordination, UNL management, ledger close

Codebase: src/xrpld/consensus/

Explore Consensus Engine →


🔗 Overlay Network

Peer-to-Peer Networking Layer

Master peer discovery, connection management, and message propagation in the decentralized network. Understand network topology, peer quality assessment, and network resilience.

Key Topics: Network topology, peer discovery, connection management, message broadcasting

Codebase: src/xrpld/overlay/detail/

Explore Overlay Network →


🔄 Transaction Lifecycle

Complete Transaction Journey

Trace the complete journey of a transaction from submission to ledger inclusion. Understand each phase: submission, validation, consensus, application, and finalization.

Key Topics: Submission methods, validation phases, consensus inclusion, canonical application

Codebase: Multiple locations across src/xrpld/

Explore Transaction Lifecycle →


🗺️ Codebase Navigation

Efficiently Navigating the Rippled Source

Learn to efficiently navigate the Rippled source code and locate key components. Understand directory structure, naming conventions, code patterns, and how to find specific functionality.

Key Topics: Directory structure, naming conventions, code patterns (Keylets, Views), IDE usage

Codebase: src/xrpld/ - all directories

Explore Codebase Navigation →


🐛 Debugging Tools

Development and Debugging Techniques

Master logging systems, standalone mode, and debugging techniques for Rippled development. Learn to interpret logs, use debuggers, and troubleshoot common issues.

Key Topics: Logging system, standalone mode, GDB usage, log interpretation, testing

Codebase: Development tools and techniques

Explore Debugging Tools →

Homework

Trace a Payment transaction from submission through ledger closure while exploring the Payment transactor code, including preflight, preclaim, and doApply.

Homework: Transaction Flow Analysis →

Homework: Transactor Code Exploration →

Analyze detailed logs to understand key messages and system behavior, and create a diagram illustrating how Rippled components interact during transaction processing.

Homework: Logging and Debugging →

Homework: Architecture Diagram →

Helpful Resources

Tips for Success

  1. Use Grep: Search the codebase with grep -r "preflight" src/ripple/app/tx/

  2. Take Notes: Document your findings as you explore

  3. Ask Questions: Use the feedback form if you're stuck

  4. Be Specific: Provide file paths, line numbers, and concrete examples

Knowledge Check

Review and Reinforce Your Understanding

Before moving on, take a few minutes to review key concepts from this module. From consensus mechanisms to transaction flows, this short quiz will help you confirm your understanding of Rippled’s architecture.

Ready? Let’s Quiz →

Questions

If you have any questions about the homework or would like us to review your work, feel free to contact us.

Submit Feedback →


➡️ Next Module: Data Architecture - SHAMap and NodeStore

Last updated