[c-lightning] Plug-in design requirements

ZmnSCPxj ZmnSCPxj at protonmail.com
Mon Dec 10 17:16:24 AEDT 2018


Good morning,


> The definition of 'application-specific data' would be 'a TLV we don't
> understand'. I think the 'chainhop' and 'multipart' and a few other TLV
> values have been proposed so far; we'd handle 'multipart' internally.

I also proposed a separate `application_data` TLV that is intended precisely to be passed into/from the lower-level Lightning protocol.

I proposed it as even TLV type, such that the application must exist on the receiving end.

However, I want to consider the below:

1.  TLV allocation needs to be done at BOLT-level.
2.  Arguably, allocation of application IDs should not be at BOLT-level, as applications should be at a different level from Lightning BOLT level.

Thus, I would also propose, that `application_data` be split into:

* [ `20` : `application_id` ]
* [ ... application-specific data ]

That is, the first 20 bytes of the `application_data` would identify the application with high probability of not colliding with another application (it could be the RIPEMD of the application name).

This prevents applications from defining TLV types that we would want to use at the BOLT level (in the same way that we changed `realm` so that different blockchains no longer allocate `realm` bytes, but instead the identification of blockchains is pushed into a blob).

Regards,
ZmnSCPxj


More information about the c-lightning mailing list