Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Conversation

@ceyonur
Copy link
Collaborator

@ceyonur ceyonur commented May 4, 2025

Why this should be merged

Importing customtypes and params pkg causes side-effects of libevm. We should reduce importing of those pkgs in custom-facing client code.

AvalancheGo Follow-up PR: ava-labs/avalanchego#3918

How this works

This pull request refactors logging functionality by consolidating and renaming the logging package, alongside minor code improvements and cleanup. The most significant changes include replacing the log and customtypes packages with a unified customlog package, updating imports and references accordingly, and simplifying variable declarations for consistency.

Logging Refactor:

  • Renamed the log package to customlog across multiple files, including format.go, handler.go, and logger.go, and updated their package declarations and references.
  • Replaced references to customtypes.FlattenLogs with customlog.FlattenLogs in core/blockchain.go, eth/filters/filter.go, and other files.

Code Cleanup and Simplification:

  • Removed unused fields (Version and BlockExtraData) and associated logic from ethclient/ethclient.go to streamline block handling, to prevent importing customtypes and libevm side-effects.

How this was tested

Added to imports_test

Need to be documented?

No

Need to update RELEASES.md?

Probably

@ceyonur ceyonur marked this pull request as ready for review May 5, 2025 10:30
@ceyonur ceyonur requested a review from a team as a code owner May 5, 2025 10:30
@ceyonur ceyonur changed the title Ceyonur/reduce customtype import reduce customtypes import May 5, 2025
@ceyonur ceyonur requested a review from a team May 5, 2025 18:15
Copy link
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

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

could you fix the

no required module provides package github.com/ava-labs/coreth/plugin/evm/customlogs; to add it:

lint message ?

maybe you forgot to add customlogs to this PR ?

@ceyonur
Copy link
Collaborator Author

ceyonur commented May 7, 2025

could you fix the

no required module provides package github.com/ava-labs/coreth/plugin/evm/customlogs; to add it:

lint message ?

maybe you forgot to add customlogs to this PR ?

it was gitignored

ceyonur and others added 2 commits May 8, 2025 16:13
Co-authored-by: Quentin McGaw <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
@ceyonur ceyonur enabled auto-merge May 8, 2025 14:13
@ceyonur ceyonur added this pull request to the merge queue May 8, 2025
Merged via the queue into master with commit f73fd02 May 8, 2025
8 checks passed
@ceyonur ceyonur deleted the ceyonur/reduce-customtype-import branch May 8, 2025 14:33
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a nit change on line 380 of filterLogs you missed

var check = 
to
check :=

ceyonur added a commit that referenced this pull request Nov 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants