From a0ead042ad87efd6779a73200040cd19d1b7ff54 Mon Sep 17 00:00:00 2001 From: tersec Date: Mon, 26 Sep 2022 21:24:32 +0000 Subject: [PATCH] newPayload `INVALIDATED` should be `unviableFork` (#4180) --- beacon_chain/eth1/eth1_monitor.nim | 2 +- beacon_chain/gossip_processing/block_processor.nim | 3 ++- beacon_chain/spec/light_client_sync.nim | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/beacon_chain/eth1/eth1_monitor.nim b/beacon_chain/eth1/eth1_monitor.nim index 6efe55bf5..ed947112f 100644 --- a/beacon_chain/eth1/eth1_monitor.nim +++ b/beacon_chain/eth1/eth1_monitor.nim @@ -300,7 +300,7 @@ template toGaugeValue(x: Quantity): int64 = func compute_time_at_slot(genesis_time: uint64, slot: Slot): uint64 = genesis_time + slot * SECONDS_PER_SLOT -# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/specs/phase0/validator.md#get_eth1_data +# https://github.com/ethereum/consensus-specs/blob/v1.2.0/specs/phase0/validator.md#get_eth1_data func voting_period_start_time(state: ForkedHashedBeaconState): uint64 = let eth1_voting_period_start_slot = getStateField(state, slot) - getStateField(state, slot) mod diff --git a/beacon_chain/gossip_processing/block_processor.nim b/beacon_chain/gossip_processing/block_processor.nim index e8338f8d6..d40244d10 100644 --- a/beacon_chain/gossip_processing/block_processor.nim +++ b/beacon_chain/gossip_processing/block_processor.nim @@ -560,7 +560,8 @@ proc runQueueProcessingLoop*(self: ref BlockProcessor) {.async.} = # Every loop iteration ends with some version of blck.resfut.complete(), # including processBlock(), otherwise the sync manager stalls. if not blck.resfut.isNil: - blck.resfut.complete(Result[void, BlockError].err(BlockError.Invalid)) + blck.resfut.complete( + Result[void, BlockError].err(BlockError.UnviableFork)) else: self[].processBlock( blck, diff --git a/beacon_chain/spec/light_client_sync.nim b/beacon_chain/spec/light_client_sync.nim index 7137f9cc0..938349a1a 100644 --- a/beacon_chain/spec/light_client_sync.nim +++ b/beacon_chain/spec/light_client_sync.nim @@ -179,7 +179,7 @@ func apply_light_client_update( didProgress = true didProgress -# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/altair/light-client/sync-protocol.md#process_light_client_store_force_update +# https://github.com/ethereum/consensus-specs/blob/v1.2.0/specs/altair/light-client/sync-protocol.md#process_light_client_store_force_update type ForceUpdateResult* = enum NoUpdate,