Skip to content

Conversation

@pinebit
Copy link
Collaborator

@pinebit pinebit commented Oct 22, 2025

eth2util, p2p, tbls packages errors revamp with claude.

category: refactor
ticket: #3882

Copy link

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 revamps error messages across the eth2util, p2p, and tbls packages to make them more concise and consistent by removing redundant prefixes like "cannot", "failed to", and "finding/posting/loading" in favor of simpler verb forms.

Key Changes

  • Standardizes error message format by removing "cannot" prefix from error messages
  • Updates error messages to use verb forms (e.g., "marshal" instead of "failed to marshal")
  • Consolidates duplicate error messages into shared error variables where appropriate

Reviewed Changes

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

Show a summary per file
File Description
tbls/tblsconv/tblsconv.go Introduced shared error variable for invalid data length validation
tbls/herumi.go Simplified error messages by removing "cannot" prefix across BLS operations
p2p/k1.go Updated error messages for private key operations to be more descriptive
p2p/config_internal_test.go Updated test assertion to match revised error message format
p2p/config.go Improved clarity of IP address validation error messages
p2p/bootnode.go Enhanced error messages for ENR parsing and relay URL validation
eth2util/types.go Simplified JSON marshaling/unmarshaling error messages
eth2util/signing/signing.go Removed "cannot" prefix from slot hash root error
eth2util/keystore/keystore.go Improved clarity of key shares validation error message
eth2util/keymanager/keymanager_test.go Updated test assertions to match revised error messages
eth2util/keymanager/keymanager.go Simplified error messages for keymanager operations
eth2util/deposit/deposit_test.go Updated test assertions to match revised error messages
eth2util/deposit/deposit.go Simplified error messages for deposit data operations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pinebit pinebit requested a review from Copilot October 22, 2025 14:56
Copy link

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 13 out of 13 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pinebit pinebit requested a review from Copilot October 22, 2025 14:59
Copy link

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 13 out of 13 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 19.56522% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.81%. Comparing base (bba43cd) to head (f832a77).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
tbls/herumi.go 0.00% 21 Missing ⚠️
eth2util/types.go 0.00% 4 Missing ⚠️
p2p/k1.go 0.00% 4 Missing ⚠️
p2p/bootnode.go 0.00% 3 Missing ⚠️
p2p/config.go 25.00% 3 Missing ⚠️
eth2util/keystore/keystore.go 0.00% 1 Missing ⚠️
eth2util/signing/signing.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4047   +/-   ##
=======================================
  Coverage   53.80%   53.81%           
=======================================
  Files         242      242           
  Lines       39425    39425           
=======================================
+ Hits        21214    21216    +2     
- Misses      15967    15968    +1     
+ Partials     2244     2241    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pinebit pinebit added the merge when ready Indicates bulldozer bot may merge when all checks pass label Oct 23, 2025
@sonarqubecloud
Copy link

@obol-bulldozer obol-bulldozer bot merged commit 7479217 into main Oct 23, 2025
11 checks passed
@obol-bulldozer obol-bulldozer bot deleted the pinebit/p2p-tbls-errors-revamp branch October 23, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge when ready Indicates bulldozer bot may merge when all checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants