From e93ba51ef807e7ae87c5f793c385112da1b8c0ab Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Sat, 15 Jun 2019 18:25:37 -0400 Subject: [PATCH] More clean up --- specs/core/1_custody-game.md | 18 +++++++++--------- specs/core/1_shard-data-chains.md | 6 +++--- specs/light_client/sync_protocol.md | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/specs/core/1_custody-game.md b/specs/core/1_custody-game.md index 9e8414a42..315084c30 100644 --- a/specs/core/1_custody-game.md +++ b/specs/core/1_custody-game.md @@ -133,9 +133,9 @@ class CustodyBitChallenge(Container): responder_index: ValidatorIndex attestation: Attestation challenger_index: ValidatorIndex - responder_key: Bytes96 + responder_key: BLSSignature chunk_bits: bytes - signature: Bytes96 + signature: BLSSignature ``` #### `CustodyChunkChallengeRecord` @@ -162,7 +162,7 @@ class CustodyBitChallengeRecord(Container): data_root: Bytes32 chunk_count: uint64 chunk_bits_merkle_root: Bytes32 - responder_key: Bytes96 + responder_key: BLSSignature ``` #### `CustodyResponse` @@ -186,7 +186,7 @@ class CustodyKeyReveal(Container): # Index of the validator whose key is being revealed revealer_index: ValidatorIndex # Reveal (masked signature) - reveal: Bytes96 + reveal: BLSSignature ``` #### `EarlyDerivedSecretReveal` @@ -196,13 +196,13 @@ Represents an early (punishable) reveal of one of the derived secrets, where der ```python class EarlyDerivedSecretReveal(Container): # Index of the validator whose key is being revealed - revealed_index: uint64 + revealed_index: ValidatorIndex # RANDAO epoch of the key that is being revealed epoch: Epoch # Reveal (masked signature) - reveal: Bytes96 + reveal: BLSSignature # Index of the validator who revealed (whistleblower) - masker_index: uint64 + masker_index: ValidatorIndex # Mask used to hide the actual reveal signature (prevent reveal from being stolen) mask: Bytes32 ``` @@ -232,7 +232,7 @@ class BeaconState(Container): # Future derived secrets already exposed; contains the indices of the exposed validator # at RANDAO reveal period % EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS - exposed_derived_secrets: Vector[List[uint64], EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS] + exposed_derived_secrets: Vector[List[ValidatorIndex], EARLY_DERIVED_SECRET_PENALTY_MAX_FUTURE_EPOCHS] ``` #### `BeaconBlockBody` @@ -267,7 +267,7 @@ def get_custody_chunk_count(crosslink: Crosslink) -> int: ### `get_custody_chunk_bit` ```python -def get_custody_chunk_bit(key: Bytes96, chunk: bytes) -> bool: +def get_custody_chunk_bit(key: BLSSignature, chunk: bytes) -> bool: # TODO: Replace with something MPC-friendly, e.g. the Legendre symbol return bool(get_bitfield_bit(hash(key + chunk), 0)) ``` diff --git a/specs/core/1_shard-data-chains.md b/specs/core/1_shard-data-chains.md index ce6f0a6c2..6b18d13f6 100644 --- a/specs/core/1_shard-data-chains.md +++ b/specs/core/1_shard-data-chains.md @@ -83,7 +83,7 @@ class ShardAttestation(Container): shard: Shard shard_block_root: Bytes32 aggregation_bitfield: bytes - aggregate_signature: Bytes96 + aggregate_signature: BLSSignature ``` ### `ShardBlock` @@ -97,7 +97,7 @@ class ShardBlock(Container): data: ShardBlockBody state_root: Bytes32 attestations: List[ShardAttestation] - signature: Bytes96 + signature: BLSSignature ``` ### `ShardBlockHeader` @@ -111,7 +111,7 @@ class ShardBlockHeader(Container): body_root: Bytes32 state_root: Bytes32 attestations: List[ShardAttestation] - signature: Bytes96 + signature: BLSSignature ``` ## Helper functions diff --git a/specs/light_client/sync_protocol.md b/specs/light_client/sync_protocol.md index 8501c5869..dc2ce397b 100644 --- a/specs/light_client/sync_protocol.md +++ b/specs/light_client/sync_protocol.md @@ -167,7 +167,7 @@ If a client wants to update its `finalized_header` it asks the network for a `Bl ```python { 'header': BeaconBlockHeader, - 'shard_aggregate_signature': 'bytes96', + 'shard_aggregate_signature': BLSSignature, 'shard_bitfield': 'bytes', 'shard_parent_block': ShardBlock, }