Skip to content

Instantly share code, notes, and snippets.

@zengzengzenghuy
Created May 15, 2025 08:07
Show Gist options
  • Select an option

  • Save zengzengzenghuy/64c63594d353618c0fcf3e6add1e9427 to your computer and use it in GitHub Desktop.

Select an option

Save zengzengzenghuy/64c63594d353618c0fcf3e6add1e9427 to your computer and use it in GitHub Desktop.
import { createChainConfig, createChainForkConfig } from "@lodestar/config";
import { mainnetChainConfig } from "@lodestar/config/networks";
const _targetSlot = 11698097; // slot after Pectra
const rootPath = ["block_roots"];
const forkConfig = createChainForkConfig(createChainConfig(mainnetChainConfig));
const BLOCK_ROOTS_INDEX = forkConfig
.getForkTypes(_targetSlot)
.BeaconState.getPathInfo(rootPath).gindex;
console.log(BLOCK_ROOTS_INDEX);
@zengzengzenghuy
Copy link
Author

Should show 69n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment