Merge pull request #169 from ethereum/djrtwo-patch-1

remove fork_version from ProposalSignedData
This commit is contained in:
Justin 2018-11-25 17:57:29 +00:00 committed by GitHub
commit 9fde4e312d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -164,8 +164,6 @@ A `ProposalSignedData` has the following fields:
```python ```python
{ {
# Fork version
'fork_version': 'uint64',
# Slot number # Slot number
'slot': 'uint64', 'slot': 'uint64',
# Shard number (or `2**64 - 1` for beacon chain) # Shard number (or `2**64 - 1` for beacon chain)
@ -835,7 +833,7 @@ Extend the list of `AttestationRecord` objects in the `state` with those include
### Verify proposer signature ### Verify proposer signature
Let `proposal_hash = hash(ProposalSignedData(fork_version, block.slot, 2**64 - 1, block_hash_without_sig))` where `block_hash_without_sig` is the hash of the block except setting `proposer_signature` to `[0, 0]`. Let `proposal_hash = hash(ProposalSignedData(block.slot, 2**64 - 1, block_hash_without_sig))` where `block_hash_without_sig` is the hash of the block except setting `proposer_signature` to `[0, 0]`.
Verify that `BLSVerify(pubkey=get_beacon_proposer(state, block.slot).pubkey, data=proposal_hash, sig=block.proposer_signature, domain=get_domain(state, block.slot, DOMAIN_PROPOSAL))` passes. Verify that `BLSVerify(pubkey=get_beacon_proposer(state, block.slot).pubkey, data=proposal_hash, sig=block.proposer_signature, domain=get_domain(state, block.slot, DOMAIN_PROPOSAL))` passes.