Skip to content

Instantly share code, notes, and snippets.

View yongkangc's full-sized avatar
🎃
Focusing

YK yongkangc

🎃
Focusing
View GitHub Profile
@yongkangc
yongkangc / stage.md
Last active September 11, 2025 05:56
reth stages

What Does "Pipeline Sync" Mean in Reth?

Pipeline sync refers to Reth's staged, sequential processing architecture for synchronizing blockchain data. It's not a single operation, but rather a multi-stage pipeline that processes blocks through a series of specialized stages in a specific order.

The Core Concept

Instead of downloading and processing blocks all at once, Reth breaks the sync process into 15 distinct stages that run serially:

@yongkangc
yongkangc / e2e.md
Last active September 5, 2025 04:11
reth e2e test actions

Reth E2E Test Actions Reference

This document provides a comprehensive reference for all available actions in the Reth e2e test framework.

Core Infrastructure Actions

Action Purpose Key Parameters Example Usage
WaitForBlockHeight Wait for a node to reach specific block height height: u64, node: NodeId WaitForBlockHeight::new(5, NodeId::new(0))
AssertPeers Verify peer connection count expected_peers: usize, node: NodeId AssertPeers::new(2, NodeId::new(0))
@yongkangc
yongkangc / trie_debugging_walkthrough.md
Created September 2, 2025 08:56
Ethereum State Root Debugging: Nibble-by-Nibble Trie Walking Guide
@yongkangc
yongkangc / reth-merkle-trie-deep-dive.md
Last active September 2, 2025 08:39
Comprehensive deep dive into Reth's Merkle/Trie implementation - architecture, stages, state root computation, and debugging guide

Comprehensive deep dive into Reth's Merkle/Trie implementation - architecture, stages, state root computation, and debugging guide

Reth Merkle/Trie Implementation - Deep Dive

A comprehensive analysis of Reth's Merkle Patricia Trie implementation, covering architecture, state root computation, sync stages, and debugging approaches.

Table of Contents

@yongkangc
yongkangc / foundry-cast-commands-reference.md
Created September 2, 2025 08:02
Comprehensive Foundry Cast commands reference for Ethereum development and debugging
@yongkangc
yongkangc / reth-bench-commands.md
Created August 23, 2025 02:16
Reth Hoodi Testnet Node and Benchmark Commands

Reth Hoodi Testnet Benchmark Commands

1. Start Reth Node

Start a Reth node with Hoodi testnet configuration and all required flags:

/mnt/disks/disk-4/rust-build-cache/debug/reth node \
  --chain hoodi \
  --datadir /mnt/disks/disk-4/hoodi-snapshot \
@yongkangc
yongkangc / reth-bench-results-summary.md
Created August 22, 2025 06:52
Reth Benchmark Results - 100 Blocks on Hoodi Network with Cache Improvements

Reth Benchmark Results - 100 Blocks on Hoodi Network

Date: 2025-08-22

Branch: alexey/tx-execution-cache (with cache improvements)

Test Configuration

@yongkangc
yongkangc / reth-cache-benchmark-results.md
Created August 22, 2025 06:20
Reth Transaction Execution Cache Performance - Branch: alexey/tx-execution-cache

Reth Transaction Execution Cache Performance Analysis

Date: 2025-08-22

Branch: alexey/tx-execution-cache

Executive Summary

We successfully implemented and optimized transaction execution caching in Reth based on PR #17844. The improvements target increasing cache hit rate from 57% to 80% through intelligent filtering and enhanced metrics.

Implementation Overview

@yongkangc
yongkangc / gist:77b2fe9e2fa42674c571c839b076dc07
Created August 20, 2025 01:07
ExEx Tracing using EthApi - Alternative Approach

ExEx Tracing using EthApi - Alternative Approach

You can use the EthApi from the RPC handle for tracing. The FullEthApi trait includes Trace capabilities.

Key Discovery

From FullEthApi trait definition:

pub trait FullEthApi:
@yongkangc
yongkangc / gist:09520c7a99862534d94fb95b68a727ea
Created August 20, 2025 01:05
Real-time tracing with Reth ExEx - Working Example
# Real-time Tracing with Reth ExEx - Working Example
A complete example showing how to get transaction traces in real-time using Reth's Execution Extensions.
## Cargo.toml
```toml
[package]
name = "exex-tracing"
version = "0.1.0"