Skip to content

Commit

Permalink
fixed secret
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-barrett committed Aug 23, 2023
1 parent 0c6514c commit e241b1a
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/lem/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,18 @@ fn apply_cont() -> Func {
return(result, env, err, errctrl)
}
Symbol("secret") => {
let (secret, _payload) = open(result);
return(secret, env, continuation, makethunk)
match result.tag {
Expr::Num => {
let result = cast(result, Expr::Comm);
let (secret, _payload) = open(result);
return(secret, env, continuation, makethunk)
}
Expr::Comm => {
let (secret, _payload) = open(result);
return(secret, env, continuation, makethunk)
}
};
return(result, env, err, errctrl)
}
Symbol("commit") => {
let comm = hide(zero, result);
Expand Down Expand Up @@ -1067,8 +1077,8 @@ mod tests {
use blstrs::Scalar as Fr;

const NUM_INPUTS: usize = 1;
const NUM_AUX: usize = 10777;
const NUM_CONSTRAINTS: usize = 13235;
const NUM_AUX: usize = 10785;
const NUM_CONSTRAINTS: usize = 13264;
const NUM_SLOTS: SlotsCounter = SlotsCounter {
hash2: 16,
hash3: 4,
Expand Down

0 comments on commit e241b1a

Please sign in to comment.