Преглед изворни кода

contrib/localnet: darkfid-single-node(with faucet) added

aggstam пре 3 година
родитељ
комит
9950d2b3dc

+ 2 - 0
contrib/localnet/darkfid-single-node/.gitignore

@@ -0,0 +1,2 @@
+faucetd/blockchain
+darkfid0

+ 4 - 0
contrib/localnet/darkfid-single-node/README.md

@@ -0,0 +1,4 @@
+darkfid localnet
+================
+
+This will start on darkfid node in single-node mode and a faucet node.

+ 3 - 0
contrib/localnet/darkfid-single-node/clean.sh

@@ -0,0 +1,3 @@
+#!/bin/sh
+rm -rf darkfid0 faucetd/blockchain
+git checkout faucetd/wallet.db

+ 74 - 0
contrib/localnet/darkfid-single-node/darkfid0.toml

@@ -0,0 +1,74 @@
+## 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 = ["DqaZzCTipXeJw4kcc6ro1SJuzo3diaNjFiaAnKTGQEK1"]
+
+# Verify system clock is correct
+#clock_sync = true

+ 55 - 0
contrib/localnet/darkfid-single-node/faucetd.toml

@@ -0,0 +1,55 @@
+## 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 = "tcp://127.0.0.1:8440"
+
+# 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
+
+# Airdrop timeout limit in seconds
+airdrop_timeout = 10
+
+# Airdrop amount limit
+airdrop_limit = "1000000"
+
+# Whitelisted faucet addresses
+faucet_pub = ["DqaZzCTipXeJw4kcc6ro1SJuzo3diaNjFiaAnKTGQEK1"]

BIN
contrib/localnet/darkfid-single-node/faucetd/wallet.db


+ 18 - 0
contrib/localnet/darkfid-single-node/tmux_sessions.sh

@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+
+# Start a tmux session with a lilith node, two consensus nodes, a non-consensus
+# node, and a faucet that's able to mint tokens.
+
+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 10
+tmux split-window -v
+tmux send-keys "LOG_TARGETS='!sled,!net' ../../../faucetd ${verbose} -c faucetd.toml" Enter
+tmux attach