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

[chunks] Fix bug that produced partial chunks were not inserted into cache #7795

Merged
merged 2 commits into from
Oct 12, 2022

Conversation

robin-near
Copy link
Contributor

This was lost in the refactoring in #7695 .

It broke pytest/tests/sanity/block_sync_archival.py because the test asserted that the chunk producer should have all the chunks in the cache. This fixes the test now; I verified that the test failed right after #7695 (73de01b) and passes when this PR is applied right on top.

Unfortunately the test is currently broken at HEAD for a different reason.

@robin-near robin-near requested a review from mzhangmzz October 10, 2022 16:16
@robin-near robin-near requested a review from a team as a code owner October 10, 2022 16:16
@robin-near
Copy link
Contributor Author

Issue: #7662

encoded_chunk,
&merkle_paths,
receipts,
)?;
Ok(())
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add another CI test (or add an assertion in some existing tests) that covers this failure? It's a bit suboptimal that this is discovered in a nayduck test that is not super relevant to the chunks logic.

@robin-near
Copy link
Contributor Author

Added some new tests.

@robin-near robin-near merged commit 4d36f2f into near:master Oct 12, 2022
nikurt pushed a commit that referenced this pull request Nov 9, 2022
…cache (#7795)

* [chunks] Fix bug that partial chunks were not inserted into cache if we produced the chunk

* Add new tests for chunk cache behavior
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.

2 participants