Merge pull request #5621 from Roasbeef/ping-pong-headers

peer: always send latest block header as part of ping messages
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2021-08-27 16:55:46 -07:00
commit c93824ec9a
11 files changed
+2111 -1906

No files matched your search

@@ -7,6 +7,25 @@ is only used for onion address connections, and clearnet for everything else.
This new behavior can be added using the `tor.skip-proxy-for-clearnet-targets`
flag.
## LN Peer-to-Peer Netowrk
### Bitcoin Blockheaders in Ping Messages
[In this release, we implement a long discussed mechanism to use the Lightning
Network as a redundant block header
source](https://github.com/lightningnetwork/lnd/pull/5621). By sending our
latest block header with each ping message, we give peers another source
(outside of the Bitcoin P2P network) they can use to spot check their chain
state. Peers can also use this information to detect if they've been eclipsed
from the traditional Bitcoin P2P network itself.
As is, we only send this data in Ping messages (which are periodically sent),
in the future we could also move to send them as the partial payload for our
pong messages, and also randomize the payload size requested as well.
The `ListPeers` RPC call will now also include a hex encoded version of the
last ping message the peer has sent to us.
## Backend Enhancements & Optimizations
### Full remote database support