config: require an HTLC interceptor when tapd is integrated

tapd's RFQ subsystem enforces the agreed upon quote for asset HTLCs
through lnd's HTLC interceptor. Whenever no interceptor is attached, lnd
forwards HTLCs without any of those checks. That window is small but
real: it exists while tapd is starting up, and whenever tapd has to
re-establish its interception stream.

By setting lnd's requireinterceptor option whenever tapd runs in-process
we make lnd fail forwards back with a temporary channel failure instead
of forwarding them unchecked. HTLCs we receive ourselves are unaffected,
as those are resolved through the invoice registry and never reach the
forwarding interceptor.
This commit is contained in:
George Tsagkarelis 2026-08-10 16:01:17 +00:00
parent a5bf9999b8
commit 3cb07bb603

View file

@ -1012,6 +1012,18 @@ func loadConfigFile(preCfg *Config, interceptor signal.Interceptor) (*Config,
cfg.Lnd.ProtocolOptions.CustomMessage, lnwire.MsgError,
)
// tapd's RFQ subsystem enforces the agreed upon quote for asset
// HTLCs through lnd's HTLC interceptor. Whenever no interceptor
// is attached, lnd forwards HTLCs without any of those checks,
// which would allow asset HTLCs to be forwarded while tapd is
// starting up or while it is re-establishing its interception
// stream. We therefore require an interceptor to be present
// whenever tapd runs in-process, which makes lnd fail HTLCs
// back instead of forwarding them unchecked.
if cfg.TaprootAssetsMode == ModeIntegrated {
cfg.Lnd.RequireInterceptor = true
}
var err error
cfg.Lnd, err = lnd.ValidateConfig(
*cfg.Lnd, interceptor, fileParser, flagParser,