mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-18 17:37:33 +00:00
Faster keystore generation in the local sim
This commit is contained in:
parent
0f758c5f02
commit
46fc5716a4
@ -1272,7 +1272,8 @@ proc generateDistirbutedStore*(rng: var HmacDrbgContext,
|
|||||||
shareValidatorDir: string,
|
shareValidatorDir: string,
|
||||||
remoteValidatorDir: string,
|
remoteValidatorDir: string,
|
||||||
remoteSignersUrls: seq[string],
|
remoteSignersUrls: seq[string],
|
||||||
threshold: uint32): Result[void, KeystoreGenerationError] =
|
threshold: uint32,
|
||||||
|
mode = KeystoreMode.Secure): Result[void, KeystoreGenerationError] =
|
||||||
var signers: seq[RemoteSignerInfo]
|
var signers: seq[RemoteSignerInfo]
|
||||||
for idx, share in shares:
|
for idx, share in shares:
|
||||||
var password = KeystorePass.init ncrutils.toHex(rng.generateBytes(32))
|
var password = KeystorePass.init ncrutils.toHex(rng.generateBytes(32))
|
||||||
@ -1284,7 +1285,7 @@ proc generateDistirbutedStore*(rng: var HmacDrbgContext,
|
|||||||
share.key, share.key.toPubKey,
|
share.key, share.key.toPubKey,
|
||||||
makeKeyPath(validatorIdx, signingKeyKind),
|
makeKeyPath(validatorIdx, signingKeyKind),
|
||||||
password.str,
|
password.str,
|
||||||
KeystoreMode.Secure)
|
mode)
|
||||||
|
|
||||||
signers.add RemoteSignerInfo(
|
signers.add RemoteSignerInfo(
|
||||||
url: HttpHostUri(parseUri(remoteSignersUrls[idx])),
|
url: HttpHostUri(parseUri(remoteSignersUrls[idx])),
|
||||||
@ -1409,7 +1410,8 @@ proc generateDeposits*(cfg: RuntimeConfig,
|
|||||||
validatorsDir & "_shares",
|
validatorsDir & "_shares",
|
||||||
validatorsDir,
|
validatorsDir,
|
||||||
remoteSignersUrls,
|
remoteSignersUrls,
|
||||||
threshold)
|
threshold,
|
||||||
|
mode)
|
||||||
|
|
||||||
deposits.add prepareDeposit(
|
deposits.add prepareDeposit(
|
||||||
cfg, withdrawalPubKey, derivedKey, signingPubKey)
|
cfg, withdrawalPubKey, derivedKey, signingPubKey)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user