-
Notifications
You must be signed in to change notification settings - Fork 992
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
TUI stay on "Downloading headers: 6%, step 1/4" #2233
Comments
#1139 has a lot of background about this. And I think the check on the miner's block submission has been removed. Or are you talking about startup? |
Thanks for remind. And I would do a real test today, for 3 cases, but sorry to those peers which connected to my node 😸
|
Excellent idea! |
We could kill a batch of bugs here 😄 Here is No.1 - If a new node is syncing but with this fraud peer connected, it will skip the state sync, and directly enter body sync, which is very slow and could be impossible to achieve since we don't have much archive nodes. Fixing now. [Updated]: This is not a problem! It's the designed behavior.
Because we set horizon as one week, before the chain height rise to one week's height, no |
Here is No.2 - If a new node is syncing but with this fraud peer connected, it will stuck at Header Syncing stage for ever. Note: it should be 1st issue, but I missed the Ping fraud message, that cause above No.1 issue come to me firstly. |
For test case:
|
Here is No.3 - If a fraud peer connects to a running mining node, it will trigger that node into a new sync state, then it will stuck at syncing state (without #2237 fix), all connected miners will not get any job updating when received new block(s), i.e. all associated miners will always work on same job, before the node jump out of syncing state. A fix will be given in #2239 |
Thought some more about this. #2337 definitely helps. But I think we can improve on #2240 by introducing a new sync state or flag for a restart. This would only be enabled when the server just starts up and disabled once we're caught up. And we can check on that to stop mined block relay, instead of any sync. What do you think? |
Good idea! will implement it on #2240 |
I closed #2240, since we already fixed the fraud peer (with fake height and total difficulty) banning issue, then we should never come to a case that need broadcasting new mined block when in syncing state. Then all found problems in this issue have been addressed or fixed. Let's close this one. |
Already saw several reports on similar issue such as "4%", "6%", etc, and stuck here.
So I look into an old log and find this:
That means the Floonet network see a highest height at
94,148
! that's why this3699
show4%
. It definitely is a problem for us, since the current highest height is7,566
!I check those old Testnets:
90,900
since 5 days ago142,700
since 69 days ago134,400
at 170 days ago130,000
at 274 days agoSo, it could not be caused by an un-upgraded node which stay on an old testnet, but since #2208 gave different magic code for the new Floonet and Mainnet, it will not be problem in the future to get a peer connected from TestnetN.
But let's give a further think about a possibility of a fraud peer, if this node is broadcasting a highest height far bigger than any other nodes (and a far bigger total_difficulty), in current implementation, it will draw all other nodes into
syncing
state fromNoSync
state, and because currentgrin-miner
depends on the node state to start mining, that will cause all othergrin-miner
paused, and only that fraud node can continue mining.IIRC, this fraud peer issue had been discussed before, but I can't remember what we did to get the immunity on this. Could somebody remind me?
Anyway, since the issue is still there, looks like we still need a fix to resist such kind of fraud peers.
The text was updated successfully, but these errors were encountered: