Skip to content

Commit e8f33fd

Browse files
authored
Update contracts submodule (#68)
* Update contracts submodule * cargo fmt
1 parent d428089 commit e8f33fd

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Verifier contracts for consensus proofs are auto-generated via the [`privacy-sca
2525
Spectre uses `abigen` macro to generate smart contract types and `rstest` for consensus spec tests. To ensure that all the necessary data for macros expansion is present during first build or testing, please run:
2626

2727
```
28+
git submodule update --init --recursive
2829
just build-contracts
2930
just download-spec-tests
3031
```

lightclient-circuits/src/gadget/crypto/sha256_wide.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl<'a, F: Field> HashInstructions<F> for Sha256ChipWide<'a, F> {
8282
for r in 0..num_input_rounds {
8383
let remaining_words = num_input_words - r * NUM_WORDS_TO_ABSORB;
8484

85-
for w in 0..std::cmp::min(remaining_words, NUM_WORDS_TO_ABSORB){
85+
for w in 0..std::cmp::min(remaining_words, NUM_WORDS_TO_ABSORB) {
8686
let i = (r * NUM_WORDS_TO_ABSORB + w) * 4;
8787
let checksum = gate.inner_product(
8888
builder.main(),
@@ -127,4 +127,3 @@ pub fn word_to_bytes_le<F: Field>(
127127
.chain(to_bytes_le::<_, 16>(&word.hi(), gate, ctx))
128128
.collect()
129129
}
130-

lightclient-circuits/tests/step.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ fn run_test_eth2_spec_mock<const K_ROTATION: u32, const K_SYNC: u32>(path: PathB
110110
end_timer!(timer);
111111

112112
// check that sync committee poseidon commits match in both circuits
113-
assert_eq!(sync_circuit.instances()[0][1], rotation_circuit.instances()[0][0]);
113+
assert_eq!(
114+
sync_circuit.instances()[0][1],
115+
rotation_circuit.instances()[0][0]
116+
);
114117
}
115118

116119
#[rstest]

test-utils/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ pub fn get_initial_sync_committee_poseidon<const EPOCHS_PER_SYNC_COMMITTEE_PERIO
4040
.iter()
4141
.map(|pk| pk.decompressed_bytes())
4242
.collect_vec();
43-
let committee_poseidon = poseidon_committee_commitment_from_uncompressed(&pubkeys_uncompressed, LIMB_BITS);
43+
let committee_poseidon =
44+
poseidon_committee_commitment_from_uncompressed(&pubkeys_uncompressed, LIMB_BITS);
4445
let committee_poseidon =
4546
ethers::prelude::U256::from_little_endian(&committee_poseidon.to_bytes());
4647
let sync_period = (bootstrap.header.beacon.slot as usize) / EPOCHS_PER_SYNC_COMMITTEE_PERIOD;

0 commit comments

Comments
 (0)