Conversation
meling
requested changes
Nov 17, 2025
Member
meling
left a comment
There was a problem hiding this comment.
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.
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #267