Skip to content

feat(blocks/slots): builder-block filter + gloas-aware MEV/Builder columns#748

Merged
barnabasbusa merged 9 commits into
masterfrom
bbusa/builder-blocks-filter
Jun 24, 2026
Merged

feat(blocks/slots): builder-block filter + gloas-aware MEV/Builder columns#748
barnabasbusa merged 9 commits into
masterfrom
bbusa/builder-blocks-filter

Conversation

@barnabasbusa

Copy link
Copy Markdown
Collaborator

Summary

Adds a builder-block filter and makes the MEV vs Builder columns Gloas-aware, across both the EL (/blocks) and CL (/slots) views. Based off glamsterdam-devnet-6 (#746).

New filter

A 3-state Builder Blocks dropdown — All / Builder-built only / Self-built only — applied at the DB layer using slots.builder_index (>= 0 = builder-built, = -1 = self-built). New BlockFilter.WithBuilderBlock field where 0 = all (the struct default, so existing GetFilteredSlots callers are unaffected).

Behavior

  • EL filtered (/blocks/filtered): new builder filter + a Builder column. When Gloas is active the builder filter and Builder column are shown (replacing the MEV filter/column); pre-Gloas keeps the MEV filter/column.
  • CL filtered (/slots/filtered): adds the 3-state builder dropdown (shown when Gloas active) alongside the existing exact builder-index field.
  • Main /blocks and /slots: default columns show the Builder column instead of MEV Block once Gloas is active. Both stay user-selectable in the column picker.

Gloas detection uses chainState.IsEip7732Enabled(currentEpoch).

Files

  • dbtypes/other.go, db/slots.goWithBuilderBlock filter field + SQL clause
  • handlers/blocks_filtered.go, types/models/blocks_filtered.go, templates/blocks_filtered/blocks_filtered.html — EL filter + Builder column
  • handlers/slots_filtered.go, types/models/slots_filtered.go, templates/slots_filtered/slots_filtered.html — CL builder dropdown
  • handlers/blocks.go, handlers/slots.go — Gloas-aware default column swap

Test plan

  • go build ./... and go vet pass
  • On a Gloas network: verify builder filter narrows to builder-built/self-built correctly on both filtered views, and the main pages default to the Builder column
  • Pre-Gloas: verify MEV filter/column still shown and behaves as before

barnabasbusa and others added 5 commits June 19, 2026 13:45
…lumns

Add a 3-state 'Builder Blocks' filter (All / Builder-built only /
Self-built only) applied at the DB layer via slots.builder_index
(>= 0 = builder-built, = -1 = self-built). New BlockFilter field
WithBuilderBlock (0=all default, safe for existing callers).

- EL filtered view (/blocks/filtered): new builder filter + Builder
  column; shows the builder filter (and Builder column) when Gloas is
  active, the MEV filter/column otherwise.
- CL filtered view (/slots/filtered): adds the 3-state builder filter
  alongside the existing exact builder-index field, shown when Gloas
  active.
- Main /blocks and /slots pages: default columns show the Builder
  column instead of MEV Block once Gloas is active (both remain
  user-selectable).
The slots (CL) views already show the payload build source in the
proposer column (house/hard-hat icon), so default-enabling a separate
Builder column under gloas is redundant. Keep it opt-in (user-selectable)
on both /slots and /slots/filtered. The EL blocks views keep the
gloas-aware MEV->Builder column swap.
A self-built block has no builder, so formatBuilder now renders the
'Self-built' label with the house icon instead of the hard-hat,
matching the proposer build-source convention. Applies to the Builder
column (EL/CL) and the slot detail Builder field.
Base automatically changed from glamsterdam-devnet-6 to master June 24, 2026 10:14
barnabasbusa and others added 3 commits June 24, 2026 16:20
… buildoor names

Build-source filter correctness:
- Apply WithBuilderBlock to cached/unfinalized blocks in GetDbBlocksByFilter
  (was only applied at the DB layer, so near-genesis/unfinalized blocks
  leaked through the Self-built/Builder-built filter)
- Exclude scheduled/missing slots when a build-source filter is active
- DB self-built clause also excludes missing slots (status != 0), which
  default to builder_index = -1

Filtered-view parity with the main pages:
- /slots/filtered proposer column uses the build-source icon (house/hard-hat)
  instead of the plain validator icon; populate builder info under
  DisplayBuilder || DisplayProposer
- Combined Builder row (dropdown + index + NOT) on both /slots/filtered and
  /blocks/filtered; disable the index input when "Self-built only" is selected
- Builder index input is positive-only (the dropdown owns the self-built case)
- Full-width Slot/Tx/Blob ranges; drop redundant Sync Agg trailing "%"

Builder index NOT (invert) filter:
- New f.binvert -> FilterInvertBuilder / dbtypes.BlockFilter.InvertBuilder,
  applied in both the SQL clause and the cache filter

Buildoor service names:
- Use the host label (service name) as the builder name; fall back to URL
  derivation only when absent
- buildoorUrls entries support an optional "label|url" form
- deriveBuilderName strips ports and no longer mangles bare IPs into "127"
  (returns empty so the display falls back to the builder index)
- devnet run.sh passes the kurtosis_service_name as the buildoor label

Claude-Session: https://claude.ai/code/session_015gfrtAprD9R2kqyLGzUAFN
@barnabasbusa barnabasbusa enabled auto-merge June 24, 2026 22:01
@barnabasbusa barnabasbusa merged commit 05ecc71 into master Jun 24, 2026
5 checks passed
@barnabasbusa barnabasbusa deleted the bbusa/builder-blocks-filter branch June 24, 2026 22:03
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.

2 participants