From daca3ae6eb5ec5fe728ebd85f90b1800c8773666 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 6 Aug 2024 14:42:18 +0800 Subject: [PATCH] add log to coordiantor log check (#1473) Co-authored-by: georgehao Co-authored-by: colinlyguo --- common/version/version.go | 2 +- coordinator/internal/logic/auth/login.go | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/version/version.go b/common/version/version.go index ab95352e4..3eab64087 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -5,7 +5,7 @@ import ( "runtime/debug" ) -var tag = "v4.4.40" +var tag = "v4.4.41" var commit = func() string { if info, ok := debug.ReadBuildInfo(); ok { diff --git a/coordinator/internal/logic/auth/login.go b/coordinator/internal/logic/auth/login.go index 1d7d5e113..aa4268380 100644 --- a/coordinator/internal/logic/auth/login.go +++ b/coordinator/internal/logic/auth/login.go @@ -59,6 +59,8 @@ func (l *LoginLogic) Check(login *types.LoginParameter) error { if login.PublicKey != "" { verify, err := login.Verify() if err != nil || !verify { + log.Error("auth message verify failure", "prover_name", login.Message.ProverName, + "prover_version", login.Message.ProverVersion, "message", login.Message) return errors.New("auth message verify failure") } } @@ -84,13 +86,14 @@ func (l *LoginLogic) Check(login *types.LoginParameter) error { vks[vk] = struct{}{} } default: - log.Error("invalid prover_type", "value", proverType) + log.Error("invalid prover_type", "value", proverType, "prover name", login.Message.ProverName, "prover_version", login.Message.ProverVersion) } } for _, vk := range login.Message.VKs { if _, ok := vks[vk]; !ok { - log.Error("vk inconsistency", "prover vk", vk) + log.Error("vk inconsistency", "prover vk", vk, "prover name", login.Message.ProverName, + "prover_version", login.Message.ProverVersion, "message", login.Message) if !version.CheckScrollProverVersion(login.Message.ProverVersion) { return fmt.Errorf("incompatible prover version. please upgrade your prover, expect version: %s, actual version: %s", version.Version, login.Message.ProverVersion)