Skip to content
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

syncer: insufficient criteria for a node to become synced #4931

Closed
countvonzero opened this issue Aug 30, 2023 · 0 comments
Closed

syncer: insufficient criteria for a node to become synced #4931

countvonzero opened this issue Aug 30, 2023 · 0 comments

Comments

@countvonzero
Copy link
Contributor

Description

currently node will declare itself synced when it fetched all atxs/ballots from peers.
it doesn't wait for the state to be synced with the network.
and when a node become synced, it starts to participate in hare and tortoise consensus.

we found that the condition is insufficient for the node to become synced for the following reason.
blocks were downloaded only when one of the following conditions is satisified.
A. the node received a valid block certificate
B. tortoise verified the block to be valid

when a node become synced, and the state lags, hare will finish but unable to generate blocks, because its state is different from the majority of proposals in the hare output.
and when blocks are not locally available when hare finishes, tortoise will vote against the block in the next layer.
the ripple effect causes the node to lag even further and produce bad votes for the network.

proposal

sync all data up to layer N and call ProcessLayer/TallyVotes up to layer N until no errors is returned from ProcessLayer()

bors bot pushed a commit that referenced this issue Aug 31, 2023
## Motivation
Closes #4931

## Changes
- make sure state is synced before declaring node is synced
- reduce gossip sync from 10 min to 2 min
- do not print confusing log "failed to build proposal" when node is not synced

## Test
- manually synced with mainnet

## TODO
- [ ] Update [changelog](../CHANGELOG.md)
bors bot pushed a commit that referenced this issue Aug 31, 2023
## Motivation
Closes #4931

## Changes
- make sure state is synced before declaring node is synced
- reduce gossip sync from 10 min to 2 min
- do not print confusing log "failed to build proposal" when node is not synced

## Test
- manually synced with mainnet
@bors bors bot closed this as completed in 5d25947 Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant