Skip to content

Commit

Permalink
fix(circuit_framework): Fix ssz_hash_tree_root for Uint64Target
Browse files Browse the repository at this point in the history
  • Loading branch information
Xearty committed Jun 12, 2024
1 parent a64bfdb commit dbb7cb5
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,8 @@ impl<F: RichField + Extendable<D>, const D: usize> SSZHashTreeRoot<F, D> for Uin
fn ssz_hash_tree_root(self, builder: &mut CircuitBuilder<F, D>) -> [BoolTarget; 256] {
let _false = builder._false();

self.limbs
self.to_be_bits(builder)
.into_iter()
.map(|limb| {
builder
.split_le_base::<2>(limb.0, 32)
.into_iter()
.map(|target| BoolTarget::new_unsafe(target))
.rev()
})
.flatten()
.pad_using(256, |_| _false)
.collect_vec()
.try_into()
Expand Down

0 comments on commit dbb7cb5

Please sign in to comment.