near / nearcore

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

When reconstructing a chunk, receipts and encrypted secret shares are not stored into the cache entry #2110

Open SkidanovAlex opened 4 years ago

SkidanovAlex commented 4 years ago

When a node that tracks a shard fully reconstructs a chunk, it sets all the parts in the cache entry:

 for (part_ord, part_entry) in entry.parts.iter() 

 { encoded_chunk.content.parts[*part_ord as usize] = Some(part_entry.part.clone()); } 

But it doesn't appear to be also setting the receipts. Thus, if the original creator of the chunk is offline, and for some shard no receipts were distributed, when network participants resort to fetching state from participants that follow the shard, such participants will not serve the receipts.

Similarly, once Randomness is finished, the same problem will exist for the encrypted secret shares.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.