Skip to content

fix(op-wheel): record block base fee on its own gauge - #21127

Merged
einar-oplabs merged 1 commit into
ethereum-optimism:developfrom
pjdurden:fix/op-wheel-basefee-metric
Jun 16, 2026
Merged

fix(op-wheel): record block base fee on its own gauge#21127
einar-oplabs merged 1 commit into
ethereum-optimism:developfrom
pjdurden:fix/op-wheel-basefee-metric

Conversation

@pjdurden

@pjdurden pjdurden commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

op-wheel's RecordBlockStats set BlockGas twice — once with gas used and once with the base fee — which left the BlockBaseFee gauge unset and clobbered the gas gauge value with the base fee. This records the base fee on BlockBaseFee instead.

The nearby pre-block status log also emitted status.Gas for its basefee field; it now emits status.BaseFee.

Changes

  • op-wheel/engine/metrics.goRecordBlockStats now sets BlockBaseFee (not BlockGas) with the base fee.
  • op-wheel/engine/engine.go — status log basefee field now logs status.BaseFee.
  • op-wheel/engine/metrics_test.go — adds TestRecordBlockStats asserting gas and base fee land on their own gauges (uses distinct values so the old bug fails the test).

Testing

go build ./engine/, go vet ./engine/, and go test ./engine/ all pass. go.mod/go.sum unchanged.

Closes #20958

@pjdurden
pjdurden requested a review from a team as a code owner June 1, 2026 03:01
Copilot AI review requested due to automatic review settings June 1, 2026 03:01
@einar-oplabs

Copy link
Copy Markdown
Contributor

@claude review once

@pjdurden

pjdurden commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@claude review once

Hey @einar-oplabs seems like the review bot didn't pick this up.

@einar-oplabs einar-oplabs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thank you. I was wondering if big.Int would be a better fit, but there is no established practice, and it is just for metrics, so I would say Float64 is fine here.

@einar-oplabs einar-oplabs self-assigned this Jun 15, 2026
@einar-oplabs
einar-oplabs enabled auto-merge June 15, 2026 20:10
@einar-oplabs

Copy link
Copy Markdown
Contributor

/ci authorize 3eb72e8

RecordBlockStats set BlockGas twice — once with gas used and once with
the base fee — which left the BlockBaseFee gauge unset and clobbered the
gas gauge. Record the base fee on BlockBaseFee instead.

Also fix the pre-block status log, which emitted status.Gas for the
"basefee" field instead of status.BaseFee.

Adds a regression test asserting gas and base fee land on their own
gauges.

Closes ethereum-optimism#20958
auto-merge was automatically disabled June 16, 2026 13:33

Head branch was pushed to by a user without write access

@pjdurden
pjdurden force-pushed the fix/op-wheel-basefee-metric branch from 3eb72e8 to b0f8df2 Compare June 16, 2026 13:33
@pjdurden

Copy link
Copy Markdown
Contributor Author

/ci authorize 3eb72e8

@einar-oplabs
Rebased onto latest develop to pick up #21400 (fixes the unrelated op-deployer Sepolia test failures). Could you re-authorize CI? The earlier failures were in op-deployer, untouched by this op-wheel change.

@einar-oplabs

Copy link
Copy Markdown
Contributor

/ci authorize b0f8df2

@pjdurden Let's get this merged today. Just for next time, could I ask you to please merge develop instead of rebasing on it - this way I can easier identify potential changes. Thank you for your work.

@einar-oplabs
einar-oplabs enabled auto-merge June 16, 2026 13:47
@einar-oplabs
einar-oplabs added this pull request to the merge queue Jun 16, 2026
Merged via the queue into ethereum-optimism:develop with commit bf91917 Jun 16, 2026
58 checks passed
@einar-oplabs einar-oplabs added the M-community Meta: community help wanted label Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

M-community Meta: community help wanted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

op-wheel reports block base fee observability incorrectly

2 participants