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

Fix check-migrations / try-runtime job (when downloading too much data/keys) #531

Open
bkontur opened this issue Jan 8, 2025 · 3 comments

Comments

@bkontur
Copy link
Contributor

bkontur commented Jan 8, 2025

Actually, the check-migrations job for AssetHubPolkadot occasionally fails, and this is happening more frequently due to Transport: 429, which likely corresponds to HTTP 429 Too Many Requests.
Example: GitHub Actions Run

With the upcoming Plaza and the increasing shift of functionality to AssetHubPolkadot, optimizing this job is crucial.

Suggested solutions:

  1. Implement rate limiting on the client side (e.g., based on the amount of data or time).
  2. Make parallel requests to different nodes, for example:
    • Download keys at a specific block from one node.
    • Download data for those keys at the same block from several nodes.
  3. Use some small snapshot of the last block (state/db) (refreshed/collected periodically and stored some where, so we just quickly download it here) - (something similar is needed here: Run storage benchmarks before release #491)
  4. Investigate and fix issues with the try-runtime CLI, which currently uses HttpClient try-runtime: dynamic storage query sizes paritytech/substrate#13923.
  5. Explore alternative ways to download the actual state/database at a specific block.
  6. Other optimizations as needed?

This optimization is particularly important because the only current workaround involves making a new commit, which triggers the full CI jobs. This approach wastes CI time unnecessarily, as it's not possible to restart just one particular job (issue.

@bkchr
Copy link
Contributor

bkchr commented Jan 8, 2025

Ha. I also looked into this today. The most easiest thing to improve this is to cache the snapshot once per day and make the snapshot downloading retry on error.

@ggwpez
Copy link
Member

ggwpez commented Jan 8, 2025

We actually have snapshot caching in the SDK, could re-use that pipeline.

For the Proxy: I think subway can be used to distribute requests among nodes.

@bkchr
Copy link
Contributor

bkchr commented Jan 8, 2025

We actually have snapshot caching in the SDK, could re-use that pipeline.

yeah I looked into it, with some optimizations we can take it.

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

3 participants