From 7f512474dc0887b2bf3064a0a16aee2fc8ef0d27 Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Mon, 17 Mar 2025 13:18:44 +0200 Subject: [PATCH 1/4] fix: adding core primitives crate --- Cargo.lock | 16 ++++++ Cargo.toml | 1 + core_primitives/Cargo.toml | 20 +++++++ core_primitives/src/commitment.rs | 16 ++++++ core_primitives/src/lib.rs | 5 ++ core_primitives/src/merkle_tree_public.rs | 2 + core_primitives/src/nullifier.rs | 18 ++++++ core_primitives/src/transaction.rs | 67 +++++++++++++++++++++++ core_primitives/src/utxo.rs | 29 ++++++++++ 9 files changed, 174 insertions(+) create mode 100644 core_primitives/Cargo.toml create mode 100644 core_primitives/src/commitment.rs create mode 100644 core_primitives/src/lib.rs create mode 100644 core_primitives/src/merkle_tree_public.rs create mode 100644 core_primitives/src/nullifier.rs create mode 100644 core_primitives/src/transaction.rs create mode 100644 core_primitives/src/utxo.rs diff --git a/Cargo.lock b/Cargo.lock index ef85b85..d4f4361 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1202,6 +1202,22 @@ dependencies = [ "libc", ] +[[package]] +name = "core_primitives" +version = "0.1.0" +dependencies = [ + "anyhow", + "elliptic-curve", + "env_logger", + "log", + "monotree", + "sequencer_core", + "serde", + "serde_json", + "sha2 0.10.8", + "storage", +] + [[package]] name = "cpp_demangle" version = "0.4.4" diff --git a/Cargo.toml b/Cargo.toml index 70e89f9..54e3059 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ members = [ "rpc_primitives", "common", "sc_core", + "core_primitives", ] [workspace.dependencies] diff --git a/core_primitives/Cargo.toml b/core_primitives/Cargo.toml new file mode 100644 index 0000000..c3a6f72 --- /dev/null +++ b/core_primitives/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "core_primitives" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow.workspace = true +serde_json.workspace = true +env_logger.workspace = true +log.workspace = true +serde.workspace = true +sha2.workspace = true +elliptic-curve.workspace = true +monotree.workspace = true + +[dependencies.storage] +path = "../storage" + +[dependencies.sequencer_core] +path = "../sequencer_core" diff --git a/core_primitives/src/commitment.rs b/core_primitives/src/commitment.rs new file mode 100644 index 0000000..6ac22bb --- /dev/null +++ b/core_primitives/src/commitment.rs @@ -0,0 +1,16 @@ +use crate::merkle_tree_public::CommitmentHashType; +use monotree::database::MemoryDB; +use monotree::hasher::Blake3; +use monotree::{Hasher, Monotree, Proof}; +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq)] +pub struct Commitment { + pub commitment_hash: CommitmentHashType, +} + +pub struct CommitmentsSparseMerkleTree { + pub curr_root: Option, + pub tree: Monotree, + pub hasher: Blake3, +} diff --git a/core_primitives/src/lib.rs b/core_primitives/src/lib.rs new file mode 100644 index 0000000..08f4269 --- /dev/null +++ b/core_primitives/src/lib.rs @@ -0,0 +1,5 @@ +pub mod commitment; +pub mod merkle_tree_public; +pub mod nullifier; +pub mod transaction; +pub mod utxo; diff --git a/core_primitives/src/merkle_tree_public.rs b/core_primitives/src/merkle_tree_public.rs new file mode 100644 index 0000000..b13d4ba --- /dev/null +++ b/core_primitives/src/merkle_tree_public.rs @@ -0,0 +1,2 @@ +pub type TreeHashType = [u8; 32]; +pub type CommitmentHashType = Vec; diff --git a/core_primitives/src/nullifier.rs b/core_primitives/src/nullifier.rs new file mode 100644 index 0000000..c395e4f --- /dev/null +++ b/core_primitives/src/nullifier.rs @@ -0,0 +1,18 @@ +use crate::merkle_tree_public::TreeHashType; +use monotree::database::MemoryDB; +use monotree::hasher::Blake3; +use monotree::{Hasher, Monotree, Proof}; +use serde::{Deserialize, Serialize}; + +//ToDo: Update Nullifier model, when it is clear +#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq)] +///General nullifier object +pub struct UTXONullifier { + pub utxo_hash: TreeHashType, +} + +pub struct NullifierSparseMerkleTree { + pub curr_root: Option, + pub tree: Monotree, + pub hasher: Blake3, +} diff --git a/core_primitives/src/transaction.rs b/core_primitives/src/transaction.rs new file mode 100644 index 0000000..90203cb --- /dev/null +++ b/core_primitives/src/transaction.rs @@ -0,0 +1,67 @@ +use log::info; +use serde::{Deserialize, Serialize}; +use sha2::{digest::FixedOutput, Digest}; + +use crate::merkle_tree_public::TreeHashType; + +use elliptic_curve::{ + consts::{B0, B1}, + generic_array::GenericArray, +}; +use sha2::digest::typenum::{UInt, UTerm}; + +pub type CipherText = Vec; +pub type Nonce = GenericArray, B1>, B0>, B0>>; + +#[derive(Debug, Serialize, Deserialize, Clone, Copy)] +pub enum TxKind { + Public, + Private, + Shielded, + Deshielded, +} + +#[derive(Debug, Serialize, Deserialize, Clone)] +///General transaction object +pub struct Transaction { + pub hash: TreeHashType, + pub tx_kind: TxKind, + ///Tx input data (public part) + pub execution_input: Vec, + ///Tx output data (public_part) + pub execution_output: Vec, + ///Tx input utxo commitments + pub utxo_commitments_spent_hashes: Vec, + ///Tx output utxo commitments + pub utxo_commitments_created_hashes: Vec, + ///Tx output nullifiers + pub nullifier_created_hashes: Vec, + ///Execution proof (private part) + pub execution_proof_private: String, + ///Encoded blobs of data + pub encoded_data: Vec<(CipherText, Vec)>, + ///Transaction senders ephemeral pub key + pub ephemeral_pub_key: Vec, +} + +#[derive(Debug, Serialize, Deserialize, Clone)] +///General transaction object +pub struct TransactionPayload { + pub tx_kind: TxKind, + ///Tx input data (public part) + pub execution_input: Vec, + ///Tx output data (public_part) + pub execution_output: Vec, + ///Tx input utxo commitments + pub utxo_commitments_spent_hashes: Vec, + ///Tx output utxo commitments + pub utxo_commitments_created_hashes: Vec, + ///Tx output nullifiers + pub nullifier_created_hashes: Vec, + ///Execution proof (private part) + pub execution_proof_private: String, + ///Encoded blobs of data + pub encoded_data: Vec<(CipherText, Vec)>, + ///Transaction senders ephemeral pub key + pub ephemeral_pub_key: Vec, +} diff --git a/core_primitives/src/utxo.rs b/core_primitives/src/utxo.rs new file mode 100644 index 0000000..b4062d5 --- /dev/null +++ b/core_primitives/src/utxo.rs @@ -0,0 +1,29 @@ +use anyhow::Result; +use log::info; +use serde::{Deserialize, Serialize}; +use sha2::{digest::FixedOutput, Digest}; +use storage::{merkle_tree_public::TreeHashType, nullifier::UTXONullifier, AccountId}; + +///Raw asset data +pub type Asset = Vec; + +#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] +///Container for raw utxo payload +pub struct UTXO { + pub hash: TreeHashType, + pub owner: AccountId, + pub nullifier: Option, + pub asset: Asset, + // TODO: change to u256 + pub amount: u128, + pub privacy_flag: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct UTXOPayload { + pub owner: AccountId, + pub asset: Asset, + // TODO: change to u256 + pub amount: u128, + pub privacy_flag: bool, +} From 2c7326d3fc9c83d8ac6a90ba148e28569268ce81 Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Mon, 17 Mar 2025 13:41:53 +0200 Subject: [PATCH 2/4] fix: warning fix --- core_primitives/src/commitment.rs | 2 +- core_primitives/src/nullifier.rs | 2 +- core_primitives/src/transaction.rs | 2 -- core_primitives/src/utxo.rs | 3 --- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/core_primitives/src/commitment.rs b/core_primitives/src/commitment.rs index 6ac22bb..49647ad 100644 --- a/core_primitives/src/commitment.rs +++ b/core_primitives/src/commitment.rs @@ -1,7 +1,7 @@ use crate::merkle_tree_public::CommitmentHashType; use monotree::database::MemoryDB; use monotree::hasher::Blake3; -use monotree::{Hasher, Monotree, Proof}; +use monotree::Monotree; use serde::{Deserialize, Serialize}; #[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq)] diff --git a/core_primitives/src/nullifier.rs b/core_primitives/src/nullifier.rs index c395e4f..d539749 100644 --- a/core_primitives/src/nullifier.rs +++ b/core_primitives/src/nullifier.rs @@ -1,7 +1,7 @@ use crate::merkle_tree_public::TreeHashType; use monotree::database::MemoryDB; use monotree::hasher::Blake3; -use monotree::{Hasher, Monotree, Proof}; +use monotree::Monotree; use serde::{Deserialize, Serialize}; //ToDo: Update Nullifier model, when it is clear diff --git a/core_primitives/src/transaction.rs b/core_primitives/src/transaction.rs index 90203cb..be0fb8e 100644 --- a/core_primitives/src/transaction.rs +++ b/core_primitives/src/transaction.rs @@ -1,6 +1,4 @@ -use log::info; use serde::{Deserialize, Serialize}; -use sha2::{digest::FixedOutput, Digest}; use crate::merkle_tree_public::TreeHashType; diff --git a/core_primitives/src/utxo.rs b/core_primitives/src/utxo.rs index b4062d5..78c799e 100644 --- a/core_primitives/src/utxo.rs +++ b/core_primitives/src/utxo.rs @@ -1,7 +1,4 @@ -use anyhow::Result; -use log::info; use serde::{Deserialize, Serialize}; -use sha2::{digest::FixedOutput, Digest}; use storage::{merkle_tree_public::TreeHashType, nullifier::UTXONullifier, AccountId}; ///Raw asset data From 437a3a5700d4c9bf3ef1370fb8251adb6e73c27f Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Fri, 28 Mar 2025 17:12:28 +0200 Subject: [PATCH 3/4] feat: making tags for utxo to privately filter decoding attempts --- accounts/src/account_core/mod.rs | 6 +++- node_core/src/lib.rs | 47 +++++++++++++++++++++----------- node_core/src/storage/mod.rs | 26 ++++++++++-------- storage/src/transaction.rs | 5 ++-- 4 files changed, 53 insertions(+), 31 deletions(-) diff --git a/accounts/src/account_core/mod.rs b/accounts/src/account_core/mod.rs index 91bdfe8..3421a63 100644 --- a/accounts/src/account_core/mod.rs +++ b/accounts/src/account_core/mod.rs @@ -4,7 +4,7 @@ use anyhow::Result; use k256::AffinePoint; use log::info; use serde::Serialize; -use storage::{merkle_tree_public::TreeHashType, nullifier::UTXONullifier}; +use storage::{merkle_tree_public::TreeHashType, nullifier::UTXONullifier, transaction::Tag}; use utxo::{ utxo_core::{UTXOPayload, UTXO}, utxo_tree::UTXOSparseMerkleTree, @@ -122,6 +122,10 @@ impl Account { info!("Account address is {:?}", hex::encode(self.address)); info!("Account balance is {:?}", self.balance); } + + pub fn make_tag(&self) -> Tag { + self.address[0] + } } impl Default for Account { diff --git a/node_core/src/lib.rs b/node_core/src/lib.rs index d5092fc..33a0fd5 100644 --- a/node_core/src/lib.rs +++ b/node_core/src/lib.rs @@ -189,6 +189,8 @@ impl NodeCore { &serde_json::to_vec(&utxo).unwrap(), ); + let tag = accout.make_tag(); + let comm = generate_commitments(&vec![utxo]); Ok(( @@ -206,7 +208,7 @@ impl NodeCore { receipt, ) .unwrap(), - encoded_data: vec![(encoded_data.0, encoded_data.1.to_vec())], + encoded_data: vec![(encoded_data.0, encoded_data.1.to_vec(), tag)], ephemeral_pub_key: eph_pub_key.to_vec(), } .into(), @@ -235,13 +237,16 @@ impl NodeCore { let encoded_data = utxos .iter() .map(|utxo| { - Account::encrypt_data( - &ephm_key_holder, - accout.key_holder.viewing_public_key, - &serde_json::to_vec(&utxo).unwrap(), + ( + Account::encrypt_data( + &ephm_key_holder, + accout.key_holder.viewing_public_key, + &serde_json::to_vec(&utxo).unwrap(), + ), + accout.make_tag(), ) }) - .map(|(ciphertext, nonce)| (ciphertext, nonce.to_vec())) + .map(|((ciphertext, nonce), tag)| (ciphertext, nonce.to_vec(), tag)) .collect(); let comm = generate_commitments(&utxos); @@ -305,7 +310,7 @@ impl NodeCore { let eph_pub_key = ephm_key_holder.generate_ephemeral_public_key().to_bytes(); - let encoded_data: Vec<(Vec, Vec)> = utxos + let encoded_data: Vec<(Vec, Vec, u8)> = utxos .iter() .map(|utxo_enc| { let accout_enc = acc_map_read_guard.acc_map.get(&utxo_enc.owner).unwrap(); @@ -316,7 +321,9 @@ impl NodeCore { &serde_json::to_vec(&utxo_enc).unwrap(), ); - (ciphertext, nonce.to_vec()) + let tag = accout_enc.make_tag(); + + (ciphertext, nonce.to_vec(), tag) }) .collect(); @@ -387,7 +394,7 @@ impl NodeCore { let eph_pub_key = ephm_key_holder.generate_ephemeral_public_key().to_bytes(); - let mut encoded_data: Vec<(Vec, Vec)> = resulting_utxos_receiver + let mut encoded_data: Vec<(Vec, Vec, u8)> = resulting_utxos_receiver .iter() .map(|utxo_enc| { let accout_enc = acc_map_read_guard.acc_map.get(&utxo_enc.owner).unwrap(); @@ -398,11 +405,13 @@ impl NodeCore { &serde_json::to_vec(&utxo_enc).unwrap(), ); - (ciphertext, nonce.to_vec()) + let tag = accout_enc.make_tag(); + + (ciphertext, nonce.to_vec(), tag) }) .collect(); - let encoded_data_1: Vec<(Vec, Vec)> = resulting_utxos_not_spent + let encoded_data_1: Vec<(Vec, Vec, u8)> = resulting_utxos_not_spent .iter() .map(|utxo_enc| { let accout_enc = acc_map_read_guard.acc_map.get(&utxo_enc.owner).unwrap(); @@ -413,7 +422,9 @@ impl NodeCore { &serde_json::to_vec(&utxo_enc).unwrap(), ); - (ciphertext, nonce.to_vec()) + let tag = accout_enc.make_tag(); + + (ciphertext, nonce.to_vec(), tag) }) .collect(); @@ -489,7 +500,7 @@ impl NodeCore { let eph_pub_key = ephm_key_holder.generate_ephemeral_public_key().to_bytes(); - let encoded_data: Vec<(Vec, Vec)> = utxos + let encoded_data: Vec<(Vec, Vec, u8)> = utxos .iter() .map(|utxo_enc| { let accout_enc = acc_map_read_guard.acc_map.get(&utxo_enc.owner).unwrap(); @@ -500,7 +511,9 @@ impl NodeCore { &serde_json::to_vec(&utxo_enc).unwrap(), ); - (ciphertext, nonce.to_vec()) + let tag = accout_enc.make_tag(); + + (ciphertext, nonce.to_vec(), tag) }) .collect(); @@ -1113,7 +1126,7 @@ impl NodeCore { let eph_pub_key = ephm_key_holder.generate_ephemeral_public_key().to_bytes(); - let encoded_data: Vec<(Vec, Vec)> = utxos + let encoded_data: Vec<(Vec, Vec, u8)> = utxos .iter() .map(|utxo_enc| { let accout_enc = acc_map_read_guard.acc_map.get(&utxo_enc.owner).unwrap(); @@ -1124,7 +1137,9 @@ impl NodeCore { &serde_json::to_vec(&utxo_enc).unwrap(), ); - (ciphertext, nonce.to_vec()) + let tag = accout_enc.make_tag(); + + (ciphertext, nonce.to_vec(), tag) }) .collect(); diff --git a/node_core/src/storage/mod.rs b/node_core/src/storage/mod.rs index 31dc538..4afcb62 100644 --- a/node_core/src/storage/mod.rs +++ b/node_core/src/storage/mod.rs @@ -111,7 +111,7 @@ impl NodeChainStore { if ephemeral_public_key_sender.is_some().into() { let ephemeral_public_key_sender = ephemeral_public_key_sender.unwrap(); - for (ciphertext, nonce) in tx.encoded_data.clone() { + for (ciphertext, nonce, tag) in tx.encoded_data.clone() { let slice = nonce.as_slice(); let nonce = accounts::key_management::constants_types::Nonce::clone_from_slice( @@ -119,19 +119,21 @@ impl NodeChainStore { ); for (acc_id, acc) in self.acc_map.iter_mut() { - let decoded_data_curr_acc = acc.decrypt_data( - ephemeral_public_key_sender, - ciphertext.clone(), - nonce, - ); + if acc_id[0] == tag { + let decoded_data_curr_acc = acc.decrypt_data( + ephemeral_public_key_sender, + ciphertext.clone(), + nonce, + ); - if let Ok(decoded_data_curr_acc) = decoded_data_curr_acc { - let decoded_utxo_try = - serde_json::from_slice::(&decoded_data_curr_acc); + if let Ok(decoded_data_curr_acc) = decoded_data_curr_acc { + let decoded_utxo_try = + serde_json::from_slice::(&decoded_data_curr_acc); - if let Ok(utxo) = decoded_utxo_try { - if &utxo.owner == acc_id { - acc.utxo_tree.insert_item(utxo)?; + if let Ok(utxo) = decoded_utxo_try { + if &utxo.owner == acc_id { + acc.utxo_tree.insert_item(utxo)?; + } } } } diff --git a/storage/src/transaction.rs b/storage/src/transaction.rs index 15672ae..2a7f23c 100644 --- a/storage/src/transaction.rs +++ b/storage/src/transaction.rs @@ -12,6 +12,7 @@ use sha2::digest::typenum::{UInt, UTerm}; pub type CipherText = Vec; pub type Nonce = GenericArray, B1>, B0>, B0>>; +pub type Tag = u8; #[derive(Debug, Serialize, Deserialize, Clone, Copy)] pub enum TxKind { @@ -39,7 +40,7 @@ pub struct Transaction { ///Execution proof (private part) pub execution_proof_private: String, ///Encoded blobs of data - pub encoded_data: Vec<(CipherText, Vec)>, + pub encoded_data: Vec<(CipherText, Vec, Tag)>, ///Transaction senders ephemeral pub key pub ephemeral_pub_key: Vec, } @@ -61,7 +62,7 @@ pub struct TransactionPayload { ///Execution proof (private part) pub execution_proof_private: String, ///Encoded blobs of data - pub encoded_data: Vec<(CipherText, Vec)>, + pub encoded_data: Vec<(CipherText, Vec, Tag)>, ///Transaction senders ephemeral pub key pub ephemeral_pub_key: Vec, } From 305e8d72966d247b2979459b37184a213e44d19e Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Fri, 28 Mar 2025 17:45:02 +0200 Subject: [PATCH 4/4] fix: risc0 version bump --- Cargo.lock | 721 ++++++++++++++++++++++++----------- common/Cargo.toml | 2 +- node_core/Cargo.toml | 2 +- sc_core/Cargo.toml | 2 +- zkvm/Cargo.toml | 2 +- zkvm/test_methods/Cargo.toml | 2 +- 6 files changed, 498 insertions(+), 233 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef85b85..d43f5b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -362,6 +362,9 @@ name = "anyhow" version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4" +dependencies = [ + "backtrace", +] [[package]] name = "approx" @@ -381,61 +384,49 @@ dependencies = [ "derive_arbitrary", ] -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-std 0.4.0", -] - [[package]] name = "ark-bn254" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d69eab57e8d2663efa5c63135b2af4f396d66424f88954c21104125ab6b3e6bc" dependencies = [ - "ark-ec 0.5.0", - "ark-ff 0.5.0", - "ark-std 0.5.0", + "ark-ec", + "ark-ff", + "ark-r1cs-std", + "ark-std", ] [[package]] name = "ark-crypto-primitives" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56" +checksum = "1e0c292754729c8a190e50414fd1a37093c786c709899f29c9f7daccecfa855e" dependencies = [ - "ark-ec 0.4.2", - "ark-ff 0.4.2", + "ahash 0.8.11", + "ark-crypto-primitives-macros", + "ark-ec", + "ark-ff", "ark-relations", - "ark-serialize 0.4.2", + "ark-serialize", "ark-snark", - "ark-std 0.4.0", + "ark-std", "blake2", "derivative", "digest 0.10.7", + "fnv", + "merlin", "sha2 0.10.8", ] [[package]] -name = "ark-ec" -version = "0.4.2" +name = "ark-crypto-primitives-macros" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +checksum = "e7e89fe77d1f0f4fe5b96dfc940923d88d17b6a773808124f21e764dfb063c6a" dependencies = [ - "ark-ff 0.4.2", - "ark-poly 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", - "itertools 0.10.5", - "num-traits", - "zeroize", + "proc-macro2", + "quote", + "syn 2.0.98", ] [[package]] @@ -445,10 +436,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" dependencies = [ "ahash 0.8.11", - "ark-ff 0.5.0", - "ark-poly 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", "educe", "fnv", "hashbrown 0.15.2", @@ -459,36 +450,16 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "digest 0.10.7", - "itertools 0.10.5", - "num-bigint 0.4.6", - "num-traits", - "paste 1.0.15", - "rustc_version", - "zeroize", -] - [[package]] name = "ark-ff" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" dependencies = [ - "ark-ff-asm 0.5.0", - "ark-ff-macros 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", "arrayvec 0.7.6", "digest 0.10.7", "educe", @@ -499,16 +470,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-ff-asm" version = "0.5.0" @@ -519,19 +480,6 @@ dependencies = [ "syn 2.0.98", ] -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint 0.4.6", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-ff-macros" version = "0.5.0" @@ -547,30 +495,17 @@ dependencies = [ [[package]] name = "ark-groth16" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20ceafa83848c3e390f1cbf124bc3193b3e639b3f02009e0e290809a501b95fc" +checksum = "88f1d0f3a534bb54188b8dcc104307db6c56cdae574ddc3212aec0625740fc7e" dependencies = [ "ark-crypto-primitives", - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-poly 0.4.2", + "ark-ec", + "ark-ff", + "ark-poly", "ark-relations", - "ark-serialize 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", + "ark-serialize", + "ark-std", ] [[package]] @@ -580,36 +515,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" dependencies = [ "ahash 0.8.11", - "ark-ff 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", + "ark-ff", + "ark-serialize", + "ark-std", "educe", "fnv", "hashbrown 0.15.2", ] [[package]] -name = "ark-relations" -version = "0.4.0" +name = "ark-r1cs-std" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" +checksum = "941551ef1df4c7a401de7068758db6503598e6f01850bdb2cfdb614a1f9dbea1" dependencies = [ - "ark-ff 0.4.2", - "ark-std 0.4.0", + "ark-ec", + "ark-ff", + "ark-relations", + "ark-std", + "educe", + "num-bigint 0.4.6", + "num-integer", + "num-traits", "tracing", - "tracing-subscriber", ] [[package]] -name = "ark-serialize" -version = "0.4.2" +name = "ark-relations" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +checksum = "ec46ddc93e7af44bcab5230937635b06fb5744464dd6a7e7b083e80ebd274384" dependencies = [ - "ark-serialize-derive 0.4.2", - "ark-std 0.4.0", - "digest 0.10.7", - "num-bigint 0.4.6", + "ark-ff", + "ark-std", + "tracing", + "tracing-subscriber", ] [[package]] @@ -618,24 +558,13 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" dependencies = [ - "ark-serialize-derive 0.5.0", - "ark-std 0.5.0", + "ark-serialize-derive", + "ark-std", "arrayvec 0.7.6", "digest 0.10.7", "num-bigint 0.4.6", ] -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-serialize-derive" version = "0.5.0" @@ -649,24 +578,14 @@ dependencies = [ [[package]] name = "ark-snark" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63" +checksum = "d368e2848c2d4c129ce7679a7d0d2d612b6a274d3ea6a13bad4445d61b381b88" dependencies = [ - "ark-ff 0.4.2", + "ark-ff", "ark-relations", - "ark-serialize 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.5", + "ark-serialize", + "ark-std", ] [[package]] @@ -679,6 +598,12 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" + [[package]] name = "arrayref" version = "0.3.9" @@ -706,6 +631,15 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "atomic-polyfill" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" +dependencies = [ + "critical-section", +] + [[package]] name = "atty" version = "0.2.14" @@ -798,6 +732,12 @@ dependencies = [ "syn 2.0.98", ] +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + [[package]] name = "bitcoin-private" version = "0.1.0" @@ -900,8 +840,8 @@ dependencies = [ [[package]] name = "bonsai-sdk" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "1.4.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "duplicate", "maybe-async", @@ -1020,16 +960,16 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.18.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.11", ] [[package]] @@ -1103,7 +1043,7 @@ dependencies = [ "clap_lex", "indexmap 1.9.3", "once_cell", - "strsim", + "strsim 0.10.0", "termcolor", "textwrap", ] @@ -1114,7 +1054,7 @@ version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-error", "proc-macro2", "quote", @@ -1130,6 +1070,12 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + [[package]] name = "common" version = "0.1.0" @@ -1230,17 +1176,10 @@ dependencies = [ ] [[package]] -name = "crossbeam" -version = "0.8.4" +name = "critical-section" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", -] +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" [[package]] name = "crossbeam-channel" @@ -1270,15 +1209,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "crossbeam-queue" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.21" @@ -1373,6 +1303,41 @@ dependencies = [ "find_cuda_helper", ] +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.98", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.98", +] + [[package]] name = "der" version = "0.7.9" @@ -1414,6 +1379,37 @@ dependencies = [ "syn 2.0.98", ] +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core", + "syn 2.0.98", +] + [[package]] name = "derive_more" version = "0.99.19" @@ -1429,18 +1425,18 @@ dependencies = [ [[package]] name = "derive_more" -version = "1.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "1.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ "proc-macro2", "quote", @@ -1542,7 +1538,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de78e66ac9061e030587b2a2e75cc88f22304913c907b11307bca737141230cb" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-error", ] @@ -1603,6 +1599,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + [[package]] name = "encoding_rs" version = "0.8.35" @@ -2036,6 +2044,15 @@ dependencies = [ "tracing", ] +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + [[package]] name = "hashbrown" version = "0.7.2" @@ -2057,9 +2074,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", ] @@ -2073,12 +2090,41 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "heapless" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version", + "serde", + "spin", + "stable_deref_trait", +] + [[package]] name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -2409,6 +2455,12 @@ dependencies = [ "syn 2.0.98", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "1.0.3" @@ -2430,6 +2482,12 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "include_bytes_aligned" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee796ad498c8d9a1d68e477df8f754ed784ef875de1414ebdaf169f70a6a784" + [[package]] name = "indexmap" version = "1.9.3" @@ -2494,6 +2552,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -2594,6 +2661,9 @@ name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] [[package]] name = "lazycell" @@ -2664,8 +2734,8 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e3d87542063daaccbfecd78b60f988079b6ec4e089249658b9455075c78d42" dependencies = [ - "ark-bn254 0.5.0", - "ark-ff 0.5.0", + "ark-bn254", + "ark-ff", "num-bigint 0.4.6", "thiserror 1.0.69", ] @@ -2741,6 +2811,64 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "malachite" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fbdf9cb251732db30a7200ebb6ae5d22fe8e11397364416617d2c2cf0c51cb5" +dependencies = [ + "malachite-base", + "malachite-float", + "malachite-nz", + "malachite-q", +] + +[[package]] +name = "malachite-base" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ea0ed76adf7defc1a92240b5c36d5368cfe9251640dcce5bd2d0b7c1fd87aeb" +dependencies = [ + "hashbrown 0.14.5", + "itertools 0.11.0", + "libm", + "ryu", +] + +[[package]] +name = "malachite-float" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af9d20db1c73759c1377db7b27575df6f2eab7368809dd62c0a715dc1bcc39f7" +dependencies = [ + "itertools 0.11.0", + "malachite-base", + "malachite-nz", + "malachite-q", +] + +[[package]] +name = "malachite-nz" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34a79feebb2bc9aa7762047c8e5495269a367da6b5a90a99882a0aeeac1841f7" +dependencies = [ + "itertools 0.11.0", + "libm", + "malachite-base", +] + +[[package]] +name = "malachite-q" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f235d5747b1256b47620f5640c2a17a88c7569eebdf27cd9cb130e1a619191" +dependencies = [ + "itertools 0.11.0", + "malachite-base", + "malachite-nz", +] + [[package]] name = "malloc_buf" version = "0.0.6" @@ -2797,6 +2925,18 @@ dependencies = [ "serde_json", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "metal" version = "0.29.0" @@ -2914,6 +3054,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "no_std_strings" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5b0c77c1b780822bc749a33e39aeb2c07584ab93332303babeabb645298a76e" + [[package]] name = "node_core" version = "0.1.0" @@ -3365,6 +3511,19 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "postcard" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "heapless", + "serde", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -3804,42 +3963,57 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "ringbuffer" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df6368f71f205ff9c33c076d170dd56ebf68e8161c733c0caa07a7a5509ed53" + [[package]] name = "risc0-binfmt" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "2.0.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "anyhow", "borsh", + "derive_more 2.0.1", "elf", + "lazy_static", + "postcard", "risc0-zkp", "risc0-zkvm-platform", + "semver", "serde", "tracing", ] [[package]] name = "risc0-build" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "2.0.1" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "anyhow", "cargo_metadata", + "derive_builder", "dirs", "docker-generate", "hex", "risc0-binfmt", + "risc0-zkos-v1compat", "risc0-zkp", "risc0-zkvm-platform", + "rzup", + "semver", "serde", "serde_json", + "stability", "tempfile", ] [[package]] name = "risc0-build-kernel" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "2.0.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "cc", "directories", @@ -3852,8 +4026,8 @@ dependencies = [ [[package]] name = "risc0-circuit-keccak" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "1.4.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "anyhow", "bytemuck", @@ -3873,12 +4047,12 @@ dependencies = [ [[package]] name = "risc0-circuit-keccak-sys" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "1.4.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "cc", "cust", - "derive_more 1.0.0", + "derive_more 2.0.1", "glob", "risc0-build-kernel", "risc0-core", @@ -3888,8 +4062,8 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "1.4.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "anyhow", "bytemuck", @@ -3913,8 +4087,8 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion-sys" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "1.4.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "glob", "risc0-build-kernel", @@ -3925,42 +4099,43 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "2.0.1" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "anyhow", "auto_ops", + "bit-vec", "bytemuck", "byteorder", "cfg-if 1.0.0", - "crossbeam", - "crypto-bigint", - "cust", - "derive_more 1.0.0", + "derive_more 2.0.1", "enum-map", - "lazy-regex", - "metal", - "num-bigint 0.4.6", + "malachite", "num-derive", "num-traits", + "paste 1.0.15", + "postcard", "rand 0.8.5", "rayon", + "ringbuffer", "risc0-binfmt", "risc0-circuit-rv32im-sys", "risc0-core", "risc0-sys", "risc0-zkp", - "risc0-zkvm-platform", "serde", - "sha2 0.10.8", + "smallvec", "tracing", ] [[package]] name = "risc0-circuit-rv32im-sys" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "2.0.1" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ + "cc", + "cust", + "derive_more 2.0.1", "glob", "risc0-build-kernel", "risc0-core", @@ -3970,10 +4145,11 @@ dependencies = [ [[package]] name = "risc0-core" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "2.0.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "bytemuck", + "bytemuck_derive", "nvtx", "puffin", "rand_core 0.6.4", @@ -3981,14 +4157,14 @@ dependencies = [ [[package]] name = "risc0-groth16" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "1.4.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "anyhow", - "ark-bn254 0.4.0", - "ark-ec 0.4.2", + "ark-bn254", + "ark-ec", "ark-groth16", - "ark-serialize 0.4.2", + "ark-serialize", "bytemuck", "hex", "num-bigint 0.4.6", @@ -4005,8 +4181,8 @@ dependencies = [ [[package]] name = "risc0-sys" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "1.4.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "anyhow", "cust", @@ -4014,10 +4190,19 @@ dependencies = [ "sppark", ] +[[package]] +name = "risc0-zkos-v1compat" +version = "2.0.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" +dependencies = [ + "include_bytes_aligned", + "no_std_strings", +] + [[package]] name = "risc0-zkp" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "2.0.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "anyhow", "blake2", @@ -4041,13 +4226,14 @@ dependencies = [ "risc0-zkvm-platform", "serde", "sha2 0.10.8", + "stability", "tracing", ] [[package]] name = "risc0-zkvm" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "2.0.0" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "addr2line 0.22.0", "anyhow", @@ -4056,6 +4242,7 @@ dependencies = [ "borsh", "bytemuck", "bytes", + "derive_more 2.0.1", "elf", "enum-map", "getrandom 0.2.15", @@ -4074,10 +4261,12 @@ dependencies = [ "risc0-circuit-rv32im", "risc0-core", "risc0-groth16", + "risc0-zkos-v1compat", "risc0-zkp", "risc0-zkvm-platform", "rrs-lib", "rustc-demangle", + "rzup", "semver", "serde", "sha2 0.10.8", @@ -4089,8 +4278,8 @@ dependencies = [ [[package]] name = "risc0-zkvm-platform" -version = "1.2.5" -source = "git+https://github.com/risc0/risc0.git?branch=release-1.2#2225069ebc465320695ef3d5e028f6072e103718" +version = "2.0.1" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" dependencies = [ "bytemuck", "cfg-if 1.0.0", @@ -4256,14 +4445,28 @@ version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" +[[package]] +name = "rzup" +version = "0.4.1" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.0#6f038bd11ed725d7025687d163977d93ac1f82f9" +dependencies = [ + "semver", + "serde", + "strum", + "tempfile", + "thiserror 2.0.11", + "toml 0.8.20", + "yaml-rust2", +] + [[package]] name = "sc_core" version = "0.1.0" dependencies = [ "accounts", "anyhow", - "ark-bn254 0.5.0", - "ark-ff 0.5.0", + "ark-bn254", + "ark-ff", "bincode", "common", "elliptic-curve", @@ -4446,7 +4649,7 @@ dependencies = [ "serde", "serde_json", "tokio", - "toml", + "toml 0.7.8", ] [[package]] @@ -4615,6 +4818,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + [[package]] name = "spki" version = "0.7.3" @@ -4682,6 +4894,34 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.98", +] + [[package]] name = "subtle" version = "1.0.0" @@ -4963,6 +5203,18 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "toml" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.24", +] + [[package]] name = "toml_datetime" version = "0.6.8" @@ -4992,6 +5244,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ "indexmap 2.7.1", + "serde", + "serde_spanned", "toml_datetime", "winnow 0.7.3", ] @@ -5655,6 +5909,17 @@ dependencies = [ "lzma-sys", ] +[[package]] +name = "yaml-rust2" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a1a1c0bc9823338a3bdf8c61f994f23ac004c6fa32c08cd152984499b445e8d" +dependencies = [ + "arraydeque", + "encoding_rs", + "hashlink", +] + [[package]] name = "yoke" version = "0.7.5" diff --git a/common/Cargo.toml b/common/Cargo.toml index 0c4664f..b4a1a3b 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -10,7 +10,7 @@ serde_json.workspace = true serde.workspace = true reqwest.workspace = true monotree.workspace = true -risc0-zkvm = { git = "https://github.com/risc0/risc0.git", branch = "release-1.2" } +risc0-zkvm = { git = "https://github.com/risc0/risc0.git", branch = "release-2.0" } [dependencies.rpc_primitives] path = "../rpc_primitives" diff --git a/node_core/Cargo.toml b/node_core/Cargo.toml index 4693aeb..c9c0968 100644 --- a/node_core/Cargo.toml +++ b/node_core/Cargo.toml @@ -19,7 +19,7 @@ reqwest.workspace = true thiserror.workspace = true tokio.workspace = true tempfile.workspace = true -risc0-zkvm = { git = "https://github.com/risc0/risc0.git", branch = "release-1.2" } +risc0-zkvm = { git = "https://github.com/risc0/risc0.git", branch = "release-2.0" } hex.workspace = true actix-rt.workspace = true diff --git a/sc_core/Cargo.toml b/sc_core/Cargo.toml index 70d5b88..55ba888 100644 --- a/sc_core/Cargo.toml +++ b/sc_core/Cargo.toml @@ -20,7 +20,7 @@ light-poseidon.workspace = true ark-bn254.workspace = true ark-ff.workspace = true -risc0-zkvm = { git = "https://github.com/risc0/risc0.git", branch = "release-1.2" } +risc0-zkvm = { git = "https://github.com/risc0/risc0.git", branch = "release-2.0" } [dependencies.accounts] path = "../accounts" diff --git a/zkvm/Cargo.toml b/zkvm/Cargo.toml index f0c0576..5f127e4 100644 --- a/zkvm/Cargo.toml +++ b/zkvm/Cargo.toml @@ -11,7 +11,7 @@ log.workspace = true serde.workspace = true thiserror.workspace = true -risc0-zkvm = { git = "https://github.com/risc0/risc0.git", branch = "release-1.2" } +risc0-zkvm = { git = "https://github.com/risc0/risc0.git", branch = "release-2.0" } test-methods = { path = "test_methods" } [dependencies.accounts] diff --git a/zkvm/test_methods/Cargo.toml b/zkvm/test_methods/Cargo.toml index 36ab3f9..35dc8bd 100644 --- a/zkvm/test_methods/Cargo.toml +++ b/zkvm/test_methods/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [build-dependencies] -risc0-build = { git = "https://github.com/risc0/risc0.git", branch = "release-1.2" } +risc0-build = { git = "https://github.com/risc0/risc0.git", branch = "release-2.0" } [package.metadata.risc0] methods = ["guest"]