-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
The spec uses only TxRefs (from BIP-136) to refer to did:btcs, but these have a few drawbacks:
- They include the block height, meaning a
did:btc'sTxRefcannot be known or shared until, at minimum it has 1 confirmation, but conservatively may need 6 to 100 for surity - In the case of a reorg, it it highly likely that the TxRef will point to a new transaction rather than be invalid, and although it is highly unlikely but not impossible that that transaction could be a different DID. This is a (admittedly incredibly expensive and hard to pull-off) attack vector. The more common case is that it is not a DID transaction, but still there.
A couple of alternatives come to mind:
- Why not just the txid? You could encode it more compactly that just hex. Using txid has the advantage that it is knowable before te transaction has been broadcast (potentially useful if someone wants to commit to an unpublished DID, and the txid itself is sort-of a commitment to the DID)
- This would also allow Proof-of-Work in DID creation, as with some nonce space to provide entropy you can grind the txid to have some number of leading
0s, which could also be used to shorten thedid:btc:...depending on the encoding chosen. - AFAIK for any Bitcoin Node that has txindex on, this is easy to fetch. However, given the ubiquity of Electrum servers on-top-of Core and the difficulty of doing much useful without it, I'd wager most core nodes do have this enabled. (Opinon) SPV and 'light' nodes seem to be near-dead as a concept, with stuff like Neutrino replacing it.
- This would also allow Proof-of-Work in DID creation, as with some nonce space to provide entropy you can grind the txid to have some number of leading
- You could use (cue screeching) one of the Ordinal theory methods of referring to a specific sat, e.g. the ordinal number encoded with Bech32m/B58/whatever, or the ordinal 'name'. These have the advantage of being a lot shorter than txids, some shorter than
TxRefs whilst still being unmalleable to reorgs.- Using Ordinal theory does have the big downside of needing an index that Bitcoin Core itself doesn't maintain
Metadata
Metadata
Assignees
Labels
No labels