Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Feature Request: Native BIP352 support in `hsmd` and enhanced `bcli` block fetching

未关闭
#9,336 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
c

调研方向

先阅读 libhsmd.c 和 hsm_control.c,了解现有的种子派生和签名接口,然后检查 bcli 的 getblock 实现及其 RPC 暴露方式。将 BIP352 派生和签名要求与 verbosity-3 区块获取要求分开界定,并确认二者都可以在不使用插件当前变通方案的情况下集成。

由索引模型根据 Issue 内容生成。

描述

Feature Request: Native BIP352 support in hsmd and enhanced bcli block fetching

The Issue

I have been developing an experimental/proof-of-concept Core Lightning plugin to introduce BIP352 (Silent Payments) support directly to CLN nodes. You can see the current progress here: aido/silentpayments.

To get this working as a Python plug-in, I had to make a few compromises that bypass CLN's standard architecture. As a result, the plugin is practically operating as a "shadow wallet" alongside Core Lightning, which is far from ideal. I'm opening this issue to see if it is possible to get native support for these requirements in future releases.

1. The hsmd derivation bottleneck

Because hsmd strictly (and rightly) locks away the master seed, the plugin currently cannot perform the necessary BIP352 ECDH tweaks or natively sign Silent Payment outputs.

The Workaround: I am using the makesecret RPC (with the tweak bip352_silent_payments) to deterministically derive a 32-byte secret, which I then use as the master seed for BIP32 inside the plugin.
The Consequence: This creates a non-standard derivation path and forces the plugin to act as a siloed "shadow wallet". If a user takes their 24-word CLN recovery phrase and imports it into a BIP352-compatible wallet (like Sparrow), it will not see these funds. The addresses are completely tethered to the plugin's makesecret sandbox, which is a major UX and security risk for users trying to recover funds.

2. The bcli verbosity limitation

For BIP352 block scanning, we need the prevout scriptPubKeys for all inputs to calculate the tweaks.

The Workaround: I have to use Python's subprocess to call bitcoin-cli getblock <hash> 3 directly.
The Consequence: I cannot use CLN's internal bcli plugin because it is heavily locked down (only exposing 5 hardcoded commands to the RPC) and its internal C code strictly hardcodes getblock to verbosity "0" (raw hex). Shelling out to bitcoin-cli is brittle and bypasses the node's native architecture.

Proposed solution

  1. Native BIP352 Support in hsmd: It would be great to see native BIP352 derivation paths, ECDH tweaks, and signing capabilities added to hsmd (specifically libhsmd.c / hsm_control.c). This would allow plugins to request Silent Payment addresses and signatures securely, integrating properly with the main node rather than acting as a disjointed shadow wallet.
  2. Verbosity "3" Support in bcli: Either allow bcli's getblock command to accept a verbosity parameter (specifically level 3) so plugins can retrieve full transaction details with prevout data, or expose a more flexible RPC pass-through for bitcoind.

Additional context

Why BIP352 for Core Lightning?

Lightning node operators frequently need to share a static on-chain address; whether for node donations, liquidity management, submarine swaps, or out-of-band channel funding. Currently, doing so may compromise on-chain privacy, as chain surveillance can easily link a public Lightning Node ID to an entire UTXO history.

Bringing BIP352 to CLN allows operators to publish a single, reusable static address that preserves their privacy. Adding native hooks for BIP352 would make it easier for the plugin ecosystem to build out these advanced privacy features without requiring users to run modified C code or risk their funds in sandbox workarounds.

主要语言
C
星标
3.1k
派生
1k
平均合并
5 天 2 小时
30 天内合并 PR
30

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ElementsProject/lightning 的其他 Issue

查看 ElementsProject/lightning 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。