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

Stuck in fast sync with no peers and validator set > 1 #2916

Closed
ebuchman opened this issue Nov 26, 2018 · 1 comment
Closed

Stuck in fast sync with no peers and validator set > 1 #2916

ebuchman opened this issue Nov 26, 2018 · 1 comment
Labels
C:sync Component: Fast Sync, State Sync T:bug Type Bug (Confirmed)

Comments

@ebuchman
Copy link
Contributor

ebuchman commented Nov 26, 2018

If the validator set is greater than 1, but we have no peers, we will be stuck in fast sync, even if we have more than 2/3 of the voting power.

This is easy to replicate. Run a node with tendermint node --proxy_app=persistent_kvstore. Add a new validator with 1/11 of the voting power: curl localhost:26657/broadcast_tx_sync?tx=\"val:0e783029302e8e4713f2c3085ee35c3335bbfd698f2bba09d3196aca3872d651/1\". Now restart the node and it will be stuck in fast sync.

We treat the special case of being the only validator in https://github.com/tendermint/tendermint/blob/develop/node/node.go#L236. We should generalize this - instead of just checking if we're the sole validator, we should check if we have > 2/3 of the voting power - if so, we can skip fast sync. If we have less than 2/3 of the voting power, we'll need at least one peer before we can switch out of fast sync.

Discovered this while trying to test that #2747 is backwards compatible by making validator set changes on current version of the software and then trying to run that branch.

@ebuchman ebuchman added T:bug Type Bug (Confirmed) C:sync Component: Fast Sync, State Sync labels Nov 26, 2018
@ebuchman
Copy link
Contributor Author

Never mind - we don't necessarily want this. It's possible a node with +2/3 is still behind and wants to sync up. It's even possible if theres just a single validator. But we'll leave the heuristic for now and others can just turn off fast sync if they find themselves in this position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:sync Component: Fast Sync, State Sync T:bug Type Bug (Confirmed)
Projects
None yet
Development

No branches or pull requests

1 participant