mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-16 12:36:25 +00:00
Update specs/core/0_beacon-chain.md
Co-Authored-By: vbuterin <v@buterin.com>
This commit is contained in:
parent
37b41a2ce6
commit
4ec721f3b7
@ -697,6 +697,13 @@ def get_active_validator_indices(validators: List[Validator], epoch: EpochNumber
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
def shuffle(values: List[Any], seed: Bytes32) -> List[Any]:
|
def shuffle(values: List[Any], seed: Bytes32) -> List[Any]:
|
||||||
|
"""
|
||||||
|
Return the shuffled ``values`` with ``seed`` as entropy.
|
||||||
|
|
||||||
|
Utilizes 'swap or not' shuffling found in
|
||||||
|
https://link.springer.com/content/pdf/10.1007%2F978-3-642-32009-5_1.pdf
|
||||||
|
See the 'generalized domain' algorithm on page 3.
|
||||||
|
"""
|
||||||
indices = list(range(len(values)))
|
indices = list(range(len(values)))
|
||||||
for round in range(90):
|
for round in range(90):
|
||||||
hashvalues = b''.join([
|
hashvalues = b''.join([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user