HomePhabricator

Use script matching rather than destination matching for watch-only.
d5087d1ba081Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Use script matching rather than destination matching for watch-only.

This changes the keystore data format, wallet format and IsMine logic
to detect watch-only outputs based on direct script matching rather
than first trying to convert outputs to destinations (addresses).

The reason is that we don't know how the software that has the spending
keys works. It may support the same types of scripts as us, but that is
not guaranteed. Furthermore, it removes the ambiguity between addresses
used as identifiers for output scripts or identifiers for public keys.

One practical implication is that adding a normal pay-to-pubkey-hash
address via importaddress will not cause payments to the corresponding
full public key to be detected as IsMine. If that is wanted, add those
scripts directly (importaddress now also accepts any hex-encoded script).

Conflicts:
src/wallet.cpp

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Jun 9 2014, 19:11
JaSK <temp@temp.temp>Committed on Jul 2 2014, 13:48
deadalnixPushed on May 14 2017, 22:04
Parents
rABC0fa2f8899adf: added includedWatchonly argument to listreceivedbyaddress/...account
Branches
Unknown
Tags
Unknown

Event Timeline

JaSK <temp@temp.temp> committed rABCd5087d1ba081: Use script matching rather than destination matching for watch-only. (authored by Pieter Wuille <pieter.wuille@gmail.com>).Jul 2 2014, 13:48