upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNsable-sh <nsable-sh@noreply.git.bitflash.network>2026-08-12 11:58:03 -0300
committerNsable-sh <nsable-sh@noreply.git.bitflash.network>2026-08-12 11:58:03 -0300
commitb0ed2ce585d2a6fd7c6d8d4db7422734aedccb58 (patch)
tree509f8424e4fed7eb00a1fa3294a26da70eb5e7ef /docs
parentbc3de301d9ed0e5fb5e2034be2e066d77cf23804 (diff)
site: document public deployment contract
Diffstat (limited to 'docs')
-rw-r--r--docs/mining-calculator.md22
-rw-r--r--docs/pool-directory.md18
-rw-r--r--docs/release-verification.md10
-rw-r--r--docs/site.md115
-rw-r--r--docs/tor.md29
5 files changed, 194 insertions, 0 deletions
diff --git a/docs/mining-calculator.md b/docs/mining-calculator.md
index 352eea1..e6cb61b 100644
--- a/docs/mining-calculator.md
+++ b/docs/mining-calculator.md
@@ -84,3 +84,25 @@ The script is intentionally standalone so the same math can later back a
84website widget or status dashboard. Until a public price exists, a website 84website widget or status dashboard. Until a public price exists, a website
85calculator should keep price as a manual field and label fiat profit as 85calculator should keep price as a manual field and label fiat profit as
86speculative. 86speculative.
87
88## Website Fields
89
90A public calculator should ask for:
91
92- miner hashrate and unit;
93- power draw in watts;
94- electricity price per kWh;
95- pool fee percent;
96- optional BTF price;
97- either current Bitflash difficulty or current network hashrate.
98
99The output should separate:
100
101- estimated BTF per day;
102- estimated gross fiat revenue, if a manual price was provided;
103- electricity cost;
104- net profit/loss;
105- the difficulty/hashrate assumptions used.
106
107Never present the fiat number as a market quote unless it comes from a real
108public market. Before that exists, label it as a manual scenario.
diff --git a/docs/pool-directory.md b/docs/pool-directory.md
index 76269b9..ff0640a 100644
--- a/docs/pool-directory.md
+++ b/docs/pool-directory.md
@@ -26,6 +26,10 @@ The generated output contains:
26- `index.html`: human-readable ranking page. 26- `index.html`: human-readable ranking page.
27- `pools.json`: machine-readable API for `api.bitflash.network/pools.json`. 27- `pools.json`: machine-readable API for `api.bitflash.network/pools.json`.
28 28
29The website is a convenience layer, not a consensus or discovery dependency.
30Nodes discover pools through Nostr descriptors and `.btf`; a missing website
31must not stop mining or pool operation.
32
29When a source is an HTTP(S) `pool_status.json`, the directory links to a 33When a source is an HTTP(S) `pool_status.json`, the directory links to a
30`pool_rounds.json` proof file next to it. That file records the block height, 34`pool_rounds.json` proof file next to it. That file records the block height,
31block hash, coinbase txid, coinbase value, pool fee, total shares, per-address 35block hash, coinbase txid, coinbase value, pool fee, total shares, per-address
@@ -41,3 +45,17 @@ Ranking order is intentionally simple:
41 45
42An entry is considered online when the source says the pool is running and its 46An entry is considered online when the source says the pool is running and its
43status file is no more than 120 seconds old. 47status file is no more than 120 seconds old.
48
49## Recommended Hostnames
50
51Use:
52
53```text
54pool.bitflash.network human-readable pool directory
55api.bitflash.network/pools.json
56status.bitflash.network relay/node health, not pool ranking
57docs.bitflash.network operator setup guide
58```
59
60The GUI may use the API as a shortcut for humans, but it should keep the
61existing decentralized pool discovery path as the source of truth.
diff --git a/docs/release-verification.md b/docs/release-verification.md
index 32de74f..408bab9 100644
--- a/docs/release-verification.md
+++ b/docs/release-verification.md
@@ -34,6 +34,16 @@ From a shell with `curl` or `wget`, `sha256sum` and `gpg`:
34scripts/verify-release.sh latest 34scripts/verify-release.sh latest
35``` 35```
36 36
37The public release host should expose latest-file aliases for convenience:
38
39```text
40https://releases.bitflash.network/SHA256SUMS
41https://releases.bitflash.network/SHA256SUMS.asc
42```
43
44Those aliases must point at the current versioned directory. They do not replace
45signature verification; they only make the common manual path shorter.
46
37For a specific release: 47For a specific release:
38 48
39```bash 49```bash
diff --git a/docs/site.md b/docs/site.md
new file mode 100644
index 0000000..522da10
--- /dev/null
+++ b/docs/site.md
@@ -0,0 +1,115 @@
1# Public Site Contract
2
3The public Bitflash sites are generated from this repository. If a deployed
4page and the source disagree, the deployed page is stale.
5
6## Canonical Navigation
7
8Every public page should use the same top navigation:
9
10| label | target |
11|---|---|
12| home | `https://bitflash.network/` |
13| code | `https://git.bitflash.network/bitflash/bitflash` |
14| docs | `https://docs.bitflash.network/` |
15| downloads | `https://releases.bitflash.network/` |
16| explorer | `https://explorer.bitflash.network/` |
17| status | `https://status.bitflash.network/` |
18
19The `code` link intentionally points at the repository, not the Forgejo
20instance root. A visitor choosing "code" wants the source tree.
21
22## Documentation Pages To Publish
23
24The docs index should expose these source files:
25
26| page | source | why it matters |
27|---|---|---|
28| Manual | `README.md` | run, mine, recover, operate |
29| Key derivation and address format | `docs/derivation.md` | independent wallet recovery |
30| Release verification | `docs/release-verification.md` | pinned signing-key flow |
31| Dependencies | `docs/dependencies.md` | pinned secp256k1/RandomX supply chain |
32| Rendezvous and .btf addressing | `docs/rendezvous.md` | network design and caveats |
33| Tor mode | `docs/tor.md` | `-tor`, `-socks`, onion relay operation |
34| Fair launch verifier | `docs/fair-launch.md` | no-premine launch audit |
35| UTXO set commitment | `docs/utxo-commitment.md` | deterministic supply/root audit |
36| UTXO inclusion proofs | `docs/utxo-proofs.md` | proof for one unspent output |
37| Mining calculator | `docs/mining-calculator.md` | local WhatToMine-style estimates |
38| Public pool directory | `docs/pool-directory.md` | `pool_status.json`, `pools.json`, ranking |
39
40## Release Mirror Aliases
41
42Each release remains under its versioned directory:
43
44```text
45https://releases.bitflash.network/v1.2.18/SHA256SUMS
46https://releases.bitflash.network/v1.2.18/SHA256SUMS.asc
47```
48
49The release root should also alias the latest files:
50
51```text
52https://releases.bitflash.network/SHA256SUMS
53https://releases.bitflash.network/SHA256SUMS.asc
54https://releases.bitflash.network/Bitflash-latest-windows.zip
55https://releases.bitflash.network/Bitflash-latest-x86_64.AppImage
56https://releases.bitflash.network/bitflash-node-latest-x86_64
57```
58
59The aliases are convenience only. Verification must still require the pinned
60release key documented in `docs/release-verification.md`.
61
62## Static Explorer
63
64`scripts/build-explorer.py` writes a static explorer with no backend:
65
66```text
67index.html
68style.css
69explorer.js
70logo.png
71blocks.json
72block/<height>.json
73```
74
75Serve it with a strict content policy:
76
77```text
78default-src 'none';
79img-src 'self';
80style-src 'self';
81script-src 'self';
82connect-src 'self';
83base-uri 'none';
84form-action 'none';
85frame-ancestors 'none';
86```
87
88The viewer must never use `innerHTML` for chain data. A malicious transaction
89must be rendered as text, not interpreted as markup.
90
91## Cache Policy
92
93Recommended defaults:
94
95| path | cache |
96|---|---|
97| HTML pages | `public, max-age=0, must-revalidate` |
98| `status.json` | `no-store` |
99| `blocks.json`, `block/*.json` | `public, max-age=0, must-revalidate` |
100| release assets | `public, max-age=14400, must-revalidate` |
101| `SHA256SUMS`, signatures, keys | `public, max-age=0, must-revalidate` |
102
103## Security Headers
104
105Recommended for all static pages:
106
107```text
108Strict-Transport-Security: max-age=31536000; includeSubDomains
109X-Content-Type-Options: nosniff
110Referrer-Policy: no-referrer
111Permissions-Policy: interest-cohort=(), geolocation=(), camera=(), microphone=()
112```
113
114Forgejo has its own application headers and should not blindly inherit the
115static-site CSP.
diff --git a/docs/tor.md b/docs/tor.md
index 087c822..69b29f1 100644
--- a/docs/tor.md
+++ b/docs/tor.md
@@ -25,6 +25,17 @@ bitflash -tor=127.0.0.1:9150
25bitflash -tor=[::1]:9050 25bitflash -tor=[::1]:9050
26``` 26```
27 27
28For a SOCKS5 proxy that is not Tor, use `-socks` directly:
29
30```bash
31bitflash -socks=127.0.0.1:9050
32bitflash -socks=[::1]:9050
33```
34
35If both `-tor` and `-socks` are present, Tor mode wins and the node prints a
36warning. That keeps a command line with `-tor` from silently becoming a custom
37proxy route.
38
28When Tor mode is enabled: 39When Tor mode is enabled:
29 40
30- outbound Nostr relay dials use Tor; 41- outbound Nostr relay dials use Tor;
@@ -34,6 +45,24 @@ When Tor mode is enabled:
34- direct `.onion` dials are refused unless a SOCKS5/Tor proxy is enabled; 45- direct `.onion` dials are refused unless a SOCKS5/Tor proxy is enabled;
35- plain HTTP external-IP probes are skipped. 46- plain HTTP external-IP probes are skipped.
36 47
48Tor mode affects outbound discovery and relay dials. It does not encrypt
49`wallet.dat`, hide mining rewards on-chain, or change the `.btf` identity. A
50relay still sees the TCP client that connected to it; with Tor mode that client
51is the Tor exit or onion circuit endpoint instead of the user's direct IP.
52
53## What to test
54
55Use the public status page only as a rough health check. To prove the local node
56is using Tor/SOCKS, test from the node machine:
57
58```bash
59bitflash -tor -debug
60```
61
62Then confirm in `debug.log` that Nostr and rendezvous dials report the proxy
63path. A DNS leak test should show no local resolver lookup for relay hostnames:
64the SOCKS5 request uses the domain-name form and asks the proxy to resolve it.
65
37## Onion rendezvous relay 66## Onion rendezvous relay
38 67
39An operator can expose a Bitflash rendezvous relay as a Tor hidden service. The 68An operator can expose a Bitflash rendezvous relay as a Tor hidden service. The