Output Script Descriptor Annotations #2099
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This BIP proposal follows from the discussion for BIP392 (#2047) in which it emerged that due to the resource-intensive scanning requirements of the protocol some metadata (for example the birthday block height) may be practically required for efficient recovery of wallet funds. However, this metadata is not technically required to determine the output scripts, and therefore deemed unsuitable for direct inclusion in an output descriptor. This may lead to a situation in future where a wallet backup consisting of a valid output descriptor may not practically be complete enough to recover all the funds in a wallet.
This BIP proposal provides a solution in the form of annotations - key/value pairs appended to a descriptor expression using URL-like query string delimiters. Annotations provide a compact way to include such metadata directly in a descriptor string, using characters already present in the BIP380 checksum character set.
Note that annotations are not intended for general wallet backup, which may include other data such as labels. They are strictly scoped to convey operational metadata to aid recovery of funds without altering the scripts produced by the descriptor.
cc: @achow101 as author of most Descriptor BIPs.