HomePhabricator

Cache parent xpub inside of BIP32PubkeyProvider

Description

Cache parent xpub inside of BIP32PubkeyProvider

Summary:
Optimize Expand by having BIP32PubkeyProvider also cache the parent
(or only) xpub within itself. Since Expand does not provide a read
cache, it is useful to internally cache this xpub to avoid re-deriving
the same xpub.

Backport of Core PR18204 part [7/7] : https://github.com/bitcoin/bitcoin/pull/18204/commits/09e25071f40c564af08a1386c39c4f2d8eb484b6

Depends on D8387

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Feb 28 2020, 21:55
deadalnixCommitted on Nov 13 2020, 13:34
deadalnixPushed on Nov 13 2020, 13:34
Reviewer
Restricted Project
Differential Revision
D8388: Cache parent xpub inside of BIP32PubkeyProvider
Parents
rABC3a378ee5ce2a: Only cache xpubs that have a hardened last step
Branches
Unknown
Tags
Unknown