Commit Graph

23 Commits

Author SHA1 Message Date
Christian Decker
74594a5b6e gci: Add support for poetry / PEP 517 based plugins
We also migrate the `historian` plugin to show how this looks
like. Next up is migrating the individual plugins.
2022-04-28 12:57:06 +02:00
Christian Decker
38d1f337a9 historian: Do not crash if we get an unknown address type 2021-12-19 15:15:37 +01:00
Christian Decker
d013450f14 historian: Instead of exiting just skip large messages
This check was introduced to protect against the length being
corrupted but we now get some node_announcements with huge
feature-bits, triggering this rule. Let's skip them instead.
2021-09-25 15:48:19 +02:00
Peter Sebastian Nordholt
ca75d7e132 Fix string formating. 2021-02-05 09:05:16 +01:00
Peter Sebastian Nordholt
63232c0fb2 Fix handling of ignored messages in historian.py
Fixes a bug where gossip messages that are ignored by the historian plugin will trigger an exception being printed.
2021-02-05 09:05:16 +01:00
Peter Sebastian Nordholt
5de2675beb Avoid out of IndexError from historian-stats
Fixes a bug where `historian-stats` would give IndexError when no announcements or updates where recorded yet.
2021-02-03 18:29:33 +01:00
Peter Sebastian Nordholt
368011cbb4 Fix reference to gossipd in historian.py
`gossipd` was referred to as `parser` resulting in errors.
2021-02-03 18:29:07 +01:00
Peter Sebastian Nordholt
a03557044c Fix missing parser error
Fixes an exception thrown for not having a parser for message type 4103. These messages are now just ignored (maybe should be handled somehow?)
2021-02-03 13:51:12 +01:00
Christian Decker
abbdeabec6 historian: Add a readme 2021-01-22 18:00:50 +01:00
Christian Decker
5236850245 historian: Rename the parser module to gossipd
We were getting a couple of path/import conflicts, renaming just to be
safe.
2021-01-22 18:00:50 +01:00
Christian Decker
a9c14da33b historian: Fix the short channel ID output
It's 2 bytes not 1
2021-01-22 18:00:50 +01:00
Christian Decker
487e927116 historian: Make the GossipStream seekable 2021-01-22 18:00:50 +01:00
Christian Decker
b7f6796315 historian: Make the destination parameter to snapshot load optional
This is a rather long option, and if `lightning-cli` is configured
correctly we should be able to extract this information directly from
it without problems. This adds auto-discovery based on `lightning-cli`
which will to the right thing™
2021-01-22 18:00:50 +01:00
Christian Decker
b5038e526a historian: Ensure parser is called with bytes 2021-01-22 18:00:50 +01:00
Christian Decker
4630eba3f8 historian: Refactor the snapshot message retrieval
We're going to use it in the web interface soon.
2021-01-22 18:00:50 +01:00
Christian Decker
3daa588be0 historian: Remove DATETIME conversion and add timestamp to grouping
Postgres requires the HAVING statement to match a GROUP BY statement and the
DATETIME function doesn't exist on postgres.
2021-01-22 18:00:16 +01:00
Christian Decker
91f7eafabb historian: Use LargeBinary instead of BLOB for portability 2021-01-22 18:00:16 +01:00
Christian Decker
3f5dc35ab1 historian: Add backup command for lnresearch 2021-01-22 18:00:16 +01:00
Christian Decker
474a2011d1 historian: Add assertion on the gossip type when decoding 2021-01-22 18:00:16 +01:00
Christian Decker
b1338ef5d4 historian: Add loading functionality to historian-cli 2021-01-22 18:00:16 +01:00
Christian Decker
2e0963cf40 historian: Switch to nested queries from massive joins
Not only is this more correct, but it's also quicker, since we avoid the huge
joins.
2021-01-22 18:00:16 +01:00
Christian Decker
c22562bd7f historian: Add a command to read a snapshot and hexdump it to stdout 2021-01-22 18:00:16 +01:00
Christian Decker
efdf985352 historian: First version of the cli 2021-01-22 18:00:16 +01:00