Skip to content

Commit

Permalink
In progress IBFT scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
arocha committed Dec 18, 2017
1 parent 9e7d44c commit 7123c55
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 17 deletions.
2 changes: 2 additions & 0 deletions data/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vanity = "0x00"
validators = ["0xb87dC349944CC47474775DDe627A8a171fC94532"]
39 changes: 24 additions & 15 deletions data/genesis.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
{
"alloc": {
"0x58b8527743f89389b754c63489262fdfc9ba9db6" : {"balance" : "1000000000000000000000000000"}
},
"coinbase": "0x0000000000000000000000000000000000000000",
"config": {
"homesteadBlock": 0
},
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x2FEFD800",
"mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
"nonce": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x00"
}
  "alloc": {
  "0x58b8527743f89389b754c63489262fdfc9ba9db6" : {"balance" : "1000000000000000000000000000"}
  },
  "coinbase": "0x0000000000000000000000000000000000000000",
  "config": {
  "homesteadBlock": 1,
  "eip150Block": 2,
  "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "eip155Block": 3,
  "eip158Block": 3,
  "istanbul": {
  "epoch": 30000,
  "policy": 0
  },
  "isQuorum": true
  },
  "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000f85ad5943c7694292b0327595500746b5f7707843a4a4a8cb8410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0",
  "gasLimit": "0x2FEFD800",
  "difficulty": "0x1",
  "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
  "nonce": "0x0",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp": "0x00"
}
15 changes: 13 additions & 2 deletions scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
set -u
set -e

MESSAGE="Usage: init CURRENT_HOST_IP | auto | backup"
if ( [ $# -ne 1 ] ); then
MESSAGE='Usage: init <mode> <node-type> <node-name>
mode: CURRENT_HOST_IP | auto | backup
node-type: validator | general
node-name: NODE_NAME (example: Alastria)'

if ( [ $# -ne 4 ] ); then
echo "$MESSAGE"
exit
fi

CURRENT_HOST_IP="$1"
NODE_NAME="$3"

if ( [ "auto" == "$1" -o "backup" == "$1" ]); then
echo "Autodiscovering public host IP ..."
Expand All @@ -31,6 +36,12 @@ if ( [ "backup" == "$1" ]); then
cp ~/alastria/data/geth/nodekey ~/alastria-keysBackup/data/geth/nodekey
fi

if ( [ "validator" == "$2" ]); then
echo "Selected node type validator..."
elif ( [ "general" == "$2" ]); then
echo "Selected node type validator..."
fi

PWD="$(pwd)"
CONSTELLATION_NODES=$(cat ../data/constellation-nodes.json)
STATIC_NODES=$(cat ../data/static-nodes.json)
Expand Down

0 comments on commit 7123c55

Please sign in to comment.