Implement validator name filter for deposit queries#799
Merged
Conversation
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.
pk910
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 intoDepositFilter/DepositTxFilter, and the in-memory unfinalized path applies it, but neitherGetDepositsFilterednorGetDepositTxsFilteredever 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 sameLEFT JOIN … ILIKEshape as the other event queries.validators.pubkeyis 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.