You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when the ChunkStateWitness gets really large, a shard can stall.
If the witness get so big that distributing it takes more time than one block production time, then the chunk validators will never receive the witness in time to endorse it, and the chunk will never get included.
It would look like this:
Chunk producer sends out a witness for chunk at height 10, shard 0
Validators for this chunk start receiving the witness, but it takes a while
Block producer does not receive the chunk endorsements for this chunk in time, and it doesn't include the chunk
Validators finally receive the witness and send out the chunk endorsements, but it's too late
The same repeats at height 11, the witness contains the same transacitons, incoming receipts, etc, so it's still large.
Rinse and repeat
The shard doesn't make progress and can't recover
There are a number of witness size limits to prevent this from happening, but it would be nice to make the protocol resistant to issues like this. If the witness ever gets too large because of a bug/unforseen corner case/etc we don't want the shard to stall.
Recently there was a fix for a similar problem that could occur when processing a chunk takes too long: #11344
The purpose of this issue is to figure out how solve the problem when distributing the witness takes too long.
The text was updated successfully, but these errors were encountered:
One approach could be to split the ChunkStateWitness into two parts:
The part that proves the execution of previous chunk
The part that contains information specific to the new chunk - new_transactions etc
Currently the chunk producer has to distribute both 1) and 2) for every new chunk, but 1) is the same every time, so there's really no need to resend it every time.
The validators could cache 1) and receive only 2) from the chunk producer. 2) is small, so it can be distributed quickly and the chunk would be endorsed in time.
Currently when the
ChunkStateWitness
gets really large, a shard can stall.If the witness get so big that distributing it takes more time than one block production time, then the chunk validators will never receive the witness in time to endorse it, and the chunk will never get included.
It would look like this:
There are a number of witness size limits to prevent this from happening, but it would be nice to make the protocol resistant to issues like this. If the witness ever gets too large because of a bug/unforseen corner case/etc we don't want the shard to stall.
Recently there was a fix for a similar problem that could occur when processing a chunk takes too long: #11344
The purpose of this issue is to figure out how solve the problem when distributing the witness takes too long.
The text was updated successfully, but these errors were encountered: