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

feat(grandpa): implement neighbor tracker and message handling #4230

Open
wants to merge 10 commits into
base: development
Choose a base branch
from

Conversation

jimjbrettj
Copy link
Contributor

@jimjbrettj jimjbrettj commented Oct 7, 2024

Changes

This PR adds the neighbor messaging protocol. This includes the ability to handle received neighbor messages, the ability to correctly send neighbor messages, as well as tracking the state of our neighbors (that we use when deciding who to send messages too),

Tests

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

Issues

#2931

@jimjbrettj jimjbrettj marked this pull request as ready for review October 7, 2024 10:41
@jimjbrettj jimjbrettj requested a review from P1sar as a code owner October 7, 2024 11:06
@jimjbrettj jimjbrettj changed the base branch from jimmy/paseoBlock1789153 to development October 7, 2024 11:07
lib/grandpa/message_handler.go Outdated Show resolved Hide resolved
lib/grandpa/neighbor_tracker.go Outdated Show resolved Hide resolved
lib/grandpa/neighbor_tracker.go Outdated Show resolved Hide resolved
lib/grandpa/neighbor_tracker.go Outdated Show resolved Hide resolved
lib/grandpa/neighbor_tracker.go Outdated Show resolved Hide resolved
lib/grandpa/neighbor_tracker.go Outdated Show resolved Hide resolved
lib/grandpa/neighbor_tracker.go Outdated Show resolved Hide resolved
Copy link
Member

@EclesioMeloJunior EclesioMeloJunior left a comment

Choose a reason for hiding this comment

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

LGTM, just a small comment over the usage of a constant.

Comment on lines +58 to +59
const duration = NeighborBroadcastPeriod
ticker := time.NewTicker(duration)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const duration = NeighborBroadcastPeriod
ticker := time.NewTicker(duration)
ticker := time.NewTicker(NeighborBroadcastPeriod)

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.

2 participants