mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-02 09:46:26 +00:00
7ea51d5b0b
* spec updates * make several constants uint64 to help minimize casting * document data type woes - will have to revisit these * change comment style on fields and constants to make room for better comments * add BLSVerify and BLSAddPbkeys facades to insulate spec code from milagro * fix proof of possession type * drop explicitly ordered container fields from ssz - there's an issue open to sort this out before committing it to the spec
22 lines
799 B
Nim
22 lines
799 B
Nim
# beacon_chain
|
|
# Copyright (c) 2018 Status Research & Development GmbH
|
|
# Licensed and distributed under either of
|
|
# * MIT license (license terms in the root directory or at http://opensource.org/licenses/MIT).
|
|
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
import
|
|
milagro_crypto,
|
|
../beacon_chain/extras,
|
|
../beacon_chain/spec/[crypto, datatypes]
|
|
|
|
func makeValidatorPrivKey(n: int): ValidatorPrivKey =
|
|
result.x[0] = n
|
|
|
|
func makeInitialValidators*(n = EPOCH_LENGTH): seq[InitialValidator] =
|
|
for i in 0..<n.int:
|
|
let key = makeValidatorPrivKey(i)
|
|
result.add InitialValidator(
|
|
pubkey: key.fromSigKey()
|
|
)
|