Skip to content

test(regnet): isolate tests and refresh mainnet seeds - #24

Open
pig-g wants to merge 2 commits into
bismuthfoundation:masterfrom
pig-g:hermes/activation-pilot
Open

test(regnet): isolate tests and refresh mainnet seeds#24
pig-g wants to merge 2 commits into
bismuthfoundation:masterfrom
pig-g:hermes/activation-pilot

Conversation

@pig-g

@pig-g pig-g commented Jul 26, 2026

Copy link
Copy Markdown

Summary

  • add explicit --config-custom, --regnet-dir, --wallet-file, --bind, and ownership-token node startup options
  • run pytest against a loopback-only regnet with temporary databases, application logs, subprocess output, and wallet keys
  • replace the fixed startup sleep with a bounded real RPC readiness probe tied to the spawned node by a unique token
  • guarantee spawn-failure, startup-failure, terminate/kill, environment restoration, and temporary-file cleanup
  • make regtest_generate(N) retry until exactly N blocks are created or fail
  • remove the broken bismuthcore test dependency while preserving transaction signature verification
  • add a pinned Python 3.11 dependency graph, a guarded one-command clean runner, and immutable-action GitHub Actions coverage
  • replace stale mainnet seeds with nine public nodes verified through two consecutive read-only RPC rounds
  • list the maintained Terranbase Bismuth explorer

Mainnet metadata refresh

  • queried candidate nodes with BismuthClient getversion and statusjson; no mutable RPC was used
  • retained exactly nine IPv4 global-unicast nodes on port 5658 that responded in both rounds
  • observed all nine synchronized at block 4,914,895 with allowed mainnet0021, mainnet0022, or mainnet0023 protocol versions
  • made peers.txt and suggested_peers.txt the same curated fallback set so stale candidates are not reintroduced
  • added https://bismuth1.terranbase.xyz, verified over HTTPS with recent blocks matching the live-node sequence
  • added offline regressions for exact seed count, JSON parity, port, IPv4 global-unicast scope, and explorer documentation

Safety boundaries

  • defaults regnet to 127.0.0.1 and explicitly binds the test node there
  • loads tests/config_custom.txt explicitly (regnet=True, no mainnet peer path)
  • rejects a missing explicit custom config or a regnet datadir paired with mainnet settings
  • redirects ledger, index, peers, wallet, application log, and subprocess output into a pytest temporary directory
  • fails immediately if port 3030 already has a listener; readiness additionally requires the spawned node's random RPC token
  • cleans process, environment variable, database, peer, wallet, and log state after the suite
  • keeps the legacy node.py regnet2 positional form parse-compatible
  • refuses to clear a symlinked or non-virtualenv .venv

Verification

  • ./scripts/test_regnet.sh60 passed in a newly recreated Python 3.11 venv
  • original suite only — 26 passed
  • regnet runtime and metadata regressions — 34 passed
  • test_api_getaddresssince — passed in three independent regnet sessions
  • repository node.log SHA-256 unchanged across fixture execution
  • malicious .venv symlink guard — passed; target marker preserved
  • post-suite 127.0.0.1:3030 — closed (connect_ex=111)
  • python3 -m compileall — passed
  • shellcheck scripts/test_regnet.sh — passed
  • git diff --check — passed
  • added-line security scan — no secrets, shell injection, eval/exec, pickle, or SQL formatting findings
  • post-fix independent review — passed=true, security concerns 0, logic errors 0, suggestions 0

Closes pig-g#1

@pig-g pig-g changed the title test(regnet): isolate and reproduce local node tests test(regnet): isolate tests and refresh mainnet seeds Jul 26, 2026
@hclivess

Copy link
Copy Markdown
Member

Can you cross open PR on https://github.com/hclivess/Bismuth ? Most of these may not be relevant anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activation pilot: restore reproducible regnet and ship three verified labs

2 participants