> ## Content Index
> Fetch the complete content index at: https://blog.chainsafe.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# Introducing Lodestar 2.0
- URL: https://blog.chainsafe.io/lodestar-2-0/
- Published: 2026-12-01T21:57:53.000Z
- Updated: 2026-12-01T21:57:53.000Z
- Description: Lodestar 2.0 replaces our TypeScript state transition with native Zig, on by default. On live mainnet, per-block state transition is 7× faster, epoch transitions ~14× faster, and beacon node memory is down 37%.
- Author: ChainSafe
- Tags: Lodestar

Author: [Bing](https://devlog.lodestar.casa/authors/spiral-ladder?ref=blog.chainsafe.io)

It has been about a year since we signaled our [move to Zig](https://blog.chainsafe.io/lodestar-zig-and-javascript/), and this week we are shipping the biggest milestone on that roadmap yet: [**Lodestar 2.0**](https://github.com/ChainSafe/lodestar/releases/tag/v2.0.0?ref=blog.chainsafe.io), replacing our TypeScript consensus state transition with a native Zig implementation that is turned on by default.

For years, the argument against running Lodestar was predictable: *"Great team and it's great for client diversity, but it's JavaScript. Isn't it slower and heavier on RAM than Rust or Go?"* With Lodestar 2.0, that argument no longer holds. On live Ethereum mainnet, our Zig-backed state transition cuts per-block state transition time by **7×**, epoch transitions by **\~14×**, and beacon process memory by **37%**. More details [below](https://devlog.lodestar.casa/lodestar-2.0/?ref=blog.chainsafe.io#mainnet-benchmark-lodestar-20-vs-old-lodestar-prysm--lighthouse).

## Ziggifying Lodestar

State transition wasn't the first module we moved to Zig. In August 2026, we swapped out our Rust-backed `@chainsafe/blst` integration for [lodestar-z's Zig BLS bindings](https://github.com/ChainSafe/lodestar/pull/8900?ref=blog.chainsafe.io), shipping it to production in Lodestar [v1.47.0](https://github.com/ChainSafe/lodestar/releases/tag/v1.47.0?ref=blog.chainsafe.io) in early September.

That first swap was a deliberate trial run to see how Zig would behave in production inside a Node.js beacon node. We have been building our Zig experience over the last year and had a good idea how Zig would behave with Node.js. But there is so much more to bringing code to production that needed fine-tuning, like build processes, packaging, and shipping native Zig N-API modules cleanly across Linux/macOS/ARM64 without disrupting operators, and whether crossing the JS-to-Zig boundary would pay off in real mainnet traffic. This did more than just validate the toolchain - by moving to a true multi-threaded runtime environment, we cut N-API boundary crossings per verification job from six down to one and saw immediate latency and throughput gains.

*(For a deep dive on the BLS work, check out our blog* [*here*](https://devlog.lodestar.casa/2026/09/25/bls?ref=blog.chainsafe.io)*.)*

Once that pipeline was proven, momentum picked up fast:

- **August–September 2026:** Zig BLS bindings merged ([PR #8900](https://github.com/ChainSafe/lodestar/pull/8900?ref=blog.chainsafe.io)) and shipped in [v1.47.0](https://github.com/ChainSafe/lodestar/releases/tag/v1.47.0?ref=blog.chainsafe.io).
- **September 2026:** Committee shuffling swapped to Zig ([PR #9829](https://github.com/ChainSafe/lodestar/pull/9829?ref=blog.chainsafe.io)).
- **October 2026:** Full Zig state transition wired in behind a feature flag ([PR #9632](https://github.com/ChainSafe/lodestar/pull/9632?ref=blog.chainsafe.io)), followed by merging `lodestar-z` directly into the main `lodestar` to form a monorepo ([PR #10513](https://github.com/ChainSafe/lodestar/pull/10513?ref=blog.chainsafe.io)).
- **November 2026:** Native Zig state transition enabled by default ([PR #10624](https://github.com/ChainSafe/lodestar/pull/10624?ref=blog.chainsafe.io)) and shipped in [**Lodestar 2.0**](https://github.com/ChainSafe/lodestar/releases/tag/v2.0.0?ref=blog.chainsafe.io).

## Mainnet Benchmark: Lodestar 2.0 vs. Old Lodestar, Prysm & Lighthouse

We could run a replay of mainnet blocks with a script to show our point, but it makes more sense to measure real data on live mainnet. We ran four nodes side-by-side on live Ethereum mainnet, following the methodology below, running the following clients:

- **Lodestar 2.0 (Zig):** [v2.0.0-rc.1](https://github.com/ChainSafe/lodestar/releases/tag/v2.0.0-rc.1?ref=blog.chainsafe.io) (new default native Zig state transition)
- **Lodestar 2.0 (JS):** [v2.0.0-rc.1](https://github.com/ChainSafe/lodestar/releases/tag/v2.0.0-rc.1?ref=blog.chainsafe.io) (old JS state transition)
- **Prysm:** `v7.3.2`
- **Lighthouse:** `v8.3.3`

### Methodology

- same hardware (**Hetzner AX41**: AMD Ryzen 5 3600, 64 GB RAM, NVMe SSD)
- same execution client (**Geth `v1.17.10`** with pre-Fusaka history pruned)
- no attached validators
- same window of mainnet uptime (52-hour window)
- nodes were fully synced at the beginning of the window, with 100% uptime

### Results

We processed **15,570 mainnet blocks** following the above methodology, and here are the averages over the 52h window:

![](https://blog.chainsafe.io/content/images/2026/12/Screenshot-2026-12-01-at-4.21.22---PM-1.png)

*\* Full block import from receipt through execution, fork choice, and database persistence (Lodestar's verification-only time before fork choice and DB writes is 127 ms Zig vs. 198 ms JS).* 
*† Computed from Prysm's `Synced new block` logs (`sinceSlotStartTime > 4s`) over the exact same 15,570 blocks.*

### State Transition & Epoch Transition

Moving state transition to Zig fundamentally changes the client's latency profile:

- **Per-block state transition** drops from **70.4 ms** in JS to **9.91 ms** in Zig (**7.1× faster**), compared to **63.1 ms** in Prysm (**6.4× faster**) and **94.6 ms** in Lighthouse (block processing + state root, **9.5× faster**). *(Note: each client's STF timer wraps slightly different sub-steps. For Lodestar, we time block BLS signature verification separately.)*

![Per-Block State Transition Mean Latency across Lodestar 2.0 (Zig), Lodestar 2.0 (JS), Prysm, and Lighthouse](https://devlog.lodestar.casa/assets/images/per-block-state-transition-429d729800edbe76ca819a6dc7ef027a.png)

- **Epoch transition** drops from **681 ms** in JS to **49.8 ms** in Zig (**13.7× faster**), compared to **745 ms** in Lighthouse (**15.0× faster**).

![Epoch Transition Mean Latency across Lodestar 2.0 (Zig), Lodestar 2.0 (JS), and Lighthouse](https://devlog.lodestar.casa/assets/images/epoch-transition-5d75ceccf0664500981e13db870b5b88.png)

**Why does epoch transition speed matter so much in practice?**

Every 32 slots (6.4 minutes), every client has to run an epoch transition, scanning the entire \~1M-validator registry to compute rewards, penalties, effective balances, inactivity scores, justification/finalization, and the new state root. Clients hide this on the happy path by precomputing it near the end of slot 31\. However, when slot 31 is skipped, arrives late, or gets reorged, that precomputed state is invalidated and this process runs on the critical path when slot 0 arrives.

At \~700 ms+ (plus block gossip arrival and EL execution payload verification), you risk blowing past the 4-second attestation deadline and missing slot-0 head votes and/or block proposals. At **49.8 ms** with Lodestar 2.0, an epoch-boundary cache miss is practically free, and even more importantly, during non-finality or multi-fork stress, the node has far more headroom to regenerate states without falling behind.

### End-to-End Block Processing

Fast consensus math only counts if it gets blocks imported and set as head before the 4-second attestation deadline.

Switching from JS to Zig cuts end-to-end block verification from 198 ms down to **127 ms** \- and since Geth itself takes \~100 ms to run the block's transactions, Lodestar's own overhead drops from \~97 ms to **\~27 ms** (**\~73%** less). *(Note: 27ms includes not only state transition, but also gossip handling, bls verification and engine api overhead.)* For reference, Lighthouse's full block-import timer (which also includes fork choice) averages **350 ms**, while Prysm averages **187 ms**.

Most importantly for stakers, Lodestar 2.0's missed 4s attestation deadline rate drops **4.5×** compared to JS STF - from 0.315% (49/15,570) down to **0.071%** (11/15,570), which is also half of Lighthouse's 0.148% (23/15,570) over the exact same blocks. Among finalized canonical blocks over those 52 hours, only **2** missed the 4s deadline due to slow local processing on Zig (**99.987%** on-time) versus 34 on JS (**17× fewer**).

### Memory & Disk

- **Memory:** Lodestar 2.0 cuts mean beacon-node RAM by **37%** (9.01 GiB -> **5.66 GiB**, with V8's heap shrinking **14.5×** from 3.38 GiB to **232 MiB**), bringing total host memory alongside Geth down from **17.26 GiB to 14.43 GiB** \- in line with **Prysm (14.29 GiB)** and below **Lighthouse (15.86 GiB)**.
- **Disk:** One of our goals for 2.0 was to keep consensus storage negligible. With [**history pruning enabled by default**](https://github.com/ChainSafe/lodestar/pull/10625?ref=blog.chainsafe.io) in 2.0, Lodestar's beacon DB sits at **\~4.1 GiB** (vs. **5.65 GiB** on Prysm).

## In the Wild: Mainnet Validation from Serenita

*Special thanks to Luca from* [*Serenita*](https://serenita.io/?ref=blog.chainsafe.io) *for providing the data in this section!*

Internal benchmarks are only half the story - what really counts is how Lodestar 2.0 performs in external production staking fleets.

[Serenita](https://serenita.io/?ref=blog.chainsafe.io) is an institutional Ethereum staking operator and the team behind [**Vero**](https://vero.docs.serenita.io/?ref=blog.chainsafe.io), an open-source multi-node validator client that connects validators to multiple independent consensus and execution clients simultaneously (requiring M-of-N agreement before signing attestations). Because Vero subscribes to every connected beacon node's SSE stream on every slot, it naturally benchmarks which client verifies, imports, and emits the canonical `head` event fastest on live mainnet.

Luca from Serenita shared two months of production mainnet telemetry across multiple consensus clients (10/02 -> 11/29), marking the exact dates they enabled native Zig state transition (10/27, `v1.51.0-rc.0 + native STF`) and upgraded to `v2.0.0-rc.1` (11/25):

> *"They clearly show Lodestar has been emitting head SSE events much quicker than before and currently dominates our mainnet infra. First red annotation line is `v1.51.0-rc.0 + native stf enabled`, second line is `v2.0.0-rc.1`."* \- Luca, Serenita in our [Discord](https://discord.com/channels/593655374469660673/1570179775966740480/1576928648680968333?ref=blog.chainsafe.io)

### Lodestar is consistently first to emit the canonical head event

Before 10/27, Lodestar sat mid-pack at **\~2.15-2.20 s**, trailing the two fastest anonymized clients by \~70-100 ms and holding 0% head-event timing dominance. The day native Zig STF was turned on, Lodestar dropped \~80-100 ms to **\~2.06-2.10 s**, overtaking every other client in the fleet, and tightened further to **\~2.04-2.06 s** after upgrading to `v2.0.0-rc.1` on 11/25:

![Min Head Event Time across 5 mainnet consensus clients on Serenita&#39;s infrastructure, showing Lodestar dropping ~80-100 ms to #1 after enabling native Zig STF on 10/27 and v2.0.0-rc.1 on 11/25](https://devlog.lodestar.casa/assets/images/serenita-min-head-event-time-250eb1fda75067d1479a4efb3956b1a8.jpg)

*Metrics source: Luca (*[*Serenita*](https://serenita.io/?ref=blog.chainsafe.io)*)*

### Lodestar dominates emitting head events first

The timeline below shows which client led the fleet (fastest head event time) at each point over those two months. Before **10/27**, **Client B** and **Client C** traded the lead. The moment native Zig STF was enabled, Lodestar immediately took over and held the #1 spot almost continuously through `v2.0.0-rc.1`:

![Head event timing dominance timeline across Serenita&#39;s mainnet fleet, showing Lodestar taking over dominance immediately on 10/27 and holding uninterrupted dominance after v2.0.0-rc.1 on 11/25](https://devlog.lodestar.casa/assets/images/serenita-head-dominance-timeline-72dba96217dd08f95fdba949538095d3.png)

*Metrics source: Luca (*[*Serenita*](https://serenita.io/?ref=blog.chainsafe.io)*)*

For operators running multi-client setups like Vero (or any latency-sensitive staking and MEV infrastructure), adding Lodestar 2.0 is no longer a "diversity tax". It is currently **the fastest beacon node** to deliver a verified head on virtually every slot.

*Again, credits to Luca from Serenita for not only this data, but for always supporting our work and running Lodestar!*

## How We Built, Hotswapped, and Hardened It

Rewriting consensus-critical code in a new language without breaking mainnet reliability requires discipline and, more importantly, manpower. We cannot disappear for two years on a rewrite and shirk our responsibility to participate in research or build the next Ethereum fork. We replaced hot-path modules incrementally in production:

1. **From-scratch Zig consensus libraries:** We built the core building blocks such as [ssz](https://github.com/ChainSafe/lodestar/tree/unstable/src/ssz?ref=blog.chainsafe.io) directly in Zig, starting in a separate [lodestar-z](https://github.com/ChainSafe/lodestar-z?ref=blog.chainsafe.io) repo. We used explicit allocator ownership and zero-allocation hot paths (for a deep dive into how our comptime SSZ representation works, see [SSZ in lodestar-z: Schema, Values, Bytes](https://devlog.lodestar.casa/ssz-schema-values-bytes?ref=blog.chainsafe.io)).
2. **Thin N-API bindings with** [**zapi**](https://github.com/ChainSafe/zapi?ref=blog.chainsafe.io)**:** Instead of shuttling huge JS objects back and forth across FFI, we expose the Zig modules to Node.js via N-API bindings built on ChainSafe's Zig N-API wrapper `zapi`, keeping heavy structures like the beacon state, validator pubkey cache, and shuffling tables in native memory.
3. **Feature-flagged hotswap & monorepo merge:** We wired the Zig state transition behind `--chain.nativeStateTransition` ([PR #9632](https://github.com/ChainSafe/lodestar/pull/9632?ref=blog.chainsafe.io)) so we could run Zig and TypeScript side-by-side on live mainnet - using our battle-tested TypeScript implementation as a live differential oracle. Once the Zig path proved to be safe and free of regressions, we merged `lodestar-z` directly into the `lodestar` monorepo ([PR #10513](https://github.com/ChainSafe/lodestar/pull/10513?ref=blog.chainsafe.io)) so TypeScript and Zig share a single CI, release pipeline, and review standard.
4. **Security & verification first:** Performance means nothing if a consensus client isn't safe to stake on. Alongside our [supply-chain security controls](https://devlog.lodestar.casa/mitigating-supply-chain-attacks?ref=blog.chainsafe.io), the Zig consensus core is:
  - Tested on every PR against Ethereum's official `consensus-spec-tests` and Hive multi-client interop suites.
  - Continuously fuzzed with **AFL++** ([our fuzzing setup](https://github.com/ChainSafe/lodestar/tree/unstable/test/fuzz?ref=blog.chainsafe.io)) with fuzz harnesses compiled in Zig's **`ReleaseSafe`** mode.
  - We are big fans of [TigerBeetle](https://tigerbeetle.com/?ref=blog.chainsafe.io) and [TIGER\_STYLE.md](https://tigerstyle.dev/?ref=blog.chainsafe.io). While their practices don't entirely map one-to-one to an Ethereum consensus client implementation (we can't statically allocate all memory at startup for example), we take great inspiration from their practices to uphold runtime safety while not sacrificing performance.

## What's Next?

Seeing Lodestar 2.0 hit sub-10 ms state transitions, \~50 ms epoch transitions, and \~5.7 GiB RSS on mainnet has only reinforced our conviction in Zig. The team loves working in it, the performance and memory wins are undeniable, and we remain fully committed to incrementally moving the rest of Lodestar into Zig module by module, battle-tested in production at every step.

Next up, we'll continue porting the remaining hot-path modules (networking/QUIC, fork choice, and storage) into Zig. We have the ambitious goal of having our client be mostly, if not entirely, Zig by the end of 2027.

If you haven't looked at Lodestar recently, now is the time to give [**Lodestar 2.0**](https://github.com/ChainSafe/lodestar/releases/tag/v2.0.0?ref=blog.chainsafe.io) a spin. Let us know your experience on our [Discord](https://discord.gg/bWHrENZjG?ref=blog.chainsafe.io) and follow along through 2027.