HomePhabricator

[backport#17719] Document better -keypool as a look-ahead safety mechanism

Description

[backport#17719] Document better -keypool as a look-ahead safety mechanism

Summary:
f41d58966995fe69df433fa684117fae74a56e66 Document better -keypool as a look-ahead safety mechanism (Antoine Riard)

Pull request description:

If after a backup, an address is issued beyond the initial
keypool range and none of the addresses in this range
is seen onchain, if a wallet is restored from backup, even in
case of rescan, funds may be loss due to the look-ahead
buffer not being incremented and so restored wallet not detecting
onchain out-of-range address as derived from its seed.

This scenario is theoretically unavoidable due to the requirement
of the keypool to have a max size. However, given the default
keypool size, this is unlikely. Document better keypool size
implications to avoid user setting a too low value.

While reviewing #17681, it took me a while to figure out the safety implications of keypool, I find it would be better to document this a bit farther to avoid users shooting themselves in the foot. For further context & discussion, see https://github.com/bitcoin/bitcoin/pull/17681#issuecomment-563613452

ACKs for top commit:

ryanofsky:
  Code review ACK f41d58966995fe69df433fa684117fae74a56e66. Just "Warning:" prefix added since the last review
jonatack:
  ACK f41d58966995fe69df433fa684117fae74a56e66 code review and build/test. The added `Warning:` since last review is a good addition.

Backport of Core PR17719

Test Plan:

ninja

read it

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7836

Details

Provenance
Samuel Dobson <dobsonsa68@gmail.com>Authored on Jan 29 2020, 20:09
majcostaCommitted on Oct 10 2020, 03:40
majcostaPushed on Oct 10 2020, 03:41
Reviewer
Restricted Project
Differential Revision
D7836: [backport#17719] Document better -keypool as a look-ahead safety mechanism
Parents
rABCb820c50ea939: [backport#17261 2/13] Locking: Lock cs_KeyStore instead of cs_wallet in legacy…
Branches
Unknown
Tags
Unknown