Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Transaction task use quorum exchange instead of committee exchange #1864

Merged
merged 11 commits into from
Oct 10, 2023

Conversation

ggutoski
Copy link
Contributor

@ggutoski ggutoski commented Oct 4, 2023

close #1693

Change the transactions task to use quorum_exchange instead of committee_exchange so that VID can retrieve the number of storage nodes.

The VID erasure code rate is still hard-coded. That's a separate issue #1734 .

Other things in this PR beyond #1693

  • Edit Committable impl for VIDBlockPayload to re-use the commitment bytes instead of computing another commitment of the commitment.
  • Add test_memory_network to justfile.
  • A few questions embedded in code comments. Search for TODO GG.

shenkeyao
shenkeyao previously approved these changes Oct 5, 2023
Copy link
Member

@shenkeyao shenkeyao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for adding those useful comments!

crates/task-impls/src/transactions.rs Outdated Show resolved Hide resolved
crates/types/src/block_impl.rs Show resolved Hide resolved
crates/types/src/data.rs Outdated Show resolved Hide resolved
Comment on lines 623 to 624
// TODO GG why create a VoteData::DA only to discard it immediately?
// Why not just have a `sign_commitment()` member?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we want to distinguish the vote type when signing, so a signature on a no vote can't be used to verify a yes vote.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But get_commit() just returns the underlying commitment regardless of the enum variant:

pub fn get_commit(&self) -> COMMITMENT {
#[allow(clippy::enum_glob_use)]
use VoteData::*;
match self {
DA(c) | Yes(c) | No(c) | Timeout(c) | ViewSyncPreCommit(c) | ViewSyncCommit(c)
| ViewSyncFinalize(c) => *c,
}
}
}

Hmm. Seems it was me who made that change in #1777: https://github.com/EspressoSystems/HotShot/pull/1777/files

Ok, I need to fix this. I'll push more commits to this PR. Thanks for explaining!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 1fdc06a

crates/types/src/traits/election.rs Outdated Show resolved Hide resolved
@ggutoski ggutoski merged commit 568b47b into develop Oct 10, 2023
5 checks passed
@ggutoski ggutoski deleted the gg/vid-quorum branch October 10, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proper source for VID number of storage nodes
2 participants