diff options
| author | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-14 15:03:21 -0300 |
|---|---|---|
| committer | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-14 15:20:54 -0300 |
| commit | c49b92a9a79a398b51200e69f7dde8a467b9c925 (patch) | |
| tree | 25c86213839210a08ff69983e7219e924d5dbb85 /docs/storage.md | |
| parent | 9b281d890168c7c912857530d787fbc82203d848 (diff) | |
wallet: add experimental SQLite record store
Diffstat (limited to 'docs/storage.md')
| -rw-r--r-- | docs/storage.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/storage.md b/docs/storage.md index c1cda45..f75f9b9 100644 --- a/docs/storage.md +++ b/docs/storage.md | |||
| @@ -85,6 +85,25 @@ A future wallet backend must keep these properties: | |||
| 85 | - recovery phrase encrypted and locked, requiring unlock before coverage can | 85 | - recovery phrase encrypted and locked, requiring unlock before coverage can |
| 86 | be audited. | 86 | be audited. |
| 87 | 87 | ||
| 88 | ## Experimental SQLite Wallet Store | ||
| 89 | |||
| 90 | The SQLite wallet path starts as a byte-preserving record store, not as a new | ||
| 91 | wallet format: | ||
| 92 | |||
| 93 | ```sql | ||
| 94 | CREATE TABLE wallet_records ( | ||
| 95 | key BLOB PRIMARY KEY NOT NULL, | ||
| 96 | value BLOB NOT NULL | ||
| 97 | ); | ||
| 98 | PRAGMA user_version=1; | ||
| 99 | ``` | ||
| 100 | |||
| 101 | Keys and values are the same serialized `CDataStream` bytes used by `wallet.dat`. | ||
| 102 | The first implementation is exercised only by `-selftest=wallet-sqlite`; the | ||
| 103 | runtime wallet still opens Berkeley DB. The purpose is to prove schema creation, | ||
| 104 | raw record write/read, close/reopen behavior, and value preservation before any | ||
| 105 | BDB-to-SQLite migration or runtime backend flag exists. | ||
| 106 | |||
| 88 | ## `blkindex.dat` | 107 | ## `blkindex.dat` |
| 89 | 108 | ||
| 90 | `blkindex.dat` is accessed through `CTxDB`. | 109 | `blkindex.dat` is accessed through `CTxDB`. |