Skip to content

feat: show self-built bid value from payload priority fees - #909

Open
barnabasbusa wants to merge 2 commits into
masterfrom
bbusa/self-built-bid-value
Open

barnabasbusa wants to merge 2 commits into
masterfrom
bbusa/self-built-bid-value

Conversation

@barnabasbusa

@barnabasbusa barnabasbusa commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Under Gloas a self-built bid must carry a value of 0, so the Bids tab always showed 0.0000 ETH for the self-built row even though the proposer earns the payload's priority fees through the fee recipient. That made it look like the proposer chose a worthless local payload over higher builder bids (e.g. sepolia slot 11368380, where Teku's local payload was worth 0.046294 ETH). The self-built row now shows the sum of (effective gas price - base fee) × gas used over the payload's transactions, taken from the execution indexer's per-tx data, and sorts by it; when the execution indexer is disabled or the block's transactions aren't indexed yet, the Value and Total cells are left blank. Self-built bids are never gossiped and the block's own bid was only written to the DB at finalization, so unfinalized slots showed no self-built row (and no winner) at all; the block's bid is now taken from the cached block too. Verified against sepolia: the shown values match eth_getBlockReceipts priority fees exactly (e.g. slots 11368556/62/65: 0.0648/0.0681/0.0801 ETH).

sepolia slot 11368608 bids

@redpandabot redpandabot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR replaces the always-0 self-built bid value with the payload's summed priority fees, computed from the execution indexer's per-tx data, with blank cells when the data is unavailable. Traced the call order (transactions are enriched before bids are built), the Gwei/wei unit conversions (all consistent), the unknown-value fallbacks (they preserve the previous sorting input), and the template branch (non-self-built rows render unchanged). No problems found.


Reviewed 3 changed file(s) @ bda0b99d — no blocking issues found.
"Real artists ship." — Steve Jobs

@redpandabot

redpandabot Bot commented Oct 16, 2026

Copy link
Copy Markdown

Summary

The PR computes the self-built bid value from the payload's priority fees and surfaces the block's own bid for unfinalized slots. The fee math, gwei units, unknown-value blanking, bid-key dedupe, and cache/DB/block-body precedence all check out, and winners now resolve pre-finalization. One remaining inconsistency: the /v1/slot/{slot}/bids API still reports the raw (Gloas-zero) bid value for self-built bids instead of the computed priority fees the page now shows.

Issues

  • 🟡 handlers/api/slot_bids_v1.go — bids API not updated to match the new self-built value — APISlotBidsV1 serializes bid.Value directly, so self-built bids still report value 0 and total_value = el_payment, while the slot page now shows the computed payload priority fees (and can blank unknown values). The page and the API disagree for the same slot; consider applying getSlotPagePayloadPriorityFees or exposing value_unknown there too.

Reviewed @ f2d3183d
"Real artists ship." — Steve Jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant