Trinity may skip a preferred-peer when running with --enable-experimental-eth1-peer-tracking
cburgdorf opened this issue · 1 comments
What is wrong?
Here is Trinity running with a preferred node and the --enable-experimental-eth1-peer-tracking
flag
The log clearly shows Trinity is started with a preferred peer but even after several minutes (and after establishing various connections to different peers) it has not once tried to reach out to our specified peers.
Here's the same without using --enable-experimental-eth1-peer-tracking
https://gist.github.com/cburgdorf/a36a95b321294fe3002d577c2c2e3669
We can see that it reaches out to 172.33.0.2
pretty much immediately.
I think what happened is that my local good peer has ended up on the block list and got filtered out. So I believe there may be two issues:
-
Why did it end up on that list (if that is true)
-
How can we make it so that a preferred node can bypass this filter
How can it be fixed
If it really is the skip_filter_fn
that causes the preferred_node
to be filtered out then I think that could be fixed here.
Lines 244 to 250 in c3f7c02
It looks like the derived PreferredNodeDiscoveryService
should have the power to overrule the skip list if it is trying to skip one of the preferred peers.