Skip to content
Snippets Groups Projects
Commit 93b25ae4 authored by Blair Vanderlugt's avatar Blair Vanderlugt
Browse files

bloxberg setup

parent 5e6cc7bf
No related branches found
No related tags found
1 merge request!4Bvander/dev node
FROM parity/parity:v2.5.13-stable
# root user for installing os dep's and setting file permissions
# RUN apt-get update && sudo apt-get -y install sed
USER root
WORKDIR /root
# ARG BASE_PATH=root/.local/share/io.parity.ethereum/
ARG KEY_PATH=/root/keys/
# mount a key volume locally if you want to persist keys between runs
# to generate new account + keys run:
#
RUN mkdir -p $KEY_PATH
COPY ./validator/bloxberg.json \
./validator/bootnodes.txt \
./validator/validator.pwd \
./validator/validator.toml \
/root/
# RUN chown -R parity:parity $HOME/ && \
# chmod -R 775 $HOME/ && \
# chmod g+s $HOME/
# USER parity
ENTRYPOINT [ "parity" ]
CMD [ "--config", "/root/validator.toml", "--keys-path", "/root/keys/" ]
\ No newline at end of file
# Refactored bloxberg node
The original bloxberg node config was kind of annoying so I am running it more like vanilla parity. This way you can pass command flags directly to parity.
## Make some keys
```
docker build -t bloxie . && docker run -v ${PWD}/keys:/root/keys -it -t bloxie account new --chain /root/bloxberg.json --keys-path /root/keys
```
## Enter the signer address and passwords in the config files
validator.toml
```
[mining]
#CHANGE ENGINE SIGNER TO VALIDATOR ADDRESS
engine_signer = "0x0a7cac94bcd82ced7cd67651246dcb6a47553d53" <---- address goes here
reseal_on_txs = "none"
force_sealing = true
min_gas_price = 1000000
gas_floor_target = "10000000"
```
validator.pwd <--- put your password in here or leave it blank if you didn't enter a password.
## Run it!
Mount the keys folder on your host if you want to preserve the keys between runs...
```
docker run -v ${PWD}/keys:/root/keys -it -t bloxie
```
---
# bloxbergValidatorSetup # bloxbergValidatorSetup
This is a Docker image for running a validator node on the bloxberg blockchain. This is a Docker image for running a validator node on the bloxberg blockchain.
......
{"id":"42d043fe-e00f-b1dd-24ac-6d0267a8a3e4","version":3,"crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"d763d18eb30c41b0a7b114b25ca20e30"},"ciphertext":"e8e123af38c0a6ed550d28da7b891518d6cc1c4d3ea506a9ca01a1c112b04d85","kdf":"pbkdf2","kdfparams":{"c":10240,"dklen":32,"prf":"hmac-sha256","salt":"27ae31da08e2d9ddebd4925fb5eabd7e836bc1b4f7f854b1eaf81cb796bde937"},"mac":"c2ed4e8f0666046b0b9b21cdb5da210dceecf6e87a6511b8419fba42f660fb22"},"address":"45736b3dd94eed55c15c9a3dfc08d58d1a377ce2","name":"","meta":"{}"}
\ No newline at end of file
{"id":"895ee4e1-9409-9e15-9036-fca117b2dc08","version":3,"crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"cf816c682310af30188f5dc05ffccdaa"},"ciphertext":"a4fe7aa40356269fce927038c3d5e3c823db4a7b7b0cb9c74f4a26c40bbc0833","kdf":"pbkdf2","kdfparams":{"c":10240,"dklen":32,"prf":"hmac-sha256","salt":"0f587a272569e3e401bb5f3a61984ae04e0c2338b2d0b72b2ac0b70a37761105"},"mac":"55a4327d58af8596ca2d9b95f6eacf05e270b2ad826e8fad337c6f8136ff579e"},"address":"b6d962c950b03a94eb91ad8408743538d0fbf5f3","name":"","meta":"{}"}
\ No newline at end of file
{}
\ No newline at end of file
FROM parity/parity:v2.5.13-stable
USER root
ADD start.sh validator.tpl /
RUN apt-get update
RUN apt-get -y install sed
#!/bin/bash
keypairs=(/home/parity/.local/share/io.parity.ethereum/bloxbergData/keys/Bloxberg/UTC*)
if [[ -z "${NAT_IP}" ]]
then
NAT_IP_STRING=""
else
NAT_IP_STRING="extip:${NAT_IP}"
fi
if [ -f "/engine_signer" ]
then
ENGINE_SIGNER=`cat /engine_signer`
fi
if [ -e ${keypairs[0]} ]
then
echo "Keypair is present, skipping account generation"
if [[ -z ${AUTH_ADDRESS} ]]
then
KEYPAIR_FILE=`ls -1tr /home/parity/.local/share/io.parity.ethereum/bloxbergData/keys/Bloxberg/UTC* | head -1`
ENGINE_SIGNER='0x'`cat ${KEYPAIR_FILE} | awk -F 'address":"' '{print $2}' | awk -F '"' '{print $1}'`
else
ENGINE_SIGNER='0x'${AUTH_ADDRESS}
fi
else
ENGINE_SIGNER=`parity --config /home/parity/.local/share/io.parity.ethereum/validator.toml account new 2>&1 | grep 0x`
echo "Generated keypair: ${ENGINE_SIGNER}"
echo ${ENGINE_SIGNER} > /engine_signer
fi
cat /validator.tpl | sed s/"__ENGINE_SIGNER__"/${ENGINE_SIGNER}/ | sed s/"__NAT_IP__"/${NAT_IP_STRING}/ > /home/parity/.local/share/io.parity.ethereum/validator.toml
echo "Using Authority Address: ${ENGINE_SIGNER}"
parity --config /home/parity/.local/share/io.parity.ethereum/validator.toml
#parity --config dev --jsonrpc-interface=0.0.0.0 --jsonrpc-apis=all --ws-interface=0.0.0.0 --ws-apis=all --network-id 8996 --identity gedev
# File validator.toml
[parity]
chain = "/home/parity/.local/share/io.parity.ethereum/bloxberg.json"
base_path = "/home/parity/.local/share/io.parity.ethereum/bloxbergData"
auto_update = "all"
[network]
port = 30303
reserved_peers = "/home/parity/.local/share/io.parity.ethereum/bootnodes.txt"
nat = "__NAT_IP__"
discovery = false
[rpc]
port = 8545
apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"]
interface = "0.0.0.0"
[websockets]
disable = false
port = 8546
interface = "0.0.0.0"
#apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts", "eth_pubsub"]
apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"]
origins = ["*"]
[account]
password = ["/home/parity/.local/share/io.parity.ethereum/validator.pwd"]
[mining]
#CHANGE ENGINE SIGNER TO VALIDATOR ADDRESS
engine_signer = "__ENGINE_SIGNER__"
reseal_on_txs = "none"
force_sealing = true
min_gas_price = 1000000
gas_floor_target = "10000000"
[footprint]
tracing = "off"
[misc]
log_file = "/home/parity/.local/share/io.parity.ethereum/bloxberg.log"
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"maximumUncleCount": 0, "maximumUncleCount": 0,
"stepDuration": "5", "stepDuration": "5",
"validators" : { "validators" : {
"list": ["0x659adb561397cbbc600fdfca3f9f6816fd1935ef"] "list": ["0xaa4c46071f95ef418ec939d67a2d62e2afd016a9"]
} }
} }
} }
......
*INSERT PASSWORD FOR BOOTNODE HERE*
# File validator.toml
[parity] [parity]
chain = "/home/parity/.local/share/io.parity.ethereum/bloxberg.json" chain = "/root/bloxberg.json"
base_path = "/home/parity/.local/share/io.parity.ethereum/bloxbergData"
auto_update = "all" auto_update = "all"
[network] [network]
port = 30303 port = 30303
reserved_peers = "/home/parity/.local/share/io.parity.ethereum/bootnodes.txt" reserved_peers = "/root/bootnodes.txt"
nat = "any" nat = "any"
discovery = false discovery = false
[rpc] [rpc]
port = 8545 port = 8545
apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"] apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"]
interface = "*" interface = "all"
[websockets] [websockets]
disable = false disable = false
port = 8546 port = 8546
interface = "*" interface = "all"
origins = ["none"] origins = ["none"]
[account] [account]
password = ["/home/parity/.local/share/io.parity.ethereum/validator.pwd"] password = ["/root/validator.pwd"]
[mining] [mining]
#CHANGE ENGINE SIGNER TO VALIDATOR ADDRESS #CHANGE ENGINE SIGNER TO VALIDATOR ADDRESS
engine_signer = "0x659adb561397cbbc600fdfca3f9f6816fd1935ef" engine_signer = "0x45736b3dd94eed55c15c9a3dfc08d58d1a377ce2"
reseal_on_txs = "none" reseal_on_txs = "none"
force_sealing = true force_sealing = true
min_gas_price = 1000000 min_gas_price = 1000000
...@@ -35,6 +32,3 @@ gas_floor_target = "10000000" ...@@ -35,6 +32,3 @@ gas_floor_target = "10000000"
[footprint] [footprint]
tracing = "off" tracing = "off"
[misc]
log_file = "/home/parity/.local/share/io.parity.ethereum/bloxberg.log"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment