Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(stdlib)!: Remove Schnorr #6749

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@
"bigint_div" => bigint_op(bigint_solver, BigIntDiv, args, return_type, location),
"blake2s" => blake_hash(interner, args, location, acvm::blackbox_solver::blake2s),
"blake3" => blake_hash(interner, args, location, acvm::blackbox_solver::blake3),
"ecdsa_secp256k1" => ecdsa_secp256_verify(

Check warning on line 70 in compiler/noirc_frontend/src/hir/comptime/interpreter/foreign.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (secp)
interner,
args,
location,
acvm::blackbox_solver::ecdsa_secp256k1_verify,
),
"ecdsa_secp256r1" => ecdsa_secp256_verify(

Check warning on line 76 in compiler/noirc_frontend/src/hir/comptime/interpreter/foreign.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (secp)
interner,
args,
location,
Expand All @@ -87,7 +87,6 @@
"sha256_compression" => sha256_compression(interner, args, location),
_ => {
let explanation = match name {
"schnorr_verify" => "Schnorr verification will be removed.".into(),
"and" | "xor" => "It should be turned into a binary operation.".into(),
"recursive_aggregation" => "A proof cannot be verified at comptime.".into(),
_ => {
Expand Down Expand Up @@ -223,7 +222,7 @@
Ok(to_byte_array(&output))
}

/// Run one of the Secp256 signature verifications.

Check warning on line 225 in compiler/noirc_frontend/src/hir/comptime/interpreter/foreign.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (Secp)
/// ```text
/// pub fn verify_signature<let N: u32>(
/// public_key_x: [u8; 32],
Expand All @@ -239,7 +238,7 @@
/// message_hash: [u8],
/// ) -> bool
/// ```
fn ecdsa_secp256_verify(

Check warning on line 241 in compiler/noirc_frontend/src/hir/comptime/interpreter/foreign.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (secp)
interner: &mut NodeInterner,
arguments: Vec<(Value, Location)>,
location: Location,
Expand Down
1 change: 0 additions & 1 deletion docs/docs/noir/standard_library/black_box_fns.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Here is a list of the current black box functions:

- [AES128](./cryptographic_primitives/ciphers.mdx#aes128)
- [SHA256](./cryptographic_primitives/hashes.mdx#sha256)
- [Schnorr signature verification](./cryptographic_primitives/schnorr.mdx)
- [Blake2s](./cryptographic_primitives/hashes.mdx#blake2s)
- [Blake3](./cryptographic_primitives/hashes.mdx#blake3)
- [Pedersen Hash](./cryptographic_primitives/hashes.mdx#pedersen_hash)
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion noir_stdlib/src/lib.nr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pub mod aes128;
pub mod array;
pub mod slice;
pub mod merkle;
pub mod schnorr;
pub mod ecdsa_secp256k1;
pub mod ecdsa_secp256r1;
pub mod embedded_curve_ops;
Expand Down
95 changes: 0 additions & 95 deletions noir_stdlib/src/schnorr.nr

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions test_programs/execution_success/schnorr/Nargo.toml

This file was deleted.

70 changes: 0 additions & 70 deletions test_programs/execution_success/schnorr/Prover.toml

This file was deleted.

24 changes: 0 additions & 24 deletions test_programs/execution_success/schnorr/src/main.nr

This file was deleted.

28 changes: 28 additions & 0 deletions tooling/nargo_cli/src/cli/test_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,31 @@ fn display_test_report(

Ok(())
}

#[cfg(test)]
mod tests {
use std::io::Write;
use std::{thread, time::Duration};
use termcolor::{ColorChoice, StandardStream};

#[test]
fn test_stderr_lock() {
for i in 0..4 {
thread::spawn(move || {
let mut writer = StandardStream::stderr(ColorChoice::Always);
//let mut writer = writer.lock();

let mut show = |msg| {
thread::sleep(Duration::from_millis(10));
//println!("{i} {msg}");
writeln!(writer, "{i} {msg}").unwrap();
};

show("a");
show("b");
show("c");
});
}
thread::sleep(Duration::from_millis(100));
}
}
Loading