Compare commits

...

7 Commits

Author SHA1 Message Date
nolash
bd672589e8 Merge remote-tracking branch 'origin/master' into lash/sovereign-import 2021-03-31 13:01:43 +02:00
nolash
51a4e75513
Update cluster dep specs 2021-03-31 12:59:59 +02:00
nolash
bffbea49c3
Remove commented code 2021-03-31 12:58:19 +02:00
nolash
5769b9f9ac
Update readme with sovereign script info 2021-03-31 12:55:52 +02:00
nolash
fe75d72ce6
Complete sovereign import script 2021-03-31 12:46:58 +02:00
nolash
9c750e7072
Upgrade faucet 2021-03-31 11:26:14 +02:00
nolash
39646d7948
WIP Add sovereign import script 2021-03-31 10:51:49 +02:00
2 changed files with 18 additions and 4 deletions

View File

@ -21,9 +21,13 @@ Make sure the following is running in the cluster:
* eth
* postgres
* redis
* cic-meta-server
If using the _custodial_ alternative for user imports, also run:
* cic-eth-tasker
* cic-eth-dispatcher
* cic-eth-manager-head
* cic-eth-tracker
You will want to run these in sequence:
@ -47,12 +51,25 @@ This will monitor new mined blocks and send balances to the newly created accoun
### 3. Users
Only use **one** of the following
#### Custodial
This alternative generates accounts using the `cic-eth` custodial engine
Without any modifications to the cluster and config files:
`python import_users.py -c config --redis-host-callback redis <datadir>`
** A note on the The callback**: The script uses a redis callback to retrieve the newly generated custodial address. This is the redis server _from the perspective of the cic-eth component_.
#### Sovereign
This alternative generates keystore files, while registering corresponding addresses in the accounts registry directly
`python import_sovereign_users.py -c config -i <newchain:id> -r <cic_registry_address> -p <eth_provider> -y ../keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c <datadir>`
A `keystore` sub-directory in the data path is created, with ethereum keystore files for all generated private keys. Passphrase is set to empty string for all of them.
## VERIFY

View File

@ -105,7 +105,6 @@ def register_eth(i, u):
(tx_hash_hex, o) = c.add(account_registry_address, signer_address, address)
logg.debug('o {}'.format(o))
rpc.do(o)
#r = rpc.wait(tx_hash_hex)
pk = keystore.get(address)
keyfile_content = to_keyfile_dict(pk, '')
@ -165,8 +164,6 @@ if __name__ == '__main__':
f.write(json.dumps(o))
f.close()
#old_address = to_checksum_address(add_0x(y[:len(y)-5]))
#fi.write('{},{}\n'.format(new_address, old_address))
meta_key = generate_metadata_pointer(bytes.fromhex(new_address_clean), 'cic.person')
meta_filepath = os.path.join(meta_dir, '{}.json'.format(new_address_clean.upper()))
os.symlink(os.path.realpath(filepath), meta_filepath)