lodestar-heapsnapshots

Capture and analyze Lodestar heap snapshots via the REST write_heapdump endpoint.

4|1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/lodekeeper/dotfiles --skill lodestar-heapsnapshots
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lodestar-heapsnapshots
Source: https://github.com/lodekeeper/dotfiles/tree/main/skills/lodestar-heapsnapshots
Command: npx skills add https://github.com/lodekeeper/dotfiles --skill lodestar-heapsnapshots

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires zstd, sha256sum, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers diagnose and fix memory leaks in the Lodestar Ethereum client by capturing and analyzing heap snapshots from running nodes.

Core Features & Use Cases

  • Heap Snapshot Capture: Remotely trigger Lodestar's REST API to write heap dumps for specific threads (main, network, discv5).
  • Snapshot Analysis: Utilize a bundled Node.js script to compare two heap snapshots, highlighting significant growth in object types and counts.
  • Use Case: When a Lodestar beacon node's memory usage is steadily increasing over time, use this Skill to capture heap snapshots before and after a period of activity, then analyze the diff to pinpoint the source of the leak.

Quick Start

Use the lodestar-heapsnapshots skill to capture a heap snapshot from the network thread of a Lodestar node running on 127.0.0.1:9596 and save it to /tmp.

Frequently Asked Questions about lodestar-heapsnapshots

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I capture a heap snapshot from a running Lodestar beacon node?

You can capture a Lodestar heap snapshot by triggering the REST write_heapdump endpoint via SSH. This allows you to remotely write heap dumps for specific threads like main, network, and discv5 to a designated output directory.

How do I analyze a Lodestar heap snapshot to find a memory leak?

To analyze a Lodestar heap snapshot for memory leaks, use the bundled Node.js script to diff two captured snapshots. This highlights significant growth in object types and counts to pinpoint the source of the leak.

What's the best way to debug memory leaks in the Lodestar Ethereum client?

Debugging Lodestar memory leaks involves capturing heap snapshots before and after a period of activity, then diffing them. This Skill automates capturing from running beacon nodes and analyzing the diff to identify memory growth patterns.

Do I need SSH access to capture Lodestar heap dumps remotely?

Yes, capturing Lodestar heap dumps requires SSH access to the host machine. You also need a reachable Lodestar REST API and knowledge of the snapshot output directories to successfully write and retrieve the dumps.

Can I capture heap snapshots for specific Lodestar threads like discv5?

Yes, you can capture heap snapshots for specific Lodestar threads including main, network, and discv5. By targeting the write_heapdump endpoint, you can isolate memory leak investigations to individual beacon node components.

Why does my Lodestar beacon node memory usage keep increasing over time?

Increasing memory usage in Lodestar often indicates a memory leak. Use this Skill to capture and diff heap snapshots from your running beacon node, highlighting significant object growth to identify the exact source of the leak.