rust-lightning/lightning
Matt Corallo 56cb6a10f1 Avoid redundant {channel,node}_announcement signature checks
If we receive `{channel,node}_announcement` messages which we
already have, we first validate their signatures and then look in
our graph and discover that we should discard the messages. This
avoids a second lock in `node_announcement` handling but does not
impact our locking in `channel_announcement` handling. It also
avoids lock contention in cases where the signatures are invalid,
but that should be exceedingly rare.

For nodes with relatively few peers, this is a fine state to be in,
however for nodes with many peers, we may see the same messages
hundreds of times. This causes a rather substantial waste of CPU
resources validating gossip messages.

Instead, here, we change to checking our network graph first and
then validate the signatures only if we don't already have the
message.
2024-09-09 18:14:19 +00:00
..
src Avoid redundant {channel,node}_announcement signature checks 2024-09-09 18:14:19 +00:00
Cargo.toml Update versions to 0.0.124 and invoice 0.32 types 0.1 release 2024-09-03 18:18:52 +00:00