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

Improve block building and verification logging #3605

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

Makes debugging issues easier.

How this works

Adds logs and formats errors.

How this was tested

N/A

Need to be documented in RELEASES.md?

No.

@StephenButtolph StephenButtolph self-assigned this Dec 17, 2024
@StephenButtolph StephenButtolph added the monitoring This primarily focuses on logs, metrics, and/or tracing label Dec 17, 2024
@@ -44,7 +45,7 @@ func (s State) AdvanceTime(
func (s State) ConsumeGas(gas Gas) (State, error) {
newCapacity, err := safemath.Sub(uint64(s.Capacity), uint64(gas))
if err != nil {
return State{}, ErrInsufficientCapacity
return State{}, fmt.Errorf("%w: capacity (%d) < gas (%d)", ErrInsufficientCapacity, s.Capacity, gas)
Copy link
Collaborator

Choose a reason for hiding this comment

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

❤️

Comment on lines +358 to +360
builder.txExecutorBackend.Ctx.Log.Warn("failed to pack block transactions",
zap.Error(err),
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note: engine will log at debug, but not warn level since block build failures can happen regularly if the VM cleared its mempool and decides not to produce an empty block.

@StephenButtolph StephenButtolph added this to the v1.12.1 milestone Dec 17, 2024
@StephenButtolph StephenButtolph added this pull request to the merge queue Dec 17, 2024
Merged via the queue into master with commit 1497cba Dec 17, 2024
23 checks passed
@StephenButtolph StephenButtolph deleted the improve-block-building-logging branch December 17, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
monitoring This primarily focuses on logs, metrics, and/or tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants