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

[Test] Reduce number of infura calls #1594

Closed
timothywangdev opened this issue May 8, 2020 · 6 comments
Closed

[Test] Reduce number of infura calls #1594

timothywangdev opened this issue May 8, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@timothywangdev
Copy link
Contributor

Screenshot from 2020-05-08 14-15-50.png

@timothywangdev timothywangdev added the enhancement New feature or request label May 8, 2020
@timothywangdev timothywangdev added this to the Sprint 112 milestone May 8, 2020
@timothywangdev timothywangdev self-assigned this May 8, 2020
@timothywangdev
Copy link
Contributor Author

timothywangdev commented May 8, 2020

Stats on receipt tests for 10878 infura calls

Infura calls:  10878 {
      'eth_blockNumber_[]': 78,
      'eth_getBalance_["0x259ec51efaa03c33787752e5a99becbf7f8526c4","latest"]': 720,
      'eth_getBalance_["0xd3ced3b16c8977ed0e345d162d982b899e978588","latest"]': 3600,
      'eth_getBalance_["0x55985f5c5cc9cc1a4263feb11ab5a1d6cbef3bba","latest"]': 144,
      'eth_call_[{"data":"0x70a08231000000000000000000000000d3ced3b16c8977ed0e345d162d982b899e978588","to":"0x4aacb7f0ba0a5cff9a8a5e8c0f24626ee9fda4a6"},"latest"]': 2640,
      'eth_call_[{"data":"0x70a08231000000000000000000000000259ec51efaa03c33787752e5a99becbf7f8526c4","to":"0x4aacb7f0ba0a5cff9a8a5e8c0f24626ee9fda4a6"},"latest"]': 528,
      'eth_call_[{"data":"0xdd62ed3e000000000000000000000000d3ced3b16c8977ed0e345d162d982b899e978588000000000000000000000000dccf3b5910e936b7bfda447f10530713c2420c5d","to":"0x4aacb7f0ba0a5cff9a8a5e8c0f24626ee9fda4a6"},"latest"]': 2640,
      'eth_call_[{"data":"0xdd62ed3e000000000000000000000000259ec51efaa03c33787752e5a99becbf7f8526c4000000000000000000000000dccf3b5910e936b7bfda447f10530713c2420c5d","to":"0x4aacb7f0ba0a5cff9a8a5e8c0f24626ee9fda4a6"},"latest"]': 528
    }
  • 0x259EC51eFaA03c33787752E5a99BeCBF7F8526c4: ETH based coins account

  • 0xd3ced3b16c8977ed0e345d162d982b899e978588: Metamask account

  • 0x55985f5c5cc9cc1a4263feb11ab5a1d6cbef3bba: Coinbase account

  • 0x4aacb7f0ba0a5cff9a8a5e8c0f24626ee9fda4a6: escrow contract

  • 0x70a08231000000000000000000000000d3ced3b16c8977ed0e345d162d982b899e978588: balanceOf(d3ced3b16c8977ed0e345d162d982b899e978588)

  • 0x70a08231000000000000000000000000259ec51efaa03c33787752e5a99becbf7f8526c4: balanceOf(259ec51efaa03c33787752e5a99becbf7f8526c4)

  • 0xdd62ed3e000000000000000000000000d3ced3b16c8977ed0e345d162d982b899e978588000000000000000000000000dccf3b5910e936b7bfda447f10530713c2420c5d: allowance(d3ced3b16c8977ed0e345d162d982b899e978588)

  • 0xdd62ed3e000000000000000000000000259ec51efaa03c33787752e5a99becbf7f8526c4000000000000000000000000dccf3b5910e936b7bfda447f10530713c2420c5d: allowance(259ec51efaa03c33787752e5a99becbf7f8526c4)

@timothywangdev
Copy link
Contributor Author

timothywangdev commented May 8, 2020

After introducing json rpc interception:

Screenshot from 2020-05-08 19-00-45.png

@timothywangdev
Copy link
Contributor Author

Optimize request interception with in-memory cache:

Screenshot from 2020-05-09 01-29-33.png

@timothywangdev
Copy link
Contributor Author

puppeteer interception does not work with service worker requests

puppeteer/puppeteer#4208
https://jarrodoverson.com/post/using-chrome-devtools-protocol-with-puppeteer-737a1300bac0/

@timothywangdev
Copy link
Contributor Author

More aggressive caching

Screenshot from 2020-05-11 22-26-47.png

@timothywangdev
Copy link
Contributor Author

Screenshot from 2020-05-12 22-52-10.png

local test passed, somehow github action kept failling. Switching to travis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant