fix: load both deployer and authority priv keys into docker-compose's geth
MODIFY
docker-compose.yml
docker-compose.yml
@@ -33,9 +33,9 @@ services:
- "8000"
environment:
# DEPLOYER_PRIVATEKEY is the geth dev account initially funded address
- - DEPLOYER_PRIVATEKEY=d885a307e35738f773d8c9c63c7a3f3977819274638d04aaf934a1e1158513ce
- - MAINTAINER_PRIVATEKEY=6f30f140fd4724519e5017c0895f158d68bbbe4a81c0c10dbb25a0006e348807
- - AUTHORITY_PRIVATEKEY=7f30f140fd4724519e5017c0895f158d68bbbe4a81c0c10dbb25a0006e348807
+ - DEPLOYER_PRIVATEKEY=d885a307e35738f773d8c9c63c7a3f3977819274638d04aaf934a1e1158513ce # 0x6de4b3b9c28e9c3e84c2b2d3a875c947a84de68d
+ - MAINTAINER_PRIVATEKEY=6f30f140fd4724519e5017c0895f158d68bbbe4a81c0c10dbb25a0006e348807 # 0x59695413678e19d7d490893810a8ac9fe6cb0f5c
+ - AUTHORITY_PRIVATEKEY=7f30f140fd4724519e5017c0895f158d68bbbe4a81c0c10dbb25a0006e348807 # 0xc0f780dfc35075979b0def588d999225b7ecc56f
- REMOTE_URL=http://geth:8545
- MIN_EXIT_PERIOD=20
depends_on:
@@ -56,11 +56,23 @@ services:
- -c
- |
apk add --update curl
- # Add account to geth dev
+ # Configures geth with the deployer and authority accounts. This includes:
+ # 1. Configuring the deployer's keystore
+ # 2. Configuring the authority's keystore
+ # 3. Configuring the keystores' password
+ # 4. Unlocking the accounts by their indexes
mkdir -p /tmp/geth-dev
echo '{"address":"6de4b3b9c28e9c3e84c2b2d3a875c947a84de68d","crypto":{"cipher":"aes-128-ctr","ciphertext":"1adf32e70f22f7e775255b4e6aa0bb0b9338402f8ee2470b6c2ffce9d7d54918","cipherparams":{"iv":"38103d2e38263399e79884f8448172b0"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"eac5b9eee7c6cdf6557f9d84d02294801fd5d6ad67df6ec25a8fcb4dc0011e72"},"mac":"42bc14b9b00ef8387b46feb3f8599ffee82e50442b9d305ef7bfc0e9480566da"},"id":"8ba88812-cef4-44e7-888e-de40b8881120","version":3}' > /tmp/geth-dev/UTC--2019-10-29T05-54-49.573595611Z--6de4b3b9c28e9c3e84c2b2d3a875c947a84de68d
+ echo '{"address":"c0f780dfc35075979b0def588d999225b7ecc56f","crypto":{"cipher":"aes-128-ctr","ciphertext":"70af4aa4485c8bb750d6cc52800bf61eaef29e16460fb9b1dd3d225affc494d8","cipherparams":{"iv":"cdff3498ff1464bf4945642e80ed5187"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"80405b854cf1c1fa56557d060fc9075176463b47b75b535fce19840612d02b06"},"mac":"54bfa823a4bacb9c6a4cb95088fb72755cd0220e26adee4c356b22285d6a167f"},"id":"40c21866-79a2-46ce-990e-d2d77cf86bc3","version":3}' > /tmp/geth-dev/UTC--2019-11-06T08-20-13.587131000Z--c0f780dfc35075979b0def588d999225b7ecc56f
+ echo "" > /tmp/geth-blank-password
# Starts geth
- geth --miner.gastarget 7500000 --miner.gasprice "10" --dev --dev.period 1 --keystore=/tmp/geth-dev --rpc --rpcapi personal,web3,eth,net --rpcaddr 0.0.0.0 --rpcvhosts=* --rpcport=8545 --ws --wsaddr 0.0.0.0 --wsorigins='*'
+ geth --miner.gastarget 7500000 --miner.gasprice "10" \
+ --dev --dev.period 1 --keystore=/tmp/geth-dev \
+ --password /tmp/geth-blank-password \
+ --unlock "0,1" \
+ --miner.etherbase "0x6de4b3b9c28e9c3e84c2b2d3a875c947a84de68d" \
+ --rpc --rpcapi personal,web3,eth,net --rpcaddr 0.0.0.0 --rpcvhosts=* --rpcport=8545 \
+ --ws --wsaddr 0.0.0.0 --wsorigins='*'
ports:
- "8545:8545"
- "8546:8546"

fix: load both deployer and authority priv keys into docker-compose's geth (#1109)