ci: fix fmt-rs, deny advisory, and rebake artifacts

This commit is contained in:
Moudy 2026-04-29 08:54:19 +02:00
parent f7349656c7
commit 55a4a1d83b
40 changed files with 53 additions and 40 deletions

14
Cargo.lock generated
View File

@ -629,9 +629,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
[[package]]
name = "astral-tokio-tar"
version = "0.6.0"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c23f3af104b40a3430ccb90ed5f7bd877a8dc5c26fc92fde51a22b40890dcf9"
checksum = "4ce73b17c62717c4b6a9af10b43e87c578b0cac27e00666d48304d3b7d2c0693"
dependencies = [
"filetime",
"futures-core",
@ -2108,7 +2108,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@ -2409,7 +2409,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.61.2",
"windows-sys 0.52.0",
]
[[package]]
@ -7085,7 +7085,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys",
"windows-sys 0.61.2",
"windows-sys 0.52.0",
]
[[package]]
@ -8018,7 +8018,7 @@ dependencies = [
"getrandom 0.4.2",
"once_cell",
"rustix",
"windows-sys 0.61.2",
"windows-sys 0.52.0",
]
[[package]]
@ -9301,7 +9301,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.52.0",
]
[[package]]

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -71,7 +71,10 @@ impl PrivacyPreservingCircuitInputAccount {
#[must_use]
pub const fn is_private_pda(&self) -> bool {
matches!(self, Self::PrivatePdaInit { .. } | Self::PrivatePdaUpdate { .. })
matches!(
self,
Self::PrivatePdaInit { .. } | Self::PrivatePdaUpdate { .. }
)
}
/// For private PDA variants, return the nullifier public key. `Init` carries it directly;

View File

@ -3220,10 +3220,12 @@ pub mod tests {
let (output, proof) = execute_and_prove(
vec![authorized_account],
Program::serialize_instruction(balance).unwrap(),
vec![PrivacyPreservingCircuitInputAccount::PrivateAuthorizedInit {
ssk: shared_secret,
nsk: private_keys.nsk,
}],
vec![
PrivacyPreservingCircuitInputAccount::PrivateAuthorizedInit {
ssk: shared_secret,
nsk: private_keys.nsk,
},
],
&program.into(),
)
.unwrap();
@ -3318,10 +3320,12 @@ pub mod tests {
let (output, proof) = execute_and_prove(
vec![authorized_account.clone()],
Program::serialize_instruction(balance).unwrap(),
vec![PrivacyPreservingCircuitInputAccount::PrivateAuthorizedInit {
ssk: shared_secret,
nsk: private_keys.nsk,
}],
vec![
PrivacyPreservingCircuitInputAccount::PrivateAuthorizedInit {
ssk: shared_secret,
nsk: private_keys.nsk,
},
],
&claimer_program.into(),
)
.unwrap();
@ -3363,10 +3367,12 @@ pub mod tests {
let res = execute_and_prove(
vec![account_metadata],
Program::serialize_instruction(()).unwrap(),
vec![PrivacyPreservingCircuitInputAccount::PrivateAuthorizedInit {
ssk: shared_secret2,
nsk: private_keys.nsk,
}],
vec![
PrivacyPreservingCircuitInputAccount::PrivateAuthorizedInit {
ssk: shared_secret2,
nsk: private_keys.nsk,
},
],
&noop_program.into(),
);
@ -3439,11 +3445,13 @@ pub mod tests {
let result = execute_and_prove(
vec![private_account],
Program::serialize_instruction(instruction).unwrap(),
vec![PrivacyPreservingCircuitInputAccount::PrivateAuthorizedUpdate {
ssk: SharedSecretKey::new(&[3; 32], &sender_keys.vpk()),
nsk: sender_keys.nsk,
membership_proof: (0, vec![]),
}],
vec![
PrivacyPreservingCircuitInputAccount::PrivateAuthorizedUpdate {
ssk: SharedSecretKey::new(&[3; 32], &sender_keys.vpk()),
nsk: sender_keys.nsk,
membership_proof: (0, vec![]),
},
],
&program.into(),
);
@ -3464,11 +3472,13 @@ pub mod tests {
let result = execute_and_prove(
vec![private_account],
Program::serialize_instruction(instruction).unwrap(),
vec![PrivacyPreservingCircuitInputAccount::PrivateAuthorizedUpdate {
ssk: SharedSecretKey::new(&[3; 32], &sender_keys.vpk()),
nsk: sender_keys.nsk,
membership_proof: (0, vec![]),
}],
vec![
PrivacyPreservingCircuitInputAccount::PrivateAuthorizedUpdate {
ssk: SharedSecretKey::new(&[3; 32], &sender_keys.vpk()),
nsk: sender_keys.nsk,
membership_proof: (0, vec![]),
},
],
&program.into(),
);

View File

@ -353,7 +353,9 @@ impl ExecutionState {
let npk = self
.private_pda_npk_by_position
.get(&pre_state_position)
.expect("private PDA pre_state must have an npk in the position map");
.expect(
"private PDA pre_state must have an npk in the position map",
);
let pda = AccountId::for_private_pda(&program_id, &seed, npk);
assert_eq!(
pre_account_id, pda,
@ -486,11 +488,7 @@ fn compute_circuit_output(
};
let states_iter = execution_state.into_states_iter();
assert_eq!(
accounts.len(),
states_iter.len(),
"Invalid accounts length"
);
assert_eq!(accounts.len(), states_iter.len(), "Invalid accounts length");
let mut output_index = 0;
for (account, (pre_state, post_state)) in accounts.iter().zip(states_iter) {

View File

@ -1109,10 +1109,12 @@ mod tests {
let (output, proof) = execute_and_prove(
vec![AccountWithMetadata::new(Account::default(), true, &npk)],
Program::serialize_instruction(0_u128).unwrap(),
vec![PrivacyPreservingCircuitInputAccount::PrivateAuthorizedInit {
ssk: shared_secret,
nsk,
}],
vec![
PrivacyPreservingCircuitInputAccount::PrivateAuthorizedInit {
ssk: shared_secret,
nsk,
},
],
&Program::authenticated_transfer_program().into(),
)
.unwrap();