Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

node never identifies that its peer is done syncing #7767

Closed
brianjohnson5972 opened this issue Aug 15, 2019 · 1 comment
Closed

node never identifies that its peer is done syncing #7767

brianjohnson5972 opened this issue Aug 15, 2019 · 1 comment
Assignees

Comments

@brianjohnson5972
Copy link
Contributor

-If node_00 has a lib of 100 and head of 200 and sends out a notify message and handshake message indicating the id of the head to node_01 which has caught up to lib but not head

-then node_00 produces block num 201

-node_00 has determined that node_01 needs block num 101 (lib+1) to block num 201
since node_01 last saw that node_00's handshake message with block num 200 as head,

-node_01 determines that it needs to send a handshake message and it has node_01's head which is 200

-after sending the handshake message, node_01 then processes block num 201 from node_00

-node_00 receives the handshake and sees that node_01 is still behind (block num 200) so it sets the connection->syncing=true, issues a notify message with the current head and sends all the needed blocks up to block num 201

-node_01 receives the blocks and drops them, since they have all been applied

So at this point, node_00 will not send new blocks to node_01 and node_01 has no reason to request new blocks, since it doesn't know about the new blocks.

Solution: In sync_manager::sync_recv_notice, we should check to see if the msg indicates a block number that is equal to or lesser than our current block number, since that would indicate that our understanding of the peer's state is incorrect. This will correct the sender's assessment that the peer connection is syncing.

@heifner
Copy link
Contributor

heifner commented Aug 30, 2019

Fixed by #7770

@heifner heifner closed this as completed Aug 30, 2019
@heifner heifner mentioned this issue Sep 17, 2019
3 tasks
@heifner heifner mentioned this issue Sep 17, 2019
3 tasks
algys pushed a commit to mixbytes/haya that referenced this issue Sep 27, 2019
oldcold pushed a commit to eosiosg/eos that referenced this issue Sep 30, 2019
justefg pushed a commit to DaoCasino/DAObet that referenced this issue Oct 17, 2019
justefg pushed a commit to DaoCasino/DAObet that referenced this issue Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants