From 57751b2007103f93bf22d8b683f5d95cfc2b0a87 Mon Sep 17 00:00:00 2001 From: aggstam Date: Fri, 18 Nov 2022 17:13:48 +0200 Subject: [PATCH] contrib/localnet/darkfid-small added --- contrib/localnet/darkfid-small/.gitignore | 3 + contrib/localnet/darkfid-small/README.md | 5 ++ contrib/localnet/darkfid-small/clean.sh | 2 + contrib/localnet/darkfid-small/darkfid0.toml | 73 +++++++++++++++++++ contrib/localnet/darkfid-small/darkfid1.toml | 73 +++++++++++++++++++ contrib/localnet/darkfid-small/darkfid2.toml | 73 +++++++++++++++++++ .../localnet/darkfid-small/tmux_sessions.sh | 22 ++++++ 7 files changed, 251 insertions(+) create mode 100644 contrib/localnet/darkfid-small/.gitignore create mode 100644 contrib/localnet/darkfid-small/README.md create mode 100755 contrib/localnet/darkfid-small/clean.sh create mode 100644 contrib/localnet/darkfid-small/darkfid0.toml create mode 100644 contrib/localnet/darkfid-small/darkfid1.toml create mode 100644 contrib/localnet/darkfid-small/darkfid2.toml create mode 100755 contrib/localnet/darkfid-small/tmux_sessions.sh diff --git a/contrib/localnet/darkfid-small/.gitignore b/contrib/localnet/darkfid-small/.gitignore new file mode 100644 index 000000000..a2758aed9 --- /dev/null +++ b/contrib/localnet/darkfid-small/.gitignore @@ -0,0 +1,3 @@ +darkfid0 +darkfid1 +darkfid2 diff --git a/contrib/localnet/darkfid-small/README.md b/contrib/localnet/darkfid-small/README.md new file mode 100644 index 000000000..5cdfbfc6e --- /dev/null +++ b/contrib/localnet/darkfid-small/README.md @@ -0,0 +1,5 @@ +darkfid localnet +================ + +This will start three darkfid. Two of the darkfid participate +in the consensus, and one is just a sync node. diff --git a/contrib/localnet/darkfid-small/clean.sh b/contrib/localnet/darkfid-small/clean.sh new file mode 100755 index 000000000..d8f18a65a --- /dev/null +++ b/contrib/localnet/darkfid-small/clean.sh @@ -0,0 +1,2 @@ +#!/bin/sh +rm -rf darkfid0 darkfid1 darkfid2 diff --git a/contrib/localnet/darkfid-small/darkfid0.toml b/contrib/localnet/darkfid-small/darkfid0.toml new file mode 100644 index 000000000..f23df3384 --- /dev/null +++ b/contrib/localnet/darkfid-small/darkfid0.toml @@ -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 diff --git a/contrib/localnet/darkfid-small/darkfid1.toml b/contrib/localnet/darkfid-small/darkfid1.toml new file mode 100644 index 000000000..77ec1751f --- /dev/null +++ b/contrib/localnet/darkfid-small/darkfid1.toml @@ -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 diff --git a/contrib/localnet/darkfid-small/darkfid2.toml b/contrib/localnet/darkfid-small/darkfid2.toml new file mode 100644 index 000000000..6cc77fa57 --- /dev/null +++ b/contrib/localnet/darkfid-small/darkfid2.toml @@ -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 = false + +# P2P accept addresses for the consensus protocol +#consensus_p2p_accept = ["tcp://127.0.0.1:8541"] + +# P2P external addressesfor 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 = ["tcp://127.0.0.1:33033"] + +# 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: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 diff --git a/contrib/localnet/darkfid-small/tmux_sessions.sh b/contrib/localnet/darkfid-small/tmux_sessions.sh new file mode 100755 index 000000000..2a5a0e802 --- /dev/null +++ b/contrib/localnet/darkfid-small/tmux_sessions.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# Start a tmux session with two consensus and a non-consensus node. + +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 +tmux split-window -v +sleep 2 +tmux select-pane -t 0 +tmux split-window -h +tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid1.toml" Enter +sleep 2 +tmux select-pane -t 2 +tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid2.toml" Enter +tmux attach