[resharding] Check proof size limit while reading delayed receipts #12721
+18
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR builds on top of #12710 and is related to issue #12701
After resharding, we copy the set of delayed receipts from parent to both children. While handling delayed receipts in the new shard, we iterated over all the delayed receipts and ignored/removed the ones that did not belong to our shard.
Due to the implementation however, we bypassed checks to the state witness size limit in the specific case of when the receipt did not belong to our shard.
Now that we are doing the checks for the state witness size within the trie recorder, it's much simper to go back and check the proof size limit after reaching EVERY delayed receipt.