This also solves the bug where when appending a dublicated proposal, a new duplicate fork being created, resulting in never finalizing, as forks of same height existed
check if we have the peer and update it's last seen if we do.
this commit also standardizes the format of send_my_addrs across
ProtocolSeed and ProtocolAddr, so we can perhaps extract the
functionality to protocol/mod.rs at some point.
Each event corresponds to a specific layer(height) in the dag, making identifying and preventing cycles way easier, as all parents must exist in previous layers. Additionally, propagation and sync gremlins have been eliminated, and proper validations added
With these changes, BlockInfo now represents a wrapper over Block, as it becomes constant/final in terms of structure. All extra data based on block versions go to BlockInfo, and their storage is handled accordingly.
Notable changes:
* Rewritten transport protocols into Dialer and Listener (Nym is TODO)
This simplifies using the transports a lot, as can be seen for example
in src/rpc, and generally around the p2p library. It also defines features
for each transport (all of which are enabled by default). We drop the
socks client for Tor and Nym and use first-class support with the Arti Tor
library, and nym-sphinx/nym-websockets (to be used with nym-client).
* Outbound session healing
The outbound session will now poll and try to fill all the requested
slots more efficiently, and if needed, will activate peer discovery to
find more peers if we can't connect to any known ones. Also if we're
unable to connect to any, we shall drop them from our set.
Additionally, transport mixing is enabled by default, so when we're
allowing transport mixing, and we use Tor, we will also be able to connect
to other transports that Tor can connect to (e.g. tcp://).
* Unix socket transport dropped
We haven't been using this, and it seems we're not going down this path,
so the code has been obsoleted and removed.
* TLS session verification
We fully verify server and client TLS certificates upon connection so
we're able to perform TLS1.3 with forward secrecy.
* lilith pruning
lilith now periodically prunes known peers from its sets if it's unable
to connect to them.