You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, does Besu currently support discV5?
When I add the --Xv5-discovery-enabled startup parameter, it prints logs:
Discovery Protocol v5 is not available
It makes me feel a bit confused.
And Second, why does selectNewPivotBlock use safeBlockHash instead of directly using HeadBlockHash like go-ethereum?
block := api.eth.BlockChain().GetBlockByHash(update.HeadBlockHash)
if block == nil {
// If this block was previously invalidated, keep rejecting it here too
if res := api.checkInvalidAncestor(update.HeadBlockHash, update.HeadBlockHash); res != nil {
return engine.ForkChoiceResponse{PayloadStatus: *res, PayloadID: nil}, nil
}
// If the head hash is unknown (was not given to us in a newPayload request),
// we cannot resolve the header, so not much to do. This could be extended in
// the future to resolve from the `eth` network, but it's an unexpected case
// that should be fixed, not papered over.
header := api.remoteBlocks.get(update.HeadBlockHash)
if header == nil {
log.Warn("Forkchoice requested unknown head", "hash", update.HeadBlockHash)
return engine.STATUS_SYNCING, nil
}
// If the finalized hash is known, we can direct the downloader to move
// potentially more data to the freezer from the get go.
finalized := api.remoteBlocks.get(update.FinalizedBlockHash)
// Header advertised via a past newPayload request. Start syncing to it.
context := []interface{}{"number", header.Number, "hash", header.Hash()}
if update.FinalizedBlockHash != (common.Hash{}) {
if finalized == nil {
context = append(context, []interface{}{"finalized", "unknown"}...)
} else {
context = append(context, []interface{}{"finalized", finalized.Number}...)
}
}
log.Info("Forkchoice requested sync to new head", context...)
if err := api.eth.Downloader().BeaconSync(api.eth.SyncMode(), header, finalized); err != nil {
return engine.STATUS_SYNCING, err
}
return engine.STATUS_SYNCING, nil
}
The snap sync downloader only needs the head block hash information to start syncing data.
And,In a besu node, when a node is syncing data using snap sync, and there is no data before the sync, when will it update its own safe block?
Or are there other details that I have overlooked?
The text was updated successfully, but these errors were encountered:
@thinkAfCod Good question on using a head hash instead of the safe block hash. This is something we discussing internally, will let you know our thoughts.
First, does Besu currently support discV5?
When I add the --Xv5-discovery-enabled startup parameter, it prints logs:
It makes me feel a bit confused.
And Second, why does
selectNewPivotBlock
use safeBlockHash instead of directly using HeadBlockHash like go-ethereum?The snap sync downloader only needs the head block hash information to start syncing data.
And,In a besu node, when a node is syncing data using snap sync, and there is no data before the sync, when will it update its own safe block?
Or are there other details that I have overlooked?
The text was updated successfully, but these errors were encountered: