Describe the bug
As mentioned on Discord#development, there is a fundamental problem with how we define a DescriptorId. Currently DescriptorId does not uniquely identify a descriptor. I.e. we can change how the xpub is portrayed and it would completely change the DescriptorId. This is a problem because the whole point of DescriptorId is so that the last derivation index is stored with something that uniquely represents a descriptor.
Proposed Solutions
An idea (first mentioned to me by @LLFourn) is to use the hash of the first derived spk for the DescriptorId. We can consider disallowing non-wildcard descriptors in KeychainTxOutIndex (as they aren't keychains) and it allows us full uniqueness for DescriptorIds.
Describe the bug
As mentioned on
Discord#development, there is a fundamental problem with how we define aDescriptorId. CurrentlyDescriptorIddoes not uniquely identify a descriptor. I.e. we can change how the xpub is portrayed and it would completely change theDescriptorId. This is a problem because the whole point ofDescriptorIdis so that the last derivation index is stored with something that uniquely represents a descriptor.Proposed Solutions
An idea (first mentioned to me by @LLFourn) is to use the hash of the first derived spk for the
DescriptorId. We can consider disallowing non-wildcard descriptors inKeychainTxOutIndex(as they aren't keychains) and it allows us full uniqueness forDescriptorIds.