Skip to content

Conversation

@deuszx
Copy link
Contributor

@deuszx deuszx commented Nov 5, 2025

Motivation

During app setup, client sends over 100 HandleChainInfo queries. This happens b/c per-validator, per-chain tasks are independent and may need this information concurrently (and independently) - often asking for the same data (or subset of it) from the same validator.

Proposal

Extend RequestsScheduler to allow for HandleChainInfo queries deduplication, similarly to other download requests.

This PR adds necessary logic for:

  • detecting equivalent queries
  • detecting subsuming queries (for two HandleChainInfo queries, if second requests subset of information of the first one, it can wait for the response rather than requesting it again).

A batter of unit tests was added to showcase that extraction logic works properly. Some property-based tests were added to verify that subsumption logic works.

Current testnet:
Screenshot 2025-11-05 at 14 23 08
This branch:
Screenshot 2025-11-05 at 14 24 01

Test Plan

CI.

Release Plan

  • Nothing to do / These changes follow the usual release cycle.
  • These changes should be backported to the latest testnet branch, then
    • be released in a new SDK,

Links

@deuszx deuszx marked this pull request as ready for review November 5, 2025 14:27
@deuszx deuszx marked this pull request as draft November 5, 2025 14:34
@deuszx deuszx force-pushed the deduplicate-handlechaininfo-query branch 2 times, most recently from d08e2cf to 2a9041e Compare November 7, 2025 14:25
@deuszx deuszx changed the base branch from testnet_conway to try-alternative-on-failure November 7, 2025 14:26
@deuszx deuszx force-pushed the try-alternative-on-failure branch 2 times, most recently from 36ca3cb to b08186b Compare November 7, 2025 15:36
@deuszx deuszx force-pushed the deduplicate-handlechaininfo-query branch from 2a9041e to b349efc Compare November 7, 2025 15:37
Base automatically changed from try-alternative-on-failure to testnet_conway November 7, 2025 18:52
@deuszx deuszx force-pushed the deduplicate-handlechaininfo-query branch from b349efc to 77ad88a Compare November 7, 2025 18:58
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