format fixes

This commit is contained in:
jonesmarvin8 2026-02-16 20:50:14 -05:00
parent a821f04fb8
commit bf8c47b9b7
24 changed files with 22 additions and 11 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -63,7 +63,13 @@ async fn main() {
.await
.expect("Node should be reachable to query account data");
let signing_keys = [signing_key];
let message = Message::try_new(program.id(), vec![account_id], nonces.iter().map(|x|Nonce(*x)).collect(), greeting).unwrap();
let message = Message::try_new(
program.id(),
vec![account_id],
nonces.iter().map(|x| Nonce(*x)).collect(),
greeting,
)
.unwrap();
// Pass the signing key to sign the message. This will be used by the node
// to flag the pre_state as `is_authorized` when executing the program
let witness_set = WitnessSet::for_message(&message, &signing_keys);

View File

@ -244,7 +244,7 @@ impl From<nssa::public_transaction::Message> for PublicMessage {
Self {
program_id: program_id.into(),
account_ids: account_ids.into_iter().map(Into::into).collect(),
nonces: nonces.iter().map(|x|Nonce(x.0)).collect(),
nonces: nonces.iter().map(|x| Nonce(x.0)).collect(),
instruction_data,
}
}
@ -261,7 +261,10 @@ impl From<PublicMessage> for nssa::public_transaction::Message {
Self::new_preserialized(
program_id.into(),
account_ids.into_iter().map(Into::into).collect(),
nonces.iter().map(|x|nssa_core::account::Nonce(x.0)).collect(),
nonces
.iter()
.map(|x| nssa_core::account::Nonce(x.0))
.collect(),
instruction_data,
)
}
@ -279,7 +282,7 @@ impl From<nssa::privacy_preserving_transaction::message::Message> for PrivacyPre
} = value;
Self {
public_account_ids: public_account_ids.into_iter().map(Into::into).collect(),
nonces: nonces.iter().map(|x|Nonce(x.0)).collect(),
nonces: nonces.iter().map(|x| Nonce(x.0)).collect(),
public_post_states: public_post_states.into_iter().map(Into::into).collect(),
encrypted_private_post_states: encrypted_private_post_states
.into_iter()
@ -308,7 +311,10 @@ impl TryFrom<PrivacyPreservingMessage> for nssa::privacy_preserving_transaction:
} = value;
Ok(Self {
public_account_ids: public_account_ids.into_iter().map(Into::into).collect(),
nonces: nonces.iter().map(|x|nssa_core::account::Nonce(x.0)).collect(),
nonces: nonces
.iter()
.map(|x| nssa_core::account::Nonce(x.0))
.collect(),
public_post_states: public_post_states
.into_iter()
.map(TryInto::try_into)

View File

@ -296,10 +296,12 @@ fn compute_circuit_output(
nsk,
);
let new_nonce = pre_state.account.nonce.private_account_nonce_increment(&nsk);
let new_nonce = pre_state
.account
.nonce
.private_account_nonce_increment(&nsk);
(new_nullifier, new_nonce)
} else {
// Private account without authentication
@ -355,9 +357,6 @@ fn compute_circuit_output(
}
}
//TODO delete
//assert!(private_nonces_iter.next().is_none(), "Too many nonces");
assert!(
private_keys_iter.next().is_none(),
"Too many private account keys"

View File

@ -12,7 +12,7 @@ fn main() {
let account_pre = &pre.account;
let mut account_post = account_pre.clone();
account_post.nonce.0 +=1;
account_post.nonce.0 += 1;
write_nssa_outputs(
instruction_words,