This is a bip for encrypted backup, an encryption scheme for bitcoin wallet related metadata.
Mailing list post: https://groups.google.com/g/bitcoindev/c/ylPeOnEIhO8
This is a bip for encrypted backup, an encryption scheme for bitcoin wallet related metadata.
Mailing list post: https://groups.google.com/g/bitcoindev/c/ylPeOnEIhO8
Could you perhaps expound the relationship to #1951?
103 | +- `timestamp`: Optional integer Unix timestamp representing account creation time in 104 | + seconds. 105 | +- `iso_8601_datetime`: optional string representing account creation time in ISO 8601 106 | + format. 107 | +- `block_height`: Optional integer representing account creation time in bitcoin block 108 | + height unit.
3 different ways of representing the birth date doesn't seem ideal. Also "iso_8601_datetime" specifies the data format, not the purpose of the field. I'd prefer short, purposeful names (e.g. "birthblock" or "birthdate") and leave the type and format out of the name.
I'm open to represent in a different way, but few points why it's end up like this:
timestamp fieldblock_height rather than unix timestamp could make more sense70 | +All other fields are optional. 71 | + 72 | +- `version`: Optional integer version of the backup format. 73 | +- `bip`: Optional integer value representing the number of this BIP. 74 | +- `name`: Optional string wallet name. 75 | + NOTE: `alias` is an alias of `name`.
Why mention alias in a new BIP?
because we already use name in Liana backup format, but in the end I think alias is more clear
87 | +All fields are optional, allowing wallets to include only the metadata they support. 88 | + 89 | +- `name`: Optional string account name. 90 | + NOTE: `alias` is an alias of `name`. 91 | +- `description`: Optional string account description. 92 | +- `active`: Optional boolean field indicating if the account is active.
active doesn't seem very useful for a backup. In fact, some of these fields feel like the union of all possible metadata fields useful to any wallet software. If so, this leads to the question: what is the standard for adding new fields to this standard?
I think it's better to specify a small(er) set of widely useful fields.
iirc it was requested by @ethicnology to represent an usage they already have in Bull Bitcoin wallet
and I just notice it is also something tracked in bitcoin core: https://github.com/bitcoin/bitcoin/blob/2b541eeb363cd43fc225c7c7f9691c925b0e4f9d/src/wallet/rpc/backup.cpp#L515
122 | + by [BIP-0174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki). 123 | +- `bip370_psbts`: Optional array containing unspent but partially signed transactions as defined 124 | + by [BIP-0370](https://github.com/bitcoin/bips/blob/master/bip-370.mediawiki). 125 | +- `psbts`: Optinnal array than can contains both BIP-0174 & BIP-0370 PSBTs. 126 | +- `bip39_mnemonic`: Optional string containing mnemonic words following BIP39. 127 | + Since backups may be stored online, storing mainnet mnemonics is strongly discouraged.
It feels wrong to specify a field which is immediately "strongly discouraged".
Need a rewording, I think mainnet mnemonic should be strongly discouraged, but it could be useful for testnet, like in a bug report, join a testnet/signet/regtest backup of a wllet can make it easy to import the wallet state in order to reproduce the bug.
76 | +- `description`: Optional string wallet description. 77 | +- `accounts`: Mandatory array of account objects. 78 | + Must contain at least one account. 79 | + See [Account Object Structure](#account-object-structure). 80 | +- `network`: Optional string network identifier. 81 | + Valid values are `bitcoin` (mainnet), `testnet3`, `testnet4`, `signet`, and `regtest`.
Non-main networks are not useful for backups. Can the "network" field be left out entirely?
cf previous message for rationale
This BIP seems to overlap #2099. It would be ideal to have a single way of encoding wallet metadata.
Thanks for reviewing related work, @seedhammer!
Thanks for review @seedhammer, I'll reply inline
This BIP seems to overlap #2099. It would be ideal to have a single way of encoding wallet metadata.
I think they have different use case:
Something that I should add in the bip abstract is, that I see this bip as a "central repository" where a wallet implementer can "register" a field usage & share it's usage of the format in a test vector. The intend is not to force anyone to be interoperable in both way with every other implem, but rather to make it easy if one want to be interoperable in at least one way.