BIP47: Define address types explicitly #1259
Closed
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.
It caught my attention that the specification supports only P2PKH addresses. Meanwhile, it appears that some implementers of the standard make it possible to derive other address types (native segwit primarily) and that that information is communicated through out-of-band channels.
For instance, the biggest payment code directory (https://paynym.is) communicates that information by verbally stating "Derives native segwit addresses (p2wpkh) as well as legacy addresses".
The proposed change to the BIP would address the issue by allocating several bits to communicating the exact address type that the recipient is deriving. This removes potential confusion, funds being sent to incorrect addresses, and makes the standard more self contained. The BIP is still in a draft state so modifying this bit would benefit everyone using the standard.
Backward compatibility with the earlier iteration of the standard is locked in with the provision stating that it is acceptable to send to other address types, as long as that information is communicated elsewhere (as is currently the case with the Paynym directory).
Tagging @SamouraiDev and @justusranvier.