Skip to content

Ecdsa#2

Open
jonathanMweiss wants to merge 13 commits intomainfrom
ecdsa
Open

Ecdsa#2
jonathanMweiss wants to merge 13 commits intomainfrom
ecdsa

Conversation

@jonathanMweiss
Copy link
Copy Markdown
Collaborator

Little refactor and utilities.
Added the Signer protocol to create a signer service.

@jonathanMweiss jonathanMweiss self-assigned this Nov 5, 2025
Copy link
Copy Markdown

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 refactors the protocol type handling by moving protocol-related code into a dedicated protocol.go file and adds support for gRPC-based signing services. The changes consolidate protocol type definitions, add gRPC service definitions for signing operations, and update dependency versions.

Key changes:

  • Extracted protocol type definitions and helper functions from message.go into a new protocol.go file
  • Refactored TrackingID.GetProtocolType() to use the new ProtocolTypeFromInt() helper function
  • Added gRPC service definitions for signer service with bidirectional streaming support
  • Updated Go version and dependencies (gRPC, protobuf) with improved protobuf generation workflow

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
protocol.go New file containing protocol type definitions, conversions, and validation functions extracted from message.go
util.go Simplified GetProtocolType() to delegate to ProtocolTypeFromInt()
message.go Removed protocol type definitions that were moved to protocol.go
service/signer/signer.pb.go Generated protobuf code for signer service messages
service/signer/signer_grpc.pb.go Generated gRPC service code for bidirectional signing streams
proto/signer.proto New protobuf definition for signer service with SignRequest, SignResponse, and SignStatus messages
proto/io.proto Updated go_package path to use full GitHub module path
io.pb.go Regenerated with updated go_package path
go.mod Updated Go version to 1.24.0, added gRPC dependency, updated protobuf version
go.sum Added checksums for new and updated dependencies
Makefile Enhanced protobuf generation to support multiple proto files and gRPC generation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread protocol.go Outdated
Comment thread service/signer/signer_grpc.pb.go
Copy link
Copy Markdown

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

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread util_test.go Outdated
Comment thread service/signer/signer_grpc.pb.go
Comment thread protocol.go

// Integer protocol identifiers (useful for internal indexing, enums, etc.)
const (
protocolTypeMin = iota
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You could define a type called ProtocolType and define it to be uint8
and then use iota to set the constants. This would save needing protocolTypeMin == 0 (since it's uint)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure about that, since protocolType.ToInt() returns -1 for a bad protocol type.
Should it return an error instead?

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.

3 participants