-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rep crawler switching between IPv4 and IPv6 for certain representatives #4718
Comments
Thanks for the report! We previously discussed implementing support for multiple addresses per rep. Given that you've already looked into this quite a bit, would you be interested in helping to implement such functionality? |
@gr0vity-dev thank you for the response! Do you mean a single node with a representative and a few different addresses or rather also availability to use same representative within different nodes? I guess I see it with |
You are right, it's not super obvious what the best route might be. We discussed a bit and thought of self-disabling voting for a rep when it detects a vote signed by it's key from a different node. Alternatively it's possible to make the rep crawler track multiple channels per rep with some kind of scoring etc. This should be possible even without authenticated channels. However it needs to be well designed. Maybe there are other more obvious areas that can be improved right now... |
For completeness,
We discussed a method for a representative to determine if its key is being used by another node if the rep receives a vote signed with its own key but with a timestamp in the future —due to slight clock differences— it indicates that another node is using the same key. Since timestamps are part of the signed confirm_ack (vote) message, the rep could self-disable voting upon detecting this. However one possible issue with this is NTP adjusting the clock might falsely trigger this detection. |
Summary
If representative node has both IPv4 and IPv6 addresses, then rep crawler will frequently reassign representative to different channels.
As of now, it seems, check for existing node ID is removed when establishing new connections and node can have multiple connections to the same peer.
Additional question I didn't check: can node actually flood same data (blocks propagation etc.) twice to the same peer via both IPv4 and IPv6?
Node version
27.0
Build details
manually built
OS and version
Linux
Steps to reproduce the behavior
Expected behavior
Don't switch representative channel often
Actual behavior
Frequent changes of representative channel between IPv4 and IPv6
Possible solution
A. This should improve live network node behavior, but probably it's not desired by new network design
if (rep.channel->get_endpoint () != channel->get_endpoint () && rep.channel->get_node_id () != channel->get_node_id ())
B. Make a setting to prefer either IPv4 or IPv6 for this or any similar situations.
C. Group peers by node ID rather than IP and allow multiple connections per one node ID (?). Don't send duplication data to different channels of one peer.
Supporting files
log_2024-09-02_17-23-07_463301168.log
The text was updated successfully, but these errors were encountered: