Skip to content

1.6.0 - Include chainId in JWT audience field and fix StepOutputVar #227

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

Merged
merged 39 commits into from
May 21, 2025

Conversation

chrisli30
Copy link
Member

No description provided.

Copy link
Contributor

@Copilot 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 introduces enhancements for improved error handling and chainId JWT audience verification while refining various CI/CD workflows for release automation. Key changes include:

  • Error handling improvements in the task engine, RPC server initialization, and JWT verification in the auth service.
  • Addition of chainId validation in JWT audience fields.
  • Updates to pre-commit hooks and GitHub workflows covering testing, release, and Docker image publishing.

Reviewed Changes

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

Show a summary per file
File Description
aggregator/task_engine.go Enhanced error handling for task processor registration and engine startup.
aggregator/rpc_server.go Added chainId field and corresponding initialization from smart wallet RPC.
aggregator/pool.go Introduced error checking for JSON unmarshalling with a silent continue strategy.
aggregator/auth_test.go Fixed error message typos and added cross-chain JWT validation tests.
aggregator/auth.go Improved chainId validation in GetKey and verifyAuth along with caching error logging.
aggregator/aggregator.go Updated RPC server startup to include error logging.
RELEASE.md Detailed the updated release process and branching strategy.
.pre-commit-config.yaml Modified go fmt command and added a conventional commit check hook.
Various GitHub workflow YAML files Updated workflows and removed deprecated ones for better CI/CD integration.

@@ -143,6 +148,12 @@ func (r *RpcServer) verifyAuth(ctx context.Context) (*model.User, error) {
return nil, fmt.Errorf("%s", auth.InvalidAuthenticationKey)
}

chainIdStr := fmt.Sprintf("%d", r.chainID)
Copy link
Preview

Copilot AI May 11, 2025

Choose a reason for hiding this comment

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

For consistency with other parts of the code that use r.chainID.Int64(), consider formatting chainIdStr using r.chainID.Int64() instead of r.chainID.

Suggested change
chainIdStr := fmt.Sprintf("%d", r.chainID)
chainIdStr := fmt.Sprintf("%d", r.chainID.Int64())

Copilot uses AI. Check for mistakes.

@@ -99,7 +99,9 @@ func (o *OperatorPool) GetAll() []*OperatorNode {

for _, rawValue := range kvs {
node := &OperatorNode{}
json.Unmarshal(rawValue.Value, node)
if err := json.Unmarshal(rawValue.Value, node); err != nil {
Copy link
Preview

Copilot AI May 11, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider logging or handling the error from json.Unmarshal instead of silently continuing to help with debugging potential issues with data unmarshalling.

Suggested change
if err := json.Unmarshal(rawValue.Value, node); err != nil {
if err := json.Unmarshal(rawValue.Value, node); err != nil {
fmt.Printf("Error unmarshalling operator node: %v\n", err)

Copilot uses AI. Check for mistakes.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

1 participant