mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-04 06:44:59 +00:00
Update 0_beacon-chain.md
This commit is contained in:
parent
fb92d68bb9
commit
e52d374521
@ -517,8 +517,8 @@ Code snippets appearing in `this style` are to be interpreted as Python code. Be
|
||||
'pubkey': 'bytes48',
|
||||
# Withdrawal credentials
|
||||
'withdrawal_credentials': 'bytes32',
|
||||
# Slots the proposer has skipped (i.e. layers of RANDAO expected)
|
||||
'randao_layers': 'uint64',
|
||||
# Number of proposer slots since genesis
|
||||
'proposer_slots': 'uint64',
|
||||
# Slot when validator activated
|
||||
'activation_slot': 'uint64',
|
||||
# Slot when validator exited
|
||||
@ -1333,7 +1333,7 @@ def process_deposit(state: BeaconState,
|
||||
validator = Validator(
|
||||
pubkey=pubkey,
|
||||
withdrawal_credentials=withdrawal_credentials,
|
||||
randao_layers=0,
|
||||
proposer_slots=0,
|
||||
activation_slot=FAR_FUTURE_SLOT,
|
||||
exit_slot=FAR_FUTURE_SLOT,
|
||||
withdrawal_slot=FAR_FUTURE_SLOT,
|
||||
@ -1430,7 +1430,7 @@ Below are the processing steps that happen at every slot.
|
||||
### Misc counters
|
||||
|
||||
* Set `state.slot += 1`.
|
||||
* Set `state.validator_registry[get_beacon_proposer_index(state, state.slot)].randao_layers += 1`.
|
||||
* Set `state.validator_registry[get_beacon_proposer_index(state, state.slot)].proposer_slots += 1`.
|
||||
* Set `state.latest_randao_mixes[state.slot % LATEST_RANDAO_MIXES_LENGTH] = state.latest_randao_mixes[(state.slot - 1) % LATEST_RANDAO_MIXES_LENGTH]`
|
||||
|
||||
### Block roots
|
||||
@ -1456,7 +1456,7 @@ Below are the processing steps that happen at every `block`.
|
||||
### RANDAO
|
||||
|
||||
* Let `proposer = state.validator_registry[get_beacon_proposer_index(state, state.slot)]`.
|
||||
* Verify that `bls_verify(pubkey=proposer.pubkey, message=int_to_bytes32(proposer.randao_layers), signature=block.randao_reveal, domain=get_domain(state.fork, state.slot, DOMAIN_RANDAO))`.
|
||||
* Verify that `bls_verify(pubkey=proposer.pubkey, message=int_to_bytes32(proposer.proposer_slots), signature=block.randao_reveal, domain=get_domain(state.fork, state.slot, DOMAIN_RANDAO))`.
|
||||
* Set `state.latest_randao_mixes[state.slot % LATEST_RANDAO_MIXES_LENGTH] = hash(state.latest_randao_mixes[state.slot % LATEST_RANDAO_MIXES_LENGTH] + block.randao_reveal)`.
|
||||
|
||||
### Eth1 data
|
||||
|
Loading…
x
Reference in New Issue
Block a user