Skip to content

Commit

Permalink
fix r1 not enabled in euclid
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsing committed Jan 16, 2025
1 parent 9df25c5 commit d2d32a2
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions crates/precompile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ impl Precompiles {
PrecompileSpecId::PRE_BERNOULLI => Self::pre_bernoulli(),
#[cfg(feature = "scroll")]
PrecompileSpecId::BERNOULLI => Self::bernoulli(),
#[cfg(feature = "scroll")]
PrecompileSpecId::EUCLID => Self::euclid(),
PrecompileSpecId::CANCUN => Self::cancun(),
PrecompileSpecId::PRAGUE => Self::prague(),
PrecompileSpecId::LATEST => Self::latest(),
Expand Down Expand Up @@ -220,19 +218,6 @@ impl Precompiles {
})
}

/// Returns precompiles for Scroll
#[cfg(feature = "scroll")]
pub fn euclid() -> &'static Self {
static INSTANCE: OnceBox<Precompiles> = OnceBox::new();
INSTANCE.get_or_init(|| {
let mut precompiles = Self::bernoulli().clone();
precompiles.extend([
secp256r1::P256VERIFY, // 0x100
]);
Box::new(precompiles)
})
}

/// Returns the precompiles for the latest spec.
pub fn latest() -> &'static Self {
Self::prague()
Expand Down Expand Up @@ -334,8 +319,6 @@ pub enum PrecompileSpecId {
PRE_BERNOULLI,
#[cfg(feature = "scroll")]
BERNOULLI,
#[cfg(feature = "scroll")]
EUCLID,
CANCUN,
PRAGUE,
LATEST,
Expand All @@ -362,9 +345,7 @@ impl PrecompileSpecId {
#[cfg(feature = "scroll")]
PRE_BERNOULLI => Self::PRE_BERNOULLI,
#[cfg(feature = "scroll")]
BERNOULLI | CURIE => Self::BERNOULLI,
#[cfg(feature = "scroll")]
EUCLID => Self::EUCLID,
BERNOULLI | CURIE | EUCLID => Self::BERNOULLI,
}
}
}
Expand Down

0 comments on commit d2d32a2

Please sign in to comment.