-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add gRPC query to get all contract specs and record specs for a scope spec #677
Comments
I just got some counts of specs on mainnet. Scope Specs: 22 Ave record specs per contract spec = 24983/7609 = 3.28334866605336 So the average result would have 1 scope spec + 3 contract specs + 1136 record specs = 1140 things in the result. That's a pretty big result. Furthermore, since there's only 22 scopes, I grabbed them all to get contract spec counts for each. Here's the distribution:
That scope spec with 2401 contract specs probably has 2401 * 3.28334866605336 = 7883.32014719412 records. That's 1 scope + 2401 contract specs + 7883 record specs = 10285 things in the result. That's more than likely a problem. Pagination doesn't make sense for this query since we're returning three different types of things. I guess only two might need pagination, but that's still complicated. Testnet has more of each spec type, but the averages and that max are pretty similar. I guess this is something to consider, and keep an eye on, but it's possible the query just doesn't work for some scope specs (or takes multiple tries). |
Also, rather than adding a new query for this, it's probably best to just enhance the |
Also consider enhancing the The only enhancement I would consider for the |
Summary
There a several gRPC queries used by Explorer to fetch spec data. However, there is not a one and done query to get all contract and record specs under a scope spec, as there is for sessions and records under a scope. This would add a query that gives all requested information under a scope spec.
Proposal
For Admin Use
The text was updated successfully, but these errors were encountered: