minerd: changed comms logic so it polls darkfid for new mining jobs

This commit is contained in:
skoupidi
2025-11-29 17:41:00 +02:00
parent ece4e4d871
commit 9b141f3fcb
46 changed files with 1519 additions and 1345 deletions

View File

@@ -17,26 +17,11 @@ database = "darkfid0"
# Confirmation threshold, denominated by number of blocks
threshold = 6
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48467"
# PoW block production target, in seconds
pow_target = 60
# Participate in block production
miner = true
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# Optional fixed PoW difficulty, used for testing
#pow_fixed_difficulty = 1
# Skip syncing process and start node right away
skip_sync = true

View File

@@ -17,23 +17,11 @@ database = "darkfid1"
# Confirmation threshold, denominated by number of blocks
threshold = 6
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48567"
# PoW block production target, in seconds
pow_target = 60
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# Optional fixed PoW difficulty, used for testing
#pow_fixed_difficulty = 1
# Skip syncing process and start node right away
skip_sync = false

View File

@@ -17,23 +17,11 @@ database = "darkfid2"
# Confirmation threshold, denominated by number of blocks
threshold = 6
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48667"
# PoW block production target, in seconds
pow_target = 60
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# Optional fixed PoW difficulty, used for testing
#pow_fixed_difficulty = 1
# Skip syncing process and start node right away
skip_sync = false

View File

@@ -17,23 +17,11 @@ database = "darkfid3"
# Confirmation threshold, denominated by number of blocks
threshold = 6
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48767"
# PoW block production target, in seconds
pow_target = 60
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# Optional fixed PoW difficulty, used for testing
#pow_fixed_difficulty = 1
# Skip syncing process and start node right away
skip_sync = false

View File

@@ -17,23 +17,11 @@ database = "darkfid4"
# Confirmation threshold, denominated by number of blocks
threshold = 6
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48867"
# PoW block production target, in seconds
pow_target = 60
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# Optional fixed PoW difficulty, used for testing
#pow_fixed_difficulty = 1
# Skip syncing process and start node right away
skip_sync = false

View File

@@ -9,10 +9,28 @@
# PoW miner number of threads to use
threads = 1
# JSON-RPC settings
[rpc]
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48467"
# Polling rate to ask darkfid for mining jobs
#polling_rate = 2
# Disabled RPC methods
#rpc_disabled_methods = []
# Stop mining at given height (0 mines forever)
#stop_at_height = 0
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Wallet mining address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# darkfid JSON-RPC endpoint
endpoint = "tcp://127.0.0.1:48240"

View File

@@ -9,10 +9,28 @@
# PoW miner number of threads to use
threads = 1
# JSON-RPC settings
[rpc]
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48567"
# Polling rate to ask darkfid for mining jobs
#polling_rate = 2
# Disabled RPC methods
#rpc_disabled_methods = []
# Stop mining at given height (0 mines forever)
#stop_at_height = 0
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Wallet mining address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# darkfid JSON-RPC endpoint
endpoint = "tcp://127.0.0.1:48340"

View File

@@ -9,10 +9,28 @@
# PoW miner number of threads to use
threads = 1
# JSON-RPC settings
[rpc]
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48667"
# Polling rate to ask darkfid for mining jobs
#polling_rate = 2
# Disabled RPC methods
#rpc_disabled_methods = []
# Stop mining at given height (0 mines forever)
#stop_at_height = 0
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Wallet mining address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# darkfid JSON-RPC endpoint
endpoint = "tcp://127.0.0.1:48440"

View File

@@ -9,10 +9,28 @@
# PoW miner number of threads to use
threads = 1
# JSON-RPC settings
[rpc]
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48767"
# Polling rate to ask darkfid for mining jobs
#polling_rate = 2
# Disabled RPC methods
#rpc_disabled_methods = []
# Stop mining at given height (0 mines forever)
#stop_at_height = 0
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Wallet mining address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# darkfid JSON-RPC endpoint
endpoint = "tcp://127.0.0.1:48540"

View File

@@ -9,10 +9,28 @@
# PoW miner number of threads to use
threads = 1
# JSON-RPC settings
[rpc]
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48867"
# Polling rate to ask darkfid for mining jobs
#polling_rate = 2
# Disabled RPC methods
#rpc_disabled_methods = []
# Stop mining at given height (0 mines forever)
#stop_at_height = 0
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Wallet mining address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# darkfid JSON-RPC endpoint
endpoint = "tcp://127.0.0.1:48640"

View File

@@ -17,32 +17,32 @@ else
fi
tmux new-session -d -s $session -n "node0"
tmux send-keys -t $session "$MINERD $verbose -c minerd0.toml" Enter
tmux send-keys -t $session "$MINERD -c minerd0.toml $verbose" Enter
sleep 1
tmux split-window -t $session -v -l 90%
tmux send-keys -t $session "$DARKFID $verbose -c darkfid0.toml" Enter
tmux send-keys -t $session "$DARKFID -c darkfid0.toml $verbose" Enter
sleep 2
tmux new-window -t $session -n "node1"
tmux send-keys -t $session "$MINERD $verbose -c minerd1.toml" Enter
tmux send-keys -t $session "$MINERD -c minerd1.toml $verbose" Enter
sleep 1
tmux split-window -t $session -v -l 90%
tmux send-keys -t $session "$DARKFID $verbose -c darkfid1.toml" Enter
tmux send-keys -t $session "$DARKFID -c darkfid1.toml $verbose" Enter
sleep 2
tmux new-window -t $session -n "node2"
tmux send-keys -t $session "$MINERD $verbose -c minerd2.toml" Enter
tmux send-keys -t $session "$MINERD -c minerd2.toml $verbose" Enter
sleep 1
tmux split-window -t $session -v -l 90%
tmux send-keys -t $session "$DARKFID $verbose -c darkfid2.toml" Enter
tmux send-keys -t $session "$DARKFID -c darkfid2.toml $verbose" Enter
sleep 2
tmux new-window -t $session -n "node3"
tmux send-keys -t $session "$MINERD $verbose -c minerd3.toml" Enter
tmux send-keys -t $session "$MINERD -c minerd3.toml $verbose" Enter
sleep 1
tmux split-window -t $session -v -l 90%
tmux send-keys -t $session "$DARKFID $verbose -c darkfid3.toml" Enter
tmux send-keys -t $session "$DARKFID -c darkfid3.toml $verbose" Enter
sleep 2
tmux new-window -t $session -n "node4"
tmux send-keys -t $session "$MINERD $verbose -c minerd4.toml" Enter
tmux send-keys -t $session "$MINERD -c minerd4.toml $verbose" Enter
sleep 1
tmux split-window -t $session -v -l 90%
tmux send-keys -t $session "$DARKFID $verbose -c darkfid4.toml" Enter
tmux send-keys -t $session "$DARKFID -c darkfid4.toml $verbose" Enter
tmux attach -t $session

View File

@@ -9,12 +9,12 @@ a testing wallet and pass its address to the `darkfid`
config, so the wallet gets the block rewards the node
produces. We generate a wallet, set it as the default
and set its address as the `recipient` field in
`darkfid.toml`, using the porvided automated script:
`minerd.toml`, using the porvided automated script:
```
% ./init-wallet.sh
```
Then start `darkfid` and wait until its initialized:
Then start the daemones and wait until `darkfid` is initialized:
```
% ./tmux_sessions.sh
```

View File

@@ -1,3 +1,3 @@
#!/bin/sh
rm -rf darkfid drk
sed -i -e "s|recipient =.*|recipient = \"9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U\"|g" darkfid.toml
sed -i -e "s|recipient =.*|recipient = \"9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U\"|g" minerd.toml

View File

@@ -17,27 +17,12 @@ database = "darkfid"
# Confirmation threshold, denominated by number of blocks
threshold = 1
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48467"
# PoW block production target, in seconds
pow_target = 10
# Optional fixed PoW difficulty, used for testing
pow_fixed_difficulty = 1
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "6iW9nywZYvyhcM7P1iLwYkh92rvYtREDsC8hgqf2GLuT"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# Skip syncing process and start node right away
skip_sync = true

View File

@@ -7,4 +7,4 @@ $DRK wallet initialize
$DRK wallet keygen
$DRK wallet default-address 1
wallet=$($DRK wallet address)
sed -i -e "s|9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U|$wallet|g" darkfid.toml
sed -i -e "s|9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U|$wallet|g" minerd.toml

View File

@@ -9,10 +9,30 @@
# PoW miner number of threads to use
#threads = 4
# JSON-RPC settings
[rpc]
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48467"
# Polling rate to ask darkfid for mining jobs
#polling_rate = 2
# Disabled RPC methods
#rpc_disabled_methods = []
# Stop mining at given height (0 mines forever)
#stop_at_height = 0
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Wallet mining address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward.
# This is the DAO spend hook set for convinience,
# replace with your own one.
#spend_hook = "6iW9nywZYvyhcM7P1iLwYkh92rvYtREDsC8hgqf2GLuT"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# darkfid JSON-RPC endpoint
endpoint = "tcp://127.0.0.1:48240"

View File

@@ -52,30 +52,30 @@ wait_token() {
}
mint_dao() {
$DRK dao create 20 10 10 0.67 MLDY > $OUTPUT_FOLDER/dao.toml
$DRK dao import MiladyMakerDAO < $OUTPUT_FOLDER/dao.toml
$DRK dao create 20 10 10 0.67 ANON > $OUTPUT_FOLDER/dao.toml
$DRK dao import AnonDAO < $OUTPUT_FOLDER/dao.toml
$DRK dao list
$DRK dao list MiladyMakerDAO
$DRK dao list AnonDAO
$DRK dao mint MiladyMakerDAO | tee $OUTPUT_FOLDER/dao-mint.tx | $DRK broadcast
$DRK dao mint AnonDAO | tee $OUTPUT_FOLDER/dao-mint.tx | $DRK broadcast
}
wait_dao_mint() {
while [ "$($DRK dao list MiladyMakerDAO | grep '^Transaction hash: ' | awk '{print $3}')" = None ]; do
while [ "$($DRK dao list AnonDAO | grep '^Transaction hash: ' | awk '{print $3}')" = None ]; do
sleep $SLEEP_TIME
sh ./sync-wallet.sh > /dev/null
done
}
fill_treasury() {
PUBKEY="$($DRK dao list MiladyMakerDAO | grep '^Notes Public key: ' | cut -d ' ' -f4)"
PUBKEY="$($DRK dao list AnonDAO | grep '^Notes Public key: ' | cut -d ' ' -f4)"
SPEND_HOOK="$($DRK dao spend-hook)"
BULLA="$($DRK dao list MiladyMakerDAO | grep '^Bulla: ' | cut -d' ' -f2)"
$DRK transfer 20 WCKD "$PUBKEY" "$SPEND_HOOK" "$BULLA" | tee $OUTPUT_FOLDER/xfer.tx | $DRK broadcast
BULLA="$($DRK dao list AnonDAO | grep '^Bulla: ' | cut -d' ' -f2)"
$DRK transfer 20 DAWN "$PUBKEY" "$SPEND_HOOK" "$BULLA" | tee $OUTPUT_FOLDER/xfer.tx | $DRK broadcast
}
dao_balance() {
BALANCE=$($DRK dao balance MiladyMakerDAO 2>/dev/null)
BALANCE=$($DRK dao balance AnonDAO 2>/dev/null)
# No tokens received at all yet
if echo "$BALANCE" | grep -q "No unspent balances found"; then
echo 0
@@ -94,7 +94,7 @@ dao_balance() {
}
wait_dao_treasury() {
while [ "$(dao_balance WCKD)" = 0 ]; do
while [ "$(dao_balance DAWN)" = 0 ]; do
sleep $SLEEP_TIME
sh ./sync-wallet.sh > /dev/null
done
@@ -102,12 +102,12 @@ wait_dao_treasury() {
propose() {
MY_ADDR=$($DRK wallet address)
PROPOSAL="$($DRK dao propose-transfer MiladyMakerDAO 1 5 WCKD "$MY_ADDR" | cut -d' ' -f3)"
PROPOSAL="$($DRK dao propose-transfer AnonDAO 1 5 DAWN "$MY_ADDR" | cut -d' ' -f3)"
$DRK dao proposal "$PROPOSAL" --mint-proposal | tee $OUTPUT_FOLDER/propose.tx | $DRK broadcast
}
wait_proposal() {
PROPOSAL="$($DRK dao proposals MiladyMakerDAO | cut -d' ' -f2)"
PROPOSAL="$($DRK dao proposals AnonDAO | cut -d' ' -f2)"
while [ "$($DRK dao proposal $PROPOSAL | grep '^Proposal transaction hash: ' | awk '{print $4}')" = None ]; do
sleep $SLEEP_TIME
sh ./sync-wallet.sh > /dev/null
@@ -115,12 +115,12 @@ wait_proposal() {
}
vote() {
PROPOSAL="$($DRK dao proposals MiladyMakerDAO | cut -d' ' -f2)"
PROPOSAL="$($DRK dao proposals AnonDAO | cut -d' ' -f2)"
$DRK dao vote "$PROPOSAL" 1 | tee $OUTPUT_FOLDER/dao-vote.tx | $DRK broadcast
}
wait_vote() {
PROPOSAL="$($DRK dao proposals MiladyMakerDAO | cut -d' ' -f2)"
PROPOSAL="$($DRK dao proposals AnonDAO | cut -d' ' -f2)"
while [ "$($DRK dao proposal $PROPOSAL | grep '^Current proposal outcome: ' | awk '{print $4}')" != "Approved" ]; do
sleep $SLEEP_TIME
sh ./sync-wallet.sh > /dev/null
@@ -128,12 +128,12 @@ wait_vote() {
}
do_exec() {
PROPOSAL="$($DRK dao proposals MiladyMakerDAO | cut -d' ' -f2)"
PROPOSAL="$($DRK dao proposals AnonDAO | cut -d' ' -f2)"
$DRK dao exec --early $PROPOSAL | tee $OUTPUT_FOLDER/dao-exec.tx | $DRK broadcast
}
wait_exec() {
PROPOSAL="$($DRK dao proposals MiladyMakerDAO | cut -d' ' -f2)"
PROPOSAL="$($DRK dao proposals AnonDAO | cut -d' ' -f2)"
while [ -z "$($DRK dao proposal $PROPOSAL | grep '^Proposal was executed on transaction: ')" ]; do
sleep $SLEEP_TIME
sh ./sync-wallet.sh > /dev/null
@@ -141,10 +141,10 @@ wait_exec() {
}
wait_token DRK
mint_token WCKD 42
wait_token WCKD
mint_token MLDY 20
wait_token MLDY
mint_token ANON 42
wait_token ANON
mint_token DAWN 20
wait_token DAWN
mint_dao
wait_dao_mint
fill_treasury

View File

@@ -3,6 +3,6 @@ darkfid localnet
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.
producing blocks, 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.
one for each of the `darkfid` block producing nodes.

View File

@@ -17,23 +17,11 @@ database = "darkfid0"
# Confirmation threshold, denominated by number of blocks
threshold = 6
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48467"
# PoW block production target, in seconds
pow_target = 20
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# Optional fixed PoW difficulty, used for testing
#pow_fixed_difficulty = 1
# Skip syncing process and start node right away
skip_sync = true

View File

@@ -25,23 +25,11 @@ database = "darkfid1"
# Confirmation threshold, denominated by number of blocks
threshold = 6
# minerd JSON-RPC endpoint
minerd_endpoint = "tcp://127.0.0.1:48567"
# PoW block production target, in seconds
pow_target = 20
# Wallet address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# Optional fixed PoW difficulty, used for testing
#pow_fixed_difficulty = 1
# Skip syncing process and start node right away
skip_sync = false

View File

@@ -17,12 +17,12 @@ database = "darkfid2"
# Confirmation threshold, denominated by number of blocks
threshold = 6
# minerd JSON-RPC endpoint
#minerd_endpoint = "tcp://127.0.0.1:28467"
# PoW block production target, in seconds
pow_target = 20
# Optional fixed PoW difficulty, used for testing
#pow_fixed_difficulty = 1
# Skip syncing process and start node right away
skip_sync = false

View File

@@ -9,10 +9,28 @@
# PoW miner number of threads to use
threads = 2
# JSON-RPC settings
[rpc]
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48467"
# Polling rate to ask darkfid for mining jobs
#polling_rate = 2
# Disabled RPC methods
#rpc_disabled_methods = []
# Stop mining at given height (0 mines forever)
#stop_at_height = 0
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Wallet mining address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# darkfid JSON-RPC endpoint
endpoint = "tcp://127.0.0.1:48240"

View File

@@ -9,10 +9,28 @@
# PoW miner number of threads to use
threads = 2
# JSON-RPC settings
[rpc]
# JSON-RPC listen URL
rpc_listen = "tcp://127.0.0.1:48567"
# Polling rate to ask darkfid for mining jobs
#polling_rate = 2
# Disabled RPC methods
#rpc_disabled_methods = []
# Stop mining at given height (0 mines forever)
#stop_at_height = 0
# Blockchain network to use
network = "localnet"
# Localnet blockchain network configuration
[network_config."localnet"]
# Wallet mining address to receive mining rewards.
# This is a dummy one so the miner can start,
# replace with your own one.
recipient = "9vw6WznKk7xEFQwwXhJWMMdjUPi3cXL8NrFKQpKifG1U"
# Optional contract spend hook to use in the mining reward
#spend_hook = "YOUR_SPEND_HOOK_HERE"
# Optional contract user data to use in the mining reward.
# This is not arbitrary data.
#user_data = "YOUR_USER_DATA_HERE"
# darkfid JSON-RPC endpoint
endpoint = "tcp://127.0.0.1:48340"

View File

@@ -18,17 +18,17 @@ else
fi
tmux new-session -d -s $session -n "node0"
tmux send-keys -t $session "$MINERD $verbose -c minerd0.toml" Enter
tmux send-keys -t $session "$MINERD -c minerd0.toml $verbose" Enter
sleep 1
tmux split-window -t $session -v -l 90%
tmux send-keys -t $session "$DARKFID $verbose -c darkfid0.toml" Enter
tmux send-keys -t $session "$DARKFID -c darkfid0.toml $verbose" Enter
sleep 2
tmux new-window -t $session -n "node1"
tmux send-keys -t $session "$MINERD $verbose -c minerd1.toml" Enter
tmux send-keys -t $session "$MINERD -c minerd1.toml $verbose" Enter
sleep 1
tmux split-window -t $session -v -l 90%
tmux send-keys -t $session "$DARKFID $verbose -c darkfid1.toml" Enter
tmux send-keys -t $session "$DARKFID -c darkfid1.toml $verbose" Enter
sleep 2
tmux new-window -t $session -n "node2"
tmux send-keys -t $session "$DARKFID $verbose -c darkfid2.toml" Enter
tmux send-keys -t $session "$DARKFID -c darkfid2.toml $verbose" Enter
tmux attach -t $session