| Age | Commit message (Collapse) | Author |
|
- describe the recovery phrase as a BIP44 tree on m/44'/4346950'/0'/...,
coin type 4346950 = 0x425446 "BTF", registered in SLIP-0044
- note the SQLite default in "The file" and that -backupwallet writes a
matching self-contained copy; scope the Berkeley DB recovery notes to a
legacy wallet.dat
- at-a-glance: name BIP44 and add a wallet-storage row
|
|
- add a Tor badge to the header row
- point Download and the quick-start link at releases.bitflash.network;
the relative ../../releases/latest 404s outside GitHub
- windows quick start: the published package bundles Tor and starts a
managed Tor automatically, with -nomanagedtor to turn it off
- note the single-file SQLite wallet default (1.2.20) and link
docs/storage.md
- bump the checksum-mirror example to v1.2.20
|
|
main
|
|
Name the release artifacts for v1.2.20. Matches BITFLASH_VERSION_STRING.
|
|
from fix-selftest-exitcode into main
|
|
The Linux branch of the child-process helper returned system()s raw wait
status instead of the exit code, so an exit code of 2 read back as 512.
Every assertion that checks a specific code (== 2), like the locked
recovery-audit test, failed only on Linux while the node itself was
correct. Windows was unaffected (_spawnv returns the code directly).
Unwrap with WIFEXITED/WEXITSTATUS so both platforms return the same value.
Test harness only; no change to node behavior.
|
|
experimental' (#64) from remove-sqlite-experimental into main
|
|
Drop the "experimental" label from the wallet code and docs now that
SQLite is the default backend for new wallets, is coin-proven, and carries
encrypt, backup, atomic seed writes, and the storage diagnostics.
- main_gui.cpp: -help text, the unknown-backend error (SQLite is no longer
"experimental" and Berkeley DB is no longer "the default"), and the
startup banner ("Wallet backend: SQLite").
- walletcmd.h: the export command comment.
- docs/storage.md: rewrite the SQLite section from staging-only ("runtime
still opens Berkeley DB", "no runtime backend flag exists yet") to the
shipped state -- default backend, conversion wizard, per-backend ops --
and reframe the migration order as shipped in v1.2.20.
|
|
wizard' (#63) from wallet-wizard-restart into main
|
|
The About dialog had "v1.1.0" hardcoded and no home for the release
version, so it drifted. Add a single BITFLASH_VERSION_STRING in
headers_core.h (bumped at release, unrelated to the protocol nVersion
fields) and show it in About -- now v1.2.20.
Fill the empty line under the version with a clickable
https://bitflash.network that opens in the browser (ShellExecute on
Windows, xdg-open elsewhere), and grow the dialog to fit it.
|
|
Follow-up to the Restart Now button. Addresses the edge cases the review
flagged, and drops the fragile batch layer entirely:
- Windows no longer writes a .bat and shells through cmd (which re-parsed
the arguments and could leave a stray file on failure). It builds the
command line once, quoted correctly (only backslashes before a quote are
doubled, so ordinary paths are not mangled), and CreateProcess launches
the new instance directly.
- The delay moved into the new instance: a -restartwait flag makes it wait
~2.5s before it opens the network port and the block index, so the old
process is gone first. No shell delay hack. Verified: -restartwait adds
the wait (0.16s -> 2.67s).
- Linux re-execs /proc/self/exe (absolute) and only falls back to argv[0],
which may be relative or a bare PATH name that execv cannot resolve.
- This instance now exits only if the relaunch actually started; on failure
it keeps running and tells the user to restart manually, so a failed
relaunch never leaves them with no node.
GUI/process wiring only; wallet code unchanged, suites still green.
|
|
gaps
Two things that read wrong once the wallet is on SQLite:
- The Wallet Safety backup dialog defaulted the file name to .dat, but
BackupWallet copies wallet.sqlite under the SQLite backend -- so the
suggested name put SQLite contents in a wallet-backup-*.dat file. The
default now matches the live backend (.sqlite on SQLite, .dat on BDB).
- The recovery audit called coins on non-phrase keys "wallet.dat-only" and
told the user to "keep wallet.dat backups". Under SQLite those coins live
in wallet.sqlite, not wallet.dat. Reworded to the backend-neutral truth:
"not phrase-backed" balance, and "keep a file backup of this wallet" --
accurate on either backend. Same wording in the CLI -recoveryaudit and
the GUI Wallet Safety panel.
Display/naming only; audit numbers and BackupWallet are unchanged. All 13
wallet suites still pass.
|
|
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.
|
|
first-run conversion wizard' (#62) from wallet-sqlite-default into main
|
|
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.
|
|
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.
|
|
atomicity, one-shot commands)' (#61) from wallet-sqlite-encrypt into main
|
|
-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.
|
|
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.
|
|
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.
|
|
net-per-ip-connlimit into main
|
|
from wallet-sqlite-activate into main
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
from wallet-sqlite-runtime-write into main
|
|
|
|
wallet-sqlite-typed-load-proof into main
|
|
|
|
wallet-storage-backend-stage into main
|
|
|
|
wallet-sqlite-runtime into main
|
|
|
|
from wallet-sqlite-loadcheck into main
|
|
|
|
wallet-sqlite-cleanup-failures into main
|
|
|
|
from wallet-sqlite-restore into main
|
|
|
|
wallet-sqlite-verify into main
|
|
|
|
wallet-sqlite-scan into main
|
|
|
|
wallet-sqlite-migration into main
|
|
|
|
wallet-sqlite-skeleton into main
|
|
|
|
(#46) from db-recreate-env-after-shutdown into main
|
|
|
|
from tests-guard-wallet-mutation-hook into main
|
|
|
|
tests-wallet-storage-sanity-negative into main
|
|
|
|
wallet-backup-tempfile-install into main
|
|
|
|
records' (#42) from wallet-rewrite-public-record-test into main
|
|
|
|
from wallet-rewrite-record-boundary into main
|
|
|
|
wallet-store-read-abstraction into main
|
|
|
|
(#39) from wallet-storage-sanity-checks into main
|
|
wallet-storage-audit-bdb into main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
direct onion peers, onion-only mode)
|
|
auto-managed-tor into main
|
|
tor-diagnostics into main
|
|
|
|
|
|
|
|
managed-tor-two-node-smoke into main
|
|
|
|
from windows-managed-tor-package into main
|
|
|
|
|
|
from embedded-tor-manager into main
|
|
|
|
|
|
|
|
|
|
onion-direct-peers into main
|
|
|
|
(#30) from site-docs-polish-v1218 into main
|
|
restore-collapse-hdnext into main
|
|
|
|
|
|
app icon)
|
|
BITFLASH_NODE_BUILD)
|
|
poll-socket-handler into main
|
|
# Conflicts:
# src/makefile.mingw
|
|
tor-mode into main
|