contrib/localnet/darkfid*: updated to work with latest darkfid

This commit is contained in:
skoupidi
2024-02-14 17:09:13 +02:00
parent d4af12f264
commit d54e44b573
34 changed files with 454 additions and 972 deletions

View File

@@ -8,3 +8,6 @@
# JSON-RPC listen URL
#rpc_listen = "tcp://127.0.0.1:28467"
# PoW miner number of threads to use
#threads = 4

View File

@@ -1,4 +1,6 @@
darkfid localnet
================
This will start 5 darkfid nodes to participate in the consensus.
This will start five `darkfid` node instances
in localnet mode, along with a `minerd` daemon
to mine blocks, for each one.

View File

@@ -1,8 +1,3 @@
#!/bin/sh
rm -rf darkfid0 darkfid1 darkfid2 darkfid3 darkfid4
# clean log files
rm /tmp/f_history.log /tmp/lead_history.log /tmp/lottery_history.log &>/dev/null &
touch /tmp/f_history.log
touch /tmp/lead_history.log
touch /tmp/lottery_history.log

View File

@@ -6,71 +6,55 @@
## 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"
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48340"
# Path to the wallet database
wallet_path = "darkfid0/wallet.db"
# Password for the wallet database
wallet_pass = "changeme"
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Path to the blockchain database directory
database = "darkfid0/blockchain"
database = "darkfid0"
# JSON-RPC listen url
rpc_listen = "tcp://127.0.0.1:8340"
# Finalization threshold, denominated by number of blocks
threshold = 3
# Participate in the consensus protocol
consensus = true
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48467"
# Enable single-node mode for local testing
single_node = false
# PoW block production target, in seconds
pow_target = 20
# P2P accept addresses for the consensus protocol
consensus_p2p_accept = ["tcp://127.0.0.1:8341"]
# Participate in block production
miner = true
# P2P external addresses for the consensus protocol
consensus_p2p_external = ["tcp://127.0.0.1:8341"]
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Connection slots for the consensus protocol
#consensus_slots = 8
# Skip syncing process and start node right away
skip_sync = true
# Connection slots for the consensus protocol
#consensus_p2p_seed = []
## Localnet sync P2P network settings
[network_config."localnet".sync_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48242"]
# Peers to connect to for the consensus protocol
#consensus_p2p_peer = []
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# 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
# Allow localnet hosts
localnet = true
# Enable channel log
channel_log = true
## Localnet miners P2P network settings
[network_config."localnet".miners_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48241"]
# Whitelisted faucet public key
#faucet_pub = []
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Verify system clock is correct
#clock_sync = true
# Allow localnet hosts
localnet = true

View File

@@ -6,71 +6,61 @@
## 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"
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48440"
# Path to the wallet database
wallet_path = "darkfid1/wallet.db"
# Password for the wallet database
wallet_pass = "changeme"
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Path to the blockchain database directory
database = "darkfid1/blockchain"
database = "darkfid1"
# JSON-RPC listen url
rpc_listen = "tcp://127.0.0.1:8440"
# Finalization threshold, denominated by number of blocks
threshold = 3
# Participate in the consensus protocol
consensus = true
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48567"
# Enable single-node mode for local testing
single_node = false
# PoW block production target, in seconds
pow_target = 20
# P2P accept addresses for the consensus protocol
consensus_p2p_accept = ["tcp://127.0.0.1:8441"]
# Participate in block production
miner = true
# P2P external addresses for the consensus protocol
consensus_p2p_external = ["tcp://127.0.0.1:8441"]
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Connection slots for the consensus protocol
#consensus_slots = 8
# Skip syncing process and start node right away
skip_sync = false
# Connection slots for the consensus protocol
#consensus_p2p_seed = []
## Localnet sync P2P network settings
[network_config."localnet".sync_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48342"]
# Peers to connect to for the consensus protocol
consensus_p2p_peer = ["tcp://127.0.0.1:8341"]
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Prefered transports of outbound connections for the consensus protocol
consensus_p2p_transports = ["tls", "tcp"]
# Peer nodes to manually connect to
peers = ["tcp+tls://0.0.0.0:48242"]
# 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
# Allow localnet hosts
localnet = true
# Enable channel log
channel_log = true
## Localnet miners P2P network settings
[network_config."localnet".miners_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48341"]
# Whitelisted faucet public key
#faucet_pub = []
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Verify system clock is correct
#clock_sync = true
# Peer nodes to manually connect to
peers = ["tcp+tls://0.0.0.0:48241"]
# Allow localnet hosts
localnet = true

View File

@@ -6,71 +6,61 @@
## 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"
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48540"
# Path to the wallet database
wallet_path = "darkfid2/wallet.db"
# Password for the wallet database
wallet_pass = "changeme"
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Path to the blockchain database directory
database = "darkfid2/blockchain"
database = "darkfid2"
# JSON-RPC listen url
rpc_listen = "tcp://127.0.0.1:8540"
# Finalization threshold, denominated by number of blocks
threshold = 3
# Participate in the consensus protocol
consensus = true
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48667"
# Enable single-node mode for local testing
single_node = false
# PoW block production target, in seconds
pow_target = 20
# P2P accept addresses for the consensus protocol
consensus_p2p_accept = ["tcp://127.0.0.1:8541"]
# Participate in block production
miner = true
# P2P external addresses for the consensus protocol
consensus_p2p_external = ["tcp://127.0.0.1:8541"]
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Connection slots for the consensus protocol
#consensus_slots = 8
# Skip syncing process and start node right away
skip_sync = false
# Connection slots for the consensus protocol
#consensus_p2p_seed = []
## Localnet sync P2P network settings
[network_config."localnet".sync_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48442"]
# Peers to connect to for the consensus protocol
consensus_p2p_peer = ["tcp://127.0.0.1:8341", "tcp://127.0.0.1:8441"]
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Prefered transports of outbound connections for the consensus protocol
consensus_p2p_transports = ["tls", "tcp"]
# Peer nodes to manually connect to
peers = ["tcp+tls://0.0.0.0:48242", "tcp+tls://0.0.0.0:48342"]
# 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
# Allow localnet hosts
localnet = true
# Enable channel log
channel_log = true
## Localnet miners P2P network settings
[network_config."localnet".miners_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48441"]
# Whitelisted faucet public key
#faucet_pub = []
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Verify system clock is correct
#clock_sync = true
# Peer nodes to manually connect to
peers = ["tcp+tls://0.0.0.0:48241", "tcp+tls://0.0.0.0:48341"]
# Allow localnet hosts
localnet = true

View File

@@ -6,71 +6,61 @@
## 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"
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48640"
# Path to the wallet database
wallet_path = "darkfid3/wallet.db"
# Password for the wallet database
wallet_pass = "changeme"
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Path to the blockchain database directory
database = "darkfid3/blockchain"
database = "darkfid3"
# JSON-RPC listen url
rpc_listen = "tcp://127.0.0.1:8640"
# Finalization threshold, denominated by number of blocks
threshold = 3
# Participate in the consensus protocol
consensus = true
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48767"
# Enable single-node mode for local testing
single_node = false
# PoW block production target, in seconds
pow_target = 20
# P2P accept addresses for the consensus protocol
consensus_p2p_accept = ["tcp://127.0.0.1:8641"]
# Participate in block production
miner = true
# P2P external addresses for the consensus protocol
consensus_p2p_external = ["tcp://127.0.0.1:8641"]
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Connection slots for the consensus protocol
#consensus_slots = 8
# Skip syncing process and start node right away
skip_sync = false
# Connection slots for the consensus protocol
#consensus_p2p_seed = []
## Localnet sync P2P network settings
[network_config."localnet".sync_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48542"]
# 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"]
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Prefered transports of outbound connections for the consensus protocol
consensus_p2p_transports = ["tls", "tcp"]
# Peer nodes to manually connect to
peers = ["tcp+tls://0.0.0.0:48242", "tcp+tls://0.0.0.0:48342", "tcp+tls://0.0.0.0:48442"]
# 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
# Allow localnet hosts
localnet = true
# Enable channel log
channel_log = true
## Localnet miners P2P network settings
[network_config."localnet".miners_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48541"]
# Whitelisted faucet public key
#faucet_pub = []
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Verify system clock is correct
#clock_sync = true
# Peer nodes to manually connect to
peers = ["tcp+tls://0.0.0.0:48241", "tcp+tls://0.0.0.0:48341", "tcp+tls://0.0.0.0:48441"]
# Allow localnet hosts
localnet = true

View File

@@ -6,71 +6,61 @@
## 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"
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48740"
# Path to the wallet database
wallet_path = "darkfid4/wallet.db"
# Password for the wallet database
wallet_pass = "changeme"
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Path to the blockchain database directory
database = "darkfid4/blockchain"
database = "darkfid4"
# JSON-RPC listen url
rpc_listen = "tcp://127.0.0.1:8740"
# Finalization threshold, denominated by number of blocks
threshold = 3
# Participate in the consensus protocol
consensus = true
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48867"
# Enable single-node mode for local testing
single_node = false
# PoW block production target, in seconds
pow_target = 20
# P2P accept addresses for the consensus protocol
consensus_p2p_accept = ["tcp://127.0.0.1:8741"]
# Participate in block production
miner = true
# P2P external addresses for the consensus protocol
consensus_p2p_external = ["tcp://127.0.0.1:8741"]
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Connection slots for the consensus protocol
#consensus_slots = 8
# Skip syncing process and start node right away
skip_sync = false
# Connection slots for the consensus protocol
#consensus_p2p_seed = []
## Localnet sync P2P network settings
[network_config."localnet".sync_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48642"]
# 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"]
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Prefered transports of outbound connections for the consensus protocol
consensus_p2p_transports = ["tls", "tcp"]
# Peer nodes to manually connect to
peers = ["tcp+tls://0.0.0.0:48242", "tcp+tls://0.0.0.0:48342", "tcp+tls://0.0.0.0:48442", "tcp+tls://0.0.0.0:48542"]
# 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
# Allow localnet hosts
localnet = true
# Enable channel log
channel_log = true
## Localnet miners P2P network settings
[network_config."localnet".miners_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48641"]
# Whitelisted faucet public key
#faucet_pub = []
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Verify system clock is correct
#clock_sync = true
# Peer nodes to manually connect to
peers = ["tcp+tls://0.0.0.0:48241", "tcp+tls://0.0.0.0:48341", "tcp+tls://0.0.0.0:48441", "tcp+tls://0.0.0.0:48541"]
# Allow localnet hosts
localnet = true

View File

@@ -1,33 +0,0 @@
import matplotlib.pyplot as plt
import numpy as np
LEAD_FILE = "/tmp/lead_history.log"
F_FILE = "/tmp/f_history.log"
LEAD_PROCESSED_IMG = "/tmp/lead_history_processed.png"
F_PROCESSED_IMG = "/tmp/f_history_processed.png"
SEP = ","
NODES = 5 # nuber of nodes logged
with open(LEAD_FILE) as f:
buf = f.read()
nodes = buf.split(SEP)[:-1]
node_log = []
for i in range(0, len(nodes), NODES):
assert (nodes[i]==nodes[i+1]==nodes[i+2]==nodes[i+3]==nodes[i+4])
node_log+=[int(nodes[i])]
freq_single_lead = sum(np.array(node_log)==1)/float(len(node_log))
print("single leader frequency: {}".format(freq_single_lead))
plt.plot(node_log)
plt.savefig(LEAD_PROCESSED_IMG)
with open(F_FILE) as f:
buf = f.read()
nodes = buf.split(SEP)[:-1]
node_log = []
for i in range(0, len(nodes), NODES):
assert (nodes[i]==nodes[i+1]==nodes[i+2]==nodes[i+3]==nodes[i+4])
node_log+=[float(nodes[i])]
plt.plot(node_log)
plt.savefig(F_PROCESSED_IMG)

View File

@@ -0,0 +1,13 @@
## minerd 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.
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48467"
# PoW miner number of threads to use
threads = 2

View File

@@ -0,0 +1,13 @@
## minerd 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.
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48567"
# PoW miner number of threads to use
threads = 2

View File

@@ -0,0 +1,13 @@
## minerd 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.
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48667"
# PoW miner number of threads to use
threads = 2

View File

@@ -0,0 +1,13 @@
## minerd 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.
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48767"
# PoW miner number of threads to use
threads = 2

View File

@@ -0,0 +1,13 @@
## minerd 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.
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48867"
# PoW miner number of threads to use
threads = 2

View File

@@ -1,31 +1,42 @@
#!/bin/sh
set -e
# Start a tmux session with 5 consensus nodes.
# Start a tmux session with five minerd daemons and five darkfid nodes
if [ "$1" = "-v" ]; then
verbose="-v"
if [ "$1" = "-vv" ]; then
verbose="-vv"
shift
else
verbose=""
fi
touch /tmp/f_history.log
touch /tmp/lead_history.log
touch /tmp/lottery_history.log
tmux new-session -d
tmux send-keys "../../../minerd ${verbose} -c minerd0.toml" Enter
sleep 1
tmux split-window -v
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid0.toml" Enter
sleep 2
tmux split-window -h
tmux new-window
tmux send-keys "../../../minerd ${verbose} -c minerd1.toml" Enter
sleep 1
tmux split-window -v
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid1.toml" Enter
sleep 2
tmux split-window -h
tmux new-window
tmux send-keys "../../../minerd ${verbose} -c minerd2.toml" Enter
sleep 1
tmux split-window -v
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid2.toml" Enter
sleep 2
tmux split-window -h
tmux new-window
tmux send-keys "../../../minerd ${verbose} -c minerd3.toml" Enter
sleep 1
tmux split-window -v
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid3.toml" Enter
sleep 2
tmux split-window -h
tmux new-window
tmux send-keys "../../../minerd ${verbose} -c minerd4.toml" Enter
sleep 1
tmux split-window -v
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid4.toml" Enter
tmux select-layout even-horizontal
tmux attach

View File

@@ -1,13 +1,13 @@
darkfid localnet
================
This will start one darkfid node in localnet mode,
along with a minerd daemon to mine blocks.
This will start one `darkfid` node in localnet mode,
along with a `minerd` daemon to mine blocks.
If we want to test wallet stuff, we must generate
a testing wallet and pass its address to the darkfid
a testing wallet and pass its address to the `darkfid`
config, so the wallet gets the block rewards the node
produces. First we start darkfid and wait until its
produces. First we start `darkfid` and wait until its
initialized:
```
% ./tmux_sessions.sh

View File

@@ -8,3 +8,6 @@
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48467"
# PoW miner number of threads to use
#threads = 4

View File

@@ -1,5 +1,8 @@
darkfid localnet
================
This will start three darkfid. Two of the darkfid participate
in the consensus, and one is just a sync node.
This will start three `darkfid` node instances
in localnet mode. Two of the nodes are activelly
mining, while the other one is just a sync node.
We also start two `minerd` daemons to mine blocks,
one for each of the `darkfid` mining nodes.

View File

@@ -6,71 +6,55 @@
## 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"
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48340"
# Path to the wallet database
wallet_path = "darkfid0/wallet.db"
# Password for the wallet database
wallet_pass = "changeme"
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Path to the blockchain database directory
database = "darkfid0/blockchain"
database = "darkfid0"
# JSON-RPC listen url
rpc_listen = "tcp://127.0.0.1:8340"
# Finalization threshold, denominated by number of blocks
threshold = 3
# Participate in the consensus protocol
consensus = true
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48467"
# Enable single-node mode for local testing
single_node = false
# PoW block production target, in seconds
pow_target = 20
# P2P accept addresses for the consensus protocol
consensus_p2p_accept = ["tcp://127.0.0.1:8341"]
# Participate in block production
miner = true
# P2P external addresses for the consensus protocol
consensus_p2p_external = ["tcp://127.0.0.1:8341"]
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Connection slots for the consensus protocol
#consensus_slots = 8
# Skip syncing process and start node right away
skip_sync = true
# Connection slots for the consensus protocol
#consensus_p2p_seed = []
## Localnet sync P2P network settings
[network_config."localnet".sync_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48242"]
# Peers to connect to for the consensus protocol
#consensus_p2p_peer = []
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# 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
# Allow localnet hosts
localnet = true
# Enable channel log
channel_log = true
## Localnet miners P2P network settings
[network_config."localnet".miners_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48241"]
# Whitelisted faucet public key
#faucet_pub = []
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Verify system clock is correct
#clock_sync = true
# Allow localnet hosts
localnet = true

View File

@@ -6,71 +6,69 @@
## 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"
## 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.
# Path to the wallet database
wallet_path = "darkfid1/wallet.db"
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48440"
# Password for the wallet database
wallet_pass = "changeme"
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Path to the blockchain database directory
database = "darkfid1/blockchain"
database = "darkfid1"
# JSON-RPC listen url
rpc_listen = "tcp://127.0.0.1:8440"
# Finalization threshold, denominated by number of blocks
threshold = 3
# Participate in the consensus protocol
consensus = true
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48567"
# Enable single-node mode for local testing
single_node = false
# PoW block production target, in seconds
pow_target = 20
# P2P accept addresses for the consensus protocol
consensus_p2p_accept = ["tcp://127.0.0.1:8441"]
# Participate in block production
miner = true
# P2P external addresses for the consensus protocol
consensus_p2p_external = ["tcp://127.0.0.1:8441"]
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Connection slots for the consensus protocol
#consensus_slots = 8
# Skip syncing process and start node right away
skip_sync = false
# Connection slots for the consensus protocol
#consensus_p2p_seed = []
## Localnet sync P2P network settings
[network_config."localnet".sync_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48342"]
# Peers to connect to for the consensus protocol
consensus_p2p_peer = ["tcp://127.0.0.1:8341"]
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Prefered transports of outbound connections for the consensus protocol
consensus_p2p_transports = ["tls", "tcp"]
# Peer nodes to manually connect to
peers = ["tcp+tls://0.0.0.0:48242"]
# 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
# Allow localnet hosts
localnet = true
# Enable channel log
channel_log = true
## Localnet miners P2P network settings
[network_config."localnet".miners_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48341"]
# Whitelisted faucet public key
#faucet_pub = []
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Verify system clock is correct
#clock_sync = true
# Peer nodes to manually connect to
peers = ["tcp+tls://0.0.0.0:48241"]
# Allow localnet hosts
localnet = true

View File

@@ -6,71 +6,39 @@
## 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"
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48540"
# Path to the wallet database
wallet_path = "darkfid2/wallet.db"
# Password for the wallet database
wallet_pass = "changeme"
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Path to the blockchain database directory
database = "darkfid2/blockchain"
database = "darkfid2"
# JSON-RPC listen url
rpc_listen = "tcp://127.0.0.1:8540"
# Finalization threshold, denominated by number of blocks
threshold = 3
# Participate in the consensus protocol
consensus = false
# PoW block production target, in seconds
pow_target = 20
# Enable single-node mode for local testing
single_node = false
# Participate in block production
miner = false
# P2P accept addresses for the consensus protocol
#consensus_p2p_accept = ["tcp://127.0.0.1:8541"]
# Skip syncing process and start node right away
skip_sync = false
# P2P external addressesfor the consensus protocol
#consensus_p2p_external = ["tcp://127.0.0.1:8541"]
## Localnet sync P2P network settings
[network_config."localnet".sync_net]
# P2P accept addresses the instance listens on for inbound connections
inbound = ["tcp+tls://0.0.0.0:48442"]
# Connection slots for the consensus protocol
#consensus_slots = 8
# Whitelisted network transports for outbound connections
allowed_transports = ["tcp+tls"]
# Connection slots for the consensus protocol
#consensus_p2p_seed = ["tcp://127.0.0.1:33033"]
# Peer nodes to manually connect to
peers = ["tcp+tls://0.0.0.0:48242", "tcp+tls://0.0.0.0:48342"]
# 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
# Allow localnet hosts
localnet = true
# Enable channel log
channel_log = true
# Whitelisted faucet public key
#faucet_pub = []
# Verify system clock is correct
#clock_sync = true

View File

@@ -0,0 +1,13 @@
## minerd 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.
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48467"
# PoW miner number of threads to use
threads = 2

View File

@@ -0,0 +1,13 @@
## minerd 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.
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48567"
# PoW miner number of threads to use
threads = 2

View File

@@ -1,22 +1,28 @@
#!/bin/sh
set -e
# Start a tmux session with two consensus and a non-consensus node.
# Start a tmux session with two mining and a non-mining darkfid nodes.
# Additionally, start two minerd daemons.
if [ "$1" = "-v" ]; then
verbose="-v"
if [ "$1" = "-vv" ]; then
verbose="-vv"
shift
else
verbose=""
fi
tmux new-session -d
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid0.toml" Enter
tmux send-keys "../../../minerd ${verbose} -c minerd0.toml" Enter
sleep 1
tmux split-window -v
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid0.toml" Enter
sleep 2
tmux select-pane -t 0
tmux split-window -h
tmux new-window
tmux send-keys "../../../minerd ${verbose} -c minerd1.toml" Enter
sleep 1
tmux split-window -v
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 new-window
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid2.toml" Enter
tmux attach

View File

@@ -1,5 +0,0 @@
faucetd/blockchain
darkfid0
darkfid1
darkfid2
lilith_hosts.tsv

View File

@@ -1,124 +0,0 @@
darkfid localnet
================
This will start three darkfid and one faucetd network. Two of the
darkfid participate in the consensus, and one is just a sync node.
The faucetd is able to airdrop arbitrary tokens into wallets.
| Node | RPC endpoint | Consensus |
|------------|------------------------|-----------|
| `darkfid0` | `tcp://127.0.0.1:8340` | `true` |
| `darkfid1` | `tcp://127.0.0.1:8440` | `true` |
| `darkfid2` | `tcp://127.0.0.1:8540` | `false` |
| `faucetd` | `tcp://127.0.0.1:8640` | `false` |
## Initialize wallets
```
$ ./drk -e tcp://127.0.0.1:8340 wallet --initialize
$ ./drk -e tcp://127.0.0.1:8340 wallet --keygen
$ ./drk -e tcp://127.0.0.1:8440 wallet --initialize
$ ./drk -e tcp://127.0.0.1:8440 wallet --keygen
$ ./drk -e tcp://127.0.0.1:8540 wallet --initialize
$ ./drk -e tcp://127.0.0.1:8540 wallet --keygen
```
Make note of the addresses given by `keygen`.
## Airdrops
Let's airdrop some money do `darkfid1` and `darkfid2`. For this to
work, we also need to subscribe to their RPC endpoints so we can scan
incoming blocks and add them to our wallet.
```
$ ./drk -e tcp://127.0.0.1:8440 subscribe blocks
$ ./drk -e tcp://127.0.0.1:8540 subscribe blocks
```
And now we can execute our airdrop calls:
```
$ ./drk -e tcp://127.0.0.1:8440 airdrop -f tcp://127.0.0.1:8640 \
15.57 A7f1RKsCUUHrSXA7a9ogmwg8p3bs6F47ggsW826HD4yd
$ ./drk -e tcp://127.0.0.1:8540 airdrop -f tcp://127.0.0.1:8640 \
66.31 BNBZ9YprWvEGMYHW4dFvbLuLfHnN9Bs64zuTFQAbw9Dy
```
If successful, `drk` should give a transaction ID. Now watch the
network and wait until the blocks with these transactions get
finalized.
Then you can check the wallets' balances:
```
$ ./drk -e tcp://127.0.0.1:8440 wallet --balance
$ ./drk -e tcp://127.0.0.1:8540 wallet --balance
```
## Payments
Now let's try to send a little bit of funds from `darkfid1` to
`darkfid2`:
```
$ ./drk -e tcp://127.0.0.1:8440 transfer 1.33 \
A7f1RKsCUUHrSXA7a9ogmwg8p3bs6F47ggsW826HD4yd \
6uw3S12RWnhikrrTrtVsTJFQQdc5i9QWoVLUEfGd8B5Z \
> transaction
```
The command will build proving keys, and create a transaction on
stdout which you should redirect into a file.
You can optionally inspect this transaction:
```
$ ./drk -e tcp://127.0.0.1:8440 inspect < transaction
```
And then we broadcast it:
```
$ ./drk -e tcp://127.0.0.1:8440 broadcast < transaction
```
On success, you should see a transaction ID.
Now wait again until the tx is finalized and scanned by your `drk`
subscribers so you'll see the balance changes.
## Swaps
We can also try to swap some coins between `darkfid1` and `darkfid2`.
First `darkfid1` will initiate the 1st half of the swap, and send it
to `darkfid2`:
```
$ ./drk -e tcp://127.0.0.1:8440 otc init \
-v 14.24:66.41 \
-t A7f1RKsCUUHrSXA7a9ogmwg8p3bs6F47ggsW826HD4yd:BNBZ9YprWvEGMYHW4dFvbLuLfHnN9Bs64zuTFQAbw9Dy \
> half_swap
```
Then `darkfid2` can create the second half and send it back to
`darkfid1`:
```
$ ./drk -e tcp://127.0.0.1:8540 otc join < half_swap > full_swap
```
And finally `darkfid1` can sign and broadcast it:
```
$ ./drk -e tcp://127.0.0.1:8440 otc sign < full_swap > signed_swap
$ ./drk -e tcp://127.0.0.1:8440 broadcast < signed_swap
```
After finalization, the balances should update.

View File

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

View File

@@ -1,77 +0,0 @@
## 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
# Enable single-node mode for local testing
single_node = false
# 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 = ["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: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 = ["tcp://127.0.0.1:33032"]
# 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

View File

@@ -1,82 +0,0 @@
## 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
# Enable single-node mode for local testing
single_node = false
# 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 = ["tcp://127.0.0.1:33033"]
# Seed nodes JSON-RPC listen URL for clock synchronization
consensus_seed_rpc = ["tcp://127.0.0.1:8340"]
# Peers to connect to for the consensus protocol
#consensus_p2p_peer = []
# Peers JSON-RPC listen URL for clock synchronization
#consensus_peer_rpc = []
# 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 = ["tcp://127.0.0.1:33032"]
# 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

View File

@@ -1,76 +0,0 @@
## 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
# Enable single-node mode for local testing
single_node = 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 = ["tcp://127.0.0.1:33032"]
# 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

View File

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

View File

@@ -1,41 +0,0 @@
## lilith 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.
# JSON-RPC listen URL
#rpc_listen = "tcp://127.0.0.1:18927"
# Daemon published urls, common for all enabled networks
urls = ["tcp://127.0.0.1"]
# Hosts .tsv file to use
hosts_file="lilith_hosts.tsv"
## Per-network settings
[network."darkfid_sync"]
port = 33032
#seeds = []
#peers = []
localnet = true
channel_log = true
[network."darkfid_consensus"]
port = 33033
#seeds = []
#peers = []
localnet = true
channel_log = true
#[network."ircd"]
#port = 25551
#seeds = []
#peers = []
#[network."taud"]
#port = 23331
#seeds = []
#peers = []

View File

@@ -1,30 +0,0 @@
#!/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='!MessageSubsystem::notify' ../../../lilith ${verbose} -c lilith_config.toml" Enter
sleep 10
tmux split-window -v
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid0.toml" Enter
sleep 10
tmux select-pane -t 0
tmux split-window -h
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid1.toml" Enter
sleep 10
tmux select-pane -t 1
tmux split-window -h
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid2.toml" Enter
sleep 10
tmux select-pane -t 3
tmux split-window -h
tmux send-keys "LOG_TARGETS='!sled,!net' ../../../faucetd ${verbose} -c faucetd.toml" Enter
tmux attach