mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-05-18 05:59:33 +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(
|
fn compute_circuit_output(
|
||||||
execution_state: ExecutionState,
|
execution_state: ExecutionState,
|
||||||
visibility_mask: &[u8],
|
visibility_mask: &[u8],
|
||||||
|
private_account_nonces: &[Nonce],
|
||||||
private_account_keys: &[(NullifierPublicKey, SharedSecretKey)],
|
private_account_keys: &[(NullifierPublicKey, SharedSecretKey)],
|
||||||
private_account_nsks: &[NullifierSecretKey],
|
private_account_nsks: &[NullifierSecretKey],
|
||||||
private_account_membership_proofs: &[Option<MembershipProof>],
|
private_account_membership_proofs: &[Option<MembershipProof>],
|
||||||
@ -219,6 +220,7 @@ fn compute_circuit_output(
|
|||||||
"Invalid visibility mask length"
|
"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_keys_iter = private_account_keys.iter();
|
||||||
let mut private_nsks_iter = private_account_nsks.iter();
|
let mut private_nsks_iter = private_account_nsks.iter();
|
||||||
let mut private_membership_proofs_iter = private_account_membership_proofs.iter();
|
let mut private_membership_proofs_iter = private_account_membership_proofs.iter();
|
||||||
@ -268,19 +270,12 @@ fn compute_circuit_output(
|
|||||||
panic!("Missing membership proof");
|
panic!("Missing membership proof");
|
||||||
};
|
};
|
||||||
|
|
||||||
let new_nullifier = compute_nullifier_and_set_digest(
|
compute_nullifier_and_set_digest(
|
||||||
membership_proof_opt.as_ref(),
|
membership_proof_opt.as_ref(),
|
||||||
&pre_state.account,
|
&pre_state.account,
|
||||||
npk,
|
npk,
|
||||||
nsk,
|
nsk,
|
||||||
);
|
)
|
||||||
|
|
||||||
let new_nonce = pre_state
|
|
||||||
.account
|
|
||||||
.nonce
|
|
||||||
.private_account_nonce_increment(&nsk);
|
|
||||||
|
|
||||||
(new_nullifier, new_nonce)
|
|
||||||
} else {
|
} else {
|
||||||
// Private account without authentication
|
// Private account without authentication
|
||||||
|
|
||||||
@ -305,17 +300,16 @@ fn compute_circuit_output(
|
|||||||
);
|
);
|
||||||
|
|
||||||
let nullifier = Nullifier::for_account_initialization(npk);
|
let nullifier = Nullifier::for_account_initialization(npk);
|
||||||
|
(nullifier, DUMMY_COMMITMENT_HASH)
|
||||||
let new_nonce = Nonce::private_account_nonce_init(npk);
|
|
||||||
|
|
||||||
((nullifier, DUMMY_COMMITMENT_HASH), new_nonce)
|
|
||||||
};
|
};
|
||||||
output.new_nullifiers.push(new_nullifier);
|
output.new_nullifiers.push(new_nullifier);
|
||||||
|
|
||||||
// Update post-state with new nonce
|
// Update post-state with new nonce
|
||||||
let mut post_with_updated_nonce = post_state;
|
let mut post_with_updated_nonce = post_state;
|
||||||
|
let Some(new_nonce) = private_nonces_iter.next() else {
|
||||||
post_with_updated_nonce.nonce = new_nonce; //*new_nonce;
|
panic!("Missing private account nonce");
|
||||||
|
};
|
||||||
|
post_with_updated_nonce.nonce = *new_nonce;
|
||||||
|
|
||||||
// Compute commitment
|
// Compute commitment
|
||||||
let commitment_post = Commitment::new(npk, &post_with_updated_nonce);
|
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!(
|
assert!(
|
||||||
private_keys_iter.next().is_none(),
|
private_keys_iter.next().is_none(),
|
||||||
"Too many private account keys"
|
"Too many private account keys"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user