Repository navigation
feat: show self-built bid value from payload priority fees - #909
barnabasbusa wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
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
SummaryThe 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
Reviewed @ |
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).