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

Gossmap topology compression and helper #7495

Merged

Conversation

rustyrussell
Copy link
Contributor

I've been meaning to do this for a while: create a format for representing the gossip map topology for testing routing. My gossip store shrinks to about 500k in this format, which is something we could actually check into the repository for testing.

It also provides a nice way to create topologies for python tests.

@rustyrussell
Copy link
Contributor Author

Rebased on master for rust regression fix

@rustyrussell rustyrussell force-pushed the guilt/gossmap-compress branch 3 times, most recently from 4265607 to 3ca23a2 Compare July 29, 2024 03:26
@rustyrussell rustyrussell force-pushed the guilt/gossmap-compress branch 5 times, most recently from 3dbb3e0 to b0075af Compare August 1, 2024 03:03
…map 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>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…ble.

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>
We marshal it into the "compressed" format and get the decompresser to
build the actual gossmap.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell force-pushed the guilt/gossmap-compress branch from b0075af to 454bf7a Compare August 7, 2024 00:46
@rustyrussell
Copy link
Contributor Author

Trivial rebase on master.

@rustyrussell rustyrussell merged commit 28b93e1 into ElementsProject:master Aug 7, 2024
34 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant