-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Potential Fix for stuck nodes: Don't lose future blocks if multiple future blocks received at the same height #489
Conversation
…ht, that is not the next block it should go into the unverified cache.
Added another commit also to fix receiving potential invalid future blocks being able to cause syncing to get stuck |
So, the only scenario that this fix solves is that someone sent fake blocks on the network? |
Yeah at this point, it solves for someone sending fake blocks on the network, unless there is any way for CN nodes to ever send an invalid block out, which I think there isn't. Do we know for sure no one has sent fake blocks on the network? |
If you have tested it well, I will merge it. |
Give me 12 hours to test more. I’m running it now and it seems fine, but I’m headed to bed now and would like will examine logs in the morning. |
OK. If your test is complete, you can merge it by yourself. |
Thanks, I will do so when ready then. |
@jsolman, yesterday we tested it and the results keep the same, it does not finally solve the issue. However, @erikzhang, the following analysis may help us to keep tracking/hunting this syncing issue. When syncing problems, a common state is: We receive a block with higher index and we do not have the header yet. This keeps until on lucky we are able to process the process and reach the top again. |
…uture blocks received at the same height (neo-project#489)
Added the following: test, notices, overview Updated: introduction, python
I've been observing for some time now that nodes can seem to get stuck and stop syncing. After spending some time in the TaskManager it seemed that somehow a block hash must be getting into
knownHashes
but somehow getting lost and never making it intoblock_cache_unverified
in Blockchain.cs. After a careful audit of how that could happen, I belive I've found a scenario that can cause it.Update: The original scenario that this change started with turned out not to be an issue. The second change does fix the situation where a valid block could be removed from
block_cache_unverified
while still inknownHashes
if an invalid future block were sent to the network above the current height.