From 4e666309ca218e2de580915594ac71638ef75a74 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Thu, 7 May 2026 08:28:52 +1000 Subject: [PATCH] docs: add masternode network section and v0.0.3/v0.0.4 changelog entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit README: - New "Masternode Network" section between "Re-exporting Wallet Data" and "Project Structure", documenting the `regtest-mn.tar.gz` release artifact, the exported directory layout, the `DASHD_MN_DATADIR` env var convention used by `rust-dashcore/dash-spv` integration tests, and `generate_masternode.py` flags. - Project Structure listing now includes `generate_masternode.py` and `generator/masternode_network.py`. CHANGELOG: - New v0.0.4 entry for the masternode network generator (#4) with the asset list (`regtest-mn.tar.gz`, `regtest-40000.tar.gz`, `regtest-200.tar.gz`). - Retroactive v0.0.3 entry for the existing 200-block release (no PR — release-only bump that shipped `regtest-200.tar.gz`). --- CHANGELOG.md | 23 +++++++++++++++++ README.md | 70 +++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 82 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 604b615..e498081 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## v0.0.4 - masternode network generator + +### Added +- masternode network generator producing real DIP-0024 rotating quorums for SPV masternode-list-sync integration tests ([#4](https://github.com/dashpay/regtest-blockchain/pull/4)) @xdustinface + +### Assets +- `regtest-mn.tar.gz` — 4-masternode network with 8 successfully-mined DKG cycles (`llmq_test` + `llmq_test_dip0024`) +- `regtest-40000.tar.gz` — full 40K-block chain (unchanged from v0.0.3) +- `regtest-200.tar.gz` — minimal 200-block chain (unchanged from v0.0.3) + +**Full Changelog**: https://github.com/dashpay/regtest-blockchain/compare/v0.0.3...v0.0.4 + +## v0.0.3 - add minimal 200-block test data + +### Added +- `regtest-200.tar.gz` minimal 200-block chain (~1.7MB) with two wallets (`default` + `wallet`), sufficient for mempool and basic sync tests + +### Assets +- `regtest-40000.tar.gz` — full 40K-block chain (unchanged from v0.0.2) +- `regtest-200.tar.gz` — minimal 200-block chain + +**Full Changelog**: https://github.com/dashpay/regtest-blockchain/compare/v0.0.2...v0.0.3 + ## v0.0.2 - initial SPV integration tests ### Changed diff --git a/README.md b/README.md index 1d974a2..870f8fa 100644 --- a/README.md +++ b/README.md @@ -65,21 +65,69 @@ python3 export_wallets.py data/regtest-15000 This starts a temporary dashd instance, loads all wallets found in the data directory, and writes updated JSON files to `wallets/`. +## Masternode Network + +A separate generator produces a regtest chain with a fully-active 4-masternode network and real DIP-0024 rotating quorums, intended for SPV masternode-list-sync integration tests: + +```bash +curl -LO https://github.com/dashpay/regtest-blockchain/releases/latest/download/regtest-mn.tar.gz +tar -xzf regtest-mn.tar.gz +``` + +The exported directory contains 5 dashd datadirs (1 controller + 4 masternodes), the `network.json` metadata file, and exported wallet stats: + +``` +regtest-mn/ +├── network.json # MN keys, proTxHashes, chain_height, dkg_cycles_completed, dashd args +├── controller/regtest/ # controller datadir (full chain + wallet) +├── mn1/regtest/ # masternode 1 datadir +├── mn2/regtest/ +├── mn3/regtest/ +├── mn4/regtest/ +└── wallets/wallet.json # exported wallet stats (mnemonics, addresses, txs) +``` + +Consumers (e.g. `rust-dashcore/dash-spv` integration tests) point at the directory via env var: + +```bash +DASHD_PATH=/path/to/dashd \ +DASHD_MN_DATADIR=/path/to/regtest-mn \ +cargo test -p dash-spv --test dashd_masternode +``` + +The chain ships with 8 successfully-mined DKG cycles for both `llmq_test` (type 100, 3 members) and `llmq_test_dip0024` (type 103, 4 members, rotating). Every commit is real (non-zero `quorumPublicKey`); the exit tip lands in the DKG Idle gap so consumers can drive a fresh `mine_dkg_cycle` from phase 1 cleanly. + +Generate locally: + +```bash +python3 generate_masternode.py --dashd-path /path/to/dashd + +# Custom number of DKG cycles (default: 8) +python3 generate_masternode.py --dashd-path /path/to/dashd --dkg-cycles 12 + +# Custom output directory +python3 generate_masternode.py --dashd-path /path/to/dashd --output-dir /tmp/output +``` + +End-to-end generation takes a few minutes — masternodes run as separate dashd processes and walk through DKG phases 1-6 with message-count gating that mirrors Dash Core's `mine_quorum` / `mine_cycle_quorum` test helpers. + ## Project Structure ``` -├── generate.py # main generation script -├── export_wallets.py # re-export wallet data from existing blockchain +├── generate.py # block-mining + wallet generation script +├── generate_masternode.py # masternode-network + DKG cycle generation script +├── export_wallets.py # re-export wallet data from existing blockchain ├── contrib/ -│ └── setup-dashd.py # cross-platform dashd binary download for CI -├── generator/ # generation library -│ ├── dashd_manager.py # dashd process lifecycle management -│ ├── rpc_client.py # dash-cli RPC wrapper -│ ├── wallet_export.py # wallet statistics collection and JSON export -│ └── errors.py # error types -├── tests/ # unit and integration tests -├── data/ # generated datasets (git-tracked) -└── .github/workflows/ # CI configuration +│ └── setup-dashd.py # cross-platform dashd binary download for CI +├── generator/ # generation library +│ ├── dashd_manager.py # dashd process lifecycle management +│ ├── masternode_network.py # multi-node masternode network manager +│ ├── rpc_client.py # dash-cli RPC wrapper +│ ├── wallet_export.py # wallet statistics collection and JSON export +│ └── errors.py # error types +├── tests/ # unit and integration tests +├── data/ # generated datasets (git-tracked) +└── .github/workflows/ # CI configuration ``` ## Development