From 46fc5716a44d24fc7c1cee526b8293b05879e2fc Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Fri, 13 Jan 2023 12:31:39 +0200 Subject: [PATCH] Faster keystore generation in the local sim --- beacon_chain/validators/keystore_management.nim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/beacon_chain/validators/keystore_management.nim b/beacon_chain/validators/keystore_management.nim index 07feb5769..86527d19c 100644 --- a/beacon_chain/validators/keystore_management.nim +++ b/beacon_chain/validators/keystore_management.nim @@ -1272,7 +1272,8 @@ proc generateDistirbutedStore*(rng: var HmacDrbgContext, shareValidatorDir: string, remoteValidatorDir: string, remoteSignersUrls: seq[string], - threshold: uint32): Result[void, KeystoreGenerationError] = + threshold: uint32, + mode = KeystoreMode.Secure): Result[void, KeystoreGenerationError] = var signers: seq[RemoteSignerInfo] for idx, share in shares: var password = KeystorePass.init ncrutils.toHex(rng.generateBytes(32)) @@ -1284,7 +1285,7 @@ proc generateDistirbutedStore*(rng: var HmacDrbgContext, share.key, share.key.toPubKey, makeKeyPath(validatorIdx, signingKeyKind), password.str, - KeystoreMode.Secure) + mode) signers.add RemoteSignerInfo( url: HttpHostUri(parseUri(remoteSignersUrls[idx])), @@ -1409,7 +1410,8 @@ proc generateDeposits*(cfg: RuntimeConfig, validatorsDir & "_shares", validatorsDir, remoteSignersUrls, - threshold) + threshold, + mode) deposits.add prepareDeposit( cfg, withdrawalPubKey, derivedKey, signingPubKey)