Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Add VidDisperseShare data type #28

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Add VidDisperseShare data type #28

wants to merge 13 commits into from

Conversation

lukaszrzasik
Copy link
Contributor

@lukaszrzasik lukaszrzasik commented Mar 17, 2024

Related to issue #1696 in HotShot

This PR:

Adds a new struct VidDisperseShare.
VidDisperseShare consists of only one VID share and keeps information about its dedicated recipient.
VidDisperseShare is sent as a direct message to its recipient only.
Consensus's field vid_shares is now a BTreeMapp of views -> (HashMap of recipient key -> Proposal of VidDisperseShare). This way a VID share can be found by view number and VID share's recipient key.

This PR does not:

Key places to review:

Changes in src/consensus.rs
Changes in src/data.rs

How to test this PR:

All the HotShot tests should pass.

@lukaszrzasik lukaszrzasik requested a review from bfish713 March 18, 2024 13:56
@lukaszrzasik
Copy link
Contributor Author

lukaszrzasik commented Mar 18, 2024

I had to drop the previous PR because I've merged main into it too fast. HotShot is not yet ready for hotshot-types main branch.

I'm also not sure what is the preferred way to handle those lint errors. One is related to my change (complex type) but the other two are unrelated. I can put those enum variants in the Box if that's what we want to do.

@lukaszrzasik lukaszrzasik marked this pull request as ready for review March 18, 2024 16:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants