Skip to content

Commit d9e74ec

Browse files
authored
Merge branch 'master' into fix-feerate-tolerance
2 parents 04b44ab + bc3b9b4 commit d9e74ec

File tree

17 files changed

+174
-132
lines changed

17 files changed

+174
-132
lines changed

.msggen.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4073,6 +4073,7 @@
40734073
"Xpay.maxdelay": 7,
40744074
"Xpay.maxfee": 3,
40754075
"Xpay.partial_msat": 6,
4076+
"Xpay.payer_note": 8,
40764077
"Xpay.retry_for": 5
40774078
},
40784079
"XpayResponse": {
@@ -14044,6 +14045,10 @@
1404414045
"added": "v24.11",
1404514046
"deprecated": null
1404614047
},
14048+
"Xpay.payer_note": {
14049+
"added": "v26.04",
14050+
"deprecated": null
14051+
},
1404714052
"Xpay.payment_preimage": {
1404814053
"added": "v24.11",
1404914054
"deprecated": null

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ will offer specific information on that command.
8888

8989
Useful commands:
9090

91-
* [newaddr](doc/lightning-newaddr.7.md): get a bitcoin address to deposit funds into your lightning node.
92-
* [listfunds](doc/lightning-listfunds.7.md): see where your funds are.
93-
* [connect](doc/lightning-connect.7.md): connect to another lightning node.
94-
* [fundchannel](doc/lightning-fundchannel.7.md): create a channel to another connected node.
95-
* [invoice](doc/lightning-invoice.7.md): create an invoice to get paid by another node.
96-
* [pay](doc/lightning-pay.7.md): pay someone else's invoice.
97-
* [plugin](doc/lightning-plugin.7.md): commands to control extensions.
91+
* [newaddr](https://docs.corelightning.org/reference/newaddr): get a bitcoin address to deposit funds into your lightning node.
92+
* [listfunds](https://docs.corelightning.org/reference/listfunds): see where your funds are.
93+
* [connect](https://docs.corelightning.org/reference/connect): connect to another lightning node.
94+
* [fundchannel](https://docs.corelightning.org/reference/fundchannel): create a channel to another connected node.
95+
* [invoice](https://docs.corelightning.org/reference/invoice): create an invoice to get paid by another node.
96+
* [pay](https://docs.corelightning.org/reference/pay): pay someone else's invoice.
97+
* [plugin](https://docs.corelightning.org/reference/plugin): commands to control extensions.
9898

9999
### Care And Feeding Of Your New Lightning Node
100100

cln-grpc/proto/node.proto

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-grpc/src/convert.rs

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-rpc/src/model.rs

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/msggen/msggen/schema.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37313,6 +37313,13 @@
3731337313
"A payment may be delayed for up to `maxdelay` blocks by another node; clients should be prepared for this worst case."
3731437314
],
3731537315
"default": "2016"
37316+
},
37317+
"payer_note": {
37318+
"type": "string",
37319+
"added": "v26.04",
37320+
"description": [
37321+
"A message that a payer is willing to send to a payee within an invoice request."
37322+
]
3731637323
}
3731737324
}
3731837325
},
@@ -37399,7 +37406,8 @@
3739937406
"id": "example:xpay#2",
3740037407
"method": "xpay",
3740137408
"params": {
37402-
"invstring": "lni1qqg0qe03030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303"
37409+
"invstring": "lni1qqg0qe03030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303",
37410+
"payer_note": "Coffee payment"
3740337411
}
3740437412
},
3740537413
"response": {

contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Lines changed: 74 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/schemas/xpay.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@
6565
"A payment may be delayed for up to `maxdelay` blocks by another node; clients should be prepared for this worst case."
6666
],
6767
"default": "2016"
68+
},
69+
"payer_note": {
70+
"type": "string",
71+
"added": "v26.04",
72+
"description": [
73+
"A message that a payer is willing to send to a payee within an invoice request."
74+
]
6875
}
6976
}
7077
},
@@ -151,7 +158,8 @@
151158
"id": "example:xpay#2",
152159
"method": "xpay",
153160
"params": {
154-
"invstring": "lni1qqg0qe03030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303"
161+
"invstring": "lni1qqg0qe03030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303",
162+
"payer_note": "Coffee payment"
155163
}
156164
},
157165
"response": {

gossipd/gossipd.c

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/*~ Welcome to the gossip daemon: keeper of maps!
22
*
3-
* This is the last "global" daemon; it has three purposes.
3+
* This is the last "global" daemon; it has one main purpose: to
4+
* maintain the append-only gossip_store file for other daemons and
5+
* plugins to read the global network map.
46
*
5-
* 1. To determine routes for payments when lightningd asks.
6-
* 2. The second purpose is to receive gossip from peers (via their
7-
* per-peer daemons) and send it out to them.
8-
* 3. Talk to `connectd` to to answer address queries for nodes.
7+
* To do this, it gets gossip messages forwarded from connectd, makes
8+
* gossip queries to peers, and can ask connect out to random peers to
9+
* get more gossip.
910
*
1011
* The gossip protocol itself is fairly simple, but has some twists which
1112
* add complexity to this daemon.
@@ -14,7 +15,6 @@
1415
#include <ccan/tal/str/str.h>
1516
#include <common/clock_time.h>
1617
#include <common/daemon_conn.h>
17-
#include <common/ecdh_hsmd.h>
1818
#include <common/memleak.h>
1919
#include <common/status.h>
2020
#include <common/subdaemon.h>
@@ -368,21 +368,6 @@ static void master_or_connectd_gone(struct daemon_conn *dc UNUSED)
368368
exit(2);
369369
}
370370

371-
/* We don't check this when loading from the gossip_store: that would break
372-
* our canned tests, and usually old gossip is better than no gossip */
373-
bool timestamp_reasonable(const struct daemon *daemon, u32 timestamp)
374-
{
375-
u64 now = clock_time().ts.tv_sec;
376-
377-
/* More than one day ahead? */
378-
if (timestamp > now + 24*60*60)
379-
return false;
380-
/* More than 2 weeks behind? */
381-
if (timestamp < now - GOSSIP_PRUNE_INTERVAL(daemon->dev_fast_gossip_prune))
382-
return false;
383-
return true;
384-
}
385-
386371
/*~ Parse init message from lightningd: starts the daemon properly. */
387372
static void gossip_init(struct daemon *daemon, const u8 *msg)
388373
{
@@ -591,9 +576,6 @@ int main(int argc, char *argv[])
591576
daemon->deferred_txouts = tal_arr(daemon, struct short_channel_id, 0);
592577
daemon->current_blockheight = 0; /* i.e. unknown */
593578

594-
/* Tell the ecdh() function how to talk to hsmd */
595-
ecdh_hsmd_setup(HSM_FD, status_failed);
596-
597579
/* Note the use of time_mono() here. That's a monotonic clock, which
598580
* is really useful: it can only be used to measure relative events
599581
* (there's no correspondence to time-since-Ken-grew-a-beard or
@@ -620,8 +602,9 @@ int main(int argc, char *argv[])
620602
}
621603
}
622604

623-
/*~ Note that the actual routing stuff is in routing.c; you might want to
624-
* check that out later.
605+
/*~ Note that the production of the gossip_store file is in gossmap_manage.c
606+
* and gossip_store.c, and the (highly optimized!) read side is in
607+
* common/gossmap.c; you might want to check those out later.
625608
*
626609
* But that's the last of the global daemons. We now move on to the first of
627610
* the per-peer daemons: openingd/openingd.c.

gossipd/gossipd.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
#include <lightningd/options.h>
99
#include <wire/peer_wire.h>
1010

11-
/* We talk to `hsmd` to sign our gossip messages with the node key */
12-
#define HSM_FD 3
13-
/* connectd asks us for help finding nodes, and gossip fds for new peers */
14-
#define CONNECTD_FD 4
15-
#define CONNECTD2_FD 5
11+
/* connectd forwards gossip messages to us. */
12+
#define CONNECTD_FD 3
1613

1714
struct chan;
1815
struct peer;
@@ -161,9 +158,4 @@ void tell_lightningd_peer_update(struct daemon *daemon,
161158
struct amount_msat htlc_minimum,
162159
struct amount_msat htlc_maximum);
163160

164-
/**
165-
* Is this gossip timestamp reasonable?
166-
*/
167-
bool timestamp_reasonable(const struct daemon *daemon, u32 timestamp);
168-
169161
#endif /* LIGHTNING_GOSSIPD_GOSSIPD_H */

0 commit comments

Comments
 (0)