eth/downloader: implement beacon sync (#23982)
* eth/downloader: implement beacon sync * eth/downloader: fix a crash if the beacon chain is reduced in length * eth/downloader: fix beacon sync start/stop thrashing data race * eth/downloader: use a non-nil pivot even in degenerate sync requests * eth/downloader: don't touch internal state on beacon Head retrieval * eth/downloader: fix spelling mistakes * eth/downloader: fix some typos * eth: integrate legacy/beacon sync switchover and UX * eth: handle UX wise being stuck on post-merge TTD * core, eth: integrate the beacon client with the beacon sync * eth/catalyst: make some warning messages nicer * eth/downloader: remove Ethereum 1&2 notions in favor of merge * core/beacon, eth: clean up engine API returns a bit * eth/downloader: add skeleton extension tests * eth/catalyst: keep non-kiln spec, handle mining on ttd * eth/downloader: add beacon header retrieval tests * eth: fixed spelling, commented failing tests out * eth/downloader: review fixes * eth/downloader: drop peers failing to deliver beacon headers * core/rawdb: track beacon sync data in db inspect * eth: fix review concerns * internal/web3ext: nit Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This commit is contained in:
@ -19,10 +19,25 @@ package beacon
|
||||
import "github.com/ethereum/go-ethereum/rpc"
|
||||
|
||||
var (
|
||||
VALID = GenericStringResponse{"VALID"}
|
||||
SUCCESS = GenericStringResponse{"SUCCESS"}
|
||||
INVALID = ForkChoiceResponse{Status: "INVALID", PayloadID: nil}
|
||||
SYNCING = ForkChoiceResponse{Status: "SYNCING", PayloadID: nil}
|
||||
// VALID is returned by the engine API in the following calls:
|
||||
// - newPayloadV1: if the payload was already known or was just validated and executed
|
||||
// - forkchoiceUpdateV1: if the chain accepted the reorg (might ignore if it's stale)
|
||||
VALID = "VALID"
|
||||
|
||||
// INVALID is returned by the engine API in the following calls:
|
||||
// - newPayloadV1: if the payload failed to execute on top of the local chain
|
||||
// - forkchoiceUpdateV1: if the new head is unknown, pre-merge, or reorg to it fails
|
||||
INVALID = "INVALID"
|
||||
|
||||
// SYNCING is returned by the engine API in the following calls:
|
||||
// - newPayloadV1: if the payload was accepted on top of an active sync
|
||||
// - forkchoiceUpdateV1: if the new head was seen before, but not part of the chain
|
||||
SYNCING = "SYNCING"
|
||||
|
||||
// ACCEPTED is returned by the engine API in the following calls:
|
||||
// - newPayloadV1: if the payload was accepted, but not processed (side chain)
|
||||
ACCEPTED = "ACCEPTED"
|
||||
|
||||
GenericServerError = rpc.CustomError{Code: -32000, ValidationError: "Server error"}
|
||||
UnknownPayload = rpc.CustomError{Code: -32001, ValidationError: "Unknown payload"}
|
||||
InvalidTB = rpc.CustomError{Code: -32002, ValidationError: "Invalid terminal block"}
|
||||
|
Reference in New Issue
Block a user