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
15 changes: 14 additions & 1 deletion .github/workflows/ci-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Verify screenshot inventory and mirrors
shell: pwsh
working-directory: .
run: ./scripts/capture-screenshots.ps1 -VerifyExisting

- name: Set up Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -219,18 +224,26 @@ jobs:
test -f docs/docker-regtest.md
test -f docs/supported-bitcoin-core.md
test -f docs/verified-scenarios.md
test -f docs/scenario-authoring.md
test -f docs/proof-bundles.md
test -f docs/threat-model.md
test -f docs/curriculum-map.md
test -f docs/testing-and-ci.md
test -f docs/release-notes-v0.1.0.md
test -f docs/migration-v0.1.0.md
test -f docs/release-readiness.md

- name: Summarize release gate
shell: bash
run: |
{
echo "## BitScope release readiness"
echo "- Release candidate: v0.1.0"
echo "- Backend tests passed"
echo "- Verified Scenarios security, cleanup, redaction, report, and export gates passed"
echo "- Verified Scenarios passed twice against disposable Bitcoin Core 28.1 datadirs"
echo "- Community Treasury Recovery flagship and Core-reaching attacks passed"
echo "- Frontend type check, lint, and production build passed"
echo "- Docker Compose config validated"
echo "- Required teaching and operations docs are present"
echo "- Required teaching, threat-model, migration, and release docs are present"
} >> "$GITHUB_STEP_SUMMARY"
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ BitScope is a local-first Bitcoin Core learning laboratory. Contributions should
- Use regtest for mining, wallet mutation, signing, funding, and broadcast workflows.
- Review [the limitations](docs/limitations.md) before proposing hosted services, address-history features, or mainnet behavior.
- Check [the supported Bitcoin Core policy](docs/supported-bitcoin-core.md) when changing RPC parameters or wallet behavior.
- Read [the scenario authoring contract](docs/scenario-authoring.md) before adding or changing a Verified Scenario.
- Read [the threat model](docs/threat-model.md) before changing trust boundaries, token handling, RPC capabilities, evidence, or cleanup.

## Local Setup

Expand Down Expand Up @@ -50,6 +52,7 @@ For a containerized regtest environment, follow [the Docker guide](docs/docker-r
- Keep request models bounded and return stable `BitScopeError` codes with secret-safe details.
- Do not expose RPC credentials, private keys, seed material, xprvs, wallet unlock data, or unfiltered upstream errors.
- Add focused unit tests for service behavior and security boundaries.
- Preserve deterministic, recursively redacted evidence and verify every artifact hash before export.

### Frontend

Expand Down Expand Up @@ -85,13 +88,15 @@ Run the backend suite:

```powershell
cd backend
python -m pytest
python -m pytest --ignore=tests/live_node
```

Build the frontend:
Type-check, lint, and build the frontend:

```powershell
cd frontend
npm run typecheck
npm run lint
npm run build
```

Expand All @@ -103,6 +108,8 @@ docker compose config

Changes to real RPC workflows should also run the opt-in tests described in [Live Bitcoin Core RPC Testing](docs/live-rpc-testing.md). These tests must use an isolated regtest node and disposable wallets.

Scenario changes must additionally cover parsing, state transitions, expected and unexpected failure classification, success and failure cleanup, interruption recovery, redaction, manifest hashing, report generation, and deterministic export. The pinned live test must create all wallets, addresses, outpoints, transactions, and blocks within its own disposable datadir.

## Documentation

Update documentation in the same change when behavior, configuration, supported Bitcoin Core versions, commands, routes, or safety constraints change. Prefer durable user and contributor guidance over implementation backlogs or completed planning documents.
Expand All @@ -116,6 +123,7 @@ Use relative links for repository documents and verify that every referenced pat
- Explain the user-visible outcome and safety implications in the pull request.
- List the exact verification commands and results.
- Call out any live-node test prerequisites or intentionally deferred follow-up work.
- Do not claim that regtest evidence is a security audit, formal proof, production approval, or custody validation.
- Keep the branch current with `main` and resolve CI failures before requesting review.

## Reporting Security Issues
Expand Down
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
# BitScope

**An interactive Bitcoin Core laboratory powered entirely by your own node.**
> **BitScope is a reproducible Bitcoin protocol laboratory that constructs, executes, attacks and verifies Bitcoin transactions against a real Bitcoin Core node.**

BitScope is a learning-focused Bitcoin Core explorer and laboratory inspired by *Learning Bitcoin from the Command Line*. It is not a hosted block explorer clone: every major screen connects UI output back to `bitcoin-cli`, JSON-RPC methods, raw Bitcoin Core JSON, and a plain-English explanation.
BitScope is local-first, regtest-focused, Bitcoin Core-backed, reproducible, educational, evidence-driven, and designed for protocol experimentation. Its Verified Scenarios create isolated wallets and current-run transactions, exercise valid and intentionally invalid paths, classify Bitcoin Core outcomes, record lifecycle evidence, clean owned state, and export deterministic proof bundles.

BitScope is not a hosted explorer, mainnet wallet, custody service, replacement for Bitcoin Core, production treasury coordinator, or guarantee that a policy is safe for real funds. A successful regtest scenario proves only the behavior observed under its recorded Bitcoin Core version, configuration, and assumptions.

## Screenshots

These screenshots show BitScope interacting with a local regtest node: node status, guided Demo Mode, wallet workflows, transaction inspection, script exploration, and the concept library.
These screenshots show the learner-first BitScope experience backed by a local regtest node. Regenerate the complete set with `.\scripts\capture-screenshots.ps1`; see [Screenshot Capture](docs/screenshots/README.md) for validation and review requirements.

| Node dashboard | Demo Mode |
| Learner Home | First Transaction |
| --- | --- |
| ![BitScope node dashboard](docs/screenshots/dashboard.png) | ![BitScope Demo Mode](docs/screenshots/demo-mode.png) |
| ![BitScope learner Home](docs/screenshots/home.png) | ![BitScope First Transaction guided lab](docs/screenshots/first-transaction.png) |

| Wallet lab | Transaction explorer |
| Node Details | Learning Path |
| --- | --- |
| ![BitScope wallet lab](docs/screenshots/wallet-lab.png) | ![BitScope transaction explorer](docs/screenshots/transaction-explorer.png) |
| ![BitScope Node Details](docs/screenshots/node-details.png) | ![BitScope curriculum Learning Path](docs/screenshots/learning-path.png) |

| Script Lab | Learning library |
| Reviewer Mode | Concept Library |
| --- | --- |
| ![BitScope Script Lab](docs/screenshots/script-lab.png) | ![BitScope learning library](docs/screenshots/learning-library.png) |
| ![BitScope Reviewer Mode](docs/screenshots/reviewer-mode.png) | ![BitScope Concept Library](docs/screenshots/learning-library.png) |

## What BitScope Teaches

- Verified transaction workflows: lifecycle, opt-in RBF replacement, multisig PSBT coordination, absolute-height CLTV, and Community Treasury Recovery.
- Evidence review: expected versus unexpected failures, backend-recorded lifecycle events, redacted Core output, deterministic manifests, and proof-bundle inspection.
- Local node state: chain selection, sync, pruning, peers, network reachability, and live status.
- Blocks and transactions: headers, proof of work, Merkle roots, inputs, outputs, witnesses, fees, locktime, and the UTXO model.
- Wallet and regtest workflows: wallet loading, descriptors, addresses, UTXOs, mining, faucet sends, confirmations, and safe local spending.
Expand All @@ -41,6 +45,7 @@ These screenshots show BitScope interacting with a local regtest node: node stat

Implemented learning surfaces include:

- Verified Scenarios, Reviewer Mode, Curriculum and Challenge Mode, policy comparison, lifecycle timelines, and deterministic proof export.
- Dashboard, Live monitor, Peer/privacy dashboard, Integrations, and RPC explorer.
- Blocks, Transactions, Tx Control, Mempool, Fees, Address, and Local Indexer.
- Wallet, Regtest, Multisig, PSBT, Timelocks, Descriptors, Taproot, Keys.
Expand Down Expand Up @@ -194,10 +199,17 @@ CI runs backend hardening gates, the complete live suite twice against clean dis
- [Docker regtest](docs/docker-regtest.md): full local stack, reset, and configuration.
- [Regtest guide](docs/regtest-guide.md): mining, coinbase maturity, and demo flow.
- [Demo script](docs/demo-script.md): reviewer-facing walkthrough.
- [Verified Scenarios](docs/verified-scenarios.md): catalogue and proved scenario behavior.
- [Scenario authoring](docs/scenario-authoring.md): closed-definition, execution, evidence, cleanup, and review contract.
- [Proof bundles](docs/proof-bundles.md): deterministic archive structure and verification.
- [Threat model](docs/threat-model.md): assets, trust boundaries, mitigations, and residual risk.
- [Curriculum map](docs/curriculum-map.md): LBCLI Chapters 3–13 mapped only to implemented capabilities.
- [Learner-first implementation plan](docs/learner-first-experience-plan.md): pre-v0.1.0 Home, navigation, flagship journey, shared lab pattern, and usability gates.
- [Live RPC testing](docs/live-rpc-testing.md): isolated live-node pytest lifecycle and regtest failure mitigations.
- [Testing and CI](docs/testing-and-ci.md): Phase 10 commands, coverage map, and release-readiness gates.
- [Supported Bitcoin Core](docs/supported-bitcoin-core.md): pinned CI version, support policy, and deterministic regtest coverage.
- [Limitations](docs/limitations.md): no hosted APIs, address-history limits, mainnet safety.
- [Release readiness](docs/release-readiness.md): v0.1.0 evidence, checklist, verification, and deferred work.
- [Contributing](CONTRIBUTING.md): development workflow, verification commands, safety invariants, and pull-request expectations.

## Demo Story
Expand Down
45 changes: 23 additions & 22 deletions docs-site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>BitScope Docs</title>
<meta
name="description"
content="BitScope is a local-first Bitcoin Core learning laboratory with a guided regtest demo, command explanations, and Bitcoin Core RPC workflows."
content="BitScope is a reproducible Bitcoin protocol laboratory that constructs, executes, attacks, and verifies transactions against a real Bitcoin Core node."
/>
<link rel="icon" href="assets/bitscope-mark.svg" type="image/svg+xml" />
<link rel="stylesheet" href="styles.css" />
Expand All @@ -27,51 +27,52 @@
</nav>
<div class="hero-grid">
<section class="hero-copy">
<p class="eyebrow">Bitcoin Core lab</p>
<h1>Learn Bitcoin from your own node.</h1>
<p class="eyebrow">Reproducible Bitcoin protocol laboratory</p>
<h1>Construct, attack, and verify transactions against Bitcoin Core.</h1>
<p>
BitScope is a local-first explorer and laboratory for Bitcoin Core RPC, regtest workflows,
wallets, transactions, scripts, PSBTs, descriptors, fees, peers, and node limits.
BitScope is local-first, regtest-focused, educational, and evidence-driven. Reviewed scenarios
record Bitcoin Core outcomes, expected failures, lifecycle events, cleanup, and deterministic proof bundles.
</p>
<div class="actions">
<a class="button primary" href="https://github.com/comwanga/BitScope#quick-start">Run locally</a>
<a class="button" href="#screenshots">View screenshots</a>
</div>
</section>
<img class="hero-shot" src="screenshots/demo-mode.png" alt="BitScope Demo Mode screen" />
<img class="hero-shot" src="screenshots/home.png" alt="BitScope learner Home screen" />
</div>
</header>

<main>
<section id="screenshots" class="section">
<div class="section-heading">
<p class="eyebrow">Screenshots</p>
<h2>Interactive workflows, not a hosted explorer clone.</h2>
<h2>Real local-node workflows, not a hosted explorer.</h2>
<p>
These screens show BitScope interacting with a local regtest node and pairing each UI result with
command-line and JSON-RPC context.
command-line and JSON-RPC context. BitScope is not a mainnet wallet, custody service, production
treasury coordinator, security audit, or replacement for Bitcoin Core.
</p>
</div>
<div class="gallery">
<article>
<img src="screenshots/dashboard.png" alt="BitScope node dashboard" />
<h3>Node dashboard</h3>
<img src="screenshots/first-transaction.png" alt="BitScope First Transaction guided lab" />
<h3>First Transaction</h3>
</article>
<article>
<img src="screenshots/wallet-lab.png" alt="BitScope wallet lab" />
<h3>Wallet lab</h3>
<img src="screenshots/node-details.png" alt="BitScope Node Details" />
<h3>Node Details</h3>
</article>
<article>
<img src="screenshots/transaction-explorer.png" alt="BitScope transaction explorer" />
<h3>Transaction explorer</h3>
<img src="screenshots/learning-path.png" alt="BitScope curriculum Learning Path" />
<h3>Learning Path</h3>
</article>
<article>
<img src="screenshots/script-lab.png" alt="BitScope Script Lab" />
<h3>Script Lab</h3>
<img src="screenshots/reviewer-mode.png" alt="BitScope Reviewer Mode" />
<h3>Reviewer Mode</h3>
</article>
<article>
<img src="screenshots/learning-library.png" alt="BitScope learning library" />
<h3>Learning library</h3>
<img src="screenshots/learning-library.png" alt="BitScope Concept Library" />
<h3>Concept Library</h3>
</article>
</div>
</section>
Expand All @@ -88,11 +89,11 @@ <h2>Hosted docs, local execution.</h2>
<div class="cards">
<article>
<h3>Frontend</h3>
<p>Next.js pages for dashboards, labs, command explanations, and educational workflows.</p>
<p>Next.js pages for dashboards, Verified Scenarios, Reviewer Mode, curriculum, policy comparison, and labs.</p>
</article>
<article>
<h3>Backend</h3>
<p>FastAPI services translate Bitcoin Core RPC responses into friendly, secret-safe learning data.</p>
<p>FastAPI executes closed reviewed workflows and emits typed, redacted, hash-covered evidence.</p>
</article>
<article>
<h3>Bitcoin Core</h3>
Expand All @@ -108,8 +109,8 @@ <h2>Start with regtest.</h2>
cd BitScope
.\scripts\compose.ps1 up --build</code></pre>
<p>
Open <code>http://localhost:3000</code>, then use Demo Mode to create a clean wallet, mine mature
regtest coins, send a transaction, decode script, and export the command trail.
Open <code>http://localhost:3000/capstone-demo</code> for the canonical Reviewer Mode walkthrough,
or use the shorter Demo Mode for basic wallet and transaction onboarding.
</p>
</section>
</main>
Expand Down
Binary file removed docs-site/screenshots/dashboard.png
Binary file not shown.
Binary file removed docs-site/screenshots/demo-mode.png
Binary file not shown.
Binary file added docs-site/screenshots/first-transaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-site/screenshots/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs-site/screenshots/learning-library.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-site/screenshots/learning-path.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-site/screenshots/node-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-site/screenshots/reviewer-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs-site/screenshots/script-lab.png
Binary file not shown.
Binary file removed docs-site/screenshots/transaction-explorer.png
Binary file not shown.
Binary file removed docs-site/screenshots/wallet-lab.png
Binary file not shown.
Loading
Loading