mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
contrib/localnet/darkfid-five-nodes added for consensus testing
This commit is contained in:
5
contrib/localnet/darkfid-five-nodes/.gitignore
vendored
Normal file
5
contrib/localnet/darkfid-five-nodes/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
darkfid0
|
||||||
|
darkfid1
|
||||||
|
darkfid2
|
||||||
|
darkfid3
|
||||||
|
darkfid4
|
||||||
4
contrib/localnet/darkfid-five-nodes/README.md
Normal file
4
contrib/localnet/darkfid-five-nodes/README.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
darkfid localnet
|
||||||
|
================
|
||||||
|
|
||||||
|
This will start 5 darkfid nodes to participate in the consensus.
|
||||||
2
contrib/localnet/darkfid-five-nodes/clean.sh
Executable file
2
contrib/localnet/darkfid-five-nodes/clean.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
rm -rf darkfid0 darkfid1 darkfid2 darkfid3 darkfid4
|
||||||
73
contrib/localnet/darkfid-five-nodes/darkfid0.toml
Normal file
73
contrib/localnet/darkfid-five-nodes/darkfid0.toml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
## darkfid configuration file
|
||||||
|
##
|
||||||
|
## Please make sure you go through all the settings so you can configure
|
||||||
|
## your daemon properly.
|
||||||
|
##
|
||||||
|
## The default values are left commented. They can be overridden either by
|
||||||
|
## uncommenting, or by using the command-line.
|
||||||
|
|
||||||
|
# Chain to use (testnet, mainnet)
|
||||||
|
chain = "testnet"
|
||||||
|
|
||||||
|
# Path to the wallet database
|
||||||
|
wallet_path = "darkfid0/wallet.db"
|
||||||
|
|
||||||
|
# Password for the wallet database
|
||||||
|
wallet_pass = "changeme"
|
||||||
|
|
||||||
|
# Path to the blockchain database directory
|
||||||
|
database = "darkfid0/blockchain"
|
||||||
|
|
||||||
|
# JSON-RPC listen url
|
||||||
|
rpc_listen = "tcp://127.0.0.1:8340"
|
||||||
|
|
||||||
|
# Participate in the consensus protocol
|
||||||
|
consensus = true
|
||||||
|
|
||||||
|
# P2P accept addresses for the consensus protocol
|
||||||
|
consensus_p2p_accept = ["tcp://127.0.0.1:8341"]
|
||||||
|
|
||||||
|
# P2P external addresses for the consensus protocol
|
||||||
|
consensus_p2p_external = ["tcp://127.0.0.1:8341"]
|
||||||
|
|
||||||
|
# Connection slots for the consensus protocol
|
||||||
|
#consensus_slots = 8
|
||||||
|
|
||||||
|
# Connection slots for the consensus protocol
|
||||||
|
#consensus_p2p_seed = []
|
||||||
|
|
||||||
|
# Peers to connect to for the consensus protocol
|
||||||
|
#consensus_p2p_peer = []
|
||||||
|
|
||||||
|
# Prefered transports of outbound connections for the consensus protocol
|
||||||
|
#consensus_p2p_transports = ["tls", "tcp"]
|
||||||
|
|
||||||
|
# P2P accept addresses for the syncing protocol
|
||||||
|
sync_p2p_accept = ["tcp://127.0.0.1:8342"]
|
||||||
|
|
||||||
|
# P2P external addresses for the syncing protocol
|
||||||
|
sync_p2p_external = ["tcp://127.0.0.1:8342"]
|
||||||
|
|
||||||
|
# Connection slots for the syncing protocol
|
||||||
|
#sync_slots = 8
|
||||||
|
|
||||||
|
# Seed nodes to connect to for the syncing protocol
|
||||||
|
#sync_p2p_seed = []
|
||||||
|
|
||||||
|
# Peers to connect to for the syncing protocol
|
||||||
|
#sync_p2p_peer = []
|
||||||
|
|
||||||
|
# Prefered transports of outbound connections for the syncing protocol
|
||||||
|
#sync_p2p_transports = ["tls", "tcp"]
|
||||||
|
|
||||||
|
# Enable localnet hosts
|
||||||
|
localnet = true
|
||||||
|
|
||||||
|
# Enable channel log
|
||||||
|
channel_log = true
|
||||||
|
|
||||||
|
# Whitelisted faucet public key
|
||||||
|
#faucet_pub = []
|
||||||
|
|
||||||
|
# Verify system clock is correct
|
||||||
|
#clock_sync = true
|
||||||
73
contrib/localnet/darkfid-five-nodes/darkfid1.toml
Normal file
73
contrib/localnet/darkfid-five-nodes/darkfid1.toml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
## darkfid configuration file
|
||||||
|
##
|
||||||
|
## Please make sure you go through all the settings so you can configure
|
||||||
|
## your daemon properly.
|
||||||
|
##
|
||||||
|
## The default values are left commented. They can be overridden either by
|
||||||
|
## uncommenting, or by using the command-line.
|
||||||
|
|
||||||
|
# Chain to use (testnet, mainnet)
|
||||||
|
chain = "testnet"
|
||||||
|
|
||||||
|
# Path to the wallet database
|
||||||
|
wallet_path = "darkfid1/wallet.db"
|
||||||
|
|
||||||
|
# Password for the wallet database
|
||||||
|
wallet_pass = "changeme"
|
||||||
|
|
||||||
|
# Path to the blockchain database directory
|
||||||
|
database = "darkfid1/blockchain"
|
||||||
|
|
||||||
|
# JSON-RPC listen url
|
||||||
|
rpc_listen = "tcp://127.0.0.1:8440"
|
||||||
|
|
||||||
|
# Participate in the consensus protocol
|
||||||
|
consensus = true
|
||||||
|
|
||||||
|
# P2P accept addresses for the consensus protocol
|
||||||
|
consensus_p2p_accept = ["tcp://127.0.0.1:8441"]
|
||||||
|
|
||||||
|
# P2P external addresses for the consensus protocol
|
||||||
|
consensus_p2p_external = ["tcp://127.0.0.1:8441"]
|
||||||
|
|
||||||
|
# Connection slots for the consensus protocol
|
||||||
|
#consensus_slots = 8
|
||||||
|
|
||||||
|
# Connection slots for the consensus protocol
|
||||||
|
#consensus_p2p_seed = []
|
||||||
|
|
||||||
|
# Peers to connect to for the consensus protocol
|
||||||
|
consensus_p2p_peer = ["tcp://127.0.0.1:8341"]
|
||||||
|
|
||||||
|
# Prefered transports of outbound connections for the consensus protocol
|
||||||
|
#consensus_p2p_transports = ["tls", "tcp"]
|
||||||
|
|
||||||
|
# P2P accept addresses for the syncing protocol
|
||||||
|
sync_p2p_accept = ["tcp://127.0.0.1:8442"]
|
||||||
|
|
||||||
|
# P2P external addresses for the syncing protocol
|
||||||
|
sync_p2p_external = ["tcp://127.0.0.1:8442"]
|
||||||
|
|
||||||
|
# Connection slots for the syncing protocol
|
||||||
|
#sync_slots = 8
|
||||||
|
|
||||||
|
# Seed nodes to connect to for the syncing protocol
|
||||||
|
#sync_p2p_seed = []
|
||||||
|
|
||||||
|
# Peers to connect to for the syncing protocol
|
||||||
|
sync_p2p_peer = ["tcp://127.0.0.1:8342"]
|
||||||
|
|
||||||
|
# Prefered transports of outbound connections for the syncing protocol
|
||||||
|
#sync_p2p_transports = ["tls", "tcp"]
|
||||||
|
|
||||||
|
# Enable localnet hosts
|
||||||
|
localnet = true
|
||||||
|
|
||||||
|
# Enable channel log
|
||||||
|
channel_log = true
|
||||||
|
|
||||||
|
# Whitelisted faucet public key
|
||||||
|
#faucet_pub = []
|
||||||
|
|
||||||
|
# Verify system clock is correct
|
||||||
|
#clock_sync = true
|
||||||
73
contrib/localnet/darkfid-five-nodes/darkfid2.toml
Normal file
73
contrib/localnet/darkfid-five-nodes/darkfid2.toml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
## darkfid configuration file
|
||||||
|
##
|
||||||
|
## Please make sure you go through all the settings so you can configure
|
||||||
|
## your daemon properly.
|
||||||
|
##
|
||||||
|
## The default values are left commented. They can be overridden either by
|
||||||
|
## uncommenting, or by using the command-line.
|
||||||
|
|
||||||
|
# Chain to use (testnet, mainnet)
|
||||||
|
chain = "testnet"
|
||||||
|
|
||||||
|
# Path to the wallet database
|
||||||
|
wallet_path = "darkfid2/wallet.db"
|
||||||
|
|
||||||
|
# Password for the wallet database
|
||||||
|
wallet_pass = "changeme"
|
||||||
|
|
||||||
|
# Path to the blockchain database directory
|
||||||
|
database = "darkfid2/blockchain"
|
||||||
|
|
||||||
|
# JSON-RPC listen url
|
||||||
|
rpc_listen = "tcp://127.0.0.1:8540"
|
||||||
|
|
||||||
|
# Participate in the consensus protocol
|
||||||
|
consensus = true
|
||||||
|
|
||||||
|
# P2P accept addresses for the consensus protocol
|
||||||
|
consensus_p2p_accept = ["tcp://127.0.0.1:8541"]
|
||||||
|
|
||||||
|
# P2P external addresses for the consensus protocol
|
||||||
|
consensus_p2p_external = ["tcp://127.0.0.1:8541"]
|
||||||
|
|
||||||
|
# Connection slots for the consensus protocol
|
||||||
|
#consensus_slots = 8
|
||||||
|
|
||||||
|
# Connection slots for the consensus protocol
|
||||||
|
#consensus_p2p_seed = []
|
||||||
|
|
||||||
|
# Peers to connect to for the consensus protocol
|
||||||
|
consensus_p2p_peer = ["tcp://127.0.0.1:8341", "tcp://127.0.0.1:8441"]
|
||||||
|
|
||||||
|
# Prefered transports of outbound connections for the consensus protocol
|
||||||
|
#consensus_p2p_transports = ["tls", "tcp"]
|
||||||
|
|
||||||
|
# P2P accept addresses for the syncing protocol
|
||||||
|
sync_p2p_accept = ["tcp://127.0.0.1:8542"]
|
||||||
|
|
||||||
|
# P2P external addresses for the syncing protocol
|
||||||
|
sync_p2p_external = ["tcp://127.0.0.1:8542"]
|
||||||
|
|
||||||
|
# Connection slots for the syncing protocol
|
||||||
|
#sync_slots = 8
|
||||||
|
|
||||||
|
# Seed nodes to connect to for the syncing protocol
|
||||||
|
#sync_p2p_seed = []
|
||||||
|
|
||||||
|
# Peers to connect to for the syncing protocol
|
||||||
|
sync_p2p_peer = ["tcp://127.0.0.1:8342", "tcp://127.0.0.1:8442"]
|
||||||
|
|
||||||
|
# Prefered transports of outbound connections for the syncing protocol
|
||||||
|
#sync_p2p_transports = ["tls", "tcp"]
|
||||||
|
|
||||||
|
# Enable localnet hosts
|
||||||
|
localnet = true
|
||||||
|
|
||||||
|
# Enable channel log
|
||||||
|
channel_log = true
|
||||||
|
|
||||||
|
# Whitelisted faucet public key
|
||||||
|
#faucet_pub = []
|
||||||
|
|
||||||
|
# Verify system clock is correct
|
||||||
|
#clock_sync = true
|
||||||
73
contrib/localnet/darkfid-five-nodes/darkfid3.toml
Normal file
73
contrib/localnet/darkfid-five-nodes/darkfid3.toml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
## darkfid configuration file
|
||||||
|
##
|
||||||
|
## Please make sure you go through all the settings so you can configure
|
||||||
|
## your daemon properly.
|
||||||
|
##
|
||||||
|
## The default values are left commented. They can be overridden either by
|
||||||
|
## uncommenting, or by using the command-line.
|
||||||
|
|
||||||
|
# Chain to use (testnet, mainnet)
|
||||||
|
chain = "testnet"
|
||||||
|
|
||||||
|
# Path to the wallet database
|
||||||
|
wallet_path = "darkfid3/wallet.db"
|
||||||
|
|
||||||
|
# Password for the wallet database
|
||||||
|
wallet_pass = "changeme"
|
||||||
|
|
||||||
|
# Path to the blockchain database directory
|
||||||
|
database = "darkfid3/blockchain"
|
||||||
|
|
||||||
|
# JSON-RPC listen url
|
||||||
|
rpc_listen = "tcp://127.0.0.1:8640"
|
||||||
|
|
||||||
|
# Participate in the consensus protocol
|
||||||
|
consensus = true
|
||||||
|
|
||||||
|
# P2P accept addresses for the consensus protocol
|
||||||
|
consensus_p2p_accept = ["tcp://127.0.0.1:8641"]
|
||||||
|
|
||||||
|
# P2P external addresses for the consensus protocol
|
||||||
|
consensus_p2p_external = ["tcp://127.0.0.1:8641"]
|
||||||
|
|
||||||
|
# Connection slots for the consensus protocol
|
||||||
|
#consensus_slots = 8
|
||||||
|
|
||||||
|
# Connection slots for the consensus protocol
|
||||||
|
#consensus_p2p_seed = []
|
||||||
|
|
||||||
|
# Peers to connect to for the consensus protocol
|
||||||
|
consensus_p2p_peer = ["tcp://127.0.0.1:8341", "tcp://127.0.0.1:8441", "tcp://127.0.0.1:8541"]
|
||||||
|
|
||||||
|
# Prefered transports of outbound connections for the consensus protocol
|
||||||
|
#consensus_p2p_transports = ["tls", "tcp"]
|
||||||
|
|
||||||
|
# P2P accept addresses for the syncing protocol
|
||||||
|
sync_p2p_accept = ["tcp://127.0.0.1:8642"]
|
||||||
|
|
||||||
|
# P2P external addresses for the syncing protocol
|
||||||
|
sync_p2p_external = ["tcp://127.0.0.1:8642"]
|
||||||
|
|
||||||
|
# Connection slots for the syncing protocol
|
||||||
|
#sync_slots = 8
|
||||||
|
|
||||||
|
# Seed nodes to connect to for the syncing protocol
|
||||||
|
#sync_p2p_seed = []
|
||||||
|
|
||||||
|
# Peers to connect to for the syncing protocol
|
||||||
|
sync_p2p_peer = ["tcp://127.0.0.1:8342", "tcp://127.0.0.1:8442", "tcp://127.0.0.1:8542"]
|
||||||
|
|
||||||
|
# Prefered transports of outbound connections for the syncing protocol
|
||||||
|
#sync_p2p_transports = ["tls", "tcp"]
|
||||||
|
|
||||||
|
# Enable localnet hosts
|
||||||
|
localnet = true
|
||||||
|
|
||||||
|
# Enable channel log
|
||||||
|
channel_log = true
|
||||||
|
|
||||||
|
# Whitelisted faucet public key
|
||||||
|
#faucet_pub = []
|
||||||
|
|
||||||
|
# Verify system clock is correct
|
||||||
|
#clock_sync = true
|
||||||
73
contrib/localnet/darkfid-five-nodes/darkfid4.toml
Normal file
73
contrib/localnet/darkfid-five-nodes/darkfid4.toml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
## darkfid configuration file
|
||||||
|
##
|
||||||
|
## Please make sure you go through all the settings so you can configure
|
||||||
|
## your daemon properly.
|
||||||
|
##
|
||||||
|
## The default values are left commented. They can be overridden either by
|
||||||
|
## uncommenting, or by using the command-line.
|
||||||
|
|
||||||
|
# Chain to use (testnet, mainnet)
|
||||||
|
chain = "testnet"
|
||||||
|
|
||||||
|
# Path to the wallet database
|
||||||
|
wallet_path = "darkfid4/wallet.db"
|
||||||
|
|
||||||
|
# Password for the wallet database
|
||||||
|
wallet_pass = "changeme"
|
||||||
|
|
||||||
|
# Path to the blockchain database directory
|
||||||
|
database = "darkfid4/blockchain"
|
||||||
|
|
||||||
|
# JSON-RPC listen url
|
||||||
|
rpc_listen = "tcp://127.0.0.1:8740"
|
||||||
|
|
||||||
|
# Participate in the consensus protocol
|
||||||
|
consensus = true
|
||||||
|
|
||||||
|
# P2P accept addresses for the consensus protocol
|
||||||
|
consensus_p2p_accept = ["tcp://127.0.0.1:8741"]
|
||||||
|
|
||||||
|
# P2P external addresses for the consensus protocol
|
||||||
|
consensus_p2p_external = ["tcp://127.0.0.1:8741"]
|
||||||
|
|
||||||
|
# Connection slots for the consensus protocol
|
||||||
|
#consensus_slots = 8
|
||||||
|
|
||||||
|
# Connection slots for the consensus protocol
|
||||||
|
#consensus_p2p_seed = []
|
||||||
|
|
||||||
|
# Peers to connect to for the consensus protocol
|
||||||
|
consensus_p2p_peer = ["tcp://127.0.0.1:8341", "tcp://127.0.0.1:8441", "tcp://127.0.0.1:8541", "tcp://127.0.0.1:8641"]
|
||||||
|
|
||||||
|
# Prefered transports of outbound connections for the consensus protocol
|
||||||
|
#consensus_p2p_transports = ["tls", "tcp"]
|
||||||
|
|
||||||
|
# P2P accept addresses for the syncing protocol
|
||||||
|
sync_p2p_accept = ["tcp://127.0.0.1:8742"]
|
||||||
|
|
||||||
|
# P2P external addresses for the syncing protocol
|
||||||
|
sync_p2p_external = ["tcp://127.0.0.1:8742"]
|
||||||
|
|
||||||
|
# Connection slots for the syncing protocol
|
||||||
|
#sync_slots = 8
|
||||||
|
|
||||||
|
# Seed nodes to connect to for the syncing protocol
|
||||||
|
#sync_p2p_seed = []
|
||||||
|
|
||||||
|
# Peers to connect to for the syncing protocol
|
||||||
|
sync_p2p_peer = ["tcp://127.0.0.1:8342", "tcp://127.0.0.1:8442", "tcp://127.0.0.1:8542", "tcp://127.0.0.1:8642"]
|
||||||
|
|
||||||
|
# Prefered transports of outbound connections for the syncing protocol
|
||||||
|
#sync_p2p_transports = ["tls", "tcp"]
|
||||||
|
|
||||||
|
# Enable localnet hosts
|
||||||
|
localnet = true
|
||||||
|
|
||||||
|
# Enable channel log
|
||||||
|
channel_log = true
|
||||||
|
|
||||||
|
# Whitelisted faucet public key
|
||||||
|
#faucet_pub = []
|
||||||
|
|
||||||
|
# Verify system clock is correct
|
||||||
|
#clock_sync = true
|
||||||
27
contrib/localnet/darkfid-five-nodes/tmux_sessions.sh
Executable file
27
contrib/localnet/darkfid-five-nodes/tmux_sessions.sh
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Start a tmux session with 5 consensus nodes.
|
||||||
|
|
||||||
|
if [ "$1" = "-v" ]; then
|
||||||
|
verbose="-v"
|
||||||
|
else
|
||||||
|
verbose=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmux new-session -d
|
||||||
|
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid0.toml" Enter
|
||||||
|
sleep 2
|
||||||
|
tmux split-window -h
|
||||||
|
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid1.toml" Enter
|
||||||
|
sleep 2
|
||||||
|
tmux split-window -h
|
||||||
|
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid2.toml" Enter
|
||||||
|
sleep 2
|
||||||
|
tmux split-window -h
|
||||||
|
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid3.toml" Enter
|
||||||
|
sleep 2
|
||||||
|
tmux split-window -h
|
||||||
|
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid4.toml" Enter
|
||||||
|
tmux select-layout even-horizontal
|
||||||
|
tmux attach
|
||||||
Reference in New Issue
Block a user