Skip to content

Commit

Permalink
Update jellyfish
Browse files Browse the repository at this point in the history
  • Loading branch information
jbearer committed Jan 12, 2024
1 parent 9604886 commit 821d8a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
7 changes: 4 additions & 3 deletions 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(),
) else {
error!("VID: failed to sign dispersal payload");
return None;
};
Expand Down
4 changes: 1 addition & 3 deletions 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 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

0 comments on commit 821d8a4

Please sign in to comment.