mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-03-20 10:53:11 +00:00
fix additional main merge errors
This commit is contained in:
parent
ba8fdf4f29
commit
bd79e982fd
@ -200,6 +200,7 @@ impl ExecutionState {
|
||||
fn compute_circuit_output(
|
||||
execution_state: ExecutionState,
|
||||
visibility_mask: &[u8],
|
||||
private_account_nonces: &[Nonce],
|
||||
private_account_keys: &[(NullifierPublicKey, SharedSecretKey)],
|
||||
private_account_nsks: &[NullifierSecretKey],
|
||||
private_account_membership_proofs: &[Option<MembershipProof>],
|
||||
@ -219,6 +220,7 @@ fn compute_circuit_output(
|
||||
"Invalid visibility mask length"
|
||||
);
|
||||
|
||||
let mut private_nonces_iter = private_account_nonces.iter();
|
||||
let mut private_keys_iter = private_account_keys.iter();
|
||||
let mut private_nsks_iter = private_account_nsks.iter();
|
||||
let mut private_membership_proofs_iter = private_account_membership_proofs.iter();
|
||||
@ -268,19 +270,12 @@ fn compute_circuit_output(
|
||||
panic!("Missing membership proof");
|
||||
};
|
||||
|
||||
let new_nullifier = compute_nullifier_and_set_digest(
|
||||
compute_nullifier_and_set_digest(
|
||||
membership_proof_opt.as_ref(),
|
||||
&pre_state.account,
|
||||
npk,
|
||||
nsk,
|
||||
);
|
||||
|
||||
let new_nonce = pre_state
|
||||
.account
|
||||
.nonce
|
||||
.private_account_nonce_increment(&nsk);
|
||||
|
||||
(new_nullifier, new_nonce)
|
||||
)
|
||||
} else {
|
||||
// Private account without authentication
|
||||
|
||||
@ -305,17 +300,16 @@ fn compute_circuit_output(
|
||||
);
|
||||
|
||||
let nullifier = Nullifier::for_account_initialization(npk);
|
||||
|
||||
let new_nonce = Nonce::private_account_nonce_init(npk);
|
||||
|
||||
((nullifier, DUMMY_COMMITMENT_HASH), new_nonce)
|
||||
(nullifier, DUMMY_COMMITMENT_HASH)
|
||||
};
|
||||
output.new_nullifiers.push(new_nullifier);
|
||||
|
||||
// Update post-state with new nonce
|
||||
let mut post_with_updated_nonce = post_state;
|
||||
|
||||
post_with_updated_nonce.nonce = new_nonce; //*new_nonce;
|
||||
let Some(new_nonce) = private_nonces_iter.next() else {
|
||||
panic!("Missing private account nonce");
|
||||
};
|
||||
post_with_updated_nonce.nonce = *new_nonce;
|
||||
|
||||
// Compute commitment
|
||||
let commitment_post = Commitment::new(npk, &post_with_updated_nonce);
|
||||
@ -338,6 +332,8 @@ fn compute_circuit_output(
|
||||
}
|
||||
}
|
||||
|
||||
assert!(private_nonces_iter.next().is_none(), "Too many nonces");
|
||||
|
||||
assert!(
|
||||
private_keys_iter.next().is_none(),
|
||||
"Too many private account keys"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user