Closed mina86 closed 2 years ago
I'm interested in working on the second item. Is std::net::Ipv4Addr::to_ipv6_mapped()
a valid approach for the conversion?
Yep.
Is there a preference regarding the first item (never unban or remove)?
Removing the peer from PeerStore
might make things easier, since then there is no need for extra logic to handle peers which are banned and blacklisted. It should be safe since new connections from blacklisted peers are rejected:
https://github.com/near/nearcore/blob/55d0e03b52d1eece08ce4ba91cc726c9134087e9/chain/network/src/peer_manager/peer_manager_actor.rs#L2081-L2085
Yeah, I think deleting the nodes from the database should be fine.
I’ve recently submitted a change which causes peers read from the database to become banned if their IP address matches entry in a blacklist. There are still two outstanding issues: