mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-05 23:03:06 +00:00
bump r0 version
This commit is contained in:
parent
8dbb636a14
commit
5bd45b685f
@ -5,7 +5,7 @@ edition = "2024"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
thiserror = "2.0.12"
|
thiserror = "2.0.12"
|
||||||
risc0-zkvm = "2.3.1"
|
risc0-zkvm = "3.0.3"
|
||||||
nssa-core = { path = "core", features = ["host"] }
|
nssa-core = { path = "core", features = ["host"] }
|
||||||
program-methods = { path = "program_methods" }
|
program-methods = { path = "program_methods" }
|
||||||
serde = "1.0.219"
|
serde = "1.0.219"
|
||||||
|
|||||||
@ -4,7 +4,7 @@ version = "0.1.0"
|
|||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
risc0-zkvm = { version = "2.3.1" }
|
risc0-zkvm = { version = "3.0.3" }
|
||||||
serde = { version = "1.0", default-features = false }
|
serde = { version = "1.0", default-features = false }
|
||||||
thiserror = { version = "2.0.12", optional = true }
|
thiserror = { version = "2.0.12", optional = true }
|
||||||
bytemuck = { version = "1.13", optional = true }
|
bytemuck = { version = "1.13", optional = true }
|
||||||
|
|||||||
@ -150,7 +150,7 @@ mod tests {
|
|||||||
data: b"hola mundo".to_vec(),
|
data: b"hola mundo".to_vec(),
|
||||||
};
|
};
|
||||||
|
|
||||||
// program owner || balance || nonce || hash(data)
|
// program owner || balance || nonce || data_len || data
|
||||||
let expected_bytes = [
|
let expected_bytes = [
|
||||||
1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8,
|
1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 8,
|
||||||
0, 0, 0, 192, 186, 220, 114, 113, 65, 236, 234, 222, 15, 215, 191, 227, 198, 23, 0, 42,
|
0, 0, 0, 192, 186, 220, 114, 113, 65, 236, 234, 222, 15, 215, 191, 227, 198, 23, 0, 42,
|
||||||
|
|||||||
@ -4,7 +4,7 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
risc0-build = { version = "2.3.1" }
|
risc0-build = { version = "3.0.3" }
|
||||||
|
|
||||||
[package.metadata.risc0]
|
[package.metadata.risc0]
|
||||||
methods = ["guest"]
|
methods = ["guest"]
|
||||||
|
|||||||
716
nssa/program_methods/guest/Cargo.lock
generated
716
nssa/program_methods/guest/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -6,5 +6,5 @@ edition = "2021"
|
|||||||
[workspace]
|
[workspace]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
risc0-zkvm = { version = "2.3.1", default-features = false, features = ['std'] }
|
risc0-zkvm = { version = "3.0.3", default-features = false, features = ['std'] }
|
||||||
nssa-core = { path = "../../core" }
|
nssa-core = { path = "../../core" }
|
||||||
|
|||||||
@ -68,8 +68,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
1 | 2 => {
|
1 | 2 => {
|
||||||
let new_nonce = private_nonces_iter.next().expect("Missing private nonce");
|
let new_nonce = private_nonces_iter.next().expect("Missing private nonce");
|
||||||
// let (Npk, Ipk, esk) = private_keys_iter.next().expect("Missing keys");
|
let (npk, shared_secret) = private_keys_iter.next().expect("Missing keys");
|
||||||
let (Npk, shared_secret) = private_keys_iter.next().expect("Missing keys");
|
|
||||||
|
|
||||||
if visibility_mask[i] == 1 {
|
if visibility_mask[i] == 1 {
|
||||||
// Private account with authentication
|
// Private account with authentication
|
||||||
@ -77,13 +76,13 @@ fn main() {
|
|||||||
private_auth_iter.next().expect("Missing private auth");
|
private_auth_iter.next().expect("Missing private auth");
|
||||||
|
|
||||||
// Verify Npk
|
// Verify Npk
|
||||||
let expected_Npk = NullifierPublicKey::from(nsk);
|
let expected_npk = NullifierPublicKey::from(nsk);
|
||||||
if &expected_Npk != Npk {
|
if &expected_npk != npk {
|
||||||
panic!("Npk mismatch");
|
panic!("Nullifier public key mismatch");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute commitment set digest associated with provided auth path
|
// Compute commitment set digest associated with provided auth path
|
||||||
let commitment_pre = Commitment::new(Npk, &pre_states[i].account);
|
let commitment_pre = Commitment::new(npk, &pre_states[i].account);
|
||||||
let set_digest = compute_digest_for_path(&commitment_pre, membership_proof);
|
let set_digest = compute_digest_for_path(&commitment_pre, membership_proof);
|
||||||
|
|
||||||
// Check pre_state authorization
|
// Check pre_state authorization
|
||||||
@ -114,7 +113,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Compute commitment
|
// Compute commitment
|
||||||
let commitment_post = Commitment::new(Npk, &post_with_updated_values);
|
let commitment_post = Commitment::new(npk, &post_with_updated_values);
|
||||||
|
|
||||||
// Encrypt and push post state
|
// Encrypt and push post state
|
||||||
let encrypted_account = EncryptionScheme::encrypt(
|
let encrypted_account = EncryptionScheme::encrypt(
|
||||||
|
|||||||
@ -4,7 +4,7 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
risc0-build = { version = "2.3.1" }
|
risc0-build = { version = "3.0.3" }
|
||||||
|
|
||||||
[package.metadata.risc0]
|
[package.metadata.risc0]
|
||||||
methods = ["guest"]
|
methods = ["guest"]
|
||||||
|
|||||||
@ -6,5 +6,5 @@ edition = "2021"
|
|||||||
[workspace]
|
[workspace]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
risc0-zkvm = { version = "2.3.1", default-features = false, features = ['std'] }
|
risc0-zkvm = { version = "3.0.3", default-features = false, features = ['std'] }
|
||||||
nssa-core = { path = "../../core" }
|
nssa-core = { path = "../../core" }
|
||||||
|
|||||||
@ -18,7 +18,7 @@ reqwest.workspace = true
|
|||||||
thiserror.workspace = true
|
thiserror.workspace = true
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
tempfile.workspace = true
|
tempfile.workspace = true
|
||||||
risc0-zkvm = "2.3.1"
|
risc0-zkvm = "3.0.3"
|
||||||
hex.workspace = true
|
hex.workspace = true
|
||||||
actix-rt.workspace = true
|
actix-rt.workspace = true
|
||||||
clap.workspace = true
|
clap.workspace = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user