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

Utilize new CP v2 API endpoints OR multi-block get on v1 #260

Open
reinamora137 opened this issue May 16, 2024 · 1 comment
Open

Utilize new CP v2 API endpoints OR multi-block get on v1 #260

reinamora137 opened this issue May 16, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request indexer Indexer related issues

Comments

@reinamora137
Copy link
Collaborator

reinamora137 commented May 16, 2024

will be interesting to see if this changes performance and perhaps we can move to multi-block downloads in one api call. currently we are pulling each block individually because prior tests created mismatched data in the mult-block query for some reason. it was never determined where that was coming from.

Note: spoke with Adam at CP, and the prior versions of CP were not handling the pagination correctly in the API. this is why we were not getting the correct stamps in the multi block calls and coded in single block calling in a multithreaded way.. This can be optimized by utilizing the get_blocks in large groups which will speed up parsing time dramatically as well.

@reinamora137 reinamora137 self-assigned this May 16, 2024
@reinamora137 reinamora137 added enhancement New feature or request help wanted Extra attention is needed indexer Indexer related issues labels May 16, 2024
@reinamora137 reinamora137 changed the title Utilize new CP v2 API endpoints Utilize new CP v2 API endpoints & multi-block get May 30, 2024
@reinamora137
Copy link
Collaborator Author

it appears that get_blocks does not allow a list of blocks to fetch all at once so perhaps utilizing the v1 API and updating to pull multiple blocks since they have fixed the pagination issues is the most efficient method. It's unclear how the caching on the server is handled for v1 without more investigation however.

https://ouzielslama.docs.apiary.io/#/reference/blocks/get-issuances-by-block/get-issuances-by-block/200?mc=reference%2Fblocks%2Fget-issuances-by-block%2Fget-issuances-by-block%2F200

@reinamora137 reinamora137 removed the help wanted Extra attention is needed label Jun 27, 2024
@reinamora137 reinamora137 changed the title Utilize new CP v2 API endpoints & multi-block get Utilize new CP v2 API endpoints OR multi-block get on v1 Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request indexer Indexer related issues
Projects
None yet
Development

No branches or pull requests

1 participant