Skip to content

Migrate CLN hold invoice plugin to Boltz hold#2503

Open
0xjc65eth wants to merge 1 commit into
RoboSats:mainfrom
0xjc65eth:cln-boltz-hold-plugin
Open

Migrate CLN hold invoice plugin to Boltz hold#2503
0xjc65eth wants to merge 1 commit into
RoboSats:mainfrom
0xjc65eth:cln-boltz-hold-plugin

Conversation

@0xjc65eth
Copy link
Copy Markdown

Summary

This migrates the CLN hold-invoice path from the archived daywalker90/holdinvoice plugin to BoltzExchange/hold.

Changes included:

  • build and install the hold binary in the CLN Docker image
  • update CLN config/traditional regtest scripts to use hold-grpc-port and the new plugin binary name
  • fetch the current BoltzExchange/hold proto in scripts/generate_grpc.sh
  • adapt api/lightning/cln.py to the new gRPC API:
    • Invoice for hold invoice creation
    • List for invoice lookup
    • Settle with the payment preimage
    • Cancel with the payment hash
    • UNPAID / ACCEPTED / PAID / CANCELLED state mapping
  • keep HTLC expiry tracking by reading cltv_expiry from accepted invoice HTLCs

Closes #2317.

Testing

  • python3 -m py_compile api/lightning/cln.py
  • .venv/bin/ruff check api/lightning/cln.py
  • generated the current Boltz hold.proto stubs with grpc_tools.protoc in /tmp and smoke-tested the Python API symbols used by this PR
  • bash -n docker/cln/entrypoint.sh
  • sh -n scripts/traditional/regtest-nodes
  • git diff --check

I did not run a full CLN regtest/docker flow locally, so the main thing I would still want confirmed in review is the runtime plugin startup plus one accepted/settled hold invoice path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLN: holdinvoice archived in favor of hold

1 participant