From c9521952c58bfe2602a651e9bbfc36e891031df5 Mon Sep 17 00:00:00 2001 From: nolash Date: Thu, 8 Apr 2021 11:49:13 +0200 Subject: [PATCH] Set default password on keyfiles --- apps/contract-migration/scripts/README.md | 4 +++- apps/contract-migration/scripts/eth/import_users.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/contract-migration/scripts/README.md b/apps/contract-migration/scripts/README.md index 9bf25d00..bcea44be 100644 --- a/apps/contract-migration/scripts/README.md +++ b/apps/contract-migration/scripts/README.md @@ -132,7 +132,7 @@ To import, run to _completion_: `python eth/import_users.py -v -c config -p -r -y ../keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c ` -After the script completes, keystore files for all generated accouts will be found in `/keystore`, all with empty string as password. +After the script completes, keystore files for all generated accouts will be found in `/keystore`, all with `foo` as password (would set it empty, but believe it or not some interfaces won't work unless you have one). If you are transferring balances externally, then run: @@ -223,3 +223,5 @@ Should exit with code 0 if all input data is found in the respective services. - Sovereign import scripts use the same keystore, and running them simultaneously will mess up the transaction nonce sequence. Better would be to use two different keystore wallets so balance and users scripts can be run simultaneously. - `pycrypto` and `pycryptodome` _have to be installed in that order_. If you get errors concerning `Crypto.KDF` then uninstall both and re-install in that order. Make sure you use the versions listed in `requirements.txt`. `pycryptodome` is a legacy dependency and will be removed as soon as possible. + +- Sovereign import script is very slow because it's scrypt'ing keystore files. An improvement would be optional and/or asynchronous keyfile generation. diff --git a/apps/contract-migration/scripts/eth/import_users.py b/apps/contract-migration/scripts/eth/import_users.py index 563dcb8f..7a2baf92 100644 --- a/apps/contract-migration/scripts/eth/import_users.py +++ b/apps/contract-migration/scripts/eth/import_users.py @@ -116,7 +116,7 @@ def register_eth(i, u): rpc.do(o) pk = keystore.get(address) - keyfile_content = to_keyfile_dict(pk, '') + keyfile_content = to_keyfile_dict(pk, 'foo') keyfile_path = os.path.join(keyfile_dir, '{}.json'.format(address)) f = open(keyfile_path, 'w') json.dump(keyfile_content, f)