-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(resharding) - fix the buffered receipts forwarding (#12561)
The new logic introduced recently in #12538 relies on some assumptions that do not hold in the ShardLayoutV1. It's important to keep this shard layout working as this is what we currently have in mainnet. The issue was that in the V1 there may be shared shard ids between the parent shard ids that were split and the current shard ids. In this case the same buffer would be processed twice and crash the node. The fix is to make it depend on the protocol version. For old protocol versions we skip forwarding receipts from parents - there should be any before the new resharding. Starting from the new resharding it is ok to assume unique shard ids so the new logic works. For reason that I can't remember the `test_resharding_v3_load_mem_trie` test broke and I needed to make some adjustments to it. Maybe it's because the new base shard layout is non-trivial now.
- Loading branch information
Showing
5 changed files
with
131 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters