Save LC Finality and Optimistic Updates in LC Store When Processing Block (#15124)

* add lcStore to Node

* changelog entry

* add atomic getters and setters for the store

* add lcstore to the blockchain package

* save lc finality update to store

* save lc optimistic update to store

* changelog entry

* change store fields visibility to private

* refactor method names and add tests

* add lcstore to the blockchain package

* save lc finality update to store

* save lc optimistic update to store

* changelog entry

* refactor method names

* setup tests

* remove get from getters

* add lcstore to the blockchain package

* save lc finality update to store

* save lc optimistic update to store

* changelog entry

* refactor method names

* setup tests

* rename methods

* temp

* temp

* add tests

* fixing tests

* stash

* refactor setUpAltair

* remove debug code

* refactor bellatrix setup

* refactor capella setup

* refactor rest - core tests remain

* refactor tests to use new functional options utils

* use the options

* add noFinalizedCheckpoint and finalizedCheckpointInPrevFork options

* add tests

* changelog entry

* refactor tests

* deps

* fix tests

* Update testing/util/lightclient.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* Update testing/util/lightclient.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* Update testing/util/lightclient.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* address comments

* address comments

* address comments

* go mod tidy

* fix annoying conflicts

* go mod tidy

* fix conflicts

* cleanup tests

* add SetupTestConfigCleanup

* commit to restart CI checks

* address comments

* address comments

* address comments

---------

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
Bastin
2025-04-15 12:38:20 +02:00
committed by GitHub
parent 215dbb8e40
commit c9e8701987
9 changed files with 397 additions and 5 deletions

View File

@@ -779,6 +779,7 @@ func (b *BeaconNode) registerBlockchainService(fc forkchoice.ForkChoicer, gs *st
blockchain.WithPayloadIDCache(b.payloadIDCache),
blockchain.WithSyncChecker(b.syncChecker),
blockchain.WithSlasherEnabled(b.slasherEnabled),
blockchain.WithLightClientStore(b.lcStore),
)
blockchainService, err := blockchain.NewService(b.ctx, opts...)