defined as those who don't relay blocks for now.
Using transactions would be much faster, but more error prone,
as well as exploit prone.
The score can be reused later to store in the peer list to
affect selection probability.
IPv6 addresses include a range that can map IPv4 addresses,
which allowed those mapped addresses to bypass filtering.
This filter should be replaced by AS filtering at some point.
Looks like wrong version of this patch, it should look like this: https://github.com/monero-project/monero/pull/6936/files#diff-d32229ecf55d414dcca43b6918ad711e1ffd313ef851492ecba1865323007f0fR1733
{
MINFO(context << "Peer " << context.m_connection_id << " relayed the block we were waiting on");
context.m_score += 1;
if (context.m_score > 10) // prevent a node from being all nice for a while then switching to asshole
Setting this to 10 makes it less aggressive. I would stay on 5.
{
if (!m_p2p->for_connection(uuid, [&](cryptonote_connection_context& ctx, nodetool::peerid_type peer_id, uint32_t f)->bool{
MINFO(ctx << "dropping bad peer (score " << ctx.m_score << ")");
drop_connection(ctx, 10, false);
Looks like wrong version of this patch, it should look like this: https://github.com/monero-project/monero/pull/6936/files#diff-d32229ecf55d414dcca43b6918ad711e1ffd313ef851492ecba1865323007f0fR1733