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

Alex/5857 full fix #1325

Merged
merged 17 commits into from Sep 22, 2021
Merged

Alex/5857 full fix #1325

merged 17 commits into from Sep 22, 2021

Conversation

AlexHentschel
Copy link
Member

@AlexHentschel AlexHentschel commented Sep 22, 2021

This implements step 1 of https://github.com/dapperlabs/flow-go/issues/5857:

simple fix for the business logic

  • update consensus.Builder to always include a gap
    • add test to verify that updated business always leaves a gap
    • update existing tests that broke due to change in business logic
  • update sealValidator to enforce the gap
    • add test to verify that verification logic rejects seals without a gap
    • update existing tests that broke due to change in business logic

Context

This PR is an extension of #1307. In this PR, we also update the seal-validation logic to reject seals that do not have a gap.

@AlexHentschel AlexHentschel added the Bug Something isn't working label Sep 22, 2021
@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2021

Codecov Report

Merging #1325 (5195cdc) into master (864fc75) will increase coverage by 0.00%.
The diff coverage is 52.63%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1325   +/-   ##
=======================================
  Coverage   56.23%   56.24%           
=======================================
  Files         500      500           
  Lines       31072    31079    +7     
=======================================
+ Hits        17474    17479    +5     
- Misses      11232    11234    +2     
  Partials     2366     2366           
Flag Coverage Δ
unittests 56.24% <52.63%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
module/chunks/chunk_assigner.go 58.97% <0.00%> (ø)
module/validation/seal_validator.go 76.10% <50.00%> (-0.75%) ⬇️
state/protocol/badger/snapshot.go 57.32% <66.66%> (ø)
module/builder/consensus/builder.go 70.03% <100.00%> (+0.23%) ⬆️
...ngine/common/synchronization/finalized_snapshot.go 68.75% <0.00%> (-4.17%) ⬇️
admin/command_runner.go 78.51% <0.00%> (-1.49%) ⬇️
engine/collection/synchronization/engine.go 63.97% <0.00%> (+1.07%) ⬆️
...sus/approvals/assignment_collector_statemachine.go 53.84% <0.00%> (+1.92%) ⬆️

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 864fc75...5195cdc. Read the comment docs.

Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

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

One thing that's confusing to me is that this indicates "final", mentions it only implements step 1 of https://github.com/dapperlabs/flow-go/issues/5857, yet:

  • seems to tick all boxes for step 2 of 5857,
  • contains a "TEMPORARY" all-caps comment.

I feel there's a way to make this PR more kind to a future eng exploring the status of the remediation we're putting in, here.

Otherwise, the code looks good!

module/validation/seal_validator.go Outdated Show resolved Hide resolved
@AlexHentschel AlexHentschel merged commit a2752f4 into master Sep 22, 2021
@AlexHentschel AlexHentschel deleted the alex/5857_full_fix branch September 22, 2021 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants