openvm_stark_sdk/config/
baby_bear_blake3.rs

1use p3_blake3::Blake3;
2
3use super::baby_bear_bytehash::{
4    self, config_from_byte_hash, BabyBearByteHashConfig, BabyBearByteHashEngine,
5};
6use crate::{
7    assert_sc_compatible_with_serde,
8    config::{
9        baby_bear_bytehash::BabyBearByteHashEngineWithDefaultHash, fri_params::SecurityParameters,
10    },
11};
12
13pub type BabyBearBlake3Config = BabyBearByteHashConfig<Blake3>;
14pub type BabyBearBlake3Engine = BabyBearByteHashEngine<Blake3>;
15
16assert_sc_compatible_with_serde!(BabyBearBlake3Config);
17
18/// `pcs_log_degree` is the upper bound on the log_2(PCS polynomial degree).
19pub fn default_engine() -> BabyBearBlake3Engine {
20    baby_bear_bytehash::default_engine(Blake3)
21}
22
23/// `pcs_log_degree` is the upper bound on the log_2(PCS polynomial degree).
24pub fn default_config() -> BabyBearBlake3Config {
25    config_from_byte_hash(Blake3, SecurityParameters::standard_fast())
26}
27
28impl BabyBearByteHashEngineWithDefaultHash<Blake3> for BabyBearBlake3Engine {
29    fn default_hash() -> Blake3 {
30        Blake3
31    }
32}