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

Remove ConsensusData from Block #1792

Merged
merged 5 commits into from
Mar 10, 2021
Merged

Remove ConsensusData from Block #1792

merged 5 commits into from
Mar 10, 2021

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Mar 1, 2021

Close #1738 .

@codecov
Copy link

codecov bot commented Mar 1, 2021

Codecov Report

Merging #1792 (ba55f4c) into master (e66d369) will decrease coverage by 0.09%.
The diff coverage is 86.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1792      +/-   ##
==========================================
- Coverage   83.61%   83.52%   -0.10%     
==========================================
  Files         284      283       -1     
  Lines       22099    22166      +67     
==========================================
+ Hits        18479    18514      +35     
- Misses       2492     2523      +31     
- Partials     1128     1129       +1     
Impacted Files Coverage Δ
pkg/interop/convert/convert.go 0.00% <0.00%> (ø)
pkg/consensus/block.go 85.71% <66.66%> (-4.77%) ⬇️
pkg/core/block/header.go 82.50% <82.50%> (+11.07%) ⬆️
pkg/core/block/block.go 81.17% <94.11%> (-2.01%) ⬇️
pkg/consensus/consensus.go 68.35% <100.00%> (-0.20%) ⬇️
pkg/core/blockchain.go 79.77% <100.00%> (+0.02%) ⬆️
pkg/core/dao/dao.go 73.70% <100.00%> (+0.10%) ⬆️
pkg/core/interop/runtime/engine.go 100.00% <100.00%> (ø)
pkg/core/native/native_gas.go 73.91% <100.00%> (ø)
pkg/core/util.go 70.00% <100.00%> (-2.73%) ⬇️
... and 9 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 e66d369...82d4fb2. Read the comment docs.

Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

The first two commits don't belong here.

pkg/rpc/server/server.go Outdated Show resolved Hide resolved
@fyrchik
Copy link
Contributor Author

fyrchik commented Mar 9, 2021

First commits are needed to correctly regenerate testchain, this wasn't catched when bug was introduced.

Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

  1. It'd be nice to rename block_base.go into header.go
  2. (*Blockchain).GetBlock should fail for incomplete block, we can do that with merkle root check, for empty block it'd be 0 (and thus block == header), for non-empty block it won't be 0 and we should then check for number of transactions (that should also not be zero, otherwise we only have header and can't answer GetBlock request).

@roman-khimov roman-khimov merged commit 9b0d4e0 into master Mar 10, 2021
@roman-khimov roman-khimov deleted the fix/consensusdata branch March 10, 2021 11:12
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.

Drop consensus data
3 participants