Skip to content

Investigate the splice reestablish branch #96

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

Draft
wants to merge 76 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
cce4f68
doc: fix cln-grpc example.
tonyaldon Oct 13, 2023
9e0b244
splice: fix WIRE_HSMD_SIGN_SPLICE_TX capability check
ksedgwic Nov 14, 2023
bdfd2d5
msggen: Add `FetchInvoice` method to Rust and grpc bindings
cdecker Nov 7, 2023
94f4d75
msggen: Add `Wait` method to managed API
cdecker Nov 7, 2023
672477c
poetry: add `requests` dependency for clnrest tests in contrib/pyln-t…
tonyaldon Oct 2, 2023
b3f122a
pytest: adds test suite for clnrest plugin
tonyaldon Oct 5, 2023
f2f6c73
clnrest: don't try to handle plugin.rpc.call results.
rustyrussell Nov 10, 2023
8b84c89
clnrest: don't convert *_msat fields to strings.
rustyrussell Nov 10, 2023
9e9c3db
clnrest: add gevent ssl monkey patch to remove warning log
ShahanaFarooqui Nov 10, 2023
017581c
doc: update decode instruction for emergency.recover
ShahanaFarooqui Nov 10, 2023
cc2665d
clnrest: prefixing all rest config options with `cln`
ShahanaFarooqui Nov 10, 2023
8f8202d
meta: Update release checklist
nepet Nov 2, 2023
2f6805a
splice: Reestablish when commit or sig sends fail
ddustin Nov 3, 2023
c1ffe15
fixup! splice: Reestablish when commit or sig sends fail
ddustin Nov 16, 2023
0ff33b7
Add remote_hsmd
ksedgwic Mar 16, 2022
c0aa3d1
read the GRPC endpoint from the env var REMOTE_HSMD_ENDPOINT (#22)
ulrichard May 23, 2021
c0f2ef9
Integrate VLSD into integration test framework
ksedgwic Mar 16, 2022
29fa9e8
Skip test which are not valid w/ VLSD
ksedgwic Mar 16, 2022
49fcf5c
Update install notes
decentclock Mar 1, 2022
27a1a62
Improved basic setup instructions
ksedgwic Mar 2, 2022
db15613
rearrange order of steps in NOTES.md
decentclock Mar 7, 2022
aa859a3
fixup: Rename formal parameter name to avoid C++ reserved word.
ksedgwic Mar 16, 2022
458874d
doc: update remote hsmd notes
Mar 17, 2022
5f9a17a
Move proxy to another repo
devrandom Mar 22, 2022
a7d5406
skip test_invoice_preimage
devrandom Mar 23, 2022
f3ce1b9
skip test_upgrade_statickey
devrandom Mar 23, 2022
5d08cc4
skip test_openchannel_hook_error_handling, frequently hangs
ksedgwic Mar 24, 2022
561f37b
Addded gitgnore of contrib/remote_hsmd because dirty
ksedgwic Mar 24, 2022
dccb296
ignore remote_hsmd_vls because dirty
ksedgwic Mar 26, 2022
3668ff2
unskip bolt12 tests
ksedgwic Mar 29, 2022
e399168
Add --rpc argument to connect vlsd to regtest in integration tests
ksedgwic Mar 7, 2022
124f2d5
WIP: unskipped a reorg test
ksedgwic Mar 7, 2022
b2a84d7
testing: allow multiple SUBDAEMON items
devrandom May 2, 2022
9ebcdb0
Skip test with IPv6 issue in CI runner
ksedgwic May 9, 2022
1ca533a
Skip test_multifunding_feerates because flakes too often
ksedgwic May 9, 2022
12e7154
Skip tests which frequently flake
ksedgwic May 10, 2022
412d046
Set BITCOIND_RPC_URL env variable in testing framework
ksedgwic May 24, 2022
67373e3
Prefix vlsd logging w/ mathcing node ordinal
ksedgwic Jun 7, 2022
c7bfb12
Skip tests which use dev_sign_last_tx to cause breach
ksedgwic Jun 27, 2022
6210325
Unskip tests which now work with VLS_ENFORCING
ksedgwic Jul 14, 2022
fe4751e
Unskip some tests when VLS_PERMISSIVE=1
ksedgwic Jul 14, 2022
b664755
Comment tests which FAIL with VLS_PERMISSIVE
ksedgwic Jul 14, 2022
c0438cd
Skip unless VLS_PERMISSIVE for tests w/ feerates higher than 100_000
ksedgwic Jul 20, 2022
2c3a507
Allow selection of serial demo node with VLS_SERIAL_SELECT
ksedgwic Jul 27, 2022
d6741da
Set network in CLN proxies
ksedgwic Aug 6, 2022
eac7365
Update vlsd test harness wrt reserve_unused_port, stderr_redir, netwo…
ksedgwic Aug 9, 2022
f46345f
Skip or require VLS_PERMISSIVE=1 as appropriate
ksedgwic Aug 10, 2022
60bfe96
Use more specific failures in validate_onchain_tx w/o dual-funding
ksedgwic Sep 8, 2022
30d1d4c
Fix VLS_NETWORK setup bug in cln:native mode
ksedgwic Sep 15, 2022
06db8f8
Skip BOLT12 tests (invoices derived from offers)
ksedgwic Sep 16, 2022
13ac712
Skip invoice test with missing mandatory payment secret
ksedgwic Sep 16, 2022
2cf12eb
Integrate lssd
devrandom Oct 4, 2022
c759b32
Change vlsd's RPC URL arg to --bitcoin
ksedgwic Nov 7, 2022
7060e6a
Unskip tests after increasing regtest max_feerate_per_kw to 151_000
ksedgwic Feb 14, 2023
f498eea
ci: add curl to setup.sh
ksedgwic Feb 14, 2023
9c86f34
ci: remove remote_hsmd from Makefile
ksedgwic Feb 14, 2023
6eaf44d
Skip dual funding tests which trigger policy failure
ksedgwic Feb 16, 2023
39d4d75
replace vlsd support with vlsd2
devrandom Feb 21, 2023
b05b42a
Unskip (completely) tests w/ unknown outputs because auto_approve
ksedgwic Apr 28, 2023
441612d
gitignore VLS proxy daemons
ksedgwic May 9, 2023
20315bb
Skip zeroconf tests unless PERMISSIVE
ksedgwic May 20, 2023
fff7042
tests: Add call to preapproveinvoice in pay to inform signer
ksedgwic Jun 7, 2023
ba70241
tests: Add explicit preapprove{invoice,keysend} calls before sendpay
ksedgwic Jun 8, 2023
2f1477d
tests: Skip unless VLS_PERMISSIVE tests which violate policy
ksedgwic Jun 8, 2023
67324df
tests: Skip entirely because malformed payment requests
ksedgwic Jun 9, 2023
e7f5f69
Skip unruly tests unless PERMISSIVE
ksedgwic Aug 5, 2023
d6a6f9a
tests: Add explicit preapprove{invoice,keysend} calls before sendpay
ksedgwic Aug 4, 2023
c62c7eb
splicing: Skip splice test until splicing is supported
ksedgwic Aug 14, 2023
6c3981a
tests: skip sign_option_will_fund_offer because (VLS:[#399])
ksedgwic Sep 13, 2023
9b9a9aa
tests: Only run splicing tests when EXPERIMENTAL_SPLICING
ksedgwic Aug 30, 2023
0029264
tests: Skip remote_hsmd incompatible tests
ksedgwic Nov 1, 2023
8c4357e
tests: Add explicit preapprove{invoice,keysend} calls before sendpay
ksedgwic Nov 1, 2023
03df18e
squash: undo unwanted splice skip [runs it]
ksedgwic Nov 13, 2023
e68a2e7
tests: disable flaky on test_splice, incompatible w/ pytest-timeout
ksedgwic Nov 16, 2023
b1d16de
tests: Add PYTEST_MOREOPTS so users can extend the options
ksedgwic Nov 16, 2023
1d4e2e9
tests: skip splicing / dual-funding tests when VLS_SKIP_SPLICE_TESTS
ksedgwic Nov 20, 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
8 changes: 7 additions & 1 deletion .dir-locals.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@
(c-basic-offset . 8)
(tab-width . 8)
))
)

(c++-mode . ((c-file-style . "linux")
(indent-tabs-mode . t)
(show-trailing-whitespace . t)
(c-basic-offset . 8)
(tab-width . 8)
)))
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
166 changes: 166 additions & 0 deletions .msggen.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,16 @@
"complete": 1,
"pending": 0
},
"WaitIndexname": {
"created": 0,
"deleted": 2,
"updated": 1
},
"WaitSubsystem": {
"forwards": 1,
"invoices": 0,
"sendpays": 2
},
"WaitanyinvoiceStatus": {
"expired": 1,
"paid": 0
Expand Down Expand Up @@ -697,6 +707,35 @@
"Feerates.perkw": 3,
"Feerates.warning_missing_feerates": 1
},
"FetchinvoiceChanges": {
"FetchInvoice.changes.amount_msat": 5,
"FetchInvoice.changes.description": 2,
"FetchInvoice.changes.description_appended": 1,
"FetchInvoice.changes.vendor": 4,
"FetchInvoice.changes.vendor_removed": 3
},
"FetchinvoiceNext_period": {
"FetchInvoice.next_period.counter": 1,
"FetchInvoice.next_period.endtime": 3,
"FetchInvoice.next_period.paywindow_end": 5,
"FetchInvoice.next_period.paywindow_start": 4,
"FetchInvoice.next_period.starttime": 2
},
"FetchinvoiceRequest": {
"FetchInvoice.amount_msat": 2,
"FetchInvoice.offer": 1,
"FetchInvoice.payer_note": 8,
"FetchInvoice.quantity": 3,
"FetchInvoice.recurrence_counter": 4,
"FetchInvoice.recurrence_label": 6,
"FetchInvoice.recurrence_start": 5,
"FetchInvoice.timeout": 7
},
"FetchinvoiceResponse": {
"FetchInvoice.changes": 2,
"FetchInvoice.invoice": 1,
"FetchInvoice.next_period": 3
},
"FundchannelRequest": {
"FundChannel.amount": 1,
"FundChannel.announce": 3,
Expand Down Expand Up @@ -1603,6 +1642,17 @@
"UtxoPsbt.psbt": 1,
"UtxoPsbt.reservations[]": 6
},
"WaitRequest": {
"Wait.indexname": 2,
"Wait.nextvalue": 3,
"Wait.subsystem": 1
},
"WaitResponse": {
"Wait.created": 2,
"Wait.deleted": 4,
"Wait.subsystem": 1,
"Wait.updated": 3
},
"WaitanyinvoicePaid_outpoint": {
"WaitAnyInvoice.paid_outpoint.outnum": 2,
"WaitAnyInvoice.paid_outpoint.txid": 1
Expand Down Expand Up @@ -2853,6 +2903,94 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice": {
"added": "pre-v0.10.1",
"deprecated": null
},
"FetchInvoice.amount_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.changes": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.changes.amount_msat": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.changes.description": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.changes.description_appended": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.changes.vendor": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.changes.vendor_removed": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.invoice": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.next_period": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.next_period.counter": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.next_period.endtime": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.next_period.paywindow_end": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.next_period.paywindow_start": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.next_period.starttime": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.offer": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.payer_note": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.quantity": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.recurrence_counter": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.recurrence_label": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.recurrence_start": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FetchInvoice.timeout": {
"added": "pre-v0.10.1",
"deprecated": false
},
"FundChannel": {
"added": "pre-v0.10.1",
"deprecated": null
Expand Down Expand Up @@ -5613,6 +5751,34 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"Wait": {
"added": "v23.08",
"deprecated": null
},
"Wait.created": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Wait.deleted": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Wait.indexname": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Wait.nextvalue": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Wait.subsystem": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Wait.updated": {
"added": "pre-v0.10.1",
"deprecated": false
},
"WaitAnyInvoice": {
"added": "pre-v0.10.1",
"deprecated": null
Expand Down
13 changes: 11 additions & 2 deletions 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 Expand Up @@ -718,7 +718,9 @@ clean: obsclean


PYLNS=client proto testing
# See doc/MAKING-RELEASES.md
# See doc/contribute-to-core-lightning/contributor-workflow.md
update-py-versions: update-pyln-versions update-clnrest-version update-poetry-lock

update-pyln-versions: $(PYLNS:%=update-pyln-version-%)

update-pyln-version-%:
Expand All @@ -730,6 +732,13 @@ pyln-release: $(PYLNS:%=pyln-release-%)
pyln-release-%:
cd contrib/pyln-$* && $(MAKE) prod-release

update-clnrest-version:
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
cd plugins/clnrest && $(MAKE) upgrade-version

update-poetry-lock:
poetry update clnrest pyln-client pyln-proto pyln-testing

update-mocks: $(ALL_TEST_PROGRAMS:%=update-mocks/%.c)

$(ALL_TEST_PROGRAMS:%=update-mocks/%.c): $(ALL_GEN_HEADERS) $(EXTERNAL_LIBS) libccan.a ccan/ccan/cdump/tools/cdump-enumstr config.vars
Expand Down
21 changes: 21 additions & 0 deletions bitcoin/psbt.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,27 @@ bool psbt_input_set_signature(struct wally_psbt *psbt, size_t in,
return ok;
}

bool psbt_input_have_signature(const struct wally_psbt *psbt,
size_t in,
const struct pubkey *pubkey,
bool *signature_found)
{
u8 pk_der[PUBKEY_CMPR_LEN];
size_t index_plus_one;
bool ok;

assert(in < psbt->num_inputs);

pubkey_to_der(pk_der, pubkey);

ok = wally_psbt_input_find_signature(&psbt->inputs[in], pk_der,
sizeof(pk_der),
&index_plus_one) == WALLY_OK;
if (ok)
*signature_found = index_plus_one > 0;
return ok;
}

void psbt_input_set_wit_utxo(struct wally_psbt *psbt, size_t in,
const u8 *scriptPubkey, struct amount_sat amt)
{
Expand Down
8 changes: 8 additions & 0 deletions bitcoin/psbt.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ WARN_UNUSED_RESULT bool psbt_input_set_signature(struct wally_psbt *psbt, size_t
const struct pubkey *pubkey,
const struct bitcoin_signature *sig);

/* Returns false on error. On success, *signature_found is set to true if the
* input has a signature present for `pubkey` and false if if one was not found.
* Only ignature presence is checked, is not validated. */
WARN_UNUSED_RESULT bool psbt_input_have_signature(const struct wally_psbt *psbt,
size_t in,
const struct pubkey *pubkey,
bool *signature_found);

void psbt_input_set_witscript(struct wally_psbt *psbt, size_t in, const u8 *wscript);

/* psbt_input_set_unknown - Set the given Key-Value in the psbt's input keymap
Expand Down
Loading