disable light client gossip from Capella onward (#4479)

To prevent exchanging incompatible data and therefore disconnect,
disable light client data gossip from Capella onward until specs are ok:
https://github.com/ethereum/consensus-specs/pull/3151
This commit is contained in:
Etan Kissling 2023-01-10 00:49:56 +01:00 committed by GitHub
parent 2dd3cd786f
commit 57b04c9f9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -323,9 +323,7 @@ proc installMessageValidators*(
ValidationResult.Ignore
let forkDigests = lightClient.forkDigests
for digest in [
forkDigests.altair, forkDigests.bellatrix, forkDigests.capella,
forkDigests.eip4844]:
for digest in [forkDigests.altair, forkDigests.bellatrix]:
lightClient.network.addValidator(
getLightClientFinalityUpdateTopic(digest),
proc(msg: altair.LightClientFinalityUpdate): ValidationResult =
@ -389,6 +387,9 @@ proc updateGossipStatus*(
for gossipFork in oldGossipForks:
if gossipFork >= BeaconStateFork.Altair:
if gossipFork >= BeaconStateFork.Capella:
# Format is still in development, do not use Gossip at this time.
continue
let forkDigest = lightClient.forkDigests[].atStateFork(gossipFork)
lightClient.network.unsubscribe(
getLightClientFinalityUpdateTopic(forkDigest))
@ -397,6 +398,9 @@ proc updateGossipStatus*(
for gossipFork in newGossipForks:
if gossipFork >= BeaconStateFork.Altair:
if gossipFork >= BeaconStateFork.Capella:
# Format is still in development, do not use Gossip at this time.
continue
let forkDigest = lightClient.forkDigests[].atStateFork(gossipFork)
lightClient.network.subscribe(
getLightClientFinalityUpdateTopic(forkDigest),