near / nearcore

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

feat: Update neard replay-archive command to mark Incoming/Outgoing receipts non-archival #11974

Closed tayfunelmas closed 2 months ago

tayfunelmas commented 2 months ago

We have been using neard replay-archive command to show that we can replay the chain with the minimal set of columns.

In this PR, we iterate through the implementation of the command by removing IncomingReceipts and OutgoingReceipts from the archival columns, since we can replay the chain without depending on them. Note that the code still derives and saves them in the store while replaying the chain since we use them for the next blocks.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 56.37255% with 89 lines in your changes missing coverage. Please review.

Project coverage is 71.56%. Comparing base (566e926) to head (43f271f). Report is 12 commits behind head on master.

Files Patch % Lines
tools/replay-archive/src/cli.rs 0.00% 85 Missing :warning:
runtime/runtime/src/actions.rs 96.22% 0 Missing and 2 partials :warning:
runtime/runtime/src/state_viewer/mod.rs 89.47% 0 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #11974 +/- ## ========================================== - Coverage 71.62% 71.56% -0.06% ========================================== Files 810 808 -2 Lines 163751 163650 -101 Branches 163751 163650 -101 ========================================== - Hits 117288 117120 -168 - Misses 41387 41451 +64 - Partials 5076 5079 +3 ``` | [Flag](https://app.codecov.io/gh/near/nearcore/pull/11974/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/11974/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <0.00%> (+<0.01%)` | :arrow_up: | | [db-migration](https://app.codecov.io/gh/near/nearcore/pull/11974/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <0.00%> (+<0.01%)` | :arrow_up: | | [genesis-check](https://app.codecov.io/gh/near/nearcore/pull/11974/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.33% <0.00%> (+<0.01%)` | :arrow_up: | | [integration-tests](https://app.codecov.io/gh/near/nearcore/pull/11974/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `38.44% <53.43%> (-0.10%)` | :arrow_down: | | [linux](https://app.codecov.io/gh/near/nearcore/pull/11974/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.34% <56.37%> (-0.05%)` | :arrow_down: | | [linux-nightly](https://app.codecov.io/gh/near/nearcore/pull/11974/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.17% <56.37%> (-0.05%)` | :arrow_down: | | [macos](https://app.codecov.io/gh/near/nearcore/pull/11974/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `54.37% <12.56%> (+0.03%)` | :arrow_up: | | [pytests](https://app.codecov.io/gh/near/nearcore/pull/11974/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.60% <0.00%> (+<0.01%)` | :arrow_up: | | [sanity-checks](https://app.codecov.io/gh/near/nearcore/pull/11974/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.40% <0.00%> (+<0.01%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/near/nearcore/pull/11974/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `65.65% <47.05%> (-0.05%)` | :arrow_down: | | [upgradability](https://app.codecov.io/gh/near/nearcore/pull/11974/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.28% <0.00%> (+<0.01%)` | :arrow_up: | 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.