Tony Aldon
1a46b37609
contrib: add developer
option to config file in startup_regtest.sh.
...
Without `developer` option, after compiling CLN and sourcing
`contrib/startup_regtest.sh`, if we try to start 2 nodes on regtest
running the command `start_ln` we get the following error:
```
lightningd: Config file /tmp/l1-regtest/config line 6: dev-fast-gossip: requires --developer
...
lightningd: Config file /tmp/l2-regtest/config line 6: dev-fast-gossip: requires --developer
```
Changelog-None
2023-10-10 23:04:31 +10:30
Rusty Russell
176a58f9e0
pytest: wean many tests off the assumption that listchannels shows private channels.
...
We will be changing this, or at least deprecating it, so get our
tests ready.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-04 08:02:33 +10:30
Dusty Daemon
bc9333ac1e
addpsbtoutput: New onchain command for PSBT output
...
Also added splice_out tests that use the new PSBT command.
ChangeLog-Added: New `addpsbtoutput` command for creating a PSBT that can receive funds to the on-chain wallet.
2023-10-03 10:12:39 +02:00
Rusty Russell
5b9b056853
doc: introduce new state DUALOPEND_OPEN_COMMITTED.
...
This is the variant of DUALOPEND_OPEN_INIT which you see once
the channel is in the db: we'll be adding it next, but to reduce
clutter the docs are added as a separate commit.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-02 11:41:19 +10:30
Rusty Russell
57a3680449
contrib/pyln-grpc-proto/ regenerate.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-02 11:41:19 +10:30
Christian Decker
9afcec0404
lnproto: Fix up the lnprototest docker image
2023-09-29 16:00:05 +09:30
Christian Decker
1242012efb
gen: Update generated files
2023-09-29 16:00:05 +09:30
ShahanaFarooqui
4301030a12
plugins/clnrest: Updated clnrest install command in Docker images and CI
...
We do not need explicit clnrest dependencies installation for clnrest
because `poetry install` will also install clnrest libraries.
2023-09-29 16:00:05 +09:30
Rusty Russell
39cb8d094e
pyln-grpc-proto: regenerate after last patch.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-22 16:41:38 +09:30
Rusty Russell
3d3bf87b34
build: remove all trace of DEVELOPER.
...
If you previously configured with `--enable-developer` we turn that into `--enable-debugbuild`.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: build: `--enable-developer` arg to configure (and DEVELOPER variables): use `./configure --enable-debugbuild` and `developer` setting at runtime.
2023-09-21 20:08:24 +09:30
Rusty Russell
6c15ea44dd
pytest: use --developer instead of environment variable.
...
And we always enable it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Rusty Russell
f725edad62
plugins: remove #if DEVELOPER.
...
And rename dev-only-option `use_shadow` to `dev_use_shadow`.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
ShahanaFarooqui
5ecf1abe5a
docker: Deleting redundant arm64v8 and arm32v7 Dockerfiles
...
Changelog-None
2023-09-20 14:08:34 +09:30
Mariusz Kogen
0952a09c2d
Remove GMP from arm64v8 build
2023-09-19 10:26:36 +09:30
Christian Decker
990096f904
schema: Fix wrong type of CLTV in route
...
We were using `number` instead of `u32` which caused it to be
serialized to string with a decimal, which then would be rejected by
lightningd.
Changelog-Fixed: proto: Fixed a wrong number type being used in routes
2023-09-01 07:32:14 +09:30
ShahanaFarooqui
6ee495b1dc
docker: bookworm image for arm32v7
2023-08-22 09:36:03 +09:30
Rusty Russell
a9c05d7d16
pytest: test for mutual close fail under very low feerates.
...
```
$ l1-cli close 445x1x1
# Sending closing fee offer 183sat, with range 0sat-183sat
# Received closing fee offer 183sat, with range 0sat-1000000sat
{
"tx": "0200000000010153ce29f4df20875492760ec51092d01ade3da99ffd72c3ff47b02e8f78a5845a0100000000ffffffff02b882010000000000225120847b3d31b036c0b4fad77fd41805f375f4fc9507d52f2a19d858b43975a633b0d1be0d000000000022512017912fd7fc767d03e02461bd932556d78291ea226db5efec84d84a5c753a650a0400473044022005b184a595ec0b650dffb3168d003b13ae0d98d456d879ec7fac7012f3dbad6202202f5a9620a59fb3cb9269be3b2a941f18fe1b7e3037c259125c56d3ec86c8e91a014730440220559f1c2a578e35a975466bb6f2319d313cd79070add77c51b6f6aeb25f7eae9802204749e84e7f8a777c66896a38588f6046a28653a493c34c79a0080580a0f389ec01475221024ff290301210ddffa14db591eb629d864bb4b4583586f5bffaaebc4ca8d5edef2102e0de3f54ca6cf38cb527b326242bf418a4a0a50485c97999074e69e127216fd052ae00000000",
"txid": "216ed9adf8df623770e219f52b31350de60cd1b236d6f043664d9eb5bc462ad4",
"type": "mutual"
}
rusty@rusty-Framework:~/devel/cvs/lightning (master)$ bt-cli getrawmempool
[
]
```
Logs show:
```
2023-08-11T02:20:13.947Z DEBUG plugin-bcli: sendrawtx exit 26 (bitcoin-cli -regtest -datadir=/home/rusty/.bitcoin sendrawtransaction 0200000000010153ce29f4df20875492760ec51092d01ade3da99ffd72c3ff47b02e8f78a5845a0100000000ffffffff02b882010000000000225120847b3d31b036c0b4fad77fd41805f375f4fc9507d52f2a19d858b43975a633b0d1be0d000000000022512017912fd7fc767d03e02461bd932556d78291ea226db5efec84d84a5c753a650a0400473044022005b184a595ec0b650dffb3168d003b13ae0d98d456d879ec7fac7012f3dbad6202202f5a9620a59fb3cb9269be3b2a941f18fe1b7e3037c259125c56d3ec86c8e91a014730440220559f1c2a578e35a975466bb6f2319d313cd79070add77c51b6f6aeb25f7eae9802204749e84e7f8a777c66896a38588f6046a28653a493c34c79a0080580a0f389ec01475221024ff290301210ddffa14db591eb629d864bb4b4583586f5bffaaebc4ca8d5edef2102e0de3f54ca6cf38cb527b326242bf418a4a0a50485c97999074e69e127216fd052ae00000000) error code: -26\nerror message:\nmin relay fee not met, 183 < 192
Indeed, tx weight is 192!
```
Reported-by: @ShahanaFarooqui
2023-08-12 13:17:46 +09:30
Dusty Daemon
c50e93d9fb
splice: Move splice to experimental feature bit
...
This was recommended by @t-bast: if the final spec commits to something
compatible, we can simply advertize and accept both features, but if it
does change in incompatible ways we won't cause problems for nodes
who implement the official spec.
(I split this, so first, we remove the OPT_SPLICE entirely, to make
sure we caught them all. --RR)
Suggested-by: @t-bast
Changelog-None
2023-08-10 15:52:53 +09:30
ShahanaFarooqui
248b34acec
docker: bitcoin and elements version update
...
Updated bitcoin and elements versions to 22.0.
2023-08-07 16:04:14 +09:30
Dusty Daemon
aa2df28faf
splicing: Update documentation
...
Added documentation for splice_update & splice_signed and tweaked splice_init.
Added corresponding schemas for splice_* commands
Changelog-None
2023-08-07 12:38:36 +09:30
Christian Decker
9074341ef6
msggen: Add staticbackup
call to list of managed methods
...
Changelog-Added: cln-grpc: Added `staticbackup` support to cln-grpc
2023-08-06 12:34:36 +09:30
ShahanaFarooqui
33ab1ce78b
docker: Install clnrest dependencies from rquirements.txt
...
Changelog-None
2023-08-06 12:34:19 +09:30
Rusty Russell
0c20cc70ab
pyln-client, pyln-proto, pyln-testing: update to new versions.
...
I actually did this manually to send 23.08 to Pypi a few days ago, as it's
required for clnrest.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-03 09:05:59 +09:30
Shahana Farooqui
0a99f0e9cd
docker: Dockerfile aarch images with pyln and clnrest
...
Changelog-None
2023-08-01 11:35:19 +09:30
Shahana Farooqui
e6a010e5fd
docker: fedora builder update
...
- Updated Bitcoin version to 22.0
- Adding clnrest dependencies
2023-08-01 11:35:19 +09:30
Dusty Daemon
0ed0a8f134
signed types: integer fix
...
integer was missing from the list of type conversions causing CI to fall over
ChangeLog-None
2023-07-31 21:00:22 +09:30
niftynei
95b3943ffe
contrib/startup: ignore db-updates
2023-07-31 21:00:22 +09:30
Dusty Daemon
4628e3ace8
channeld: Code to implement splicing
...
Update the lightningd <-> channeld interface with lots of new commands to needed to facilitate spicing.
Implement the channeld splicing protocol leveraging the interactivetx protocol.
Implement lightningd’s channel_control to support channeld in its splicing efforts.
Changelog-Added: Added the features to enable splicing & resizing of active channels.
2023-07-31 21:00:22 +09:30
Dustin Dettmer
6472475714
Mac: Update Makefile to work on Mac zsh
...
Using the -n flag on echo is non-standard for zsh. printf ‘%s’ accomplishes the equivilent thing.
Changelog-Added: Small fix for Mac OS building
# Conflicts:
# plugins/Makefile
2023-07-31 21:00:22 +09:30
Lagrang3
6ea6b0397e
use of PATH_TO_BITCOIN in regtest
...
[ Quotes added to make shellcheck happy --RR ]
Signed-off-by: Lagrang3 <eduardo.quintana@pm.me>
2023-07-31 14:24:12 +09:30
Rusty Russell
f51ce7be85
pytest: follow RBF txids properly, but ignoring identical "RBF" txs.
...
`mine_txid_or_rbf` uses is_in_log, which grabs the first line. Thus it doesn't track when a txid gets "RBF"ed by itself, such as:
```
DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-chan#1: RBF onchain txid 5df8474399e43c58cc45efb6acf1ae08fe678bea9a27d131628394a009cda361 (fee 122sat) with txid 5df8474399e43c58cc45efb6acf1ae08fe678bea9a27d131628394a009cda361 (fee 122sat)
...
INFO 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-chan#1: RBF onchain txid 5df8474399e43c58cc45efb6acf1ae08fe678bea9a27d131628394a009cda361 (fee 122sat) with txid 044a564a2b6f8c7c212246e4973a303d24ce0dcd31c470a9ea272f314cf6a4ce (fee 3630sat)
...
DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-chan#1: RBF onchain txid 044a564a2b6f8c7c212246e4973a303d24ce0dcd31c470a9ea272f314cf6a4ce (fee 3630sat) with txid 044a564a2b6f8c7c212246e4973a303d24ce0dcd31c470a9ea272f314cf6a4ce (fee 3630sat)
...
DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-chan#1: RBF onchain txid 044a564a2b6f8c7c212246e4973a303d24ce0dcd31c470a9ea272f314cf6a4ce (fee 3630sat) with txid 044a564a2b6f8c7c212246e4973a303d24ce0dcd31c470a9ea272f314cf6a4ce (fee 3630sat)
```
The simplest fix is to only use INFO lines, which are printed when we actually increase fee.
```
def test_onchaind_replay(node_factory, bitcoind):
...
# l1 should still notice that the funding was spent and that we should react to it
_, txid, blocks = l1.wait_for_onchaind_tx('OUR_DELAYED_RETURN_TO_WALLET',
'OUR_UNILATERAL/DELAYED_OUTPUT_TO_US')
assert blocks == 200
bitcoind.generate_block(200)
# Could be RBF!
> l1.mine_txid_or_rbf(txid)
tests/test_closing.py:1860:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
contrib/pyln-testing/pyln/testing/utils.py:1292: in mine_txid_or_rbf
wait_for(lambda: rbf_or_txid_broadcast(txids))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
success = <function LightningNode.mine_txid_or_rbf.<locals>.<lambda> at 0x7f5d55f770d0>
timeout = 180
def wait_for(success, timeout=TIMEOUT):
start_time = time.time()
interval = 0.25
while not success():
time_left = start_time + timeout - time.time()
if time_left <= 0:
> raise ValueError("Timeout while waiting for {}".format(success))
E ValueError: Timeout while waiting for <function LightningNode.mine_txid_or_rbf.<locals>.<lambda> at 0x7f5d55f770d0>
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-28 09:44:58 +09:30
Christian Decker
7b8ea7f60a
msggen: Add two missing fields to the listpays
schema
...
The fields were missing because they weren't annotated with a type and
a description. Adding those fixes them.
Changelog-Fixed: msggen: `listpays` now includes the missing `amount_msat` and `amount_sent_msat` fields
No-schema-diff-check: fields were always there, just undocumented!
2023-07-27 12:40:28 +09:30
Shahana Farooqui
94205c094f
plugins/clnrest: Update clnrest dependencies in scripts and Dockerfiles
...
Adding python3-json5 python3-flask python3-gunicorn flask_restx pyln-client
Also run `pip3 install -r plugins/clnrest/requirements.txt`
2023-07-25 19:20:16 +09:30
ff
6920e36135
added listhtlcs model
2023-07-24 09:07:24 +09:30
Rusty Russell
d25a8ca0fd
lightningd: expose created_index and updated_index fields.
...
If you miss a wait event, you can catch up by doing listinvoices and
getting the max of these fields. It's also a good debugging clue.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-23 13:48:37 +09:30
Rusty Russell
284262d006
listinvoices: add limit param.
...
Changelog-Added: JSON-RPC: `listinvoices` has `limit` parameter for listing control.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-23 13:48:37 +09:30
Rusty Russell
16c133746b
listinvoices: add index and start params.
...
Now we have defined ordering, we can add a start param.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `listinvoices` has `index` and `start` parameters for listing control.
2023-07-23 13:48:37 +09:30
Rusty Russell
7372b518ef
pytest: test for setchannel's new ignorefeelimits.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-22 13:11:08 +09:30
Rusty Russell
b529e79621
lightningd: setchannel
can set ignorefeelimits
.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `setchannel` adds a new `ignorefeelimits` parameter to allow peer to set arbitrary commitment transaction fees on a per-channel basis.
2023-07-22 13:11:08 +09:30
Rusty Russell
8910529e6a
lightningd: expose ignore_fee_limits field in listpeerchannels.
...
Changelog-Added: JSON-RPC: `listpeerchannels` has a new field `ignore_fee_limits`
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-22 13:11:08 +09:30
Christian Decker
975046a790
pyln: Make the grpcio dependencies optional
...
We also document how the grpc test mode works, and why it currently
lacks coverage.
Changelog-Changed: pyln-testing: The grpc dependencies are now optional.
2023-07-21 15:12:03 +09:30
Shahana Farooqui
c0bb7f0721
lightningd: updating python v3.7 to v3.8
2023-07-20 11:44:46 +09:30
Shahana Farooqui
2e72387700
lightningd: removing bionic and python 3.7 support
...
Changelog-Removed: support for python v<=3.7 & Ubuntu bionic has been
removed.
clnrest's flask & gevent libraries require Python v>=3.8.
2023-07-20 11:44:46 +09:30
Dustin Dettmer
aba4d18ed1
signed types: add handlers for signed types
...
We're adding signed types to the spec! This adds the support mechanisms
for them.
2023-07-13 19:34:47 +09:30
Rusty Russell
279b3aa7e8
pyln: add ability to subscribe to all notifications.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-13 18:59:37 +09:30
Greg Sanders
4b70736d13
Support p2tr deposit addresses
...
Changelog-Added: JSON-RPC: newaddr: p2tr option to create taproot addresses.
Changelog-Changed: Wallet: we now use taproot change addresses.
2023-07-11 11:41:15 +09:30
Rusty Russell
e993818ffe
pyln-proto: make point release.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-10 18:22:43 +02:00
Rusty Russell
2109f0b0ea
pyln-client: make point release to prepare for next release.
...
People running master notice that calling listconfigs fails, because
we don't handle objects called xxx_msat correctly (see
d348554ff4
). This makes it painful
to test, until we release a pyln-client version.
Fortunately, the three changes in master are all fully backwards compatible,
so we can simply cut a release now and upload to pipy.org.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-10 18:22:43 +02:00
Christian Decker
53b37ca1c1
cln-rpc: Allow access to deprecated fields in conversions
...
This silences a compilation warning about accessing a deprecated
field. This was triggering on each build and we'll notice when they go
away, so why upset users with it?
2023-07-10 18:22:11 +02:00
Christian Decker
557cd183ac
cln-rpc: Generate ToString for Enums
...
This will return the stringified name of the variant.
2023-07-10 18:22:11 +02:00