Skip to content
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

remote-hsmd on CLN v23.11 #100

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2a7a3d2
tests/clnrest: Added rpc method name and params to use the same `noti…
ShahanaFarooqui Nov 21, 2023
fdc7fcb
tests/clnrest: Test to confirm that `msat` suffix has been removed fr…
ShahanaFarooqui Nov 21, 2023
0b23133
lightningd: don't print out notification msat fields as strings.
rustyrussell Nov 21, 2023
eb3b1b8
clnrest: Import sys in except clause explicitly
nepet Nov 20, 2023
194dd2b
CHANGELOG.md: Update for 23.11rc3
nepet Nov 21, 2023
9d40a16
hsmtool: Fix argc check on getcodexsecret
nepet Nov 24, 2023
3d51f00
doc: Add `getemergencyrecover` to the hsmtool doc
nepet Nov 24, 2023
9ace27e
doc: Update example to be valid codex32 string
nepet Nov 24, 2023
5887be0
CHANGELOG.md: Update for 23.11 final
nepet Nov 28, 2023
454c02b
ci: add curl to setup.sh
ksedgwic Feb 14, 2023
3dc93d3
gitignore VLS proxy daemons
ksedgwic May 9, 2023
dd92113
tests: add PYTEST_MOREOPTS so users can extend the options
ksedgwic Nov 16, 2023
2237336
tests: add TEST_KEEPDIR to prevent cleanup of successful tests
ksedgwic Nov 21, 2023
50ce87f
tests: add VLS to CLN integration suite
ksedgwic Nov 21, 2023
b2f4d29
tests: integrate lssd
devrandom Oct 4, 2022
d149504
tests: add call to preapproveinvoice in pay to inform signer
ksedgwic Jun 7, 2023
4fef4ef
tests: add explicit preapprove{invoice,keysend} calls before sendpay
ksedgwic Jun 8, 2023
e52a0c3
tests: disable flaky on test_splice, incompatible w/ pytest-timeout
ksedgwic Nov 16, 2023
e5b94ba
tests: skip splicing / dual-funding tests when VLS_SKIP_SPLICE_TESTS
ksedgwic Nov 20, 2023
fb44905
tests: skip test_reckless.py::test_disable_enable because no canned g…
ksedgwic Nov 20, 2023
3498d57
tests: skip tests incompatible with VLS
ksedgwic Nov 21, 2023
4e53aa3
tests: reevaluate: reenabled tests which pass
ksedgwic Nov 21, 2023
2f5f098
tests: Fix test_sign_and_send_psbt wrt VLS signatures
ksedgwic Nov 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
build-essential \
clang \
cppcheck \
curl \
docbook-xml \
eatmydata \
gcc-aarch64-linux-gnu \
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [v23.11rc2] - 2023-11-02: "Bitcoin Orangepaper"
## [23.11] - 2023-11-28: "Bitcoin Orangepaper"

This release named by Shahana Farooqui

Expand Down Expand Up @@ -74,11 +74,14 @@ Note: You should always set `allow-deprecated-apis=false` to test for changes.
- Protocol: Implemented splicing restart logic for tx_signature and commitment_signed. Splice commitments are reworked in a manner incompatible with the last version. ([#6840])
- Wallet: close change outputs show up immediately in `listfunds` so you can CPFP. ([#6734])
- Restore any missing metadata that resource constrained signers stripped ([#6767])
- JSON-RPC: Plugin notification `msat` fields in `invoice_payment` and `invoice_created` hooks now a number, not a string with "msat" suffix. ([#6884])
- JSON-RPC: Plugin hook `payment` `msat` field is now a number, not a string with "msat" suffix. ([#6884])
- JSON-RPC: fix `checkrune` when `method` parameter is the empty string. ([#6759])
- JSON-RPC: `getroute` now documents that it ignores `fuzzpercent`. ([#6697])
- Rune: use runes table `id` instead `runes_uniqueid` from `vars` because it returns incorrect unique id if rune/s migrated from datastore. ([#6715])
- Added docs, testing, and some fixes related to splicing out, insufficent balance handling, and restarting during a splice. ([#6677])
- The WIRE_HSMD_SIGN_SPLICE_TX HSM capability is now correctly checked. ([#6867])
- Hsmtool: Fix segmentation fault when calling `getcodexsecret` without id. ([#6895])


### EXPERIMENTAL
Expand Down Expand Up @@ -122,6 +125,8 @@ Note: You should always set `allow-deprecated-apis=false` to test for changes.
[#6857]: https://github.com/ElementsProject/lightning/pull/6857
[#6876]: https://github.com/ElementsProject/lightning/pull/6876
[#6840]: https://github.com/ElementsProject/lightning/pull/6840
[#6884]: https://github.com/ElementsProject/lightning/pull/6884
[#6895]: https://github.com/ElementsProject/lightning/pull/6895


## [23.08.1] - 2023-09-12: "Satoshi's Successor II"
Expand Down Expand Up @@ -2754,6 +2759,7 @@ There predate the BOLT specifications, and are only of vague historic interest:
6. [0.5.1] - 2016-10-21
7. [0.5.2] - 2016-11-21: "Bitcoin Savings & Trust Daily Interest II"

[23.11]: https://github.com/ElementsProject/lightning/releases/tag/v23.11
[23.05]: https://github.com/ElementsProject/lightning/releases/tag/v23.05
[23.02.1]: https://github.com/ElementsProject/lightning/releases/tag/v23.02.1
[23.02]: https://github.com/ElementsProject/lightning/releases/tag/v23.02
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ COMPAT_CFLAGS=-DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -D
endif

# (method=thread to support xdist)
PYTEST_OPTS := -v -p no:logging $(PYTEST_OPTS)
PYTEST_OPTS := -v -p no:logging $(PYTEST_OPTS) $(PYTEST_MOREOPTS)
MY_CHECK_PYTHONPATH=$${PYTHONPATH}$${PYTHONPATH:+:}$(shell pwd)/contrib/pyln-client:$(shell pwd)/contrib/pyln-testing:$(shell pwd)/contrib/pyln-proto/:$(shell pwd)/external/lnprototest:$(shell pwd)/contrib/pyln-spec/bolt1:$(shell pwd)/contrib/pyln-spec/bolt2:$(shell pwd)/contrib/pyln-spec/bolt4:$(shell pwd)/contrib/pyln-spec/bolt7
# Collect generated python files to be excluded from lint checks
PYTHON_GENERATED= \
Expand Down
2 changes: 1 addition & 1 deletion common/json_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ void json_add_amount_msat(struct json_stream *result,
const char *msatfieldname,
struct amount_msat msat)
{
assert(strends(msatfieldname, "_msat"));
assert(strends(msatfieldname, "_msat") || streq(msatfieldname, "msat"));
json_add_u64(result, msatfieldname, msat.millisatoshis); /* Raw: low-level helper */
}

Expand Down
29 changes: 26 additions & 3 deletions contrib/pyln-testing/pyln/testing/fixtures.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from concurrent import futures
from pyln.testing.db import SqliteDbProvider, PostgresDbProvider
from pyln.testing.utils import NodeFactory, BitcoinD, ElementsD, env, LightningNode, TEST_DEBUG
from pyln.testing.utils import NodeFactory, BitcoinD, ElementsD, env, LightningNode, TEST_DEBUG, LssD
from pyln.client import Millisatoshi
from typing import Dict

Expand Down Expand Up @@ -31,6 +31,9 @@ def test_base_dir():

yield directory

if bool(int(os.getenv('TEST_KEEPDIR', '0'))):
return

# Now check if any test directory is left because the corresponding test
# failed. If there are no such tests we can clean up the root test
# directory.
Expand Down Expand Up @@ -92,7 +95,7 @@ def directory(request, test_base_dir, test_name):
outcome = 'passed' if rep_call is None else rep_call.outcome
failed = not outcome or request.node.has_errors or outcome != 'passed'

if not failed:
if not failed and not bool(int(os.getenv('TEST_KEEPDIR', '0'))):
try:
shutil.rmtree(directory)
except OSError:
Expand Down Expand Up @@ -164,6 +167,25 @@ def bitcoind(directory, teardown_checks):
bitcoind.proc.wait()


@pytest.fixture
def lssd(directory, teardown_checks):
lssd = LssD(directory)

try:
lssd.start()
except Exception:
lssd.stop()
raise

yield lssd

try:
lssd.stop()
except Exception:
lssd.proc.kill()
lssd.proc.wait()


class TeardownErrors(object):
def __init__(self):
self.errors = []
Expand Down Expand Up @@ -446,11 +468,12 @@ def jsonschemas():


@pytest.fixture
def node_factory(request, directory, test_name, bitcoind, executor, db_provider, teardown_checks, node_cls, jsonschemas):
def node_factory(request, directory, test_name, bitcoind, lssd, executor, db_provider, teardown_checks, node_cls, jsonschemas):
nf = NodeFactory(
request,
test_name,
bitcoind,
lssd,
executor,
directory=directory,
db_provider=db_provider,
Expand Down
Loading
Loading