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 checks for equivocatory blocks #2596

Merged
merged 26 commits into from
Jul 12, 2022

Conversation

kishansagathiya
Copy link
Contributor

@kishansagathiya kishansagathiya commented Jun 10, 2022

Changes

We have logic to find different blocks with same block number and same author. If we find such blocks we throw and error.
Some of the discussion is here #2541 (comment)
#2541 (comment)

As discussed with @noot , it's probably authoring one as primary and one as secondary. If we don't error the fork should get resolved eventually.

Tests

go test -tags integration github.com/ChainSafe/gossamer

Issues

Fixes #2597

Primary Reviewer

@timwu20

lib/babe/verify.go Outdated Show resolved Hide resolved
lib/babe/verify.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 29, 2022

Codecov Report

Merging #2596 (1a44c28) into development (78c03b6) will increase coverage by 0.54%.
The diff coverage is 59.25%.

@@               Coverage Diff               @@
##           development    #2596      +/-   ##
===============================================
+ Coverage        62.44%   62.99%   +0.54%     
===============================================
  Files              211      211              
  Lines            27354    27136     -218     
===============================================
+ Hits             17082    17095      +13     
+ Misses            8633     8482     -151     
+ Partials          1639     1559      -80     
Flag Coverage Δ
unit-tests 62.99% <59.25%> (+0.54%) ⬆️

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

Impacted Files Coverage Δ
dot/types/babe.go 34.72% <0.00%> (ø)
lib/babe/verify.go 88.88% <64.00%> (-2.35%) ⬇️
dot/state/block_notify.go 81.90% <0.00%> (-8.58%) ⬇️
dot/sync/message.go 66.21% <0.00%> (-0.68%) ⬇️
dot/peerset/peerset.go 49.34% <0.00%> (-0.44%) ⬇️
dot/network/connmgr.go 90.41% <0.00%> (+1.36%) ⬆️
dot/network/notifications.go 65.29% <0.00%> (+1.37%) ⬆️
lib/runtime/wasmer/imports.go 55.43% <0.00%> (+6.93%) ⬆️
dot/network/inbound.go 100.00% <0.00%> (+7.01%) ⬆️

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 78c03b6...1a44c28. Read the comment docs.

lib/babe/verify.go Show resolved Hide resolved
lib/babe/verify.go Outdated Show resolved Hide resolved
lib/babe/verify.go Outdated Show resolved Hide resolved
lib/babe/verify_test.go Show resolved Hide resolved
dot/types/babe.go Outdated Show resolved Hide resolved
lib/babe/verify.go Outdated Show resolved Hide resolved
lib/babe/verify.go Outdated Show resolved Hide resolved
lib/babe/verify.go Outdated Show resolved Hide resolved
dot/types/babe.go Outdated Show resolved Hide resolved
lib/babe/verify.go Show resolved Hide resolved
lib/babe/verify.go Outdated Show resolved Hide resolved
kishansagathiya and others added 4 commits July 7, 2022 10:06
lib/babe/verify.go Outdated Show resolved Hide resolved
@kishansagathiya kishansagathiya merged commit fe1e2f0 into development Jul 12, 2022
@kishansagathiya kishansagathiya deleted the kishan/fix/equivocatory-blocks branch July 12, 2022 07:48
@github-actions
Copy link

🎉 This PR is included in version 0.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

When checking for equivocatory blocks error only if both are created by primary author
4 participants