nethermind
nethermind copied to clipboard
Do not mark peer as low quality too soon if there is only one peer connected
In a situation where there is only one peer connected we have a logic which can very quickly mark this peer as low quality one: https://github.com/NethermindEth/nethermind/blob/d18e4f695d979060804237aae16f92488c8f8d1f/src/Nethermind/Nethermind.Synchronization/SnapSync/SnapSyncFeed.cs#L172
It is problematic especially on testing scenario where we set only 1 selected peer to sync from but can be problematic on small chains as well. Would be really nice to improve that part of code to make sure that maybe first node should update pivot and then recheck this peer once more.
Hi @kamilchodola , kindly refer this PR - https://github.com/NethermindEth/nethermind/pull/6818
Let me know if this looks good.
Hi @kamilchodola, can you please review this PR- #7067
Let me know if this works.
I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
I have worked on a diverse range of projects, ranging from small-scale web applications to large-scale enterprise-level platforms. This experience has equipped me with the ability to adapt to different project requirements and work collaboratively with cross-functional teams to deliver exceptional user experiences
How I plan on tackling this issue
I would approach this issue with following steps
First, I would propose improvements to the peer evaluation strategy. This could include introducing additional checks before marking a peer as low quality, implementing a more adaptive approach that considers network conditions and synchronization stage, or incorporating a gradual peer assessment mechanism.
I would then implement the changes, ensuring they align with the overall system design. Thorough testing would be a top priority, covering various scenarios like single-peer, multi-peer, small-chain, and large-chain environments.
Throughout the process, I would maintain open communication with the project team, seeking their input and feedback to validate the proposed solutions. I would also meticulously document my findings, the rationale behind the changes, and the test results to facilitate future collaboration and enhancements.
By taking this thoughtful and collaborative approach, I am confident I can address the root cause of the issue and deliver a robust and well-tested solution that will enhance the reliability and performance of the SnapSyncFeed component in the Nethermind project.