Skip to content
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

Better logs #139

Merged
merged 7 commits into from
Oct 31, 2024
Merged

Better logs #139

merged 7 commits into from
Oct 31, 2024

Conversation

pavelkrolevets
Copy link
Contributor

Fix for #109 and #106

Old version 0.0.1 and 1.0.1 reply with error incorrect offset as they cant ssz unmarshal messages structured differently.
In case of ping to older versions even dont have health_check route, so they reply 404

@pavelkrolevets pavelkrolevets mentioned this pull request Oct 8, 2024
@pavelkrolevets pavelkrolevets marked this pull request as ready for review October 8, 2024 08:57
@pavelkrolevets pavelkrolevets added the enhancement New feature or request label Oct 8, 2024
@pavelkrolevets
Copy link
Contributor Author

@MatusKysel #109 (comment)

@@ -896,6 +901,9 @@ func checkThreshold(responses map[uint64][]byte, errs map[uint64]error, oldOpera
var finalErr error
for _, op := range newOperators {
if err, ok := errs[op.ID]; ok {
if strings.Contains(err.Error(), "invalid ssz encoding") {
err = fmt.Errorf("%w, operator probably of old version 1.*.*, please upgrade", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not define 1, just old version is enough

if parseErr == nil {
return nil, fmt.Errorf("%v", errmsg)
}
return nil, fmt.Errorf("operator failed with: %w, probably of old version 1.*.*, please upgrade", errors.New(string(resdata)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@MatusKysel MatusKysel merged commit 859e050 into unstable Oct 31, 2024
1 check passed
@MatusKysel MatusKysel deleted the better_logs branch November 18, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants