upleb.uk

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

summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-08-19gui: add a "Restart Now" button to the conversion wizardbitflash
After converting to SQLite the wizard said "restart to apply" but offered no way to do it, so a user could close the dialog and keep mining on the old Berkeley DB wallet without realizing the switch had not taken effect -- and coins mined in the meantime land only in wallet.dat, not the SQLite wallet they think they are now on. The post-conversion screen now offers "Restart Now", which relaunches Bitflash with the same command line and datadir (a short delay lets this instance release the network port and block-index files first) and asks this one to exit, so mining resumes on the SQLite wallet. "Later" keeps the old behaviour. A dimmed line warns that mining before the restart still credits the old wallet. wallet.dat is still never touched. The conversion action itself is unchanged (wallet-convert self-test still green); this is GUI wiring only.
2026-08-18Merge pull request 'wallet/gui: SQLite is the default for new wallets + a ↵Bitflash
first-run conversion wizard' (#62) from wallet-sqlite-default into main
2026-08-18gui: offer to convert a Berkeley DB wallet to SQLite on first runbitflash
A first-run dialog for an existing wallet.dat with no backend choice yet: "Convert to SQLite" exports the wallet and records the sqlite marker so the next start opens it; "Keep Berkeley DB" records that choice so the offer does not return; "Decide later" leaves no marker and asks again. wallet.dat is never touched, and the change takes effect on restart -- matching the restart-to-apply model. The conversion itself is DoConvertWalletToSQLite(), a headless-testable function the button calls: it reuses the export path (extracted as ExportActiveWalletToSQLite, shared with -walletsqliteexport, which keeps its own specific messages), refuses if already on SQLite or if a wallet.sqlite exists, and writes the marker only after a verified export. New wallet-convert self-test proves the action end to end: build a Berkeley DB wallet, convert, and confirm wallet.sqlite + the marker are written, wallet.dat is left untouched, a second convert refuses, and a flagless restart opens the converted SQLite wallet with its phrase intact. All wallet suites pass. The modal itself is thin UI over this tested action.
2026-08-18wallet: make SQLite the default backend for new walletsbitflash
A fresh install with no wallet.dat now starts on the SQLite backend and creates wallet.sqlite, instead of a Berkeley DB wallet.dat. The choice is recorded in a plain-text <datadir>/wallet-backend marker so it survives a restart without a command-line flag. Backend resolution when no -walletbackend is given: an existing wallet.sqlite (or a "sqlite" marker) stays on SQLite; an existing wallet.dat stays on Berkeley DB -- nothing is converted behind the user; a fresh datadir starts on SQLite. An explicit -walletbackend=bdb or a "bdb" marker forces Berkeley DB and overrides the default. Adds CreateNewSQLiteWallet() (WalletSQLiteRuntimeOpen gains fMustExist so the create path can make a new file) which mints the first default key straight into the SQLite store via the same FinishLoadedWallet() call the Berkeley DB create path uses, then cleans up on failure. Marker read/write helpers are plain text, hand-editable. New wallet-backend-default self-test proves the resolution in child processes (fresh->SQLite+marker, existing wallet.dat->BDB, "bdb" marker->BDB, explicit flag->wallet.dat). The three wallet.dat-specific suites now ask for -walletbackend=bdb explicitly, since a flagless fresh datadir is SQLite now. All wallet suites pass.
2026-08-18Merge pull request 'wallet: complete SQLite backend activation (encrypt, ↵Bitflash
atomicity, one-shot commands)' (#61) from wallet-sqlite-encrypt into main
2026-08-18wallet: one-shot storage commands honour -walletbackend=sqlitebitflash
-walletstorageaudit, -walletstoragecheck and -backupwallet all read wallet.dat regardless of the selected backend. Under -walletbackend=sqlite that is wrong, and for backup it is dangerous: it silently backs up the stale plaintext wallet.dat instead of the live wallet.sqlite. - ScanWalletRecords() routes to the active SQLite store instead of a Berkeley DB cursor (it returned an error under the runtime before). This is the single choke point audit and check scan through. - WalletSQLiteRuntimeOpenReadOnly() opens wallet.sqlite for scanning without loading or validating records, so the pre-load diagnostics can inspect a wallet the loader would refuse. main_gui opens it for audit/check when the SQLite backend is selected (and rejects an unknown backend value there too). - BackupWallet() copies wallet.sqlite (checkpoint, then the temp/old/rename dance; a checkpointed SQLite file is self-contained, no lsn_reset). wallet-sqlite-encrypt self-test proves routing on a datadir where the SQLite wallet is encrypted and wallet.dat beside it is still plaintext: audit with the flag reports the encrypted seed, without it reports the plaintext one; the SQLite backup carries no plaintext key and loadchecks as a standalone wallet.
2026-08-18wallet: bracket WriteHDMaster in a SQLite runtime transactionbitflash
The SQLite runtime wrote each record as its own autocommit, so a group that must land together -- hdmaster and hdchaincode, the two halves of an HD seed -- could be left half-written by a failure or crash between them, the incomplete-seed state -walletstoragecheck exists to catch. Berkeley DB was no worse (it is not transactional here either) but no better. Add WalletSQLiteRuntimeBeginTxn/CommitTxn/RollbackTxn -- no-ops that succeed when the SQLite backend is not active, so Berkeley DB keeps its existing per-write behaviour -- and wrap WriteHDMaster in them so the seed lands all-or-nothing under SQLite. The one BDB-atomic wallet rewrite, the encrypt path, is already matched by its own transaction in the SQLite encrypt branch; every other wallet multi-write is ordering-based on both backends by design. wallet-sqlite self-test now proves the bracket: a rolled-back runtime write leaves no record, a committed one persists, and WriteHDMaster lands both halves of the seed.
2026-08-18wallet: encrypt atomically under the SQLite backendbitflash
EncryptWallet() had only a Berkeley DB path: it rebuilt a wallet.dat temp file and swapped it in. Under -walletbackend=sqlite that was wrong -- it would leave the live wallet.sqlite unencrypted and write a divergent wallet.dat instead. Add a SQLite persistence branch that rebuilds a fresh wallet.sqlite in one transaction (public records copied from the live store, encrypted key material serialized byte-for-byte the way the BDB path writes it), checkpoints it, and swaps it in with a .before-encrypt backup, mirroring the BDB rename dance. A fresh file rather than an in-place rewrite keeps the change atomic and leaves no plaintext key in a freed page. CmdEncryptWallet skips PurgeDbEnvironmentLogs under SQLite (no Berkeley DB environment behind the wallet) and reports the backend it used. New wallet-sqlite-encrypt self-test drives the real command path in child processes: export a wallet to SQLite, encrypt it through -walletbackend=sqlite, and prove it comes out encrypted, unlockable with the right passphrase, refusing the wrong one, with its recovery phrase intact and the original wallet.dat left untouched.
2026-08-18Merge pull request 'net: cap inbound connections per address' (#60) from ↵Bitflash
net-per-ip-connlimit into main
2026-08-18Merge pull request 'wallet: run the node on a SQLite backend (opt-in)' (#59) ↵Bitflash
from wallet-sqlite-activate into main
2026-08-18net: exempt loopback from the per-IP connection capbitflash
Review follow-up. A managed-Tor node receives every inbound onion peer over its local hidden-service listener, so they all accept as 127.0.0.1. Capping loopback would cap onion peers as one group and refuse the 33rd legitimate onion peer -- the wrong limit for a network moving toward onion-only. Exempt loopback (127.0.0.0/8): the global MAX_CONNECTIONS still bounds the total, and the direct-IP flood this defends against never arrives over loopback. Bench: a 40-connection flood from 127.0.0.1 is now held in full (no per-IP refusal), while a flood from the machine's LAN address still caps at exactly 32.
2026-08-18wallet: clearer refusal for an empty or misnamed SQLite backendbitflash
Review follow-up on the SQLite activation. Two guards, both fail-closed; neither is a correctness fix -- FinishLoadedWallet already refuses a missing default key -- but they make the refusal say what happened: - an empty or non-wallet wallet.sqlite is refused with "no default key record; it may be empty or not a wallet export", instead of the generic "no usable default public key" that reads as corruption; - a misspelled -walletbackend value (e.g. sqlit) is refused instead of silently falling through to Berkeley DB; -walletbackend=bdb is accepted as the explicit default.
2026-08-18net: cap inbound connections per addressbitflash
A single IP could hold every inbound slot up to MAX_CONNECTIONS -- which is what a connection-exhaustion flood did to the rendezvous relays, one address parking hundreds of sockets and starving real peers. Add MAX_CONNECTIONS_PER_IP (32): the accept path counts existing connections from the same address and refuses a new one past the cap. The relays' firewall connlimit does the same a layer lower; this makes every build carry the defense, including future poll()-based relays with no FD ceiling.
2026-08-17wallet: run the node on a SQLite backend (opt-in)bitflash
Adds -walletbackend=sqlite: an opt-in flag that runs the node on <datadir>/wallet.sqlite instead of wallet.dat. It requires an export to exist first (no silent migration) and prints a step-by-step guide when one does not; wallet.dat is never opened or touched, so a plain restart goes back to Berkeley DB. - LoadWalletFromSQLiteRuntime opens the export read-write, keeps the handle open as the active backend, loads records into memory through the same visitor/reconcile/finish path as the read-only staging load, and never fabricates a default key. - Shutdown checkpoints and closes the SQLite backend; a kill before that loses nothing because WAL + synchronous=FULL already made every committed write durable. - Self-test proves runtime writes persist across a close and reopen. BDB stays the default: nothing activates the SQLite runtime unless the flag is given. One-shot audit/recovery commands still use Berkeley DB.
2026-08-17Merge pull request 'wallet: route CWalletDB through SQLite runtime' (#58) ↵Bitflash
from wallet-sqlite-runtime-write into main
2026-08-17wallet: route CWalletDB through SQLite runtimeNsable-sh
2026-08-17Merge pull request 'tests: prove typed SQLite wallets load' (#57) from ↵Bitflash
wallet-sqlite-typed-load-proof into main
2026-08-17tests: prove typed SQLite wallets loadNsable-sh
2026-08-17Merge pull request 'wallet: add typed SQLite wallet records' (#56) from ↵Bitflash
wallet-storage-backend-stage into main
2026-08-17wallet: add typed SQLite wallet recordsNsable-sh
2026-08-17Merge pull request 'wallet: stage SQLite runtime loading' (#55) from ↵Bitflash
wallet-sqlite-runtime into main
2026-08-14wallet: stage SQLite runtime loadingNsable-sh
2026-08-14Merge pull request 'wallet: check SQLite exports against loader types' (#54) ↵Bitflash
from wallet-sqlite-loadcheck into main
2026-08-14wallet: check SQLite exports against loader typesNsable-sh
2026-08-14Merge pull request 'wallet: clean up failed SQLite migrations' (#52) from ↵Bitflash
wallet-sqlite-cleanup-failures into main
2026-08-14wallet: clean up failed SQLite migrationsNsable-sh
2026-08-14Merge pull request 'wallet: restore BDB wallets from SQLite exports' (#51) ↵Bitflash
from wallet-sqlite-restore into main
2026-08-14wallet: restore BDB wallets from SQLite exportsNsable-sh
2026-08-14Merge pull request 'wallet: verify SQLite wallet exports' (#50) from ↵Bitflash
wallet-sqlite-verify into main
2026-08-14wallet: verify SQLite wallet exportsNsable-sh
2026-08-14Merge pull request 'wallet: scan SQLite wallet records' (#49) from ↵Bitflash
wallet-sqlite-scan into main
2026-08-14wallet: scan SQLite wallet recordsNsable-sh
2026-08-14Merge pull request 'wallet: export BDB records to SQLite' (#48) from ↵Bitflash
wallet-sqlite-migration into main
2026-08-14wallet: export BDB records to SQLiteNsable-sh
2026-08-14Merge pull request 'wallet: add experimental SQLite record store' (#47) from ↵Bitflash
wallet-sqlite-skeleton into main
2026-08-14wallet: add experimental SQLite record storeNsable-sh
2026-08-14Merge pull request 'db: recreate Berkeley DB environment after shutdown' ↵Bitflash
(#46) from db-recreate-env-after-shutdown into main
2026-08-14db: recreate Berkeley DB environment after shutdownNsable-sh
2026-08-14Merge pull request 'tests: guard destructive wallet mutation helper' (#45) ↵Bitflash
from tests-guard-wallet-mutation-hook into main
2026-08-14tests: guard destructive wallet mutation helperNsable-sh
2026-08-14Merge pull request 'tests: prove wallet storage sanity failures' (#44) from ↵Bitflash
tests-wallet-storage-sanity-negative into main
2026-08-14tests: prove wallet storage sanity failuresNsable-sh
2026-08-14Merge pull request 'wallet: install backups via temporary file' (#43) from ↵Bitflash
wallet-backup-tempfile-install into main
2026-08-14wallet: install backups via temporary fileNsable-sh
2026-08-14Merge pull request 'tests: prove encrypted rewrite keeps public wallet ↵Bitflash
records' (#42) from wallet-rewrite-public-record-test into main
2026-08-14tests: prove encrypted rewrite keeps public wallet recordsNsable-sh
2026-08-14Merge pull request 'wallet: route rewrite copies through record scan' (#41) ↵Bitflash
from wallet-rewrite-record-boundary into main
2026-08-14wallet: route rewrite copies through record scanNsable-sh
2026-08-14Merge pull request 'wallet: add read-only record scan boundary' (#40) from ↵Bitflash
wallet-store-read-abstraction into main
2026-08-14wallet: add read-only record scan boundaryNsable-sh
2026-08-14Merge pull request 'wallet: fail closed on unsafe wallet storage state' ↵Bitflash
(#39) from wallet-storage-sanity-checks into main
2026-08-14Merge pull request 'wallet: audit Berkeley DB wallet storage' (#38) from ↵Bitflash
wallet-storage-audit-bdb into main
2026-08-14wallet: drop bdb log check from storage sanityNsable-sh
2026-08-14wallet: initialize storage audit counts explicitlyNsable-sh
2026-08-13wallet: add storage sanity checkNsable-sh
2026-08-13wallet: export storage audit jsonNsable-sh
2026-08-13wallet: add storage audit commandNsable-sh
2026-08-13tests: assert encryptwallet purges BDB logsNsable-sh
2026-08-13docs: inventory Berkeley DB storageNsable-sh
2026-08-13tests: cover portable wallet copiesNsable-sh
2026-08-13wallet: report locked encrypted recovery seedNsable-sh
2026-08-13release: v1.2.19 (nHDNext restore fix, Tor onion transport: managed Tor, ↵bitflash
direct onion peers, onion-only mode)
2026-08-13Merge pull request 'net: auto-start bundled managed Tor' (#37) from ↵Bitflash
auto-managed-tor into main
2026-08-13Merge pull request 'net: show Tor transport in diagnostics' (#36) from ↵Bitflash
tor-diagnostics into main
2026-08-13net: auto-start bundled managed TorNsable-sh
2026-08-13net: count direct onion peers by endpointNsable-sh
2026-08-13net: show Tor transport in diagnosticsNsable-sh
2026-08-13Merge pull request 'net: add onion-only btf dial mode' (#35) from ↵Bitflash
managed-tor-two-node-smoke into main
2026-08-13net: add onion-only btf dial modeNsable-sh
2026-08-13Merge pull request 'release: package Windows builds with managed Tor' (#34) ↵Bitflash
from windows-managed-tor-package into main
2026-08-13release: verify bundled Tor signaturesNsable-sh
2026-08-13release: package Windows builds with managed TorNsable-sh
2026-08-13Merge pull request 'net: add managed Tor hidden service bootstrap' (#33) ↵Bitflash
from embedded-tor-manager into main
2026-08-13net: stop managed Tor through control portNsable-sh
2026-08-13net: fix managed Tor Windows startupNsable-sh
2026-08-13net: harden managed Tor lifecycleNsable-sh
2026-08-13net: add managed Tor hidden service bootstrapNsable-sh
2026-08-13Merge pull request 'net: add signed direct onion peer endpoints' (#32) from ↵Bitflash
onion-direct-peers into main
2026-08-13net: add signed direct onion peer endpointsNsable-sh
2026-08-12Merge pull request 'site: align public docs and static explorer output' ↵Bitflash
(#30) from site-docs-polish-v1218 into main
2026-08-12Merge pull request 'wallet: collapse restored legacy hdnext' (#31) from ↵Bitflash
restore-collapse-hdnext into main
2026-08-12wallet: collapse restored legacy hdnextNsable-sh
2026-08-12site: document public deployment contractNsable-sh
2026-08-12release: v1.2.18 (Tor/SOCKS5 outbound privacy, poll() socket handler, new ↵bitflash
app icon)
2026-08-12build: fix leftover merge markers in makefile.mingw (drop FD_SETSIZE, keep ↵bitflash
BITFLASH_NODE_BUILD)
2026-08-12Merge pull request 'net: replace peer select loop with poll' (#29) from ↵Bitflash
poll-socket-handler into main
2026-08-12test mergebitflash
# Conflicts: # src/makefile.mingw
2026-08-12Merge pull request 'net: add Tor mode for outbound discovery' (#28) from ↵Bitflash
tor-mode into main
2026-08-12Merge pull request 'net: add optional SOCKS5 outbound proxy' (#27) from ↵Bitflash
socks5-proxy into main
2026-08-12Merge pull request 'tests: add deterministic chain tool fixtures' (#26) from ↵Bitflash
tool-fixtures into main
2026-08-12docs: update social banner to the new coin logobitflash
2026-08-12release: bump version to 1.2.17 (hardened audit tooling)bitflash
2026-08-12Merge pull request 'tools: harden chain audit scripts' (#25) from ↵Bitflash
tooling-hardening into main
2026-08-11net: replace peer select loop with pollNsable-sh
2026-08-11net: warn when Tor mode overrides SOCKSNsable-sh
2026-08-11net: add Tor mode for outbound discoveryNsable-sh
2026-08-11net: harden SOCKS5 proxy parsing and testsNsable-sh
2026-08-11net: add optional SOCKS5 outbound proxyNsable-sh
2026-08-11tests: add deterministic chain tool fixturesNsable-sh
2026-08-11tools: address audit follow-upsNsable-sh