From 8e8eed23f324fa4708d1032c7e0001e403b8c4bd Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 16 Oct 2018 13:50:31 +0100 Subject: [PATCH 01/14] Misc minor cleanups --- specs/beacon-chain.md | 69 +++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 379e32b11..4d0b2ebed 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -44,7 +44,7 @@ The primary source of load on the beacon chain are "attestations". Attestations | `MAX_VALIDATOR_CHURN_QUOTIENT` | 2**5 (= 32) | — | | `RANDAO_SLOTS_PER_LAYER` | 2**12 (=4096) | slots | ~18 hours | | `LOGOUT_MESSAGE` | `"LOGOUT"` | — | -| `MIN_ONLINE_DEPOSIT_SIZE` | 2**4 (= 16) | ETH | +| `MIN_BALANCE` | 2**4 (= 16) | ETH | **Notes** @@ -99,7 +99,7 @@ A `BeaconBlock` has the following fields: # Recent PoW chain reference (block hash) 'pow_chain_reference': 'hash32', # Skip list of previous block hashes - # i'th item is the most recent ancestor who's slot is a multiple of 2**i for i = 0, ..., 31 + # i'th item is the most recent ancestor whose slot is a multiple of 2**i for i = 0, ..., 31 'ancestor_hashes': ['hash32'], # Active state root 'active_state_root': 'hash32', @@ -230,7 +230,7 @@ A `ValidatorRecord` has the following fields: 'randao_commitment': 'hash32', # Slot the RANDAO commitment was last changed 'randao_last_change': 'int64', - # Balance + # Balance in Gwei 'balance': 'int64', # Status code 'status': 'int8', @@ -243,7 +243,7 @@ A `CrosslinkRecord` has the following fields: ```python { - # Since last validator set change? + # Flag indicating a recent validator set change 'recently_changed': 'bool', # Slot number 'slot': 'int64', @@ -300,22 +300,16 @@ Here's an example of its working (green is finalized blocks, yellow is justified We now define the state transition function. At the high level, the state transition is made up of two parts: -1. The per-block processing, which happens every block, and affects the `ActiveState` only -2. The crystallized state recalculation, which happens only if `block.slot >= last_state_recalculation_slot + CYCLE_LENGTH`, and affects the `CrystallizedState` and `ActiveState` - +1. The per-block processing, which happens every block, and affects the `ActiveState` only. +2. The crystallized state recalculation, which happens only if `block.slot >= last_state_recalculation_slot + CYCLE_LENGTH`, and affects the `CrystallizedState` and `ActiveState`. The crystallized state recalculation generally focuses on changes to the validator set, including adjusting balances and adding and removing validators, as well as processing crosslinks and managing block justification, and the per-block processing generally focuses on verifying aggregate signatures and saving temporary records relating to the in-block activity in the `ActiveState`. ### Helper functions -We start off by defining some helper algorithms. First, the function that selects the active validators: +Below are various helper functions. -```python -def get_active_validator_indices(validators): - return [i for i, v in enumerate(validators) if v.status == ACTIVE] -``` - -Now, a function that shuffles this list: +First a function that shuffles the validator list: ```python def shuffle(values: List[Any], @@ -403,7 +397,7 @@ Now, our combined helper method: def get_new_shuffling(seed: Hash32, validators: List[ValidatorRecord], crosslinking_start_shard: int) -> List[List[ShardAndCommittee]]: - active_validators = get_active_validator_indices(validators) + active_validators = [i for i, v in enumerate(validators) if v.status == ACTIVE] active_validators_size = len(active_validators) committees_per_slot = clamp( @@ -485,7 +479,6 @@ def int_sqrt(n: int) -> int: return x ``` - ### On startup Run the following code: @@ -571,7 +564,7 @@ def add_validator(validators: List[ValidatorRecord], withdrawal_address=withdrawal_address, randao_commitment=randao_commitment, randao_last_change=current_slot, - balance=DEPOSIT_SIZE * GWEI_PER_ETH, # in Gwei + balance=DEPOSIT_SIZE * GWEI_PER_ETH, status=PENDING_ACTIVATION, exit_slot=0 ) @@ -712,7 +705,7 @@ For each `SpecialRecord` `obj` in `active_state.pending_specials`: #### Finally... -* For any validator with index `v` with balance less than `MIN_ONLINE_DEPOSIT_SIZE` and status `ACTIVE`, run `exit_validator(v, crystallized_state, penalize=False, current_slot=block.slot)` +* For any validator with index `v` with balance less than `MIN_BALANCE` and status `ACTIVE`, run `exit_validator(v, crystallized_state, penalize=False, current_slot=block.slot)` * Set `crystallized_state.last_state_recalculation_slot += CYCLE_LENGTH` * Remove all attestation records older than slot `crystallized_state.last_state_recalculation_slot` * Empty the `active_state.pending_specials` list @@ -731,7 +724,7 @@ Then, run the following algorithm to update the validator set: ```python def change_validators(validators: List[ValidatorRecord]) -> None: # The active validator set - active_validators = get_active_validator_indices(validators) + active_validators = [i for i, v in enumerate(validators) if v.status == ACTIVE] # The total balance of active validators total_balance = sum([v.balance for i, v in enumerate(validators) if i in active_validators]) # The maximum total wei that can deposit+withdraw @@ -793,41 +786,41 @@ Finally: ### TODO -Note: This spec is ~60% complete. +Note: This spec is ~65% complete. **Missing** -* [ ] Specify how `crystallized_state_root` and `active_state_root` are constructed, including Merklelisation logic for light clients -* [ ] Specify the rules around acceptable values for `pow_chain_reference` +* [ ] Specify the Merklelisation rules for beacon state and blocks and merge `crystallized_state_root` and `active_state_root` ([issue 54](https://github.com/ethereum/eth2.0-specs/issues/54)) +* [ ] Specify the rules around acceptable values for `pow_chain_reference` ([issue 58](https://github.com/ethereum/eth2.0-specs/issues/58)) * [ ] Specify the shard chain blocks, blobs, proposers, etc. -* [ ] Specify the rules for forced deregistrations -* [ ] Specify the various assumptions (global clock, networking latency, validator honesty, validator liveness, etc.) -* [ ] Specify (in a separate Vyper file) the registration contract on the PoW chain -* [ ] Specify the bootstrapping logic for the beacon chain genesis (e.g. specify a minimum number validators before the genesis block) +* [ ] Specify the deposit contract on the PoW chain in Vyper +* [ ] Specify the beacon chain genesis rules ([issue 58](https://github.com/ethereum/eth2.0-specs/issues/58)) * [ ] Specify the logic for proofs of custody, including slashing conditions -* [ ] Add an appendix about the BLS12-381 curve -* [ ] Add an appendix on gossip networks and the offchain signature aggregation logic -* [ ] Add a glossary (in a separate `glossary.md`) to comprehensively and precisely define all the terms +* [ ] Specify BLSVerify and rework the spec for BLS12-381 throughout +* [ ] Specify the constraints for `SpecialRecord`s ([issue 43](https://github.com/ethereum/eth2.0-specs/issues/43)) * [ ] Undergo peer review, security audits and formal verification -**Possible rework/additions** +**Documentation** + +* [ ] Specify the various assumptions (global clock, networking latency, validator honesty, validator liveness, etc.) +* [ ] Add an appendix on gossip networks and the offchain signature aggregation logic +* [ ] Add a glossary (in a separate `glossary.md`) to comprehensively and precisely define all the terms +* [ ] Clearly document the various edge cases, e.g. with committee sizing +* [ ] Rework the document for readability + +**Possible modifications and additions** * [ ] Replace the IMD fork choice rule with LMD -* [ ] Merklelise `crystallized_state_root` and `active_state_root` into a single root -* [ ] Replace Blake with a STARK-friendly hash function +* [ ] Homogenise types to `uint64` ([PR 36](https://github.com/ethereum/eth2.0-specs/pull/36)) * [ ] Reduce the slot duration to 8 seconds * [ ] Allow for the delayed inclusion of aggregated signatures -* [ ] Use a separate networking-optimised serialisation format for networking -* [ ] Harden RANDAO against orphaned reveals -* [ ] Introduce a RANDAO slashing condition for early leakage +* [ ] Introduce a RANDAO slashing condition for early reveals * [ ] Use a separate hash function for the proof of possession * [ ] Rework the `ShardAndCommittee` data structures * [ ] Add a double-batched Merkle accumulator for historical beacon chain blocks * [ ] Allow for deposits larger than 32 ETH, as well as deposit top-ups -* [ ] Add penalties for a deposit below 32 ETH (or some other threshold) +* [ ] Add penalties for deposits below 32 ETH (or some other threshold) * [ ] Add a `SpecialRecord` to (re)register -* [ ] Rework the document for readability -* [ ] Clearly document the various edge cases, e.g. with committee sizing # Appendix ## Appendix A - Hash function From 7945ce58d593bcdd9d1ae8a2f20eed931471f923 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Tue, 16 Oct 2018 16:22:05 -0500 Subject: [PATCH 02/14] update recently_changed flag comment --- specs/beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 4d0b2ebed..f07cfda45 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -243,7 +243,7 @@ A `CrosslinkRecord` has the following fields: ```python { - # Flag indicating a recent validator set change + # Flag indicating if crosslink was updated since most recent validator change 'recently_changed': 'bool', # Slot number 'slot': 'int64', From bb76b05f7d781fe5a4d90833c34b0700eff7851f Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Wed, 17 Oct 2018 12:52:48 -0500 Subject: [PATCH 03/14] fix merge conflicts --- specs/beacon-chain.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 48c4511bf..cc4e0b57a 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -100,13 +100,8 @@ A `BeaconBlock` has the following fields: 'randao_reveal': 'hash32', # Recent PoW chain reference (block hash) 'pow_chain_reference': 'hash32', -<<<<<<< HEAD - # Skip list of previous block hashes - # i'th item is the most recent ancestor whose slot is a multiple of 2**i for i = 0, ..., 31 -======= # Skip list of previous beacon block hashes - # i'th item is the most recent ancestor who's slot is a multiple of 2**i for i = 0, ..., 31 ->>>>>>> master + # i'th item is the most recent ancestor whose slot is a multiple of 2**i for i = 0, ..., 31 'ancestor_hashes': ['hash32'], # Active state root 'active_state_root': 'hash32', @@ -307,17 +302,10 @@ Here's an example of its working (green is finalized blocks, yellow is justified We now define the state transition function. At the high level, the state transition is made up of two parts: -<<<<<<< HEAD 1. The per-block processing, which happens every block, and affects the `ActiveState` only. 2. The crystallized state recalculation, which happens only if `block.slot >= last_state_recalculation_slot + CYCLE_LENGTH`, and affects the `CrystallizedState` and `ActiveState`. -The crystallized state recalculation generally focuses on changes to the validator set, including adjusting balances and adding and removing validators, as well as processing crosslinks and managing block justification, and the per-block processing generally focuses on verifying aggregate signatures and saving temporary records relating to the in-block activity in the `ActiveState`. -======= -1. The per-block processing, which happens every block, and affects the `ActiveState` only -2. The crystallized state recalculation, which happens only if `block.slot >= last_state_recalculation_slot + CYCLE_LENGTH`, and affects the `CrystallizedState` and `ActiveState` - The crystallized state recalculation generally focuses on changes to the validator set, including adjusting balances and adding and removing validators, as well as processing crosslinks and managing block justification/finalization, and the per-block processing generally focuses on verifying aggregate signatures and saving temporary records relating to the in-block activity in the `ActiveState`. ->>>>>>> master ### Helper functions From 17fd4c766935116b40d8fca505b5b93cd7c281d2 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Wed, 17 Oct 2018 19:00:45 -0700 Subject: [PATCH 04/14] add code representation of utility function described in text for style consistency --- specs/beacon-chain.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index c22b71a24..3e81bc8b2 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -550,7 +550,19 @@ The `CrystallizedState()` and `ActiveState()` constructors should initialize all ### Routine for adding a validator -This routine should be run for every validator that is inducted as part of a log created on the PoW chain [TODO: explain where to check for these logs]. These logs should be processed in the order in which they are emitted by the PoW chain. Define `min_empty_validator(validators)` as a function that returns the lowest validator index `i` such that `validators[i].status == WITHDRAWN`, otherwise `None`. +This routine should be run for every validator that is inducted as part of a log created on the PoW chain [TODO: explain where to check for these logs]. These logs should be processed in the order in which they are emitted by the PoW chain. + +First, a helper function: + +```python +def min_empty_validator(validators: List[ValidatorRecord]): + for i, v in enumerate(validators): + if v.status == WITHDRAWN: + return i + return None +``` + +Now, to add a validator: ```python def add_validator(validators: List[ValidatorRecord], From bfe4caa379883be7a9064b61da5294b54597e176 Mon Sep 17 00:00:00 2001 From: Yutaro Mori Date: Sat, 20 Oct 2018 17:07:45 +0900 Subject: [PATCH 05/14] minor typo --- specs/beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 3e81bc8b2..1495419e3 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -682,7 +682,7 @@ For every `(shard, shard_block_hash)` tuple: * Let `total_balance_attesting_to_h` be the total balance of validators that attested to the shard block with hash `shard_block_hash`. * Let `total_committee_balance` be the total balance in the committee of validators that could have attested to the shard block with hash `shard_block_hash`. -* If `3 * total_balance_attesting_to_h >= 2 * total_committee_balance` and `recently_changed is False`, set `crosslinks[shard] = CrosslinkRecord(recently_changed=True, slot=block.last_state_recalculation_slot + CYCLE_LENGTH, hash=shard_block_hash)`. +* If `3 * total_balance_attesting_to_h >= 2 * total_committee_balance` and `recently_changed is False`, set `crosslinks[shard] = CrosslinkRecord(recently_changed=True, slot=last_state_recalculation_slot + CYCLE_LENGTH, hash=shard_block_hash)`. #### Balance recalculations related to FFG rewards From 40d0076b27411dfe71fe0548db6f433a1e11ae1e Mon Sep 17 00:00:00 2001 From: terence tsao Date: Mon, 22 Oct 2018 13:11:54 -0700 Subject: [PATCH 06/14] clean up possible rework/additions --- specs/beacon-chain.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 1495419e3..9cbc7aa51 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -837,7 +837,6 @@ Note: This spec is ~60% complete. * [ ] Reduce the slot duration to 8 seconds * [ ] Allow for the delayed inclusion of aggregated signatures * [ ] Use a separate networking-optimised serialisation format for networking -* [ ] Harden RANDAO against orphaned reveals * [ ] Introduce a RANDAO slashing condition for early leakage * [ ] Use a separate hash function for the proof of possession * [ ] Rework the `ShardAndCommittee` data structures From 203eeba2b6ef48fb2f5225fa3fffa7265028418b Mon Sep 17 00:00:00 2001 From: terence tsao Date: Wed, 24 Oct 2018 09:04:40 -0700 Subject: [PATCH 07/14] update change_validator --- specs/beacon-chain.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 9cbc7aa51..82a04a423 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -503,7 +503,8 @@ def on_startup(initial_validator_entries: List[Any]) -> Tuple[CrystallizedState, withdrawal_shard=withdrawal_shard, withdrawal_address=withdrawal_address, randao_commitment=randao_commitment, - current_slot=0 + current_slot=0, + status=ACTIVE, ) # Setup crystallized state x = get_new_shuffling(bytes([0] * 32), validators, 0) @@ -550,7 +551,7 @@ The `CrystallizedState()` and `ActiveState()` constructors should initialize all ### Routine for adding a validator -This routine should be run for every validator that is inducted as part of a log created on the PoW chain [TODO: explain where to check for these logs]. These logs should be processed in the order in which they are emitted by the PoW chain. +This routine should be run for every validator that is inducted as part of a log created on the PoW chain [TODO: explain where to check for these logs]. The status of the validators will be PENDING_ACTIVE. These logs should be processed in the order in which they are emitted by the PoW chain. First, a helper function: @@ -571,6 +572,7 @@ def add_validator(validators: List[ValidatorRecord], withdrawal_shard: int, withdrawal_address: Address, randao_commitment: Hash32, + status: uint8, current_slot: int) -> int: # if following assert fails, validator induction failed # move on to next validator registration log @@ -584,7 +586,7 @@ def add_validator(validators: List[ValidatorRecord], randao_commitment=randao_commitment, randao_last_change=current_slot, balance=DEPOSIT_SIZE * GWEI_PER_ETH, # in Gwei - status=PENDING_ACTIVATION, + status=status, exit_slot=0 ) index = min_empty_validator(validators) From 9064cfaddbb481a6756608cffdf45f89442385d0 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Wed, 24 Oct 2018 10:14:24 -0700 Subject: [PATCH 08/14] use int for type hints --- specs/beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 82a04a423..855b6b651 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -572,7 +572,7 @@ def add_validator(validators: List[ValidatorRecord], withdrawal_shard: int, withdrawal_address: Address, randao_commitment: Hash32, - status: uint8, + status: int, current_slot: int) -> int: # if following assert fails, validator induction failed # move on to next validator registration log From e3931f1e725c3fca342ad2cad5fa6e49fc75dfad Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Thu, 25 Oct 2018 09:43:47 +0200 Subject: [PATCH 09/14] minor type/clarification in adding validator --- specs/beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 855b6b651..6de5b40f2 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -551,7 +551,7 @@ The `CrystallizedState()` and `ActiveState()` constructors should initialize all ### Routine for adding a validator -This routine should be run for every validator that is inducted as part of a log created on the PoW chain [TODO: explain where to check for these logs]. The status of the validators will be PENDING_ACTIVE. These logs should be processed in the order in which they are emitted by the PoW chain. +This routine should be run for every validator that is inducted as part of a log created on the PoW chain [TODO: explain where to check for these logs]. The status of the validators added after genesis is `PENDING_ACTIVATION`. These logs should be processed in the order in which they are emitted by the PoW chain. First, a helper function: From ff81a3032fa5422e2f47393b8cc3f0e8638e019f Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Thu, 25 Oct 2018 15:51:24 +0200 Subject: [PATCH 10/14] fix small error in comment --- specs/beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 6de5b40f2..6c967a8e4 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -146,7 +146,7 @@ An `AttestationSignedData` has the following fields: 'slot': 'uint64', # Shard number 'shard': 'uint16', - # 31 parent hashes + # CYCLE_LENGTH parent hashes 'parent_hashes': ['hash32'], # Shard block hash 'shard_block_hash': 'hash32', From 0064043e141efa39471a011c49aa3614a753012e Mon Sep 17 00:00:00 2001 From: mratsim Date: Sat, 27 Oct 2018 13:36:10 +0200 Subject: [PATCH 11/14] Mention that lists are of elements of homegeneous type --- specs/simple-serialize.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specs/simple-serialize.md b/specs/simple-serialize.md index be58a68dd..f508e8298 100644 --- a/specs/simple-serialize.md +++ b/specs/simple-serialize.md @@ -186,6 +186,8 @@ return byte_length + value #### List/Vectors +Lists are a collection of elements of the same homogeneous type. + | Check to perform | Code | |:--------------------------------------------|:----------------------------| | Length of serialized list fits into 4 bytes | ``len(serialized) < 2**32`` | @@ -327,7 +329,7 @@ return rawbytes[bytes_start:bytes_end], new_index #### List/Vectors -Deserialize each object in the list. +Deserialize each element in the list. 1. Get the length of the serialized list. 2. Loop through deserializing each item in the list until you reach the entire length of the list. From 9cf4f0c86e0d2471ae864bd7c3c7d51f3d04536a Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Sun, 4 Nov 2018 19:15:17 +0300 Subject: [PATCH 12/14] remove unused variable --- specs/beacon-chain.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 6c967a8e4..a3fa31a91 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -404,7 +404,6 @@ def get_new_shuffling(seed: Hash32, validators: List[ValidatorRecord], crosslinking_start_shard: int) -> List[List[ShardAndCommittee]]: active_validators = get_active_validator_indices(validators) - active_validators_size = len(active_validators) committees_per_slot = clamp( 1, From 83c624d0e8af7276c4310b6bcf32ed135db1ac6a Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Sun, 4 Nov 2018 23:26:24 +0100 Subject: [PATCH 13/14] add back in get_active_validator_indices --- specs/beacon-chain.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 676ea0600..fb1c12491 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -311,7 +311,10 @@ The crystallized state recalculation generally focuses on changes to the validat Below are various helper functions. -First a function that shuffles the validator list: +def get_active_validator_indices(validators) + return [i for i, v in enumerate(validators) if v.status == ACTIVE] + +The following is a function that shuffles the validator list: ```python def shuffle(values: List[Any], @@ -399,7 +402,7 @@ Now, our combined helper method: def get_new_shuffling(seed: Hash32, validators: List[ValidatorRecord], crosslinking_start_shard: int) -> List[List[ShardAndCommittee]]: - active_validators = [i for i, v in enumerate(validators) if v.status == ACTIVE] + active_validators = get_active_validator_indices(validators) active_validators_size = len(active_validators) committees_per_slot = clamp( @@ -747,7 +750,7 @@ Then, run the following algorithm to update the validator set: ```python def change_validators(validators: List[ValidatorRecord]) -> None: # The active validator set - active_validators = [i for i, v in enumerate(validators) if v.status == ACTIVE] + active_validators = get_active_validator_indices(validators) # The total balance of active validators total_balance = sum([v.balance for i, v in enumerate(validators) if i in active_validators]) # The maximum total wei that can deposit+withdraw From d44eb8ecccb7383da2d18a073c29ff64eade626b Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Sun, 4 Nov 2018 23:27:08 +0100 Subject: [PATCH 14/14] remove unnecessary comment --- specs/beacon-chain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index fb1c12491..5ff485dc1 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -583,7 +583,7 @@ def add_validator(validators: List[ValidatorRecord], withdrawal_address=withdrawal_address, randao_commitment=randao_commitment, randao_last_change=current_slot, - balance=DEPOSIT_SIZE * GWEI_PER_ETH, # in Gwei + balance=DEPOSIT_SIZE * GWEI_PER_ETH, status=status, exit_slot=0 )