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

task(lib/grandpa): Verify block hashes and number #2468

Merged
merged 17 commits into from
Apr 26, 2022

Conversation

kishansagathiya
Copy link
Contributor

@kishansagathiya kishansagathiya commented Apr 6, 2022

Changes

  • Verify block hashes against block number in justification
  • Fix some of the tests

Tests

there are tests for verifying justification in message_handler_test.go. I think if those pass, that should be enough.

Issues

Primary Reviewer

Verify block hashes against block number in justification
@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Merging #2468 (f7fe855) into development (44648af) will decrease coverage by 0.02%.
The diff coverage is 31.14%.

@@               Coverage Diff               @@
##           development    #2468      +/-   ##
===============================================
- Coverage        61.56%   61.54%   -0.03%     
===============================================
  Files              215      215              
  Lines            28215    28267      +52     
===============================================
+ Hits             17371    17396      +25     
- Misses            9079     9100      +21     
- Partials          1765     1771       +6     
Flag Coverage Δ
unit-tests 61.54% <31.14%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
dot/state/block_finalisation.go 46.77% <25.00%> (-0.77%) ⬇️
lib/grandpa/message_handler.go 59.56% <26.41%> (-4.59%) ⬇️
dot/state/block.go 42.60% <100.00%> (-0.15%) ⬇️
dot/state/grandpa.go 40.59% <100.00%> (ø)
dot/network/notifications.go 63.79% <0.00%> (-1.04%) ⬇️
lib/runtime/wasmer/imports.go 48.40% <0.00%> (-0.05%) ⬇️
dot/network/block_announce.go 63.20% <0.00%> (+4.80%) ⬆️
dot/network/inbound.go 92.98% <0.00%> (+7.01%) ⬆️
dot/state/block_notify.go 90.47% <0.00%> (+8.57%) ⬆️

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 41db27b...f7fe855. Read the comment docs.

@kishansagathiya kishansagathiya marked this pull request as ready for review April 12, 2022 14:59
dot/state/block_finalisation.go Outdated Show resolved Hide resolved
dot/state/grandpa.go Outdated Show resolved Hide resolved
dot/state/grandpa.go Show resolved Hide resolved
lib/grandpa/errors.go Outdated Show resolved Hide resolved
lib/grandpa/grandpa.go Outdated Show resolved Hide resolved
lib/grandpa/message_handler.go Show resolved Hide resolved
lib/grandpa/message_handler.go Show resolved Hide resolved
lib/grandpa/message_handler.go Show resolved Hide resolved
lib/grandpa/message_handler.go Outdated Show resolved Hide resolved
lib/grandpa/message_handler_test.go Show resolved Hide resolved
kishansagathiya and others added 6 commits April 14, 2022 16:13
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com>
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com>
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com>
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com>
Co-authored-by: Quentin McGaw <quentin.mcgaw@gmail.com>
lib/grandpa/message_handler.go Outdated Show resolved Hide resolved
dot/state/grandpa.go Outdated Show resolved Hide resolved
lib/grandpa/errors.go Show resolved Hide resolved
lib/grandpa/message_handler.go Show resolved Hide resolved
lib/grandpa/message_handler.go Show resolved Hide resolved
lib/grandpa/message_handler.go Outdated Show resolved Hide resolved
lib/grandpa/message_handler.go Outdated Show resolved Hide resolved
lib/grandpa/message_handler.go Show resolved Hide resolved
@kishansagathiya kishansagathiya merged commit fee48c1 into development Apr 26, 2022
@kishansagathiya kishansagathiya deleted the kishan/fix/match-number-with-hash branch April 26, 2022 09:36
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.

Block Numbers are Not Verified Against Block Hashes in GRANDPA (GSR-04)
5 participants