upleb.uk

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

summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorbitflash-coin <bookofshamers@outlook.com>2026-08-04 06:41:20 -0700
committerbitflash-coin <bookofshamers@outlook.com>2026-08-04 06:41:20 -0700
commit9e4b42048659363b4a2560dc08fa18861238407f (patch)
tree9cdfff82aa722141ad2ba1b30b11dc33062db945 /README.md
parent5ce650382352c1503f40abf08129ada69402af55 (diff)
readme commit
Diffstat (limited to 'README.md')
-rw-r--r--README.md314
1 files changed, 312 insertions, 2 deletions
diff --git a/README.md b/README.md
index 1ae3af9..9810e8b 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,312 @@
1# bitflash-core 1 Bitflash `BTF`
2Bitflash - CPU-mined with RandomX, anonymous .btf addressing over Nostr, fair launch. 2
3CPU-only cryptocurrency. A revival of Bitcoin 0.1.0 with RandomX proof of work and anonymous `.btf` addressing over Nostr.
4
5---
6
7## What it is
8
9Bitflash keeps Satoshi's original consensus rules and replaces two things:
10
11**RandomX proof of work.** Memory-hard algorithm used by Monero. A laptop competes equally with a server. ASICs and GPUs have no advantage.
12
13**Anonymous addressing.** Every node has a `.btf` address derived from its public key, similar to a Tor `.onion`. Nodes reach each other through encrypted rendezvous tunnels, so no port forwarding is needed and a node behind CGNAT works normally.
14
15No premine. No ICO. 50 BTF per block, halving on schedule, 21M cap, ~2 minute blocks.
16
17### What `.btf` does and does not hide
18
19Worth being precise, because the difference matters if you are relying on it.
20
21**A peer you reach over `.btf` does not learn your IP.** All outbound connections go through a rendezvous tunnel; there is no IP-based peer dialling left in the node. The relay forwards encrypted bytes and cannot read or alter them.
22
23**The rendezvous relay does see your IP.** It has to — it is the thing your TCP connection terminates on. Relays are run by volunteers, so treat that as a party who knows you are on the network.
24
25**The node still listens on 8433.** Nothing dials by IP any more, but the listener is still there, so anyone who already knows your address and can reach that port may connect directly. If that matters to you, firewall it.
26
27This is unlinkability between peers, not anonymity against a network observer. It is not Tor.
28
29---
30
31## Quick start
32
33**Linux:** make the `.AppImage` executable and run it.
34
35**Windows:** extract the `-windows.zip` and run `Bitflash.exe`.
36
37**Keep your node current.** Consensus rules have changed since the first
38releases — 1.0.0 fixed a bug that let anyone spend anyone's coins. A node on an older build will accept
39blocks that current nodes reject, which puts it on a different chain without any
40warning.
41
42Your wallet and chain data live in `%APPDATA%\Bitflash` (Windows) or
43`~/.bitflash` (Linux) and are shared by every version, so upgrading is just
44replacing the binary. Never delete that directory to "fix" something without a
45backup — it holds your keys.
46
47---
48
49## Your wallet: the phrase and the file
50
51The derivation is written down in [docs/derivation.md](docs/derivation.md), with
52test vectors and a script that reproduces them from scratch. It is there so the
53twelve words keep working even if this software does not: paths, address format
54and encoding, enough to recover the keys with ordinary tools and no Bitflash
55code at all.
56
57### The recovery phrase
58
59```
60bitflash -newphrase # create it, show it once, exit
61bitflash -restorephrase="twelve words here" # rebuild a wallet from it
62```
63
64`-newphrase` installs a BIP32 seed, derives the wallet's key pool and default
65receiving address from it, and prints the words once. It refuses if a phrase
66already exists: replacing one silently would strand every coin on addresses the
67written-down words no longer describe.
68
69`-restorephrase` installs the seed and walks forward in batches of a hundred
70addresses, rescanning the chain after each and stopping when a whole batch turns
71up nothing. `-restoredepth=N` looks further. `-showderived=N` lists the addresses
72a phrase produces, so you can check one before trusting it.
73
74The same two operations are in the window, under **Wallet Safety**.
75
76**The words are printed to the terminal and nowhere else** — never to
77`debug.log`, which is the file people are routinely asked to attach to an issue.
78
79**What the phrase does not cover.** Keys that existed *before* the seed was
80installed are random. They are not derived from it and they do not come back
81from the words. The wallet names such an address `Your Address (created before
82the recovery phrase)` so you can tell them apart. This is why file backups still
83matter.
84
85### The file
86
87**Copying `wallet.dat` on its own is not a backup.** Berkeley DB ties the file
88to the environment in the `database/` subdirectory beside it, so a lone
89`wallet.dat` will not open elsewhere — the keys are all still in there, and the
90file is refused anyway. Use the built-in command, which writes a copy that
91stands on its own:
92
93```
94bitflash -backupwallet=/path/to/wallet-backup.dat
95```
96
97It loads the wallet, writes the copy, and exits without starting the node. If
98you would rather copy by hand, shut the node down first and take the **whole**
99data directory, not just `wallet.dat`.
100
101A file backup covers what a phrase cannot: keys from before the seed, and any
102key the wallet acquired by import. It also has a margin of its own — the wallet
103keeps a pool of 100 pre-generated keys, so a backup covers the next 100 mining
104rewards or receive addresses. Take a fresh one after mining for a while, after
105creating many receive addresses, and before moving the wallet to another machine.
106
107The GUI has a **Backup Wallet** button and a **Wallet Safety** view, which fills
108the key pool before writing the backup.
109
110### Finding coins the wallet never recorded
111
112```
113bitflash -rescan
114```
115
116Walks the chain for coins a key of yours owns but the wallet has no record of —
117after importing keys, or after restoring a file from another machine.
118`-importwallet` runs this automatically. A scan asked for with no chain data
119loaded is refused rather than reported as "no transactions found", which reads
120as a verdict to somebody who has just lost a wallet.
121
122### When wallet.dat itself will not open
123
124Everything above still runs through Berkeley DB. If the database is the thing
125that is broken — a build that will not read it, a file truncated by a bad copy,
126an environment beyond recovery — the keys are usually still fine, and you can
127take them out as text:
128
129```
130bitflash -dumpwallet=/path/to/keys.txt
131bitflash -importwallet=/path/to/keys.txt # into any wallet, on any machine
132```
133
134One key per line with its address and label, no database and no environment.
135Importing skips keys the wallet already holds, so running it twice is safe, and
136an unreadable line is reported and stepped over rather than abandoning the rest.
137Restart the node afterwards so it scans the chain for transactions belonging to
138the new keys.
139
140**The dump is your private keys in the clear.** Anyone who reads that file can
141spend those coins. It is written owner-only on Linux and macOS; on Windows it
142inherits whatever the containing folder allows, so choose the folder carefully.
143Move it somewhere safe and delete the copy. `-dumpwallet` will not overwrite an
144existing file.
145
146---
147
148## Mining
149
150Open **Options** from the menu bar. Under Mining Mode:
151
152**Solo** — mine directly to your wallet. Default.
153
154**Operator** — run a pool. The pool server uses `.btf` rendezvous only. The window shows the pool's `.btf` address, discovered pools, and owed payouts.
155
156Pool announcements are published on Nostr with live status fields, so external tools can query the latest pool state by `.btf` address.
157
158**Participant** — mine to someone else's pool. Enter or select the pool's `.btf` address and enable Start Mining.
159
160SRBMiner and XMRig connect to operator pools through the `.btf` path:
161
162```bash
163SRBMiner-MULTI --algorithm randomx --pool POOL_BTF_ADDRESS --wallet YOUR_BTF_ADDRESS --password x
164xmrig -a rx/0 -o POOL_BTF_ADDRESS -u YOUR_BTF_ADDRESS -p x
165```
166
167---
168
169## Headless / server mode
170
171```bash
172./bitflash -nogui # node only
173./bitflash -nogui -gen # node + solo mining
174./bitflash -nogui -gen -operator # pool operator
175./bitflash -nogui -gen -participant=POOL_BTF_ADDRESS # mine to pool
176```
177
178Every option takes `-` or `/`. **Under MSYS2 use the `-` form** — the shell
179rewrites a leading slash into a path before the node ever sees it.
180
181**The mining mode is remembered between restarts** since 1.2.11, so a node that
182was mining comes back mining. A `-gen`, `-operator` or `-participant` flag always
183wins over what was stored, and the log says on every start which of the two
184decided. Passing the flag anyway is the safe habit: it survives a wallet that
185came from an older build.
186
187Other options worth knowing:
188
189```bash
190-datadir=PATH # wallet and chain data elsewhere
191-port=N # P2P listen port, default 8433
192-debug # verbose log; without it debug.log is nearly silent
193-help # full list
194```
195
196`-port` plus `-datadir` is what lets two nodes share one machine. Both are
197needed — the data directory takes an exclusive lock, so a second node pointed at
198the same one will refuse to start.
199
200### When something looks wrong
201
202**Menu > Diagnostics**, and the same report in `debug.log` every ten minutes:
203peers held against peers `select()` is actually watching, blocks received and how
204many arrived without a parent, the proof-of-work mode with the live miner thread
205count, sockets by the part of the program that opened them, and per peer how long
206since the last message each way. There is a copy button — if you open an issue,
207paste that.
208
209It exists because every hard problem in this project so far was found from
210*outside* the node: sockets read over WMI from another machine, memory compared
211against a number in a README, a `grep` over somebody's log. In each case the node
212knew and had no way to say so.
213
214As a systemd service:
215
216```ini
217[Unit]
218Description=Bitflash node
219After=network.target
220
221[Service]
222ExecStart=/opt/bitflash/bitflash -nogui -gen -operator
223Restart=always
224User=bitcoin
225WorkingDirectory=/opt/bitflash
226
227[Install]
228WantedBy=multi-user.target
229```
230
231---
232
233## How nodes find each other
234
235A node publishes a **self-certifying descriptor**: its `.btf` address, an
236encryption key, and the rendezvous relay where it is currently reachable, signed
237with the key the address decodes to. Nobody can publish a descriptor for an
238address they do not own, so a hostile relay can withhold descriptors but cannot
239forge one.
240
241Discovery runs on four layers, so no single failure takes the network down:
242
243| | |
244|---|---|
245| **Nostr relays** | where descriptors are published and looked up |
246| **Rendezvous relays** | the tunnel itself, where two nodes are paired |
247| **Peer cache** | peers that answered last time, saved to `btfpeers.json` and dialled on start before any relay is contacted |
248| **Peer exchange** | connected nodes hand each other signed descriptors, so discovery keeps working while relays are down |
249
250Peer exchange carries the same signed descriptors, verified the same way, so a
251peer passing one on is trusted for nothing.
252
253The cache is what makes a restart fast: on a clean install the first peer takes
254about 36 seconds, and on the next start about 2.
255
256---
257
258## Running a relay
259
260Relays are the meeting points that let nodes behind NAT connect to each other. More relays make the network more resilient.
261
262```bash
263sudo bash relay/install-bitflash-relay.sh 8434
264./bitflash -nogui -announcerelay=YOUR_PUBLIC_IP:8434
265```
266
267Relays forward encrypted bytes and cannot read or modify traffic.
268
269---
270
271## Build from source
272
273**Linux:**
274```bash
275make linux
276```
277Installs deps via apt, builds libsecp256k1 and RandomX, produces `Bitflash-*.AppImage`.
278
279**Windows (MSYS2 UCRT64):**
280```bash
281make windows
282```
283Installs deps via pacman, produces `Bitflash-*-windows.zip`.
284
285---
286
287## At a glance
288
289| | |
290|---|---|
291| Ticker | BTF |
292| Proof of work | RandomX (CPU, memory-hard) |
293| Block time | ~2 minutes |
294| Difficulty retarget | every 30 blocks (~1 hour) |
295| Block reward | 50 BTF, halving every 210,000 blocks |
296| Halving interval | **~292 days** at target block time |
297| Max supply | 21,000,000 BTF |
298| Coinbase maturity | 100 blocks (~3.3 hours) before mined coins can be spent |
299| Max signature ops | 20,000 per block |
300| P2P port | 8433 |
301| Addressing | `.btf` rendezvous — see the caveats above |
302| Premine | None |
303| Pool server | Built-in — `.btf` rendezvous only |
304| Wallet recovery | Twelve-word phrase (BIP39 + BIP32), plus file backup |
305
306The halving interval is the number most people get wrong coming from Bitcoin.
307Same 210,000 blocks, but at two minutes instead of ten, so it arrives in about
308ten months rather than four years.
309
310---
311
312MIT. Built on Bitcoin 0.1.0 (Satoshi Nakamoto, 2009).