Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Brechtpd committed Jun 25, 2024
1 parent df642f1 commit 8dfc65d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/precompile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ ripemd = { version = "0.1", default-features = false }
sha2 = { version = "0.10", default-features = false }
# modexp precompile
aurora-engine-modexp = { version = "1.1", default-features = false }
cfg-if = "1"

# Optional KZG point evaluation precompile
c-kzg = { git = "https://github.com/brechtpd/c-kzg-4844", branch = "for-alpha7", default-features = false, optional = true, features = [
Expand Down
6 changes: 3 additions & 3 deletions crates/precompile/src/secp256k1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mod secp256k1_zk {
use crate::Error;
use revm_primitives::{alloy_primitives::B512, B256};

pub fn ecrecover(sig: &B512, recid: u8, msg: &B256) -> Result<B256, Error> {
pub(crate) fn ecrecover(sig: &B512, recid: u8, msg: &B256) -> Result<B256, Error> {
#[cfg(feature = "sp1-cycle-tracker")]
println!("cycle-tracker-start: ecrecover");
let res = if zk_op::contains_operation(&ZkOperation::Secp256k1) {
Expand All @@ -36,7 +36,7 @@ mod secp256k1 {
use k256::ecdsa::{Error, RecoveryId, Signature, VerifyingKey};
use revm_primitives::{alloy_primitives::B512, keccak256, B256};

pub fn ecrecover(sig: &B512, mut recid: u8, msg: &B256) -> Result<B256, Error> {
pub(crate) fn ecrecover(sig: &B512, mut recid: u8, msg: &B256) -> Result<B256, Error> {
// parse signature
let mut sig = Signature::from_slice(sig.as_slice())?;

Expand Down Expand Up @@ -74,7 +74,7 @@ mod secp256k1 {
// Silence the unused crate dependency warning.
use k256 as _;

pub fn ecrecover(sig: &B512, recid: u8, msg: &B256) -> Result<B256, secp256k1::Error> {
pub(crate) fn ecrecover(sig: &B512, recid: u8, msg: &B256) -> Result<B256, secp256k1::Error> {
let recid = RecoveryId::from_i32(recid as i32).expect("recovery ID is valid");
let sig = RecoverableSignature::from_compact(sig.as_slice(), recid)?;

Expand Down

0 comments on commit 8dfc65d

Please sign in to comment.