gossamer
gossamer copied to clipboard
feat(lib/grandpa): update grandpa catch-up process; add submodule, use NeighbourMessages
Changes
- add
catchUp
submodule to track status of catch up and deal with sending out catch-up requests and handling responses - update grandpa message handler to use
NeighbourMessage
s to trigger catch-up process if needed - TODO: still need to test this w/ polkadot (seems we aren't getting responses, probably continue this is another PR)
- TODO: need to add test cases and update stress test
Tests
go test ./lib/grandpa -short
Issues
- closes #1531
Codecov Report
Merging #1554 (a190d03) into development (2f9f80c) will decrease coverage by
1.67%
. The diff coverage is33.71%
.
:exclamation: Current head a190d03 differs from pull request most recent head 550a625. Consider uploading reports for the commit 550a625 to get more accurate results
@@ Coverage Diff @@
## development #1554 +/- ##
===============================================
- Coverage 60.62% 58.94% -1.68%
===============================================
Files 202 185 -17
Lines 27286 19404 -7882
===============================================
- Hits 16541 11438 -5103
+ Misses 8845 5980 -2865
- Partials 1900 1986 +86
Flag | Coverage Δ | |
---|---|---|
unit-tests | 58.94% <33.71%> (-1.68%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
dot/network/service.go | 69.12% <0.00%> (+11.15%) |
:arrow_up: |
lib/grandpa/network.go | 52.03% <0.00%> (+5.26%) |
:arrow_up: |
lib/grandpa/catch_up.go | 31.06% <31.06%> (ø) |
|
dot/network/notifications.go | 65.47% <37.50%> (-0.38%) |
:arrow_down: |
lib/grandpa/message_handler.go | 69.37% <61.53%> (+4.94%) |
:arrow_up: |
lib/grandpa/grandpa.go | 59.87% <100.00%> (+1.38%) |
:arrow_up: |
dot/network/gossip.go | 37.50% <0.00%> (-62.50%) |
:arrow_down: |
dot/network/pool.go | 50.00% <0.00%> (-50.00%) |
:arrow_down: |
dot/state/transaction.go | 58.33% <0.00%> (-21.36%) |
:arrow_down: |
dot/types/consensus_digest.go | 0.00% <0.00%> (-17.86%) |
:arrow_down: |
... and 228 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 2f9f80c...550a625. Read the comment docs.
It seems that the GRANDPA catch-up mechanism was implemented before request/response protocols were defined. I believe that these messages should be sent as "request notifications" and "response notifications".