-
Notifications
You must be signed in to change notification settings - Fork 961
Downgrade tool #8702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Downgrade tool #8702
Changes from all commits
8f9cdeb
6421931
89c1b06
3c89231
d74d89d
dd7e460
b4be1b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,9 @@ $(info Building version $(VERSION)) | |
| # Next release. | ||
| CLN_NEXT_VERSION := v25.12 | ||
|
|
||
| # Previous release (for downgrade testing) | ||
| CLN_PREV_VERSION := v25.09 | ||
|
|
||
| # --quiet / -s means quiet, dammit! | ||
| ifeq ($(findstring s,$(word 1, $(MAKEFLAGS))),s) | ||
| ECHO := : | ||
|
|
@@ -552,8 +555,8 @@ CHECK_BOLT_PREFIX=--prefix="BOLT-$(BOLTVERSION)" | |
| endif | ||
|
|
||
| # Any mention of BOLT# must be followed by an exact quote, modulo whitespace. | ||
| bolt-check/%: % bolt-precheck tools/check-bolt | ||
| @if [ -d .tmp.lightningrfc ]; then tools/check-bolt $(CHECK_BOLT_PREFIX) .tmp.lightningrfc $<; else echo "Not checking BOLTs: BOLTDIR $(BOLTDIR) does not exist" >&2; fi | ||
| bolt-check/%: % bolt-precheck devtools/check-bolt | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This commit looks good, but why are we doing this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. devtools are for tools run by developers only. |
||
| @if [ -d .tmp.lightningrfc ]; then devtools/check-bolt $(CHECK_BOLT_PREFIX) .tmp.lightningrfc $<; else echo "Not checking BOLTs: BOLTDIR $(BOLTDIR) does not exist" >&2; fi | ||
|
|
||
| LOCAL_BOLTDIR=.tmp.lightningrfc | ||
|
|
||
|
|
@@ -565,7 +568,7 @@ check-source-bolt: $(ALL_NONGEN_SRCFILES:%=bolt-check/%) | |
| check-whitespace/%: % | ||
| @if grep -Hn '[ ]$$' $<; then echo Extraneous whitespace found >&2; exit 1; fi | ||
|
|
||
| check-whitespace: check-whitespace/Makefile check-whitespace/tools/check-bolt.c $(ALL_NONGEN_SRCFILES:%=check-whitespace/%) | ||
| check-whitespace: check-whitespace/Makefile check-whitespace/devtools/check-bolt.c $(ALL_NONGEN_SRCFILES:%=check-whitespace/%) | ||
|
|
||
| check-spelling: | ||
| @tools/check-spelling.sh | ||
|
|
@@ -934,8 +937,7 @@ TESTBINS = \ | |
| $(CLN_PLUGIN_EXAMPLES) \ | ||
| tests/plugins/test_libplugin \ | ||
| tests/plugins/channeld_fakenet \ | ||
| tests/plugins/test_selfdisable_after_getmanifest \ | ||
| tools/hsmtool | ||
| tests/plugins/test_selfdisable_after_getmanifest | ||
|
|
||
| # The testpack is used in CI to transfer built artefacts between the | ||
| # build and the test phase. This is necessary because the fixtures in | ||
|
|
@@ -944,7 +946,7 @@ TESTBINS = \ | |
| # version of `lightningd` leading to bogus results. We bundle up all | ||
| # built artefacts here, and will unpack them on the tester (overlaying | ||
| # on top of the checked out repo as if we had just built it in place). | ||
| testpack.tar.bz2: $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) $(PY_PLUGINS) $(MAN1PAGES) $(MAN5PAGES) $(MAN7PAGES) $(MAN8PAGES) $(DOC_DATA) config.vars $(TESTBINS) $(DEVTOOLS) | ||
| testpack.tar.bz2: $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) $(PY_PLUGINS) $(MAN1PAGES) $(MAN5PAGES) $(MAN7PAGES) $(MAN8PAGES) $(DOC_DATA) config.vars $(TESTBINS) $(DEVTOOLS) $(TOOLS) | ||
| tar -caf $@ $^ | ||
|
|
||
| uninstall: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| lightning-downgrade -- Tool to revert core lightning to an older version | ||
| ======================================================================== | ||
|
|
||
| SYNOPSIS | ||
| -------- | ||
|
|
||
| ```bash | ||
| lightning-downgrade method [ARGUMENTS]... | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is method? It doesn't seem like the main function accepts any arguments? |
||
| ``` | ||
|
|
||
| DESCRIPTION | ||
| ----------- | ||
|
|
||
| **lightning-downgrade** reverts an upgrade by modifying the `lightningd` | ||
| database back the prior version. `lightningd` must **not** be running | ||
| at the time. | ||
|
|
||
| A downgrade may not be possible if a new feature has been used that would | ||
| be incompatible with an older version. In this case the downgrade will fail | ||
| with a message and nothing will be changed. | ||
|
|
||
| Use the latest `lightning-downgrade` to downgrade. For example, the `v25.12` lightning-downgrade won't know how to downgrade `v26.06`. | ||
|
|
||
| All minor versions are compatible, so a downgrade to v25.09 will work | ||
| fine with v25.09.1 or v25.09.2, etc. | ||
|
|
||
| VERSIONS | ||
| -------- | ||
|
|
||
| * *v25.12*: downgrades to v25.09. | ||
|
|
||
| Downgrade is not possible if `withhold` `true` has been used with `fundchannel_complete`. | ||
|
|
||
| * *v25.09*: downgrade is not supported. | ||
|
|
||
| OPTIONS | ||
| ------- | ||
|
|
||
| * **--lightning-dir**=*DIR* | ||
|
|
||
| Set the directory for the lightning daemon we're talking to; defaults to | ||
| *$HOME/.lightning*. | ||
|
|
||
| * **--conf**=*PATH* | ||
|
|
||
| Sets configuration file (default: **lightning-dir**/*config* ). | ||
|
|
||
| * **--network**=*network* | ||
| * **--mainnet** | ||
| * **--testnet** | ||
| * **--testnet4** | ||
| * **--signet** | ||
| * **--regtest** | ||
|
|
||
| Sets network explicitly. | ||
|
|
||
| * **--rpc-file**=*FILE* | ||
|
|
||
| Named pipe to use to talk to lightning daemon: default is | ||
| *lightning-rpc* in the lightning directory. | ||
|
|
||
| * **wallet**=*DSN* | ||
|
|
||
| Identify the location of the wallet. See lightningd-config(5) for details. | ||
|
|
||
| * **--help**/**-h** | ||
|
|
||
| Pretty-print summary of options to standard output and exit. The format can | ||
| be changed using `-F`, `-R`, `-J`, `-H` etc. | ||
|
|
||
| * **--version**/**-V** | ||
|
|
||
| Print version number to standard output and exit. | ||
|
|
||
|
|
||
| BUGS | ||
| ---- | ||
|
|
||
| You should report bugs on our github issues page, and maybe submit a fix | ||
| to gain our eternal gratitude! | ||
|
|
||
| AUTHOR | ||
| ------ | ||
|
|
||
| Rusty Russell <<rusty@rustcorp.com.au>> wrote the initial version of **lightning-downgrade** and this man page. | ||
|
|
||
| SEE ALSO | ||
| -------- | ||
|
|
||
| lightningd(8), lightningd-config(5) | ||
|
|
||
| RESOURCES | ||
| --------- | ||
|
|
||
| Main web site: <https://github.com/ElementsProject/lightning> | ||
|
|
||
| COPYING | ||
| ------- | ||
|
|
||
| Note: the modules in the ccan/ directory have their own licenses, but | ||
| the rest of the code is covered by the BSD-style MIT license. | ||
| Main web site: <https://github.com/ElementsProject/lightning> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something manually updated or updated by one of the build scripts? I'm guessing it's okay for the previous release version to always stay as 25.09 because we will always try to make our releases downgradable from here on out?