diff --git a/beacon_chain/block_pools/candidate_chains.nim b/beacon_chain/block_pools/candidate_chains.nim index 9bfb92ab4..e011eca5c 100644 --- a/beacon_chain/block_pools/candidate_chains.nim +++ b/beacon_chain/block_pools/candidate_chains.nim @@ -133,7 +133,7 @@ func atSlot*(blck: BlockRef, slot: Slot): BlockSlot = ## block proposal) BlockSlot(blck: blck.getAncestorAt(slot), slot: slot) -func init*(T: type BlockRef, root: Eth2Digest, slot: Slot): BlockRef = +func init(T: type BlockRef, root: Eth2Digest, slot: Slot): BlockRef = BlockRef( root: root, slot: slot @@ -828,7 +828,7 @@ proc getProposer*( dag.withState(dag.tmpState, head.atSlot(slot)): var cache = get_empty_per_epoch_cache() - # https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/specs/phase0/validator.md#validator-assignments + # https://github.com/ethereum/eth2.0-specs/blob/v0.11.3/specs/phase0/validator.md#validator-assignments let proposerIdx = get_beacon_proposer_index(state, cache) if proposerIdx.isNone: warn "Missing proposer index", diff --git a/beacon_chain/spec/state_transition_block.nim b/beacon_chain/spec/state_transition_block.nim index 1205e1772..dec2a1caf 100644 --- a/beacon_chain/spec/state_transition_block.nim +++ b/beacon_chain/spec/state_transition_block.nim @@ -95,7 +95,7 @@ proc process_block_header*( true -# https://github.com/ethereum/eth2.0-specs/blob/v0.9.2/specs/core/0_beacon-chain.md#randao +# https://github.com/ethereum/eth2.0-specs/blob/v0.11.3/specs/phase0/beacon-chain.md#randao proc process_randao( state: var BeaconState, body: BeaconBlockBody, flags: UpdateFlags, stateCache: var StateCache): bool {.nbench.}= @@ -107,9 +107,9 @@ proc process_randao( debug "Proposer index missing, probably along with any active validators" return false + # Verify RANDAO reveal let proposer = addr state.validators[proposer_index.get] - # Verify that the provided randao value is valid let signing_root = compute_signing_root( epoch, get_domain(state, DOMAIN_RANDAO, get_current_epoch(state))) if skipBLSValidation notin flags: diff --git a/beacon_chain/spec/validator.nim b/beacon_chain/spec/validator.nim index 0a64472e2..a752790ff 100644 --- a/beacon_chain/spec/validator.nim +++ b/beacon_chain/spec/validator.nim @@ -219,7 +219,7 @@ func get_beacon_proposer_indexes_for_epoch*(state: BeaconState, epoch: Epoch, st if idx.isSome: result.add (currSlot, idx.get) -# https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/specs/phase0/validator.md#validator-assignments +# https://github.com/ethereum/eth2.0-specs/blob/v0.11.3/specs/phase0/validator.md#validator-assignments func get_committee_assignment( state: BeaconState, epoch: Epoch, validator_index: ValidatorIndex): Option[tuple[a: seq[ValidatorIndex], b: CommitteeIndex, c: Slot]] {.used.} = @@ -244,7 +244,7 @@ func get_committee_assignment( return some((committee, idx, slot)) none(tuple[a: seq[ValidatorIndex], b: CommitteeIndex, c: Slot]) -# https://github.com/ethereum/eth2.0-specs/blob/v0.11.1/specs/phase0/validator.md#validator-assignments +# https://github.com/ethereum/eth2.0-specs/blob/v0.11.3/specs/phase0/validator.md#validator-assignments func is_proposer( state: BeaconState, validator_index: ValidatorIndex): bool {.used.} = var cache = get_empty_per_epoch_cache()