Skip to content

Commit

Permalink
ok fixed it for real
Browse files Browse the repository at this point in the history
  • Loading branch information
ec2 committed Oct 13, 2023
1 parent 47dbfe2 commit 4512053
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions lightclient-circuits/src/committee_update_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ impl<S: Spec, F: Field> CommitteeUpdateCircuit<S, F> {
[(); { S::SYNC_COMMITTEE_SIZE }]:,
{
let pubkeys_x = args.pubkeys_compressed.iter().cloned().map(|mut bytes| {
bytes.reverse();
bytes[47] &= 0b00011111;
bls12_381::Fq::from_bytes_le(&bytes)
});
Expand Down
14 changes: 12 additions & 2 deletions lightclient-circuits/tests/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,18 @@ mod solidity_tests {
[(); Spec::SYNC_COMMITTEE_SIZE]:,
{
fn from(args: CommitteeRotationArgs<Spec, Fr>) -> Self {
let poseidon_commitment_le =
poseidon_committee_commitment_from_compressed(&args.pubkeys_compressed).unwrap();
let poseidon_commitment_le = poseidon_committee_commitment_from_compressed(
&args
.pubkeys_compressed
.iter()
.cloned()
.map(|mut b| {
b.reverse();
b
})
.collect_vec(),
)
.unwrap();

let mut pk_vector: Vector<Vector<u8, 48>, { Spec::SYNC_COMMITTEE_SIZE }> = args
.pubkeys_compressed
Expand Down

0 comments on commit 4512053

Please sign in to comment.