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

[CHORE] Update jellyfish #2397

Merged
merged 1 commit into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions crates/task-impls/src/vid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,10 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
}

HotShotEvent::BlockReady(vid_disperse, view_number) => {
let Ok(signature) =
TYPES::SignatureKey::sign(&self.private_key, &vid_disperse.payload_commitment)
else {
let Ok(signature) = TYPES::SignatureKey::sign(
&self.private_key,
vid_disperse.payload_commitment.as_ref().as_ref(),
Copy link
Contributor

Choose a reason for hiding this comment

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

as_ref().as_ref() yikes. wish that could be cleaner 😕

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah this could be fixed Jellyfish side. Just add AsRef<[u8]> or Into<Vec<u8>> or something like that

Copy link
Contributor

Choose a reason for hiding this comment

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

) else {
error!("VID: failed to sign dispersal payload");
return None;
};
Expand Down
4 changes: 1 addition & 3 deletions crates/testing/src/block_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,10 @@ impl BlockHeader for TestBlockHeader {

impl Committable for TestBlockHeader {
fn commit(&self) -> Commitment<Self> {
let payload_commitment_bytes: [u8; 32] = self.payload_commitment().into();

RawCommitmentBuilder::new("Header Comm")
.u64_field("block number", self.block_number())
.constant_str("payload commitment")
.fixed_size_bytes(&payload_commitment_bytes)
.fixed_size_bytes(self.payload_commitment().as_ref().as_ref())
.finalize()
}

Expand Down
3 changes: 1 addition & 2 deletions crates/types/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ pub fn serialize_signature2<TYPES: NodeType>(

impl<TYPES: NodeType> Committable for Leaf<TYPES> {
fn commit(&self) -> commit::Commitment<Self> {
let payload_commitment_bytes: [u8; 32] = self.get_payload_commitment().into();
let signatures_bytes = if self.justify_qc.is_genesis {
let mut bytes = vec![];
bytes.extend("genesis".as_bytes());
Expand All @@ -519,7 +518,7 @@ impl<TYPES: NodeType> Committable for Leaf<TYPES> {
.u64_field("block number", self.get_height())
.field("parent Leaf commitment", self.parent_commitment)
.constant_str("block payload commitment")
.fixed_size_bytes(&payload_commitment_bytes)
.fixed_size_bytes(self.get_payload_commitment().as_ref().as_ref())
.constant_str("justify_qc view number")
.u64(*self.justify_qc.view_number)
.field(
Expand Down