diff --git a/beacon_chain/consensus_object_pools/blockchain_dag.nim b/beacon_chain/consensus_object_pools/blockchain_dag.nim index 0c7243859..3eac8dc1e 100644 --- a/beacon_chain/consensus_object_pools/blockchain_dag.nim +++ b/beacon_chain/consensus_object_pools/blockchain_dag.nim @@ -1498,7 +1498,7 @@ proc pruneBlocksDAG(dag: ChainDAGRef) = prunedHeads = hlen - dag.heads.len, dagPruneDur = Moment.now() - startTick -# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/sync/optimistic.md#helpers +# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/sync/optimistic.md#helpers template is_optimistic*(dag: ChainDAGRef, root: Eth2Digest): bool = root in dag.optimisticRoots @@ -1508,15 +1508,15 @@ proc markBlockInvalid*(dag: ChainDAGRef, root: Eth2Digest) = logScope: blck = shortLog(blck) if not dag.is_optimistic(root): - # https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/sync/optimistic.md#transitioning-from-valid---invalidated-or-invalidated---valid - # "It is outside of the scope of the specification since it's only possible - # with a faulty EE. Such a scenario requires manual intervention." + # https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/sync/optimistic.md#transitioning-from-valid---invalidated-or-invalidated---valid + # "These operations are purposefully omitted. It is outside of the scope of + # the specification since it's only possible with a faulty EE." warn "markBlockInvalid: attempt to invalidate valid block" doAssert strictVerification notin dag.updateFlags return if root == dag.finalizedHead.blck.root: - # https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/sync/optimistic.md#re-orgs + # https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/sync/optimistic.md#re-orgs # "If the justified checkpoint transitions from `NOT_VALIDATED` -> # `INVALIDATED`, a consensus engine MAY choose to alert the user and force # the application to exit." diff --git a/beacon_chain/fork_choice/fork_choice_types.nim b/beacon_chain/fork_choice/fork_choice_types.nim index 75a887734..34dcd6a06 100644 --- a/beacon_chain/fork_choice/fork_choice_types.nim +++ b/beacon_chain/fork_choice/fork_choice_types.nim @@ -88,8 +88,7 @@ type ProtoNodes* = object buf*: seq[ProtoNode] offset*: int ##\ - ## Substracted from logical Index - ## to get the physical index + ## Subtracted from logical index to get the physical index ProtoArray* = object hasLowParticipation*: bool