This UNOFFICIAL repository hosts backports of features and fixes from the latest Core Lightning releases while maintaining the database schemas of older releases. The intention is to allow testing and vetting of functionality from newer releases of Core Lightning on near-production nodes without the ratchet-effect risk of database schema migrations.
branch | branch | branch | branch | branch | |
---|---|---|---|---|---|
database schema identical to… | v0.12.1 |
v22.11.1 |
v23.02.2 |
v23.05 |
v23.08.1 |
backported from… | v23.11.2 |
v23.11.2 |
v23.11.2 |
v23.11.2 |
v23.11.2 |
completed_at fields |
✖ | ✔ | ✔ | ✔ | ✔ |
delforward RPC; expanded autoclean |
✖ | ✔ | ✔ | ✔ | ✔ |
database index on payment hash | ✖ | ✔ | ✔ | ✔ | ✔ |
listhtlcs RPC |
✖ | ✔ | ✔ | ✔ | ✔ |
immature coinbase status |
✖ | ✔ | ✔ | ✔ | ✔ |
…invoicerequest RPCs |
✖ | ✔ | ✔ | ✔ | ✔ |
remember requested dual-open lease across restarts | ✖ | ✖ | ✔ | ✔ | ✔ |
dual-open supports requiring confirmed inputs | ✖ | ✖ | ✔ | ✔ | ✔ |
PSBTv2; setpsbtversion RPC |
✖ | ✖ | ✖ | ✔ | ✔ |
Taproot | ✖ | ✖ | ✖ | ✔ | ✔ |
feature bits persist across restarts | ✖ | ✖ | ✖ | ✖ | ✔ |
native runes | ✖ | ✖ | ✖ | ✖ | ✔ |
ignored fee limits persist across restarts | ✖ | ✖ | ✖ | ✖ | ✔ |
invoice indices | ✖ | ✖ | ✖ | ✖ | ✔ |
splicing | ✖ | ✖ | ✖ | ✖ | ✔ |
runes last-used time | ✖ | ✖ | ✖ | ✖ | ✖ |
invoice on-chain fallbacks | ✖ | ✖ | ✖ | ✖ | ✖ |
local anchors | ✖ | ✖ | ✖ | ✖ | ✖ |
forwards and sendpays indices |
✖ | ✖ | ✖ | ✖ | ✖ |
Of course, you need to be very careful about where you source software that handles money. The backports branches in this repository are structured to make auditing their delta versus upstream as painless as possible.
The backports workflow follows these rules:
- Each backports branch is based on (i.e., forked from) the upstream release tag whose database schema it maintains.
- At the head of each backports branch is a merge from the upstream release tag that the branch backports.
- Between the fork point and the branch head is a series of reverge commits. (“Reverge” is a portmanteau of “revert” and “merge.”)
- Each reverge commit is a merge of a revert commit that is a direct child of the commit it reverts.
- Each revert commit is tree-same as its grandparent commit. This fact can be checked mechanistically; see below.
The foregoing rules reduce the delta surface requiring manual auditing to the set of merge conflict resolutions plus any “evil” changes that may have been introduced anew by merge commits, of which hopefully there are none.
You can use the following Bash snippet to check that every non-merge commit that is reachable from a backports branch head but not from the backported upstream tag is tree-same as its grandparent:
$ UPSTREAM_TAGS=( v23.11.2 v23.05.2 )
$ BACKPORTS_HEAD=22.11.1/backports # example
$ git rev-list --no-merges "${BACKPORTS_HEAD}" --not "${UPSTREAM_TAGS[@]}" |
while read -r rev ; do
git diff --name-only --exit-code "${rev}"{^^,} >/dev/null || echo "${rev}^!"
done | git rev-list --abbrev-commit --format=oneline --stdin
Note that very occasionally there may be partial reverts that are not tree-same as their grandparents. These indeed will be singled out by the preceding shell code, and you should audit their diffs.
After you have verified that all of the revert commits are copacetic, you can audit the changes introduced by the merge commits with the following command:
$ git log --reverse --merges --cc "${UPSTREAM_TAGS[0]}..${BACKPORTS_HEAD}"
The --cc
option suppresses output of diff hunks that differ from only one merge parent, which is what you want, as those hunks contain only changes that originated upstream.
The remaining hunks are those that resolve merge conflicts or introduce novel changes.
Pay special attention to any diff lines that begin with ++
or --
, as those lines represent changes that are present in neither parent of the merge.
If some malicious code were to sneak into these backports branches, it would appear as ++
lines in the merge diff.
These backports are available in the Bitcoin Gentoo repository.
# emerge -n app-eselect/eselect-repository dev-vcs/git
# eselect repository enable bitcoin
# emaint sync -r bitcoin
# echo '<net-p2p/core-lightning-9999::bitcoin **' >>/etc/portage/package.accept_keywords
# emerge net-p2p/core-lightning::bitcoin