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

Optimize getBlockByNumber queries #78

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

guilledk
Copy link
Collaborator

Only did this too see how fast batched requests could be so only tested that, but if this ever wants to really get merged need to test more thoroughly.

@guilledk
Copy link
Collaborator Author

Finished tests: https://github.com/telosnetwork/telos-evm-docker/blob/rpc_batch_testing/tests/test_rpc_batch.py

  1. Run mainnet node request first 1000 blocks using batch and compare against getting the same block num using web3.py which is python's standard ethereum framework.
  2. Run mainnet node, do batch request with eth_getBlockByNumber interleaved with eth_blockNumber calls then check correct order on response.
  3. Run local node configured with only 1000 docs per index on elastic and wait till block 1200, do batch request from block 800 to 1200 which should cross over the indeces then compare response for proper ordering and against web3.py for each block.

@guilledk guilledk changed the title [DRAFT DONT MERGE] Optimize getBlockByNumber queries Optimize getBlockByNumber queries Mar 18, 2024
tomtomcrypto
tomtomcrypto previously approved these changes Mar 18, 2024
@rozzaswap
Copy link

Issue found - @guilledk investigating

@guilledk
Copy link
Collaborator Author

guilledk commented Apr 9, 2024

Done, problem had to do with changing some helper apis to return elasticDoc straight up instead of elasticDoc._source['@raw'] for receipts. Its now passing my local tests, included a new one I added to catch this behaivour next time.

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.

3 participants