Skip to content

Implement validator name filter for deposit queries#799

Merged
qu0b merged 1 commit into
masterfrom
qu0b/fix-deposit-name-filter
Jul 16, 2026
Merged

Implement validator name filter for deposit queries#799
qu0b merged 1 commit into
masterfrom
qu0b/fix-deposit-name-filter

Conversation

@qu0b

@qu0b qu0b commented Jul 16, 2026

Copy link
Copy Markdown
Member

What

The validator name filter (f.vname) on included_deposits and initiated_deposits has no effect (spotted by @pk910 while reviewing #796): the handlers pass it into DepositFilter/DepositTxFilter, and the in-memory unfinalized path applies it, but neither GetDepositsFiltered nor GetDepositTxsFiltered ever consumed the field — finalized rows were never filtered.

How

Deposits are keyed by pubkey rather than validator index, so the name resolves through the validators table (publickey → validators.pubkey → validator_names."index"), using the same LEFT JOIN … ILIKE shape as the other event queries. validators.pubkey is indexed. Deposits for pubkeys that never became a validator have no name and never match a name filter — consistent with the pages showing no name for them.

Joins are only added when the filter is set, so unfiltered queries are unchanged.

Testing

sqlite integration test covering both queries: exact match, substring match, no match, unfiltered, and the unknown-pubkey case.

Note: independent of #796 — this fixes the current-name filter mechanism. Time-aware name stamping for the deposits family remains a #796 follow-up.

The included_deposits and initiated_deposits pages accept a validator
name filter (f.vname) and pass it into DepositFilter/DepositTxFilter,
but neither GetDepositsFiltered nor GetDepositTxsFiltered ever consumed
it - the filter silently did nothing for finalized rows (only the
in-memory unfinalized path applied it).

Deposits are keyed by pubkey, so the name resolves through the
validators table: publickey -> validators.pubkey -> validator_names.
Deposits for pubkeys without a validator have no name and never match.
@qu0b
qu0b merged commit 24739f8 into master Jul 16, 2026
2 checks passed
@qu0b
qu0b deleted the qu0b/fix-deposit-name-filter branch July 16, 2026 15:01
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