p2p: wire stategen into service for last finalized state (#16034)

This PR removes the last production usage for: `LastArchivedRoot` by

- extend the P2P config to accept a `StateGen` dependency and wire it up
from the beacon node
- update gossip scoring to read the active validator count via stategen
using last finalized block root

note: i think the correct implementation should process last finalizes
state to current slot, but that's a bigger change i dont want to make in
this PR, i just want to remove usages for `LastArchivedRoot`
This commit is contained in:
terence
2025-11-21 11:13:00 -05:00
committed by GitHub
parent 3d7f7b588b
commit 5449fd0352
6 changed files with 40 additions and 22 deletions

View File

@@ -663,6 +663,7 @@ func (b *BeaconNode) registerP2P(cliCtx *cli.Context) error {
EnableUPnP: cliCtx.Bool(cmd.EnableUPnPFlag.Name),
StateNotifier: b,
DB: b.db,
StateGen: b.stateGen,
ClockWaiter: b.clockWaiter,
})
if err != nil {