-
Notifications
You must be signed in to change notification settings - Fork 67
fixed delayuntil in kauri's begin #279
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
Conversation
meling
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would be possible to get Copilot to prepare some test cases for the Kauri implementation. Perhaps guiding it to use the clique_test.go as a basis? Could you give it a go @hanish520?
This removes the container kauri.ContributionRecvEvent which only wrapped the kauripb.Contribution message; we can simply pass the protobuf message directly via the event loop since events can be of 'any' type.
Gorums contains breaking changes, so we need to do it separately.
meling
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes issue #267 where Kauri's DelayUntil was incorrectly using a func() as an event type without a corresponding event handler. The fix introduces a proper WaitForConnectedEvent struct and registers an event handler for it.
Changes:
- Introduced
WaitForConnectedEventstruct with fields for storing proposal and partial certificate data - Registered
onWaitForConnectedhandler to process delayed events after connection - Simplified event handling by using
*kauripb.Contributiondirectly instead of wrapping it inContributionRecvEvent - Added comprehensive test coverage for delayed connection scenarios
- Updated dependencies and regenerated protobuf files
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| protocol/comm/kauri.go | Core fix: added WaitForConnectedEvent struct and handler, updated begin() to delay events until connection, simplified onContributionRecv signature |
| protocol/comm/kauri/service.go | Simplified to send *kauripb.Contribution events directly instead of wrapping in ContributionRecvEvent |
| protocol/comm/kauri_test.go | Added comprehensive test suite covering leaf nodes, intermediate nodes, root nodes, delayed connection scenarios, and various tree configurations |
| internal/testutil/mocksender.go | Added ContributionMsg type and methods to support Kauri protocol testing |
| metrics/types/types.pb.go | Regenerated with updated protoc-gen-go (v1.36.11) and protoc (v6.33.4) |
| internal/proto/orchestrationpb/orchestration.pb.go | Regenerated with updated protoc versions |
| internal/proto/kauripb/kauri_gorums.pb.go | Regenerated with updated protoc (v6.33.4) |
| internal/proto/kauripb/kauri.pb.go | Regenerated with updated protoc versions |
| internal/proto/hotstuffpb/hotstuff_gorums.pb.go | Regenerated with updated protoc (v6.33.4) |
| internal/proto/hotstuffpb/hotstuff.pb.go | Regenerated with updated protoc versions |
| internal/proto/clientpb/client_gorums.pb.go | Regenerated with updated protoc (v6.33.4) |
| internal/proto/clientpb/client.pb.go | Regenerated with updated protoc versions |
| go.mod | Updated Go version to 1.25.6 and various dependencies |
| go.sum | Updated checksums for dependency updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #267