ci: address fmt-rs, lint, and unit-tests failures from the merge

This commit is contained in:
Moudy 2026-04-30 22:16:26 +02:00
parent 8517906025
commit 8a8bac8b69
30 changed files with 13 additions and 22 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -27,7 +27,7 @@ use nssa::{
public_transaction as putx,
};
use nssa_core::{
MembershipProof, NullifierPublicKey, InputAccountIdentity,
InputAccountIdentity, MembershipProof, NullifierPublicKey,
account::{AccountWithMetadata, Nonce, data::Data},
encryption::ViewingPublicKey,
};

View File

@ -29,7 +29,7 @@ pub enum InputAccountIdentity {
/// commitment, ciphertext, or nullifier.
Public,
/// Init of an authorized standalone private account: no membership proof. The `pre_state`
/// must be `Account::default()`. The account_id is derived as
/// must be `Account::default()`. The `account_id` is derived as
/// `AccountId::from((&NullifierPublicKey::from(nsk), identifier))` and matched against
/// `pre_state.account_id`.
PrivateAuthorizedInit {

View File

@ -2177,14 +2177,16 @@ pub mod tests {
let private_pda_account =
AccountWithMetadata::new(Account::default(), false, AccountId::new([1; 32]));
let visibility_mask = [0, 3];
let result = execute_and_prove(
vec![public_account_1, private_pda_account],
Program::serialize_instruction(10_u128).unwrap(),
visibility_mask.to_vec(),
vec![(npk, 0, shared_secret)],
vec![],
vec![None],
vec![
InputAccountIdentity::Public,
InputAccountIdentity::PrivatePdaInit {
npk,
ssk: shared_secret,
},
],
&program.into(),
);

View File

@ -498,9 +498,7 @@ fn compute_circuit_output(
);
let mut output_index = 0;
for (account_identity, (pre_state, post_state)) in
account_identities.iter().zip(states_iter)
{
for (account_identity, (pre_state, post_state)) in account_identities.iter().zip(states_iter) {
match account_identity {
InputAccountIdentity::Public => {
output.public_pre_states.push(pre_state);
@ -518,10 +516,7 @@ fn compute_circuit_output(
let npk = NullifierPublicKey::from(nsk);
let account_id = AccountId::from((&npk, *identifier));
assert_eq!(
account_id, pre_state.account_id,
"AccountId mismatch"
);
assert_eq!(account_id, pre_state.account_id, "AccountId mismatch");
assert!(
pre_state.is_authorized,
"Pre-state not authorized for authenticated private account"
@ -562,10 +557,7 @@ fn compute_circuit_output(
let npk = NullifierPublicKey::from(nsk);
let account_id = AccountId::from((&npk, *identifier));
assert_eq!(
account_id, pre_state.account_id,
"AccountId mismatch"
);
assert_eq!(account_id, pre_state.account_id, "AccountId mismatch");
assert!(
pre_state.is_authorized,
"Pre-state not authorized for authenticated private account"
@ -601,10 +593,7 @@ fn compute_circuit_output(
);
let account_id = AccountId::from((npk, *identifier));
assert_eq!(
account_id, pre_state.account_id,
"AccountId mismatch"
);
assert_eq!(account_id, pre_state.account_id, "AccountId mismatch");
assert_eq!(
pre_state.account,
Account::default(),