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

Save BlockTransaction and BlockOperation when sync #893

Merged
merged 4 commits into from
Jan 3, 2019

Conversation

anarcher
Copy link
Contributor

@anarcher anarcher commented Dec 30, 2018

Github Issue

Background

The operation of above a blockheight is congress-voting-result and it needs to check the operation of congress-voting which should be saved already.

This PR intent that when syncer finishes a block, the operations and the transactions of this block are saved with finishing the block in sync/watcher node.

Solution

when syncer finishes a block, the operations and the transactions of this block are saved with finishing the block in sync/watcher node.

Possible Drawbacks

Without SavingBlockOperations, It makes slower sync/watcher time than with SavingBlockOperations.

@anarcher anarcher added the sync label Dec 30, 2018
@anarcher anarcher added this to the MainNet milestone Dec 30, 2018
@anarcher anarcher self-assigned this Dec 30, 2018
Copy link
Contributor

@Geod24 Geod24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependency changes are unrelated?

@anarcher
Copy link
Contributor Author

anarcher commented Jan 2, 2019

Dependency changes are unrelated?

@Geod24 Oh, I removed this dependency changes in comments :->

@codecov-io
Copy link

codecov-io commented Jan 2, 2019

Codecov Report

Merging #893 into master will decrease coverage by 0.17%.
The diff coverage is 41.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #893      +/-   ##
==========================================
- Coverage   60.38%   60.21%   -0.18%     
==========================================
  Files         153      153              
  Lines       10724    10746      +22     
==========================================
- Hits         6476     6471       -5     
- Misses       3512     3532      +20     
- Partials      736      743       +7
Flag Coverage Δ
#integration_tests_long_term 44.32% <41.66%> (-0.15%) ⬇️
#integration_tests_node 40.32% <5%> (-0.07%) ⬇️
#unittests 48.53% <16.66%> (-0.1%) ⬇️
Impacted Files Coverage Δ
lib/sync/types.go 100% <ø> (ø) ⬆️
lib/node/runner/finish_ballot.go 43.86% <33.33%> (+0.11%) ⬆️
lib/sync/validator.go 57.3% <36.66%> (-3.08%) ⬇️
lib/sync/fetcher.go 57.23% <52.38%> (-7.77%) ⬇️
lib/sync/try.go 78.57% <0%> (-7.15%) ⬇️
lib/metrics/sync.go 88.57% <0%> (-5.72%) ⬇️
lib/block/transaction.go 70.12% <0%> (+1.82%) ⬆️

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 83efb8e...8ce8881. Read the comment docs.

@anarcher anarcher added the Urgent label Jan 3, 2019
@anarcher
Copy link
Contributor Author

anarcher commented Jan 3, 2019

Ping~

Copy link
Member

@Charleslee522 Charleslee522 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

return
}

func ProcessProposerTransaction(st *storage.LevelDBBackend, blk block.Block, ptx ballot.ProposerTransaction, log logging.Logger) (err error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@anarcher anarcher merged commit 01496d1 into bosnet:master Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants