From f4e0d9804a18c8e09315fa92effe1be75668ca21 Mon Sep 17 00:00:00 2001 From: Akhila Raju Date: Tue, 5 Mar 2019 20:14:00 -0500 Subject: [PATCH 1/3] Minor spelling fixes. --- specs/validator/0_beacon-chain-validator.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/validator/0_beacon-chain-validator.md b/specs/validator/0_beacon-chain-validator.md index e1083c5c55..0c95fb446a 100644 --- a/specs/validator/0_beacon-chain-validator.md +++ b/specs/validator/0_beacon-chain-validator.md @@ -379,7 +379,7 @@ def get_committee_assignment( ### Lookahead -The beacon chain shufflings are designed to provide a minimum of 1 epoch lookahead on the validator's upcoming assignemnts of proposing and attesting dictated by the shuffling and slot. +The beacon chain shufflings are designed to provide a minimum of 1 epoch lookahead on the validator's upcoming assignments of proposing and attesting dictated by the shuffling and slot. There are three possibilities for the shuffling at the next epoch: 1. The shuffling changes due to a "validator registry change". From 37b77725d88da0bd17e4d66e7def30249fd4253c Mon Sep 17 00:00:00 2001 From: Dankrad Feist Date: Wed, 6 Mar 2019 22:32:26 +0100 Subject: [PATCH 2/3] Make basic/non-basic for bytes explicit --- specs/simple-serialize.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/simple-serialize.md b/specs/simple-serialize.md index a452213b5f..a169f8f932 100644 --- a/specs/simple-serialize.md +++ b/specs/simple-serialize.md @@ -44,9 +44,9 @@ This is a **work in progress** describing typing, serialization and Merkleizatio For convenience we alias: -* `byte` to `uint8` -* `bytes` to `byte[]` -* `bytesN` to `byte[N]` +* `byte` to `uint8` (this is a basic type) +* `bytes` to `byte[]` (this is *not* a basic type) +* `bytesN` to `byte[N]` (this is *not* a basic type) ## Serialization From ee2fbd0df7582790876d1051417932d6718ea793 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Wed, 6 Mar 2019 13:48:06 -0800 Subject: [PATCH 3/3] Fix calls of `signed_root` --- specs/core/0_beacon-chain.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index e09e7c2615..239f262dfc 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1292,7 +1292,7 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None: # Verify the proof of possession proof_is_valid = bls_verify( pubkey=deposit_input.pubkey, - message_hash=signed_root(deposit_input, "proof_of_possession"), + message_hash=signed_root(deposit_input), signature=deposit_input.proof_of_possession, domain=get_domain( state.fork, @@ -1664,8 +1664,8 @@ Below are the processing steps that happen at every `block`. #### Block signature * Let `proposer = state.validator_registry[get_beacon_proposer_index(state, state.slot)]`. -* Let `proposal = Proposal(block.slot, BEACON_CHAIN_SHARD_NUMBER, signed_root(block, "signature"), block.signature)`. -* Verify that `bls_verify(pubkey=proposer.pubkey, message_hash=signed_root(proposal, "signature"), signature=proposal.signature, domain=get_domain(state.fork, get_current_epoch(state), DOMAIN_PROPOSAL))`. +* Let `proposal = Proposal(block.slot, BEACON_CHAIN_SHARD_NUMBER, signed_root(block), block.signature)`. +* Verify that `bls_verify(pubkey=proposer.pubkey, message_hash=signed_root(proposal), signature=proposal.signature, domain=get_domain(state.fork, get_current_epoch(state), DOMAIN_PROPOSAL))`. #### RANDAO @@ -1705,7 +1705,7 @@ def process_proposer_slashing(state: BeaconState, for proposal in (proposer_slashing.proposal_1, proposer_slashing.proposal_2): assert bls_verify( pubkey=proposer.pubkey, - message_hash=signed_root(proposal, "signature"), + message_hash=signed_root(proposal), signature=proposal.signature, domain=get_domain(state.fork, slot_to_epoch(proposal.slot), DOMAIN_PROPOSAL) ) @@ -1853,7 +1853,7 @@ def process_exit(state: BeaconState, exit: VoluntaryExit) -> None: # Verify signature assert bls_verify( pubkey=validator.pubkey, - message_hash=signed_root(exit, "signature"), + message_hash=signed_root(exit), signature=exit.signature, domain=get_domain(state.fork, exit.epoch, DOMAIN_EXIT) ) @@ -1898,7 +1898,7 @@ def process_transfer(state: BeaconState, transfer: Transfer) -> None: # Verify that the signature is valid assert bls_verify( pubkey=transfer.pubkey, - message_hash=signed_root(transfer, "signature"), + message_hash=signed_root(transfer), signature=transfer.signature, domain=get_domain(state.fork, slot_to_epoch(transfer.slot), DOMAIN_TRANSFER) )