# 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 →](/core-dev-bootcamp/module02/protocols-communication-and-interoperability.md)

***

#### ⚙️ 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 →](/core-dev-bootcamp/module02/transactors-transaction-processing-framework.md)

***

#### 🏗️ 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 →](/core-dev-bootcamp/module02/application-layer-central-orchestration-and-coordination.md)

***

#### 🤝 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 →](/core-dev-bootcamp/module02/consensus-engine-xrp-ledger-consensus-protocol.md)

***

#### 🔗 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 →](/core-dev-bootcamp/module02/overlay-network-peer-to-peer-networking-layer.md)

***

#### 🔄 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 →](/core-dev-bootcamp/module02/transaction-lifecycle-complete-transaction-journey.md)

***

#### 🗺️ 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 →](/core-dev-bootcamp/module02/codebase-navigation-efficiently-navigating-the-rippled-source.md)

***

#### 🐛 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 →](/core-dev-bootcamp/module02/debugging-tools-development-and-debugging-techniques.md)

## 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 →](/core-dev-bootcamp/module02/homeworks/homework1.md)

[Homework: Transactor Code Exploration →](/core-dev-bootcamp/module02/homeworks/homework2.md)

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 →](/core-dev-bootcamp/module02/homeworks/homework3.md)

[Homework: Architecture Diagram →](/core-dev-bootcamp/module02/homeworks/homework4.md)

### Helpful Resources

* **Rippled Repository**: [github.com/XRPLF/rippled](https://github.com/XRPLF/rippled)
* **Module Materials**: [docs.xrpl-commons.org/core-dev-bootcamp](https://docs.xrpl-commons.org/core-dev-bootcamp/)
* **Code Navigation Tips**: Look in `src/ripple/app/tx/impl/` for transaction implementations

### 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 →](https://xrpl.at/cdbc-quiz02)

## Questions

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

[Submit Feedback →](https://docs.google.com/forms/d/e/1FAIpQLSe7qIbqepUKGVJxmWFHv0rs1zsBAzk8G6y5-bfz0Yd5rqW_5A/viewform)

***

➡️ **Next Module**: Data Architecture - [SHAMap and NodeStore](/core-dev-bootcamp/module03.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xrpl-commons.org/core-dev-bootcamp/module02.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
