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

go/consensus/tendermint: sync-worker additionally check block timestamps #2873

Merged
merged 2 commits into from
Apr 29, 2020

Conversation

ptrus
Copy link
Member

@ptrus ptrus commented Apr 28, 2020

Fixes: #2861

Sync-worker relies on Tendermint fast-sync to determine if the node is still
catching up. This PR adds aditional condition that the latest block is not
older than 1 minute. This prevents cases where node stops fast-syincing
before it has actually caught up.

TODO:

  • although not directly testing the change itself done in this PR it would probably be good to have an E2E test that starts a client node at a later time (e.g. after 2 minutes or so), and ensures the node catches up and starts

@ptrus ptrus force-pushed the ptrus/feature/syncworker-timestamps branch 2 times, most recently from 918f240 to b292a8a Compare April 28, 2020 12:50
@ptrus ptrus force-pushed the ptrus/feature/syncworker-timestamps branch 2 times, most recently from 6e75c3c to c64e73e Compare April 28, 2020 13:46
@codecov
Copy link

codecov bot commented Apr 28, 2020

Codecov Report

Merging #2873 into master will decrease coverage by 0.08%.
The diff coverage is 44.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2873      +/-   ##
==========================================
- Coverage   67.66%   67.58%   -0.09%     
==========================================
  Files         344      344              
  Lines       33609    33623      +14     
==========================================
- Hits        22743    22725      -18     
- Misses       7944     7972      +28     
- Partials     2922     2926       +4     
Impacted Files Coverage Δ
go/consensus/tendermint/tendermint.go 66.32% <44.44%> (-0.44%) ⬇️
go/worker/common/host/interface.go 38.46% <0.00%> (-15.39%) ⬇️
go/consensus/tendermint/abci/state/state.go 50.00% <0.00%> (-7.70%) ⬇️
go/storage/api/root_cache.go 72.41% <0.00%> (-6.90%) ⬇️
go/storage/database/database.go 77.27% <0.00%> (-3.64%) ⬇️
go/storage/mkvs/tree.go 89.28% <0.00%> (-3.58%) ⬇️
go/storage/metrics.go 84.78% <0.00%> (-3.27%) ⬇️
go/registry/api/grpc.go 29.96% <0.00%> (-2.76%) ⬇️
go/storage/mkvs/insert.go 87.75% <0.00%> (-2.73%) ⬇️
go/consensus/tendermint/abci/mux.go 69.19% <0.00%> (-2.68%) ⬇️
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52704f3...056e4bb. Read the comment docs.

@ptrus ptrus force-pushed the ptrus/feature/syncworker-timestamps branch 2 times, most recently from 1b07e25 to 7f5d7a2 Compare April 29, 2020 07:55
ptrus added 2 commits April 29, 2020 10:04
Sync-worker relies on Tendermint fast-sync to determine if the node is still
catching up. This PR adds aditional condition that the latest block is not
older than 1 minute. This prevents cases where node stops fast-syincing
before it has actually caught up.
@ptrus ptrus force-pushed the ptrus/feature/syncworker-timestamps branch from 7f5d7a2 to 056e4bb Compare April 29, 2020 08:11
@ptrus ptrus merged commit 8642c9a into master Apr 29, 2020
@ptrus ptrus deleted the ptrus/feature/syncworker-timestamps branch April 29, 2020 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider recent block timestamps in sync worker
2 participants