本文档记录了闪电网络 BOLT 9 中init
消息、channel_announcement
和node_announcement
消息中features
标志的分配。
本文档跟踪 init
消息中的 features
标识的分配 (BOLT #1),以及 channel_announcement
和 node_announcement
消息中的 features
字段 ([BOLT
随着时间的推移,可能会添加新的标识。
标识从最低有效位开始编号,位于位 0(即 0x1,一个偶数位)。它们通常成对分配,以便可以将功能
作为可选的(奇数位)引入,然后升级为强制性的
(偶数位),这将不被过时的节点接受:
请参阅 BOLT #1: The init
Message。
某些功能在每个通道或每个节点的基础上没有意义,因此 每个功能都定义了它在这些上下文中如何呈现。某些 功能可能是打开通道所必需的,但不是使用该通道的必需项,因此这些功能的呈现取决于功能本身。
“上下文”列的解码如下:
I
: 在 init
消息中呈现。N
: 在 node_announcement
消息中呈现。C
: 在 channel_announcement
消息中呈现。C-
: 在 channel_announcement
消息中呈现,但始终为奇数(可选)。C+
: 在 channel_announcement
消息中呈现,但始终为偶数(必需)。9
: 在 BOLT 11 发票中呈现。位 | 名称 | 描述 | 上下文 | 依赖项 | 链接 |
---|---|---|---|---|---|
0/1 | option_data_loss_protect |
需要或支持额外的 channel_reestablish 字段 |
IN | BOLT #2 | |
3 | initial_routing_sync |
发送节点需要完整的路由信息转储 | I | BOLT #7 | |
4/5 | option_upfront_shutdown_script |
在打开通道时提交到一个关闭 scriptpubkey | IN | BOLT #2 | |
6/7 | gossip_queries |
更复杂的 gossip 控制 | IN | BOLT #7 | |
8/9 | var_onion_optin |
需要/支持可变长度路由 onion payloads | IN9 | 路由 Onion 规范 | |
10/11 | gossip_queries_ex |
Gossip 查询可以包含其他信息 | IN | gossip_queries |
BOLT #7 |
12/13 | option_static_remotekey |
用于远程输出的静态密钥 | IN | BOLT #3 | |
14/15 | payment_secret |
节点支持 payment_secret 字段 |
IN9 | var_onion_optin |
路由 Onion 规范 |
16/17 | basic_mpp |
节点可以接收基本的多部分付款 | IN9 | payment_secret |
BOLT #4 |
18/19 | option_support_large_channel |
可以创建大型通道 | IN | BOLT #2 | |
20/21 | option_anchor_outputs |
Anchor 输出 | IN | option_static_remotekey |
BOLT #3 |
22/23 | option_anchors_zero_fee_htlc_tx |
具有零费用 HTLC 交易的 Anchor commitment 类型 | IN | option_static_remotekey |
BOLT #3, lightning-dev |
26/27 | option_shutdown_anysegwit |
shutdown 中允许的未来 segwit 版本 |
IN | BOLT #2 | |
44/45 | option_channel_type |
节点支持 open/accept 中的 channel_type 字段 |
IN | BOLT #2 | |
48/49 | option_payment_metadata |
TLV 记录中的支付元数据 | 9 | BOLT #11 |
我们将 option_anchors
定义为 option_anchor_outputs || option_anchors_zero_fee_htlc_tx
。
源节点:
接收特定位的要求在上面表格中的链接部分中定义。
上面未定义的功能位的要求可以在 BOLT #1: The init
Message 中找到。
initial_routing_sync
没有偶数位,因为没有什么
意义:本地节点无法确定远程节点是否合规,并且它必须
按照初始规范中的定义解释该标志。
请注意,对于node_announcement
和 BOLT 11 发票上下文中都可用的功能标志,BOLT 11 发票中设置的功能应覆盖 node_announcement
中设置的功能。这使事情与 BOLT 7 中指定的未知功能行为保持一致。
源必须设置所有传递功能依赖项,以便创建 格式良好的功能向量。通过预先验证所有已知的依赖项,这简化了受单个功能位控制的逻辑;已知该功能的依赖项已设置,并且不需要在每个功能门处进行验证。
<br>
本作品根据 Creative Commons Attribution 4.0 International License 获得许可。
- 原文链接: github.com/lightning/bol...
- 登链社区 AI 助手,为大家转译优秀英文文章,如有翻译不通的地方,还请包涵~
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!