Skip to content

feat: process attestations and apply fork choice - #26

Merged
MegaRedHand merged 10 commits into
mainfrom
process-attestations
Jan 14, 2026
Merged

MegaRedHand merged 10 commits into
mainfrom
process-attestations

Conversation

@MegaRedHand

Copy link
Copy Markdown
Collaborator

No description provided.

@MegaRedHand
MegaRedHand merged commit cfdb6a1 into main Jan 14, 2026
@MegaRedHand
MegaRedHand deleted the process-attestations branch January 14, 2026 19:10
tcoratger pushed a commit to tcoratger/ethlambda that referenced this pull request Oct 30, 2026
)

* feat(beacon): add sepolia and hoodi as built-in networks

`--network` only knew `mainnet`, so following a public testnet meant
checking out its eth-clients repo, fetching Hoodi's 150 MB genesis state
through git-lfs, and pointing `--network` at the directory.

Both testnets now resolve by name. Each embeds its eth-clients
`config.yaml` and `bootstrap_nodes.yaml` unchanged, parsed through the
same reader a `--network <dir>` uses, plus `genesis_time` and
`genesis_validators_root` as constants. Neither carries its genesis
state: a built-in network never anchors at genesis, so those two values
are all the state was ever read for. The constants are pinned by tests
against fork digests published in each network's own bootnode ENRs, and
at runtime checkpoint sync and resume already reject an anchor state
whose genesis values disagree.

`NetworkSource::BuiltInMainnet` becomes `BuiltIn`, dispatching on a
`BuiltInNetwork`. The debug assertion that guarded against a second name
silently resolving to mainnet goes away, because each name now has its
own dispatch arm and a test checks they resolve to distinct chains.

Sepolia's config schedules gloas at epoch 353024, which this build
cannot process, so a Sepolia follower stops tracking the chain at that
epoch. The ignored-keys warning at startup names it.

* refactor(beacon): describe mainnet the way sepolia and hoodi are described

Mainnet was the odd one out among the built-in networks: a hardcoded
`Config::mainnet()`, a Rust array of bootnode ENRs, and a 5.4 MB genesis
state decoded at every startup to read two values off it. Every built-in
chain is now one `EmbeddedChain`: its eth-clients `config.yaml` and
`bootstrap_nodes.yaml` unchanged, plus `genesis_time` and
`genesis_validators_root` as constants.

The genesis state leaves the binary (5.4 MB smaller) and becomes a test
fixture, because the tests still need a real phase0 state and it is now
what the mainnet constants are checked against. The config fixture moves
the other way, into `assets/`, since it was already byte-identical to
eth-clients' current file. A test pins the parsed config to
`Config::mainnet()`, so the file and the Rust constant cannot drift.

Taking eth-clients' bootnode file also refreshes the list: upstream
replaced four EF ENRs with five newer ones since `MAINNET_BOOTNODES` was
copied.

* docs(readme): describe the beacon follower as it is now

The section still described the first cut: a gossip logger that "keeps
no chain, imports nothing" and needs no flags. The follower now anchors
at a checkpoint, imports through fork choice, custodies data columns and
serves the Beacon API, and a fresh data directory on a built-in network
cannot start without --checkpoint-sync-url. The sample output is taken
from a live Sepolia run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant