darkfid: consensus fixes

This commit is contained in:
skoupidi
2024-02-22 17:52:56 +02:00
parent 5e9892363a
commit cff856971d
4 changed files with 65 additions and 28 deletions

View File

@@ -20,6 +20,9 @@ database = "darkfid2"
# Finalization threshold, denominated by number of blocks
threshold = 3
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:28467"
# PoW block production target, in seconds
pow_target = 20
@@ -42,3 +45,17 @@ peers = ["tcp+tls://0.0.0.0:48242", "tcp+tls://0.0.0.0:48342"]
# Allow localnet hosts
localnet = 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 network transports for outbound connections
allowed_transports = ["tcp+tls"]
# 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

@@ -1,6 +1,8 @@
#!/bin/sh
set -e
session=darkfid-small
# Start a tmux session with two mining and a non-mining darkfid nodes.
# Additionally, start two minerd daemons.
@@ -11,18 +13,18 @@ else
verbose=""
fi
tmux new-session -d
tmux send-keys "../../../minerd ${verbose} -c minerd0.toml" Enter
tmux new-session -d -s $session
tmux send-keys -t $session "../../../minerd ${verbose} -c minerd0.toml" Enter
sleep 1
tmux split-window -v
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid0.toml" Enter
tmux split-window -t $session -v
tmux send-keys -t $session "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid0.toml" Enter
sleep 2
tmux new-window
tmux send-keys "../../../minerd ${verbose} -c minerd1.toml" Enter
tmux new-window -t $session
tmux send-keys -t $session "../../../minerd ${verbose} -c minerd1.toml" Enter
sleep 1
tmux split-window -v
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid1.toml" Enter
tmux split-window -t $session -v
tmux send-keys -t $session "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid1.toml" Enter
sleep 2
tmux new-window
tmux send-keys "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid2.toml" Enter
tmux attach
tmux new-window -t $session
tmux send-keys -t $session "LOG_TARGETS='!sled' ../../../darkfid ${verbose} -c darkfid2.toml" Enter
tmux attach -t $session