Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# List of binaries devnet needs to function properly
# List of binaries hacknet needs to function properly
COMMANDS := sudo tar zstd getent stress
$(foreach bin,$(COMMANDS),\
$(if $(shell command -v $(bin) 2> /dev/null),$(info),$(error Missing required dependency: `$(bin)`)))
Expand All @@ -18,7 +18,7 @@ export GID := $(shell getent passwd $$(whoami) | cut -d":" -f 4)
EPOCH := $(shell date +%s)
PWD = $(shell pwd)
# Set a unique project name (used for checking if the network is running)
PROJECT ?= devnet
PROJECT ?= hacknet
CHAINSTATE_ARCHIVE ?= $(PWD)/docker/chainstate.tar.zstd
export CHAINSTATE_DIR ?= $(PWD)/docker/chainstate/$(EPOCH)
export DOCKER_NETWORK ?= stacks
Expand Down Expand Up @@ -202,7 +202,7 @@ stress:

# Run the liveness script to verify the services are all loaded and operating as expected
test:
./docker/tests/devnet-liveness.sh
./docker/tests/hacknet-liveness.sh

# Run the chain monitor script (loops and curls /v2/info, parsing the output to show current heights of miners)
monitor:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Devnet
# Hacknet
- Configured for 3 stacks miners and signers
- bind-mounts a local filesystem for data persistence
- Uses a chainstate archive to boot the network quickly
Expand Down Expand Up @@ -129,7 +129,7 @@ ex:
CHAINSTATE_ARCHIVE=./docker/chainstate_new.tar.zstd make up
```

#### Force stop the devnet network
#### Force stop the hacknet network
If the network is in a "stuck" state where the Makefile targets are not stopping the services (i.e. the `.current-chainstate-dir` file was removed while network was running), `down-force` may be used to force stop the network.

```sh
Expand Down
4 changes: 2 additions & 2 deletions docker/bitcoin/bitcoin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ rest=1
rpcbind=0.0.0.0:18443
rpcallowip=0.0.0.0/0
rpcallowip=::/0
rpcuser=devnet
rpcpassword=devnet
rpcuser=hacknet
rpcpassword=hacknet
bind=0.0.0.0:18444

# [debug]
Expand Down
6 changes: 3 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ x-common-vars:
# Bitcoin env vars
- &BITCOIN_PEER_PORT 18444
- &BITCOIN_RPC_PORT 18443
- &BITCOIN_RPC_USER devnet
- &BITCOIN_RPC_PASS devnet
- &BITCOIN_RPC_USER hacknet
- &BITCOIN_RPC_PASS hacknet
- &MINE_INTERVAL ${MINE_INTERVAL:-2} # time in seconds to wait to mine a block in epoch 2.0
- &MINE_INTERVAL_EPOCH25 ${MINE_INTERVAL_EPOCH25:-1} # time in seconds to wait to mine a block in epoch 2.5
- &MINE_INTERVAL_EPOCH3 ${MINE_INTERVAL_EPOCH3:-30} # time in seconds to wait to mine a block in epoch 3.0
Expand Down Expand Up @@ -167,7 +167,7 @@ x-stacks-signer: &stacks-signer
profiles:
- default

name: devnet
name: hacknet

# Services.
# ------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docker/stacks/stacks-follower.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# stacks-node devnet follower confifg
# stacks-node hacknet follower confifg
[node]
name = "$MINER_NAME"
rpc_bind = "0.0.0.0:20443"
Expand Down
2 changes: 1 addition & 1 deletion docker/stacks/stacks-miner_signer.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# stacks-node devnet miner config
# stacks-node hacknet miner config
# event observers:
# - stacks-signer
[node]
Expand Down
2 changes: 1 addition & 1 deletion docker/stacks/stacks-signer.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# stacks-signer devnet config
# stacks-signer hacknet config
stacks_private_key = "$SIGNER_PRIVATE_KEY"
node_host = "$STACKS_NODE_HOST"
endpoint = "$STACKS_SIGNER_ENDPOINT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo -e " -----------------------------------------------"
echo -e "| => (1) 🔬 TEST: [CHECK BITCOIN NODE IS LIVE] |"
echo -e " -----------------------------------------------"

CHECK_BTC_LIVENESS_RESULT=$(curl -s -u "devnet:devnet" --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockcount", "params": []}' -H 'content-type: text/plain;' "http://localhost:18443/" | jq)
CHECK_BTC_LIVENESS_RESULT=$(curl -s -u "hacknet:hacknet" --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockcount", "params": []}' -H 'content-type: text/plain;' "http://localhost:18443/" | jq)

echo -e "\nGET BLOCKCOUNT RPC:"
echo -e $CHECK_BTC_LIVENESS_RESULT | jq
Expand All @@ -22,7 +22,7 @@ echo -e " ------------------------------------------------------"

echo -e "\nMINE 1 BLOCK RPC:"
MINER_ADDRESS="mqVnk6NPRdhntvfm4hh9vvjiRkFDUuSYsH"
CHECK_IF_BTC_MINEABLE_RESULT=$(curl -s -u "devnet:devnet" --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "generatetoaddress", "params": [1, "'$MINER_ADDRESS'"]}' -H 'content-type: text/plain;' "http://localhost:18443/" | jq)
CHECK_IF_BTC_MINEABLE_RESULT=$(curl -s -u "hacknet:hacknet" --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "generatetoaddress", "params": [1, "'$MINER_ADDRESS'"]}' -H 'content-type: text/plain;' "http://localhost:18443/" | jq)

echo -e $CHECK_IF_BTC_MINEABLE_RESULT | jq

Expand Down