Skip to content
This repository has been archived by the owner on Dec 22, 2024. It is now read-only.

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.

@guilledk guilledk force-pushed the underground_updates_club branch from c2d4b7e to 50af881 Compare June 18, 2024 19:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants