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

feat: rewrite error logs from blob submission eth_call due to insuffi… #157

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jonesho
Copy link
Contributor

@jonesho jonesho commented Oct 7, 2024

…cient gas prices

This PR implements issue(s) #

Checklist

  • I wrote new tests for my new core changes.
  • I have successfully ran tests, style checker and build against my new changes locally.
  • I have informed the team of any breaking changes if there are any.

@jonesho jonesho self-assigned this Oct 7, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 67.85%. Comparing base (3f9b0d9) to head (c1cf83c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...nsensys/zkevm/ethereum/submission/LoggingHelper.kt 66.66% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main     #157   +/-   ##
=========================================
  Coverage     67.84%   67.85%           
  Complexity     1040     1040           
=========================================
  Files           248      248           
  Lines         10391    10396    +5     
  Branches        867      870    +3     
=========================================
+ Hits           7050     7054    +4     
  Misses         2874     2874           
- Partials        467      468    +1     
Flag Coverage Δ
kotlin 67.85% <66.66%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
...nsensys/zkevm/ethereum/submission/LoggingHelper.kt 50.00% <66.66%> (+10.00%) ⬆️

isEthCall = true
)
val expectedErrorMessage =
"max fee per gas less than block base fee:" +
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should keep the original terminology maxFeePerGas. Likewise in the other places as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we'd like to keep the original terminology maxFeePerGas, I'd also do the same for maxFeePerBlobGas

@@ -28,6 +28,7 @@
<KnownError logLevel="DEBUG" message="^.*?\bConnection reset\b.*?$" stackTrace="true" />
<KnownError logLevel="INFO" message="^.*?\beth_call\b.*?\bContract Call has been reverted by the EVM with the reason\b.*?$"/>
<KnownError logLevel="INFO" message="^.*?\brequest beyond head block\b.*?$"/>
<KnownError logLevel="INFO" message="^.*?\beth_call for blob submission failed\b.*?\bmax fee per (blob )?gas less than block (blob gas|base) fee\b.*?$"/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This log level shall be addressed in the code IMO. Not, by configuration.

The configuration shall be used as a "quick fix/workaround" in prod until the log is is fixed in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to let the log rewriter to set the log level to INFO instead of ERROR for the reformatted error message given that the one in line 29 won't be working for insufficent gas fee error after the error message get reformatted.

My initial thought is to align the use of log rewriter to re-set the log level, but I also think, for simplicity, we could just call log.info() in LoggingHelper if eth_call blob submission insufficent gas fee error is detected. If no objection, I'd change that to be handled in LoggingHelper

@jonesho jonesho requested a review from jpnovais October 9, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants