-
Notifications
You must be signed in to change notification settings - Fork 132
Description
Using this issue to collect errors and omissions in blip-tap.md
that need to be fixed to match what tapd actually does.
For starters, TLV types don't match blip-tap.md
. For example, we have
taproot-assets/rfqmsg/records.go
Lines 34 to 44 in 331ac78
type ( | |
// HtlcAmountRecordType is a type alias for the TLV type that is used to | |
// encode an asset ID and amount list within the custom records of an | |
// HTLC record on the wire. | |
HtlcAmountRecordType = tlv.TlvType65536 | |
// HtlcRfqIDType is the type alias for the TLV type that is used to | |
// encode an RFQ id within the custom records of an HTLC record on the | |
// wire. | |
HtlcRfqIDType = tlv.TlvType65538 | |
) |
but these numbers don't match those defined at
I think we also have an issue here
taproot-assets/tapchannelmsg/records.go
Lines 48 to 79 in 331ac78
type ( | |
// HtlcAmountRecordType is a type alias for the TLV type that is used to | |
// encode an asset ID and amount list within the custom records of an | |
// HTLC record on the wire. | |
HtlcAmountRecordType = tlv.TlvType65536 | |
// HtlcSigsRecordType is a type alias for the TLV type that is used to | |
// encode the signatures of an HTLC record on the wire. | |
HtlcSigsRecordType = tlv.TlvType65537 | |
// HtlcRfqIDType is the type alias for the TLV type that is used to | |
// encode an RFQ id within the custom records of an HTLC record on the | |
// wire. | |
HtlcRfqIDType = tlv.TlvType65538 | |
// BtcKeyShutdownType is the type alias for the TLV type that is used to | |
// encode the BTC internal key of the shutdown record on the wire. | |
BtcKeyShutdownType = tlv.TlvType65539 | |
// AssetKeyShutdownType is the type alias for the TLV type that is used | |
// to encode the asset internal key of the shutdown record on the wire. | |
AssetKeyShutdownType = tlv.TlvType65540 | |
// ScriptKeysShutdownType is the type alias for the TLV type that is | |
// used to encode the script keys of the shutdown record on the wire. | |
ScriptKeysShutdownType = tlv.TlvType65541 | |
// ProofDeliveryAddrShutdownType is the type alias for the TLV type that | |
// is used to encode the proof delivery address of the shutdown record | |
// on the wire. | |
ProofDeliveryAddrShutdownType = tlv.TlvType65542 | |
) |
I'm not sure where else in the code TLV values are used that we could have similar problems.
I think it likely makes sense to update blip-tap.md
and not the code, but I'm not the one to make that decision. I think we need to fix something though because it is hard to understand the code if values don't match the spec.