diff --git a/Makefile b/Makefile index fddcc10..c705fe1 100644 --- a/Makefile +++ b/Makefile @@ -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)`))) @@ -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 @@ -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: diff --git a/README.md b/README.md index d36eb0d..2f8025d 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/docker/bitcoin/bitcoin.conf b/docker/bitcoin/bitcoin.conf index eb1b1d2..afe43d4 100644 --- a/docker/bitcoin/bitcoin.conf +++ b/docker/bitcoin/bitcoin.conf @@ -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] diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index be42afa..adc9dcc 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -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 @@ -167,7 +167,7 @@ x-stacks-signer: &stacks-signer profiles: - default -name: devnet +name: hacknet # Services. # ------------------------------------------------------------------------------ diff --git a/docker/stacks/stacks-follower.toml b/docker/stacks/stacks-follower.toml index 2a41a37..a9ba70a 100644 --- a/docker/stacks/stacks-follower.toml +++ b/docker/stacks/stacks-follower.toml @@ -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" diff --git a/docker/stacks/stacks-miner_signer.toml b/docker/stacks/stacks-miner_signer.toml index 6a923f7..1b538d3 100644 --- a/docker/stacks/stacks-miner_signer.toml +++ b/docker/stacks/stacks-miner_signer.toml @@ -1,4 +1,4 @@ -# stacks-node devnet miner config +# stacks-node hacknet miner config # event observers: # - stacks-signer [node] diff --git a/docker/stacks/stacks-signer.toml b/docker/stacks/stacks-signer.toml index 5b18451..c9c49e3 100644 --- a/docker/stacks/stacks-signer.toml +++ b/docker/stacks/stacks-signer.toml @@ -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" diff --git a/docker/tests/devnet-liveness.sh b/docker/tests/hacknet-liveness.sh similarity index 96% rename from docker/tests/devnet-liveness.sh rename to docker/tests/hacknet-liveness.sh index 8a0326e..adfa2fc 100755 --- a/docker/tests/devnet-liveness.sh +++ b/docker/tests/hacknet-liveness.sh @@ -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 @@ -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