Skip to content

Instantly share code, notes, and snippets.

View yongkangc's full-sized avatar
🎃
Focusing

YK yongkangc

🎃
Focusing
View GitHub Profile
@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"
@yongkangc
yongkangc / gist:5c3c30d463cbb5a3783410a109d991cf
Last active August 20, 2025 00:57
Real-time traces with Reth ExEx

Real-time Traces with Reth ExEx

Three approaches to get near real-time traces using Reth's Execution Extensions (ExEx):

1. Re-execute with TracingInspector (Most Flexible)

TracingInspector is from the revm-inspectors crate.

use revm_inspectors::tracing::{TracingInspector, TracingInspectorConfig};
@yongkangc
yongkangc / reth-hoodi-testnet-guide.md
Created August 15, 2025 08:17
Complete step-by-step guide for running Reth (Rust Ethereum client) on the Hoodi Ethereum testnet

Running a Reth Node on the Hoodi Ethereum Testnet

This guide provides a step-by-step process for setting up and running a Reth (Rust Ethereum client) execution client on the Hoodi testnet. Hoodi is an upcoming Ethereum testnet launching on March 17, 2025, with Chain ID 560048 and Network ID 560048, utilizing Deneb consensus and Cancun execution features.

This guide is designed for developers and enthusiasts looking to participate in the Hoodi testnet by running their own Reth node.

Table of Contents

  1. Prerequisites and System Requirements
  2. Installation Methods