Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow per-query predicates #145

Open
divagant-martian opened this issue Nov 16, 2022 · 0 comments
Open

allow per-query predicates #145

divagant-martian opened this issue Nov 16, 2022 · 0 comments

Comments

@divagant-martian
Copy link
Collaborator

Right now the predicate we have for queries receives an enr and the query finishes when a number of peers is found. I think an improvement would be to allow a per query predicate that can accumulate the found peers and decide if it found the peers it needs.

The difference is that, as we have this right now, the grouped predicate is if n peers satisfy a predicate. The new version would allow to identify if a group satisfies a predicate.

In lh this would be useful since we have grouped queries for subnets and it might be more beneficial to ensure that at least one peers belongs to each subnet in the query than checking if every peer belongs to at least one, where this would finish when potentially all peers belong to the same one. Changing this logic would mitigate queries where the "individual" predicates have a distribution such that some are harder to satisfy than others

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

No branches or pull requests

1 participant