Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Commit

Permalink
Add support for stct proof
Browse files Browse the repository at this point in the history
  • Loading branch information
Daksh14 committed Nov 1, 2023
1 parent 709b1c4 commit dfb2d55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions assets/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
}
}
},
"Crossover": {
"CrossoverType": {
"description": "The value of the Crossover and the blinder",
"type": "object",
"required": [
Expand Down Expand Up @@ -193,7 +193,7 @@
},
"crossover": {
"description": "The crossover value",
"$ref": "#/definitions/Crossover"
"$ref": "#/definitions/CrossoverType"
},
"fee": {
"description": "A rkyv serialized Fee",
Expand Down
4 changes: 2 additions & 2 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ pub fn execute(args: i32, len: i32) -> i64 {
outputs.push(o);
}

let rng = &mut utils::rng(&rng_seed);
let rng = &mut utils::rng(rng_seed);
let tx = tx::UnprovenTransaction::new(
rng, inputs, outputs, fee, crossover, call,
);
Expand Down Expand Up @@ -313,7 +313,7 @@ pub fn filter_notes(args: i32, len: i32) -> i64 {

let notes: Vec<_> = notes
.into_iter()
.zip(flags.into_iter())
.zip(flags)
.filter_map(|(n, f)| (!f).then_some(n))
.collect();

Expand Down
7 changes: 3 additions & 4 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ where
compose(true, ptr, len)
}

/// Creates a secure RNG from a seed.
/// We should keep this above 64 to be secure
pub fn rng(seed: &[u8; 32]) -> ChaCha12Rng {
ChaCha12Rng::from_seed(*seed)
/// Creates a secure RNG directly a seed.
pub fn rng(seed: [u8; 32]) -> ChaCha12Rng {
ChaCha12Rng::from_seed(seed)
}

/// Creates a secure RNG from a seed with embedded index.
Expand Down

0 comments on commit dfb2d55

Please sign in to comment.