near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.31k stars 619 forks source link

[locust] Add caching of block hash #11662

Closed aborg-dev closed 3 months ago

aborg-dev commented 3 months ago

There is no need to use the latest block hash when sending a transaction, so we can cache the result of previous query which will significantly decrease the number of issued RPC requests (up to 2x).

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.64%. Comparing base (2b6030c) to head (65715a8).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #11662 +/- ## ========================================== + Coverage 71.62% 71.64% +0.01% ========================================== Files 787 787 Lines 161191 161191 Branches 161191 161191 ========================================== + Hits 115461 115489 +28 + Misses 40697 40665 -32 - Partials 5033 5037 +4 ``` | [Flag](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | Coverage Δ | | |---|---|---| | [backward-compatibility](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (ø)` | | | [db-migration](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (ø)` | | | [genesis-check](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.36% <ø> (ø)` | | | [integration-tests](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `37.72% <ø> (-0.09%)` | :arrow_down: | | [linux](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `69.04% <ø> (+0.03%)` | :arrow_up: | | [linux-nightly](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.13% <ø> (+<0.01%)` | :arrow_up: | | [macos](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `52.62% <ø> (+1.24%)` | :arrow_up: | | [pytests](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.59% <ø> (ø)` | | | [sanity-checks](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.39% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `66.26% <ø> (+0.01%)` | :arrow_up: | | [upgradability](https://app.codecov.io/gh/near/nearcore/pull/11662/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.28% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.