HotShot icon indicating copy to clipboard operation
HotShot copied to clipboard

Lr/optimistic vid

Open lukaszrzasik opened this issue 9 months ago • 0 comments

Closes #3028

This PR:

  • DaTaskState now optimistically calculates VID shares and updates Consensus state when handling DaProposalValidated event and the primary network is down.
  • moves calculate_vid_disperse from crates/task-impls/src/helpers.rs crate to crates/types/src/data.rs crate.
  • adds calculate_and_update_vid method to Consensus to keep the code DRY (now used in DaTaskState and NetworkResponseState)

This PR does not:

Does not dramatically lower the pessimistic scenario (VID is calculated only when the request arrives) hit rate. This is because we reset the primary network state to up on every view update. This change needs to be implemented to visibly improve the situation.

Key places to review:

crates/task-impls/src/da.rs crates/task-impls/src/response.rs crates/types/src/consensus.rs

How to test this PR:

All the tests should pass.

lukaszrzasik avatar May 24 '24 10:05 lukaszrzasik