mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-08 22:28:12 -05:00
contrib: Add scripts for localnet testing.
This commit is contained in:
4
contrib/localnet/README.md
Normal file
4
contrib/localnet/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
DarkFi localnet tools
|
||||
=====================
|
||||
|
||||
Helpful scripts for local network deployment and testing.
|
||||
58
contrib/localnet/darkfid0.toml
Normal file
58
contrib/localnet/darkfid0.toml
Normal file
@@ -0,0 +1,58 @@
|
||||
## 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 address for the consensus protocol
|
||||
consensus_p2p_accept = "tls://127.0.0.1:8341"
|
||||
|
||||
# P2P external address for the consensus protocol
|
||||
consensus_p2p_external = "tls://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 = []
|
||||
|
||||
# P2P accept address for the syncing protocol
|
||||
sync_p2p_accept = "tls://127.0.0.1:8342"
|
||||
|
||||
# P2P external address for the syncing protocol
|
||||
sync_p2p_external = "tls://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 = []
|
||||
|
||||
# Whitelisted faucet public key
|
||||
faucet_pub = ["1z3JuN456MieHtpoF4cr5a1ntFF87L8Z3m2E5ACppFodFcjnLS"]
|
||||
58
contrib/localnet/darkfid1.toml
Normal file
58
contrib/localnet/darkfid1.toml
Normal file
@@ -0,0 +1,58 @@
|
||||
## 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 address for the consensus protocol
|
||||
consensus_p2p_accept = "tls://127.0.0.1:8441"
|
||||
|
||||
# P2P external address for the consensus protocol
|
||||
consensus_p2p_external = "tls://127.0.0.1:8441"
|
||||
|
||||
# Connection slots for the consensus protocol
|
||||
#consensus_slots = 8
|
||||
|
||||
# Connection slots for the consensus protocol
|
||||
consensus_p2p_seed = ["tls://127.0.0.1:8341"]
|
||||
|
||||
# Peers to connect to for the consensus protocol
|
||||
#consensus_p2p_peer = []
|
||||
|
||||
# P2P accept address for the syncing protocol
|
||||
sync_p2p_accept = "tls://127.0.0.1:8442"
|
||||
|
||||
# P2P external address for the syncing protocol
|
||||
sync_p2p_external = "tls://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 = ["tls://127.0.0.1:8342"]
|
||||
|
||||
# Peers to connect to for the syncing protocol
|
||||
#sync_p2p_peer = []
|
||||
|
||||
# Whitelisted faucet public key
|
||||
faucet_pub = ["1z3JuN456MieHtpoF4cr5a1ntFF87L8Z3m2E5ACppFodFcjnLS"]
|
||||
58
contrib/localnet/darkfid2.toml
Normal file
58
contrib/localnet/darkfid2.toml
Normal file
@@ -0,0 +1,58 @@
|
||||
## 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 address for the consensus protocol
|
||||
consensus_p2p_accept = "tls://127.0.0.1:8541"
|
||||
|
||||
# P2P external address for the consensus protocol
|
||||
consensus_p2p_external = "tls://127.0.0.1:8541"
|
||||
|
||||
# Connection slots for the consensus protocol
|
||||
#consensus_slots = 8
|
||||
|
||||
# Connection slots for the consensus protocol
|
||||
consensus_p2p_seed = ["tls://127.0.0.1:8341"]
|
||||
|
||||
# Peers to connect to for the consensus protocol
|
||||
#consensus_p2p_peer = []
|
||||
|
||||
# P2P accept address for the syncing protocol
|
||||
sync_p2p_accept = "tls://127.0.0.1:8542"
|
||||
|
||||
# P2P external address for the syncing protocol
|
||||
sync_p2p_external = "tls://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 = ["tls://127.0.0.1:8342"]
|
||||
|
||||
# Peers to connect to for the syncing protocol
|
||||
#sync_p2p_peer = []
|
||||
|
||||
# Whitelisted faucet public key
|
||||
faucet_pub = ["1z3JuN456MieHtpoF4cr5a1ntFF87L8Z3m2E5ACppFodFcjnLS"]
|
||||
37
contrib/localnet/faucetd.toml
Normal file
37
contrib/localnet/faucetd.toml
Normal file
@@ -0,0 +1,37 @@
|
||||
## faucetd 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 = "faucetd/wallet.db"
|
||||
|
||||
# Password for the wallet database
|
||||
wallet_pass = "changeme"
|
||||
|
||||
# Path to the blockchain database directory
|
||||
database = "faucetd/blockchain"
|
||||
|
||||
# JSON-RPC listen URL
|
||||
rpc_listen = "tls://127.0.0.1:8640"
|
||||
|
||||
# P2P accept address for the syncing protocol
|
||||
sync_p2p_accept = "tls://127.0.0.1:8642"
|
||||
|
||||
# P2P external address for the syncing protocol
|
||||
sync_p2p_external = "tls://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 = ["tls://127.0.0.1:8342"]
|
||||
|
||||
# Peers to connect to for the syncing protocol
|
||||
#sync_p2p_peer = []
|
||||
BIN
contrib/localnet/faucetd/wallet.db
Normal file
BIN
contrib/localnet/faucetd/wallet.db
Normal file
Binary file not shown.
15
contrib/localnet/tmux_sessions.sh
Executable file
15
contrib/localnet/tmux_sessions.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Start a tmux session with two consensus nodes and a non-consensus node, and
|
||||
# a faucet that's able to mint tokens.
|
||||
|
||||
tmux new-session -d "LOG_TARGETS='!sled' ../../darkfid2 -v -c darkfid0.toml"
|
||||
sleep 2
|
||||
tmux split-window -v "LOG_TARGETS='!sled' ../../darkfid2 -v -c darkfid1.toml"
|
||||
sleep 2
|
||||
tmux split-window -h "LOG_TARGETS='!sled' ../../darkfid2 -v -c darkfid2.toml"
|
||||
sleep 2
|
||||
tmux select-pane -t 0
|
||||
tmux split-window -h "LOG_TARGETS='!sled' ../../faucetd -v -c faucetd.toml"
|
||||
tmux attach
|
||||
Reference in New Issue
Block a user