Skip to content

Conversation

@hanish520
Copy link
Contributor

@hanish520 hanish520 commented Nov 16, 2025

Fixes #267

Copy link
Member

@meling meling left a 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?

hanish520 and others added 7 commits November 18, 2025 01:17
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.
Copy link
Member

@meling meling left a 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!

Copy link
Contributor

Copilot AI left a 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 WaitForConnectedEvent struct with fields for storing proposal and partial certificate data
  • Registered onWaitForConnected handler to process delayed events after connection
  • Simplified event handling by using *kauripb.Contribution directly instead of wrapping it in ContributionRecvEvent
  • 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.

@meling meling merged commit 6175c71 into main Jan 28, 2026
10 checks passed
@meling meling deleted the fix_kauri branch January 28, 2026 09:58
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.

bug: kauri's DelayUntil provide a func() without a corresponding event handler registration

3 participants