Skip to content

Commit

Permalink
fix(plonky2x): register EcOp and SHA512 hints (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani authored Nov 8, 2023
1 parent fcf983d commit aab74a1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions plonky2x/core/src/backend/circuit/serialization/hints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use curta::chip::hash::blake::blake2b::generator::{
BLAKE2BAirParameters, BLAKE2BGenerator, BLAKE2BHintGenerator,
};
use curta::machine::hash::sha::sha256::SHA256;
use curta::machine::hash::sha::sha512::SHA512;
use curta::plonky2::cubic::arithmetic_gate::ArithmeticCubicGenerator;
use curta::plonky2::cubic::mul_gate::MulCubicGenerator;
use plonky2::field::extension::Extendable;
Expand Down Expand Up @@ -38,6 +39,8 @@ use plonky2::util::serialization::{Buffer, IoResult, Read, WitnessGeneratorSeria
use super::registry::{SerializationRegistry, Serializer};
use super::PlonkParameters;
use crate::frontend::builder::watch::WatchGenerator;
use crate::frontend::ecc::curve25519::curta::proof_hint::EcOpProofHint;
use crate::frontend::ecc::curve25519::curta::result_hint::EcOpResultHint;
use crate::frontend::eth::beacon::generators::{
BeaconAllWithdrawalsHint, BeaconBalanceBatchWitnessHint, BeaconBalanceGenerator,
BeaconBalanceWitnessHint, BeaconBalancesGenerator, BeaconBlockRootsHint,
Expand Down Expand Up @@ -400,6 +403,18 @@ where
r.register_hint::<SHAProofHint<SHA256, 64>>();
r.register_async_hint::<Async<SHAProofHint<SHA256, 64>>>();

r.register_hint::<SHADigestHint<SHA512, 80>>();
r.register_async_hint::<Async<SHADigestHint<SHA512, 80>>>();

r.register_hint::<SHAProofHint<SHA512, 80>>();
r.register_async_hint::<Async<SHAProofHint<SHA512, 80>>>();

r.register_hint::<EcOpProofHint>();
r.register_async_hint::<Async<EcOpProofHint>>();

r.register_hint::<EcOpResultHint>();
r.register_async_hint::<Async<EcOpResultHint>>();

register_powers_of_two!(r, BeaconHeadersFromOffsetRangeHint);

register_watch_generator!(
Expand Down

0 comments on commit aab74a1

Please sign in to comment.