Reorganize/refactor 7nodes example and update for latest Vagrant

This commit is contained in:
Patrick Mylund Nielsen
2018-02-08 16:50:13 -05:00
parent c50e97a362
commit 035ca6b281
20 changed files with 87 additions and 433 deletions

View File

@@ -10,7 +10,7 @@ The easiest way to get started with running the examples is to use the vagrant e
**Important note**: Any account/encryption keys contained in this repository are for
demonstration and testing purposes only. Before running a real environment, you should
generate new ones using Geth's `account` tool and `constellation-enclave-keygen`.
generate new ones using Geth's `account` tool and `constellation-node --generate-keys`.
## Vagrant Usage
@@ -20,7 +20,7 @@ Quorum examples.
### Requirements
1. Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
1. Install [Vagrant](https://www.vagrantup.com/downloads.html)
2. Install [Vagrant](https://www.vagrantup.com/downloads.html)
(If you are behind a proxy server, please see https://github.com/jpmorganchase/quorum/issues/23)
@@ -41,8 +41,6 @@ cd quorum-examples
exist, please run `sudo rm -r /opt/vagrant/embedded/bin/curl`. This is usually due to
issues with the version of curl bundled with Vagrant.)
To shut down the Vagrant instance, run `vagrant suspend`. To delete it, run
`vagrant destroy`. To start from scratch, run `vagrant up` after destroying the
instance.

View File

@@ -0,0 +1,28 @@
#!/bin/bash
set -u
set -e
for i in {1..7}
do
DDIR="qdata/c$i"
mkdir -p $DDIR
mkdir -p qdata/logs
cp "keys/tm$i.pub" "$DDIR/tm.pub"
cp "keys/tm$i.key" "$DDIR/tm.key"
rm -f "$DDIR/tm.ipc"
CMD="constellation-node --url=https://127.0.0.$i:900$i/ --port=900$i --workdir=$DDIR --socket=tm.ipc --publickeys=tm.pub --privatekeys=tm.key --othernodes=https://127.0.0.1:9001/"
echo "$CMD >> qdata/logs/constellation$i.log 2>&1 &"
$CMD >> "qdata/logs/constellation$i.log" 2>&1 &
done
DOWN=true
while $DOWN; do
sleep 0.1
DOWN=false
for i in {1..7}
do
if [ ! -S "qdata/c$i/tm.ipc" ]; then
DOWN=true
fi
done
done

View File

@@ -8,14 +8,16 @@ mkdir -p qdata/logs
echo "[*] Configuring node 1"
mkdir -p qdata/dd1/{keystore,geth}
cp raft/static-nodes.json qdata/dd1
cp permissioned-nodes.json qdata/dd1/static-nodes.json
cp permissioned-nodes.json qdata/dd1/
cp keys/key1 qdata/dd1/keystore
cp raft/nodekey1 qdata/dd1/geth/nodekey
geth --datadir qdata/dd1 init istanbul-genesis.json
echo "[*] Configuring node 2"
mkdir -p qdata/dd2/{keystore,geth}
cp raft/static-nodes.json qdata/dd2
cp permissioned-nodes.json qdata/dd2/static-nodes.json
cp permissioned-nodes.json qdata/dd2/
cp keys/key2 qdata/dd2/keystore
cp keys/key3 qdata/dd2/keystore
cp raft/nodekey2 qdata/dd2/geth/nodekey
@@ -23,32 +25,37 @@ geth --datadir qdata/dd2 init istanbul-genesis.json
echo "[*] Configuring node 3"
mkdir -p qdata/dd3/{keystore,geth}
cp raft/static-nodes.json qdata/dd3
cp permissioned-nodes.json qdata/dd3/static-nodes.json
cp permissioned-nodes.json qdata/dd3/
cp raft/nodekey3 qdata/dd3/geth/nodekey
geth --datadir qdata/dd3 init istanbul-genesis.json
echo "[*] Configuring node 4 as voter"
mkdir -p qdata/dd4/{keystore,geth}
cp raft/static-nodes.json qdata/dd4
cp permissioned-nodes.json qdata/dd4/static-nodes.json
cp permissioned-nodes.json qdata/dd4/
cp keys/key4 qdata/dd4/keystore
cp raft/nodekey4 qdata/dd4/geth/nodekey
geth --datadir qdata/dd4 init istanbul-genesis.json
echo "[*] Configuring node 5 as voter"
mkdir -p qdata/dd5/{keystore,geth}
cp raft/static-nodes.json qdata/dd5
cp permissioned-nodes.json qdata/dd5/static-nodes.json
cp permissioned-nodes.json qdata/dd5/
cp keys/key5 qdata/dd5/keystore
cp raft/nodekey5 qdata/dd5/geth/nodekey
geth --datadir qdata/dd5 init istanbul-genesis.json
echo "[*] Configuring node 6"
mkdir -p qdata/dd6/{keystore,geth}
cp raft/static-nodes.json qdata/dd6
cp permissioned-nodes.json qdata/dd6/static-nodes.json
cp permissioned-nodes.json qdata/dd6/
cp raft/nodekey6 qdata/dd6/geth/nodekey
geth --datadir qdata/dd6 init istanbul-genesis.json
echo "[*] Configuring node 7"
mkdir -p qdata/dd7/{keystore,geth}
cp raft/static-nodes.json qdata/dd7
cp permissioned-nodes.json qdata/dd7/static-nodes.json
cp permissioned-nodes.json qdata/dd7/
cp raft/nodekey7 qdata/dd7/geth/nodekey
geth --datadir qdata/dd7 init istanbul-genesis.json
geth --datadir qdata/dd7 init istanbul-genesis.json

View File

@@ -2,44 +2,22 @@
set -u
set -e
GLOBAL_ARGS="--syncmode full --mine --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,istanbul"
mkdir -p qdata/logs
echo "[*] Starting Constellation nodes"
nohup constellation-node tm1.conf 2>> qdata/logs/constellation1.log &
sleep 1
nohup constellation-node tm2.conf 2>> qdata/logs/constellation2.log &
nohup constellation-node tm3.conf 2>> qdata/logs/constellation3.log &
nohup constellation-node tm4.conf 2>> qdata/logs/constellation4.log &
nohup constellation-node tm5.conf 2>> qdata/logs/constellation5.log &
nohup constellation-node tm6.conf 2>> qdata/logs/constellation6.log &
nohup constellation-node tm7.conf 2>> qdata/logs/constellation7.log &
./constellation-start.sh
sleep 1
echo "[*] Starting Ethereum nodes"
set -v
ARGS="--syncmode full --mine --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,istanbul"
PRIVATE_CONFIG=qdata/c1/tm.ipc nohup geth --datadir qdata/dd1 $ARGS --rpcport 22000 --port 21000 --unlock 0 --password passwords.txt 2>>qdata/logs/1.log &
PRIVATE_CONFIG=qdata/c2/tm.ipc nohup geth --datadir qdata/dd2 $ARGS --rpcport 22001 --port 21001 2>>qdata/logs/2.log &
PRIVATE_CONFIG=qdata/c3/tm.ipc nohup geth --datadir qdata/dd3 $ARGS --rpcport 22002 --port 21002 2>>qdata/logs/3.log &
PRIVATE_CONFIG=qdata/c4/tm.ipc nohup geth --datadir qdata/dd4 $ARGS --rpcport 22003 --port 21003 2>>qdata/logs/4.log &
PRIVATE_CONFIG=qdata/c5/tm.ipc nohup geth --datadir qdata/dd5 $ARGS --rpcport 22004 --port 21004 2>>qdata/logs/5.log &
PRIVATE_CONFIG=qdata/c6/tm.ipc nohup geth --datadir qdata/dd6 $ARGS --rpcport 22005 --port 21005 2>>qdata/logs/6.log &
PRIVATE_CONFIG=qdata/c7/tm.ipc nohup geth --datadir qdata/dd7 $ARGS --rpcport 22006 --port 21006 2>>qdata/logs/7.log &
set +v
echo "[*] Starting node 1"
PRIVATE_CONFIG=tm1.conf nohup geth --datadir qdata/dd1 $GLOBAL_ARGS --rpcport 22000 --port 21000 --unlock 0 --password passwords.txt 2>>qdata/logs/1.log &
echo "[*] Starting node 2"
PRIVATE_CONFIG=tm2.conf nohup geth --datadir qdata/dd2 $GLOBAL_ARGS --rpcport 22001 --port 21001 2>>qdata/logs/2.log &
echo "[*] Starting node 3"
PRIVATE_CONFIG=tm3.conf nohup geth --datadir qdata/dd3 $GLOBAL_ARGS --rpcport 22002 --port 21002 2>>qdata/logs/3.log &
echo "[*] Starting node 4"
PRIVATE_CONFIG=tm4.conf nohup geth --datadir qdata/dd4 $GLOBAL_ARGS --rpcport 22003 --port 21003 2>>qdata/logs/4.log &
echo "[*] Starting node 5"
PRIVATE_CONFIG=tm5.conf nohup geth --datadir qdata/dd5 $GLOBAL_ARGS --rpcport 22004 --port 21004 2>>qdata/logs/5.log &
echo "[*] Starting node 6"
PRIVATE_CONFIG=tm6.conf nohup geth --datadir qdata/dd6 $GLOBAL_ARGS --rpcport 22005 --port 21005 2>>qdata/logs/6.log &
echo "[*] Starting node 7"
PRIVATE_CONFIG=tm7.conf nohup geth --datadir qdata/dd7 $GLOBAL_ARGS --rpcport 22006 --port 21006 2>>qdata/logs/7.log &
echo "[*] Waiting for nodes to start"
sleep 10
echo "[*] Sending first transaction"
PRIVATE_CONFIG=tm1.conf geth --exec 'loadScript("script1.js")' attach ipc:qdata/dd1/geth.ipc
echo "All nodes configured. See 'qdata/logs' for logs, and run e.g. 'geth attach qdata/dd1/geth.ipc' to attach to the first Geth node"
echo
echo "All nodes configured. See 'qdata/logs' for logs, and run e.g. 'geth attach qdata/dd1/geth.ipc' to attach to the first Geth node."
echo "To test sending a private transaction from Node 1 to Node 7, run './runscript script1.js'"

View File

@@ -2,44 +2,22 @@
set -u
set -e
GLOBAL_ARGS="--raft --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum --emitcheckpoints"
mkdir -p qdata/logs
echo "[*] Starting Constellation nodes"
nohup constellation-node tm1.conf 2>> qdata/logs/constellation1.log &
sleep 1
nohup constellation-node tm2.conf 2>> qdata/logs/constellation2.log &
nohup constellation-node tm3.conf 2>> qdata/logs/constellation3.log &
nohup constellation-node tm4.conf 2>> qdata/logs/constellation4.log &
nohup constellation-node tm5.conf 2>> qdata/logs/constellation5.log &
nohup constellation-node tm6.conf 2>> qdata/logs/constellation6.log &
nohup constellation-node tm7.conf 2>> qdata/logs/constellation7.log &
./constellation-start.sh
sleep 1
echo "[*] Starting Ethereum nodes"
set -v
ARGS="--raft --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum --emitcheckpoints"
PRIVATE_CONFIG=qdata/c1/tm.ipc nohup geth --datadir qdata/dd1 $ARGS --permissioned --raftport 50401 --rpcport 22000 --port 21000 --unlock 0 --password passwords.txt 2>>qdata/logs/1.log &
PRIVATE_CONFIG=qdata/c2/tm.ipc nohup geth --datadir qdata/dd2 $ARGS --permissioned --raftport 50402 --rpcport 22001 --port 21001 2>>qdata/logs/2.log &
PRIVATE_CONFIG=qdata/c3/tm.ipc nohup geth --datadir qdata/dd3 $ARGS --permissioned --raftport 50403 --rpcport 22002 --port 21002 2>>qdata/logs/3.log &
PRIVATE_CONFIG=qdata/c4/tm.ipc nohup geth --datadir qdata/dd4 $ARGS --permissioned --raftport 50404 --rpcport 22003 --port 21003 2>>qdata/logs/4.log &
PRIVATE_CONFIG=qdata/c5/tm.ipc nohup geth --datadir qdata/dd5 $ARGS --raftport 50405 --rpcport 22004 --port 21004 2>>qdata/logs/5.log &
PRIVATE_CONFIG=qdata/c6/tm.ipc nohup geth --datadir qdata/dd6 $ARGS --raftport 50406 --rpcport 22005 --port 21005 2>>qdata/logs/6.log &
PRIVATE_CONFIG=qdata/c7/tm.ipc nohup geth --datadir qdata/dd7 $ARGS --raftport 50407 --rpcport 22006 --port 21006 2>>qdata/logs/7.log &
set +v
echo "[*] Starting node 1 (permissioned)"
PRIVATE_CONFIG=tm1.conf nohup geth --datadir qdata/dd1 $GLOBAL_ARGS --permissioned --raftport 50401 --rpcport 22000 --port 21000 --unlock 0 --password passwords.txt 2>>qdata/logs/1.log &
echo "[*] Starting node 2 (permissioned)"
PRIVATE_CONFIG=tm2.conf nohup geth --datadir qdata/dd2 $GLOBAL_ARGS --permissioned --raftport 50402 --rpcport 22001 --port 21001 2>>qdata/logs/2.log &
echo "[*] Starting node 3 (permissioned)"
PRIVATE_CONFIG=tm3.conf nohup geth --datadir qdata/dd3 $GLOBAL_ARGS --permissioned --raftport 50403 --rpcport 22002 --port 21002 2>>qdata/logs/3.log &
echo "[*] Starting node 4 (permissioned)"
PRIVATE_CONFIG=tm4.conf nohup geth --datadir qdata/dd4 $GLOBAL_ARGS --permissioned --raftport 50404 --rpcport 22003 --port 21003 2>>qdata/logs/4.log &
echo "[*] Starting node 5 (unpermissioned)"
PRIVATE_CONFIG=tm5.conf nohup geth --datadir qdata/dd5 $GLOBAL_ARGS --raftport 50405 --rpcport 22004 --port 21004 2>>qdata/logs/5.log &
echo "[*] Starting node 6 (unpermissioned)"
PRIVATE_CONFIG=tm6.conf nohup geth --datadir qdata/dd6 $GLOBAL_ARGS --raftport 50406 --rpcport 22005 --port 21005 2>>qdata/logs/6.log &
echo "[*] Starting node 7 (unpermissioned)"
PRIVATE_CONFIG=tm7.conf nohup geth --datadir qdata/dd7 $GLOBAL_ARGS --raftport 50407 --rpcport 22006 --port 21006 2>>qdata/logs/7.log &
echo "[*] Waiting for nodes to start"
sleep 10
echo "[*] Sending first transaction"
PRIVATE_CONFIG=tm1.conf geth --exec 'loadScript("script1.js")' attach ipc:qdata/dd1/geth.ipc
echo "All nodes configured. See 'qdata/logs' for logs, and run e.g. 'geth attach qdata/dd1/geth.ipc' to attach to the first Geth node"
echo
echo "All nodes configured. See 'qdata/logs' for logs, and run e.g. 'geth attach qdata/dd1/geth.ipc' to attach to the first Geth node."
echo "To test sending a private transaction from Node 1 to Node 7, run './runscript script1.js'"

View File

@@ -1,2 +1,2 @@
#!/bin/bash
PRIVATE_CONFIG=tm1.conf geth --exec "loadScript(\"$1\")" attach ipc:qdata/dd1/geth.ipc
PRIVATE_CONFIG=qdata/c1/tm.ipc geth --exec "loadScript(\"$1\")" attach ipc:qdata/dd1/geth.ipc

View File

@@ -1,48 +0,0 @@
# Externally accessible URL for this node (this is what's advertised)
url = "http://127.0.0.1:9000/"
# Port to listen on for the public API
port = 9000
# Socket file to use for the private API / IPC
socket = "qdata/tm1.ipc"
# Initial (not necessarily complete) list of other nodes in the network.
# Constellation will automatically connect to other nodes not in this list
# that are advertised by the nodes below, thus these can be considered the
# "boot nodes."
othernodes = []
# The set of public keys this node will host
publickeys = ["keys/tm1.pub"]
# The corresponding set of private keys
privatekeys = ["keys/tm1.key"]
# Optional comma-separated list of paths to public keys to add as recipients
# for every transaction sent through this node, e.g. for backup purposes.
# These keys must be advertised by some Constellation node on the network, i.e.
# be in a node's publickeys/privatekeys lists.
# alwayssendto = []
# Optional file containing the passwords to unlock the given privatekeys
# (one password per line -- add an empty line if one key isn't locked.)
# passwords = "passwords"
# Where to store payloads and related information
storage = "dir:qdata/constellation1"
# Optional IP whitelist for the public API. If unspecified/empty,
# connections from all sources will be allowed (but the private API remains
# accessible only via the IPC socket above.) To allow connections from
# localhost when a whitelist is defined, e.g. when running multiple
# Constellation nodes on the same machine, add "127.0.0.1" and "::1" to
# this list.
# ipwhitelist = ["10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"]
# Verbosity level (each level includes all prior levels)
# - 0: Only fatal errors
# - 1: Warnings
# - 2: Informational messages
# - 3: Debug messages
verbosity = 2

View File

@@ -1,48 +0,0 @@
# Externally accessible URL for this node (this is what's advertised)
url = "http://127.0.0.1:9001/"
# Port to listen on for the public API
port = 9001
# Socket file to use for the private API / IPC
socket = "qdata/tm2.ipc"
# Initial (not necessarily complete) list of other nodes in the network.
# Constellation will automatically connect to other nodes not in this list
# that are advertised by the nodes below, thus these can be considered the
# "boot nodes."
othernodes = ["http://127.0.0.1:9000/"]
# The set of public keys this node will host
publickeys = ["keys/tm2.pub"]
# The corresponding set of private keys
privatekeys = ["keys/tm2.key"]
# Optional comma-separated list of paths to public keys to add as recipients
# for every transaction sent through this node, e.g. for backup purposes.
# These keys must be advertised by some Constellation node on the network, i.e.
# be in a node's publickeys/privatekeys lists.
# alwayssendto = []
# Optional file containing the passwords to unlock the given privatekeys
# (one password per line -- add an empty line if one key isn't locked.)
# passwords = "passwords"
# Where to store payloads and related information
storage = "dir:qdata/constellation2"
# Optional IP whitelist for the public API. If unspecified/empty,
# connections from all sources will be allowed (but the private API remains
# accessible only via the IPC socket above.) To allow connections from
# localhost when a whitelist is defined, e.g. when running multiple
# Constellation nodes on the same machine, add "127.0.0.1" and "::1" to
# this list.
# ipwhitelist = ["10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"]
# Verbosity level (each level includes all prior levels)
# - 0: Only fatal errors
# - 1: Warnings
# - 2: Informational messages
# - 3: Debug messages
verbosity = 2

View File

@@ -1,48 +0,0 @@
# Externally accessible URL for this node (this is what's advertised)
url = "http://127.0.0.1:9002/"
# Port to listen on for the public API
port = 9002
# Socket file to use for the private API / IPC
socket = "qdata/tm3.ipc"
# Initial (not necessarily complete) list of other nodes in the network.
# Constellation will automatically connect to other nodes not in this list
# that are advertised by the nodes below, thus these can be considered the
# "boot nodes."
othernodes = ["http://127.0.0.1:9000/"]
# The set of public keys this node will host
publickeys = ["keys/tm3.pub"]
# The corresponding set of private keys
privatekeys = ["keys/tm3.key"]
# Optional comma-separated list of paths to public keys to add as recipients
# for every transaction sent through this node, e.g. for backup purposes.
# These keys must be advertised by some Constellation node on the network, i.e.
# be in a node's publickeys/privatekeys lists.
# alwayssendto = []
# Optional file containing the passwords to unlock the given privatekeys
# (one password per line -- add an empty line if one key isn't locked.)
# passwords = "passwords"
# Where to store payloads and related information
storage = "dir:qdata/constellation3"
# Optional IP whitelist for the public API. If unspecified/empty,
# connections from all sources will be allowed (but the private API remains
# accessible only via the IPC socket above.) To allow connections from
# localhost when a whitelist is defined, e.g. when running multiple
# Constellation nodes on the same machine, add "127.0.0.1" and "::1" to
# this list.
# ipwhitelist = ["10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"]
# Verbosity level (each level includes all prior levels)
# - 0: Only fatal errors
# - 1: Warnings
# - 2: Informational messages
# - 3: Debug messages
verbosity = 2

View File

@@ -1,48 +0,0 @@
# Externally accessible URL for this node (this is what's advertised)
url = "http://127.0.0.1:9003/"
# Port to listen on for the public API
port = 9003
# Socket file to use for the private API / IPC
socket = "qdata/tm4.ipc"
# Initial (not necessarily complete) list of other nodes in the network.
# Constellation will automatically connect to other nodes not in this list
# that are advertised by the nodes below, thus these can be considered the
# "boot nodes."
othernodes = ["http://127.0.0.1:9000/"]
# The set of public keys this node will host
publickeys = ["keys/tm4.pub"]
# The corresponding set of private keys
privatekeys = ["keys/tm4.key"]
# Optional comma-separated list of paths to public keys to add as recipients
# for every transaction sent through this node, e.g. for backup purposes.
# These keys must be advertised by some Constellation node on the network, i.e.
# be in a node's publickeys/privatekeys lists.
# alwayssendto = []
# Optional file containing the passwords to unlock the given privatekeys
# (one password per line -- add an empty line if one key isn't locked.)
# passwords = "passwords"
# Where to store payloads and related information
storage = "dir:qdata/constellation4"
# Optional IP whitelist for the public API. If unspecified/empty,
# connections from all sources will be allowed (but the private API remains
# accessible only via the IPC socket above.) To allow connections from
# localhost when a whitelist is defined, e.g. when running multiple
# Constellation nodes on the same machine, add "127.0.0.1" and "::1" to
# this list.
# ipwhitelist = ["10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"]
# Verbosity level (each level includes all prior levels)
# - 0: Only fatal errors
# - 1: Warnings
# - 2: Informational messages
# - 3: Debug messages
verbosity = 2

View File

@@ -1,48 +0,0 @@
# Externally accessible URL for this node (this is what's advertised)
url = "http://127.0.0.1:9004/"
# Port to listen on for the public API
port = 9004
# Socket file to use for the private API / IPC
socket = "qdata/tm5.ipc"
# Initial (not necessarily complete) list of other nodes in the network.
# Constellation will automatically connect to other nodes not in this list
# that are advertised by the nodes below, thus these can be considered the
# "boot nodes."
othernodes = ["http://127.0.0.1:9000/"]
# The set of public keys this node will host
publickeys = ["keys/tm5.pub"]
# The corresponding set of private keys
privatekeys = ["keys/tm5.key"]
# Optional comma-separated list of paths to public keys to add as recipients
# for every transaction sent through this node, e.g. for backup purposes.
# These keys must be advertised by some Constellation node on the network, i.e.
# be in a node's publickeys/privatekeys lists.
# alwayssendto = []
# Optional file containing the passwords to unlock the given privatekeys
# (one password per line -- add an empty line if one key isn't locked.)
# passwords = "passwords"
# Where to store payloads and related information
storage = "dir:qdata/constellation5"
# Optional IP whitelist for the public API. If unspecified/empty,
# connections from all sources will be allowed (but the private API remains
# accessible only via the IPC socket above.) To allow connections from
# localhost when a whitelist is defined, e.g. when running multiple
# Constellation nodes on the same machine, add "127.0.0.1" and "::1" to
# this list.
# ipwhitelist = ["10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"]
# Verbosity level (each level includes all prior levels)
# - 0: Only fatal errors
# - 1: Warnings
# - 2: Informational messages
# - 3: Debug messages
verbosity = 2

View File

@@ -1,48 +0,0 @@
# Externally accessible URL for this node (this is what's advertised)
url = "http://127.0.0.1:9006/"
# Port to listen on for the public API
port = 9006
# Socket file to use for the private API / IPC
socket = "qdata/tm6.ipc"
# Initial (not necessarily complete) list of other nodes in the network.
# Constellation will automatically connect to other nodes not in this list
# that are advertised by the nodes below, thus these can be considered the
# "boot nodes."
othernodes = ["http://127.0.0.1:9000/"]
# The set of public keys this node will host
publickeys = ["keys/tm6.pub"]
# The corresponding set of private keys
privatekeys = ["keys/tm6.key"]
# Optional comma-separated list of paths to public keys to add as recipients
# for every transaction sent through this node, e.g. for backup purposes.
# These keys must be advertised by some Constellation node on the network, i.e.
# be in a node's publickeys/privatekeys lists.
# alwayssendto = []
# Optional file containing the passwords to unlock the given privatekeys
# (one password per line -- add an empty line if one key isn't locked.)
# passwords = "passwords"
# Where to store payloads and related information
storage = "dir:qdata/constellation6"
# Optional IP whitelist for the public API. If unspecified/empty,
# connections from all sources will be allowed (but the private API remains
# accessible only via the IPC socket above.) To allow connections from
# localhost when a whitelist is defined, e.g. when running multiple
# Constellation nodes on the same machine, add "127.0.0.1" and "::1" to
# this list.
# ipwhitelist = ["10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"]
# Verbosity level (each level includes all prior levels)
# - 0: Only fatal errors
# - 1: Warnings
# - 2: Informational messages
# - 3: Debug messages
verbosity = 2

View File

@@ -1,48 +0,0 @@
# Externally accessible URL for this node (this is what's advertised)
url = "http://127.0.0.1:9005/"
# Port to listen on for the public API
port = 9005
# Socket file to use for the private API / IPC
socket = "qdata/tm7.ipc"
# Initial (not necessarily complete) list of other nodes in the network.
# Constellation will automatically connect to other nodes not in this list
# that are advertised by the nodes below, thus these can be considered the
# "boot nodes."
othernodes = ["http://127.0.0.1:9000/"]
# The set of public keys this node will host
publickeys = ["keys/tm7.pub"]
# The corresponding set of private keys
privatekeys = ["keys/tm7.key"]
# Optional comma-separated list of paths to public keys to add as recipients
# for every transaction sent through this node, e.g. for backup purposes.
# These keys must be advertised by some Constellation node on the network, i.e.
# be in a node's publickeys/privatekeys lists.
# alwayssendto = []
# Optional file containing the passwords to unlock the given privatekeys
# (one password per line -- add an empty line if one key isn't locked.)
# passwords = "passwords"
# Where to store payloads and related information
storage = "dir:qdata/constellation7"
# Optional IP whitelist for the public API. If unspecified/empty,
# connections from all sources will be allowed (but the private API remains
# accessible only via the IPC socket above.) To allow connections from
# localhost when a whitelist is defined, e.g. when running multiple
# Constellation nodes on the same machine, add "127.0.0.1" and "::1" to
# this list.
# ipwhitelist = ["10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"]
# Verbosity level (each level includes all prior levels)
# - 0: Only fatal errors
# - 1: Warnings
# - 2: Informational messages
# - 3: Debug messages
verbosity = 2

View File

@@ -7,25 +7,26 @@ apt-get update
apt-get install -y build-essential unzip libdb-dev libleveldb-dev libsodium-dev zlib1g-dev libtinfo-dev solc sysvbanner wrk
# install constellation
CREL=constellation-0.2.0-ubuntu1604
wget -q https://github.com/jpmorganchase/constellation/releases/download/v0.2.0/$CREL.tar.xz
CVER="0.3.0"
CREL="constellation-$CVER-ubuntu1604"
wget -q https://github.com/jpmorganchase/constellation/releases/download/v$CVER/$CREL.tar.xz
tar xfJ $CREL.tar.xz
cp $CREL/constellation-node /usr/local/bin && chmod 0755 /usr/local/bin/constellation-node
rm -rf $CREL
# install golang
GOREL=go1.7.3.linux-amd64.tar.gz
wget -q https://storage.googleapis.com/golang/$GOREL
GOREL=go1.9.3.linux-amd64.tar.gz
wget -q https://dl.google.com/go/$GOREL
tar xfz $GOREL
mv go /usr/local/go
rm -f $GOREL
PATH=$PATH:/usr/local/go/bin
echo 'PATH=$PATH:/usr/local/go/bin' >> /home/ubuntu/.bashrc
echo 'PATH=$PATH:/usr/local/go/bin' >> /home/vagrant/.bashrc
# make/install quorum
git clone https://github.com/jpmorganchase/quorum.git
pushd quorum >/dev/null
git checkout tags/v2.0.0
git checkout tags/v2.0.1-pre
make all
cp build/bin/geth /usr/local/bin
cp build/bin/bootnode /usr/local/bin
@@ -36,8 +37,8 @@ wget -q https://github.com/jpmorganchase/quorum/releases/download/v1.2.0/porosit
mv porosity /usr/local/bin && chmod 0755 /usr/local/bin/porosity
# copy examples
cp -r /vagrant/examples /home/ubuntu/quorum-examples
chown -R ubuntu:ubuntu /home/ubuntu/quorum /home/ubuntu/quorum-examples
cp -r /vagrant/examples /home/vagrant/quorum-examples
chown -R vagrant:vagrant /home/vagrant/quorum /home/vagrant/quorum-examples
# done!
banner "Quorum"