Rusty Russell
fdfc7ce62f
gossmap: add (and use) logging hook.
...
Default goes to stderr for LOG_UNUSUAL and higher.
We have to whitelist more cases in map_catchup so we don't spam the logs
with perfectly-expected (but ignored) messages though.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2025-02-11 15:11:47 -06:00
Rusty Russell
607b14fe12
common/gossmap: remove open-by-fd.
...
We only use it in one place, and that was simply to share an fd between
gossipd writing and gossipd reading, which may be causing our zfs problem
anyway.
In fact, it fixes a race if we don't have HAVE_PWRITEV.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2025-02-11 15:11:47 -06:00
Rusty Russell
6303a96ee2
devtools/gossmap-compress: make fake nodeids same for 32/64 bits.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-11-06 21:17:36 +10:30
Rusty Russell
4ee9d1d2f2
gossmap: include cltv_expiry_delta in gossmap_chan_get_update_details for completeness.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-10-15 09:58:04 +10:30
Rusty Russell
5052f0763f
gossmap: keep capacity for locally-generated channels as well.
...
It was weird not to have a capacity associated with localmods channels, and
fixing it has some very nice side effects.
Now the gossmap_chan_get_capacity() call never fails (we prevented reading
of channels from gossmap in the partially-written case already), so we
make it return the capacity. We do this in msat, because that's what
all the callers want.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-10-04 11:27:53 +09:30
Rusty Russell
d1a6649c73
gossmap-compress: warn about updates which we don't include in map.
...
There are some, they're unusable high-fee.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-10-04 08:47:53 +09:30
Rusty Russell
01b65d1a15
gossmap: print out nodeids and aliases, so you can map them back after compression.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-10-04 08:47:53 +09:30
Rusty Russell
e55a4850cc
devtools/gossmap-compress: fix channels.
...
We can only use the loop to iterate once.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-10-04 08:47:53 +09:30
Rusty Russell
d143c22976
gossmap-compress: sort nodes into most to least as intended.
...
Interestingly, compressed sizes don't change, but uncompressed does:
```
$ file /tmp/gs.out-wrongorder
/tmp/gs.out-wrongorder: gzip compressed data, max compression, from Unix, original size modulo 2^32 1594822
$ ls -l /tmp/gs.out-wrongorder
-rw-rw-r-- 1 rusty rusty 494337 Sep 20 13:34 /tmp/gs.out-wrongorder
$ file /tmp/gs.out
/tmp/gs.out: gzip compressed data, max compression, from Unix, original size modulo 2^32 1498634
$ ls -l /tmp/gs.out
-rw-rw-r-- 1 rusty rusty 494353 Sep 20 13:33 /tmp/gs.out
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-10-04 08:47:53 +09:30
Rusty Russell
6150d1b3fa
patch general-node-id-assign.patch
2024-09-19 12:16:53 +09:30
Rusty Russell
61ccf18521
devtools/gossmap-compress: allow setting the nodeid explicitly for generated nodes.
...
This lets us make gossip which contains "real" nodes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-08-07 20:35:30 +09:30
Rusty Russell
e3f06b2602
devtools/gossmap-compress: print out node ids.
...
This helps code using generate_gossip_store() too, since it can map its identifiers
to the nodeids which were used.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-08-07 11:18:55 +09:30
Rusty Russell
99e8e9246e
devtools/gossmap-compress: use transparent zlib compression if available.
...
Before:
```
-rw-rw-r-- 1 rusty rusty 1643258 Jul 26 09:51 compressed
```
After:
```
-rw-rw-r-- 1 rusty rusty 508332 Jul 26 09:49 compressed
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-08-07 11:18:55 +09:30
Rusty Russell
c93b4aafb2
devtools/gossmap-compress: decompress code.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-08-07 11:18:55 +09:30
Rusty Russell
cf936d296e
devtools: add gossmap-compress to give minimal representation of gossmap topology.
...
Simple format, which doesn't include node information, just the channels.
Example:
```
$ ls -l gossip-store-2024-06-26
-rw------- 1 rusty rusty 98815543 Jul 26 09:47 gossip-store-2024-06-26
$ ./devtools/gossmap-compress -v compress gossip-store-2024-06-26 compressed
18693 nodes
61437 channels
46148 disabled channels (32620 no update)
9690 unique capacities
85 unique htlc_min
6867 unique htlc_max
807 unique basefee
2521 unique propfee
94 unique delay
$ ls -l compressed
-rw-rw-r-- 1 rusty rusty 1643258 Jul 26 09:51 compressed
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au >
2024-08-07 11:18:55 +09:30