Skip to content

Commit

Permalink
fix: adjust rebase for blake2s + sha512 events
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker authored and wwared committed Oct 8, 2024
1 parent 62f9557 commit 7c61584
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
24 changes: 24 additions & 0 deletions core/src/runtime/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,10 +657,13 @@ impl ExecutionRecord {
secp256k1_double_events: take(&mut self.secp256k1_double_events),
bn254_add_events: take(&mut self.bn254_add_events),
bn254_double_events: take(&mut self.bn254_double_events),
blake2s_round_events: take(&mut self.blake2s_round_events),
bls12381_g1_add_events: take(&mut self.bls12381_g1_add_events),
bls12381_g1_double_events: take(&mut self.bls12381_g1_double_events),
sha_extend_events: take(&mut self.sha_extend_events),
sha_compress_events: take(&mut self.sha_compress_events),
sha512_extend_events: take(&mut self.sha512_extend_events),
sha512_compress_events: take(&mut self.sha512_compress_events),
ed_add_events: take(&mut self.ed_add_events),
ed_decompress_events: take(&mut self.ed_decompress_events),
secp256k1_decompress_events: take(&mut self.secp256k1_decompress_events),
Expand Down Expand Up @@ -740,6 +743,13 @@ impl ExecutionRecord {
opts.deferred_shift_threshold,
last
);
split_events!(
self,
blake2s_round_events,
shards,
opts.deferred_shift_threshold,
last
);
split_events!(
self,
bls12381_g1_add_events,
Expand Down Expand Up @@ -768,6 +778,20 @@ impl ExecutionRecord {
opts.sha_compress_split_threshold,
last
);
split_events!(
self,
sha512_extend_events,
shards,
opts.deferred_shift_threshold,
last
);
split_events!(
self,
sha512_compress_events,
shards,
opts.deferred_shift_threshold,
last
);
split_events!(
self,
ed_add_events,
Expand Down
8 changes: 4 additions & 4 deletions core/src/stark/air.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ impl<F: PrimeField32> RiscvAir<F> {
chips.push(RiscvAir::Sha256Extend(sha_extend));
let sha_compress = ShaCompressChip;
chips.push(RiscvAir::Sha256Compress(sha_compress));
let sha512_extend = Sha512ExtendChip;
chips.push(RiscvAir::Sha512Extend(sha512_extend));
let sha512_compress = Sha512CompressChip;
chips.push(RiscvAir::Sha512Compress(sha512_compress));
let ed_add_assign = EdAddAssignChip::<EdwardsCurve<Ed25519Parameters>>::new();
chips.push(RiscvAir::Ed25519Add(ed_add_assign));
let ed_decompress = EdDecompressChip::<Ed25519Parameters>::default();
Expand Down Expand Up @@ -169,10 +173,6 @@ impl<F: PrimeField32> RiscvAir<F> {
chips.push(RiscvAir::Bls12381G1Decompress(bls12381_g1_decompress));
let blake_2s_round = Blake2sRoundChip::new();
chips.push(RiscvAir::Blake2sRound(blake_2s_round));
let sha512_extend = Sha512ExtendChip;
chips.push(RiscvAir::Sha512Extend(sha512_extend));
let sha512_compress = Sha512CompressChip;
chips.push(RiscvAir::Sha512Compress(sha512_compress));
let div_rem = DivRemChip;
chips.push(RiscvAir::DivRem(div_rem));

Expand Down

0 comments on commit 7c61584

Please sign in to comment.