diff --git a/artifacts/program_methods/amm.bin b/artifacts/program_methods/amm.bin index c780e6b3..b3f45bb8 100644 Binary files a/artifacts/program_methods/amm.bin and b/artifacts/program_methods/amm.bin differ diff --git a/artifacts/program_methods/associated_token_account.bin b/artifacts/program_methods/associated_token_account.bin index 0316eaee..b7df725e 100644 Binary files a/artifacts/program_methods/associated_token_account.bin and b/artifacts/program_methods/associated_token_account.bin differ diff --git a/artifacts/program_methods/authenticated_transfer.bin b/artifacts/program_methods/authenticated_transfer.bin index 5a8c88d7..faf0b9b6 100644 Binary files a/artifacts/program_methods/authenticated_transfer.bin and b/artifacts/program_methods/authenticated_transfer.bin differ diff --git a/artifacts/program_methods/clock.bin b/artifacts/program_methods/clock.bin index 37a4d30f..3e31ce96 100644 Binary files a/artifacts/program_methods/clock.bin and b/artifacts/program_methods/clock.bin differ diff --git a/artifacts/program_methods/pinata.bin b/artifacts/program_methods/pinata.bin index 04326ebf..3cd4e775 100644 Binary files a/artifacts/program_methods/pinata.bin and b/artifacts/program_methods/pinata.bin differ diff --git a/artifacts/program_methods/pinata_token.bin b/artifacts/program_methods/pinata_token.bin index c662db47..53d01729 100644 Binary files a/artifacts/program_methods/pinata_token.bin and b/artifacts/program_methods/pinata_token.bin differ diff --git a/artifacts/program_methods/privacy_preserving_circuit.bin b/artifacts/program_methods/privacy_preserving_circuit.bin index a7e81cf4..bae8f89f 100644 Binary files a/artifacts/program_methods/privacy_preserving_circuit.bin and b/artifacts/program_methods/privacy_preserving_circuit.bin differ diff --git a/artifacts/program_methods/token.bin b/artifacts/program_methods/token.bin index 599ef7df..33cb3836 100644 Binary files a/artifacts/program_methods/token.bin and b/artifacts/program_methods/token.bin differ diff --git a/artifacts/test_program_methods/burner.bin b/artifacts/test_program_methods/burner.bin index 59557543..20e8510c 100644 Binary files a/artifacts/test_program_methods/burner.bin and b/artifacts/test_program_methods/burner.bin differ diff --git a/artifacts/test_program_methods/chain_caller.bin b/artifacts/test_program_methods/chain_caller.bin index 69aa790d..b5aea81f 100644 Binary files a/artifacts/test_program_methods/chain_caller.bin and b/artifacts/test_program_methods/chain_caller.bin differ diff --git a/artifacts/test_program_methods/changer_claimer.bin b/artifacts/test_program_methods/changer_claimer.bin index 471314e5..1287d385 100644 Binary files a/artifacts/test_program_methods/changer_claimer.bin and b/artifacts/test_program_methods/changer_claimer.bin differ diff --git a/artifacts/test_program_methods/claimer.bin b/artifacts/test_program_methods/claimer.bin index 8f23cffc..43ed5f4f 100644 Binary files a/artifacts/test_program_methods/claimer.bin and b/artifacts/test_program_methods/claimer.bin differ diff --git a/artifacts/test_program_methods/clock_chain_caller.bin b/artifacts/test_program_methods/clock_chain_caller.bin index 2faa9b69..c99cd0ce 100644 Binary files a/artifacts/test_program_methods/clock_chain_caller.bin and b/artifacts/test_program_methods/clock_chain_caller.bin differ diff --git a/artifacts/test_program_methods/data_changer.bin b/artifacts/test_program_methods/data_changer.bin index 87775199..a5e415d2 100644 Binary files a/artifacts/test_program_methods/data_changer.bin and b/artifacts/test_program_methods/data_changer.bin differ diff --git a/artifacts/test_program_methods/extra_output.bin b/artifacts/test_program_methods/extra_output.bin index 2316340b..2c5ddb72 100644 Binary files a/artifacts/test_program_methods/extra_output.bin and b/artifacts/test_program_methods/extra_output.bin differ diff --git a/artifacts/test_program_methods/flash_swap_callback.bin b/artifacts/test_program_methods/flash_swap_callback.bin index f259c5b3..c366bb35 100644 Binary files a/artifacts/test_program_methods/flash_swap_callback.bin and b/artifacts/test_program_methods/flash_swap_callback.bin differ diff --git a/artifacts/test_program_methods/flash_swap_initiator.bin b/artifacts/test_program_methods/flash_swap_initiator.bin index f1b67504..c1d7af8c 100644 Binary files a/artifacts/test_program_methods/flash_swap_initiator.bin and b/artifacts/test_program_methods/flash_swap_initiator.bin differ diff --git a/artifacts/test_program_methods/malicious_authorization_changer.bin b/artifacts/test_program_methods/malicious_authorization_changer.bin index 683202fd..1d7fa13e 100644 Binary files a/artifacts/test_program_methods/malicious_authorization_changer.bin and b/artifacts/test_program_methods/malicious_authorization_changer.bin differ diff --git a/artifacts/test_program_methods/malicious_caller_program_id.bin b/artifacts/test_program_methods/malicious_caller_program_id.bin index 9907ba58..e2eeb9d2 100644 Binary files a/artifacts/test_program_methods/malicious_caller_program_id.bin and b/artifacts/test_program_methods/malicious_caller_program_id.bin differ diff --git a/artifacts/test_program_methods/malicious_self_program_id.bin b/artifacts/test_program_methods/malicious_self_program_id.bin index b530a0b3..a745e6f8 100644 Binary files a/artifacts/test_program_methods/malicious_self_program_id.bin and b/artifacts/test_program_methods/malicious_self_program_id.bin differ diff --git a/artifacts/test_program_methods/minter.bin b/artifacts/test_program_methods/minter.bin index c49b681b..c6a2f5ec 100644 Binary files a/artifacts/test_program_methods/minter.bin and b/artifacts/test_program_methods/minter.bin differ diff --git a/artifacts/test_program_methods/missing_output.bin b/artifacts/test_program_methods/missing_output.bin index 4ff2599e..77b3b0dd 100644 Binary files a/artifacts/test_program_methods/missing_output.bin and b/artifacts/test_program_methods/missing_output.bin differ diff --git a/artifacts/test_program_methods/modified_transfer.bin b/artifacts/test_program_methods/modified_transfer.bin index 19b684c3..a370d528 100644 Binary files a/artifacts/test_program_methods/modified_transfer.bin and b/artifacts/test_program_methods/modified_transfer.bin differ diff --git a/artifacts/test_program_methods/nonce_changer.bin b/artifacts/test_program_methods/nonce_changer.bin index 7e9e2ee5..5f95e69b 100644 Binary files a/artifacts/test_program_methods/nonce_changer.bin and b/artifacts/test_program_methods/nonce_changer.bin differ diff --git a/artifacts/test_program_methods/noop.bin b/artifacts/test_program_methods/noop.bin index af0041e8..4e5d29bd 100644 Binary files a/artifacts/test_program_methods/noop.bin and b/artifacts/test_program_methods/noop.bin differ diff --git a/artifacts/test_program_methods/pinata_cooldown.bin b/artifacts/test_program_methods/pinata_cooldown.bin index 36e60f9c..ae1e3971 100644 Binary files a/artifacts/test_program_methods/pinata_cooldown.bin and b/artifacts/test_program_methods/pinata_cooldown.bin differ diff --git a/artifacts/test_program_methods/program_owner_changer.bin b/artifacts/test_program_methods/program_owner_changer.bin index 9fe35bf6..e36a7c10 100644 Binary files a/artifacts/test_program_methods/program_owner_changer.bin and b/artifacts/test_program_methods/program_owner_changer.bin differ diff --git a/artifacts/test_program_methods/simple_balance_transfer.bin b/artifacts/test_program_methods/simple_balance_transfer.bin index ffc9d5d6..25ef436e 100644 Binary files a/artifacts/test_program_methods/simple_balance_transfer.bin and b/artifacts/test_program_methods/simple_balance_transfer.bin differ diff --git a/artifacts/test_program_methods/time_locked_transfer.bin b/artifacts/test_program_methods/time_locked_transfer.bin index 8b3da3ea..bf0cfef2 100644 Binary files a/artifacts/test_program_methods/time_locked_transfer.bin and b/artifacts/test_program_methods/time_locked_transfer.bin differ diff --git a/artifacts/test_program_methods/validity_window.bin b/artifacts/test_program_methods/validity_window.bin index 4ec53610..fad0c516 100644 Binary files a/artifacts/test_program_methods/validity_window.bin and b/artifacts/test_program_methods/validity_window.bin differ diff --git a/artifacts/test_program_methods/validity_window_chain_caller.bin b/artifacts/test_program_methods/validity_window_chain_caller.bin index 6eb706cb..678073f6 100644 Binary files a/artifacts/test_program_methods/validity_window_chain_caller.bin and b/artifacts/test_program_methods/validity_window_chain_caller.bin differ diff --git a/indexer/core/src/block_store.rs b/indexer/core/src/block_store.rs index 2d05fe94..e65cd81d 100644 --- a/indexer/core/src/block_store.rs +++ b/indexer/core/src/block_store.rs @@ -185,11 +185,11 @@ mod tests { } fn acc1() -> AccountId { - AccountId::public_account_id(&PublicKey::new_from_private_key(&acc1_sign_key()), None) + AccountId::public_account_id(&PublicKey::new_from_private_key(&acc1_sign_key())) } fn acc2() -> AccountId { - AccountId::public_account_id(&PublicKey::new_from_private_key(&acc2_sign_key()), None) + AccountId::public_account_id(&PublicKey::new_from_private_key(&acc2_sign_key())) } #[test] diff --git a/indexer/core/src/lib.rs b/indexer/core/src/lib.rs index 4e7d60bd..120ed707 100644 --- a/indexer/core/src/lib.rs +++ b/indexer/core/src/lib.rs @@ -12,6 +12,7 @@ use logos_blockchain_core::mantle::{ ops::channel::{ChannelId, inscribe::InscriptionOp}, }; use nssa::{AccountId, V03State}; +use nssa_core::account::Identifier; use testnet_initial_state::initial_state_testnet; use crate::{block_store::IndexerStore, config::IndexerConfig}; @@ -71,7 +72,7 @@ impl IndexerCore { acc.program_owner = nssa::program::Program::authenticated_transfer_program().id(); - nssa_core::Commitment::new(&AccountId::private_account_id(npk, None), &acc) + nssa_core::Commitment::new(&AccountId::private_account_id(npk, Identifier(0_u128)), &acc) }) .collect() }); diff --git a/integration_tests/src/config.rs b/integration_tests/src/config.rs index 2c0926df..630552ac 100644 --- a/integration_tests/src/config.rs +++ b/integration_tests/src/config.rs @@ -5,7 +5,7 @@ use bytesize::ByteSize; use indexer_service::{BackoffConfig, ChannelId, ClientConfig, IndexerConfig}; use key_protocol::key_management::KeyChain; use nssa::{Account, AccountId}; -use nssa_core::{PrivateKey, PublicKey, account::Data, program::DEFAULT_PROGRAM_ID}; +use nssa_core::{PrivateKey, PublicKey, account::{Data, Identifier}, program::DEFAULT_PROGRAM_ID}; use sequencer_core::config::{BedrockConfig, SequencerConfig}; use testnet_initial_state::{ PrivateAccountPrivateInitialData, PrivateAccountPublicInitialData, @@ -46,11 +46,11 @@ impl InitialData { let mut public_alice_public_key = PublicKey::new_from_private_key(&public_alice_private_key); let mut public_alice_account_id = - AccountId::public_account_id(&public_alice_public_key, None); + AccountId::public_account_id(&public_alice_public_key); let mut public_bob_private_key = PrivateKey::new_os_random(); let mut public_bob_public_key = PublicKey::new_from_private_key(&public_bob_private_key); - let mut public_bob_account_id = AccountId::public_account_id(&public_bob_public_key, None); + let mut public_bob_account_id = AccountId::public_account_id(&public_bob_public_key); // Ensure consistent ordering if public_alice_account_id > public_bob_account_id { @@ -61,11 +61,11 @@ impl InitialData { let mut private_charlie_key_chain = KeyChain::new_os_random(); let mut private_charlie_account_id = - AccountId::private_account_id(&private_charlie_key_chain.nullifier_public_key, None); + AccountId::private_account_id(&private_charlie_key_chain.nullifier_public_key, Identifier(0_u128)); let mut private_david_key_chain = KeyChain::new_os_random(); let mut private_david_account_id = - AccountId::private_account_id(&private_david_key_chain.nullifier_public_key, None); + AccountId::private_account_id(&private_david_key_chain.nullifier_public_key, Identifier(0_u128)); // Ensure consistent ordering if private_charlie_account_id > private_david_account_id { @@ -109,7 +109,7 @@ impl InitialData { .iter() .map(|(priv_key, balance)| { let pub_key = PublicKey::new_from_private_key(priv_key); - let account_id = AccountId::public_account_id(&pub_key, None); + let account_id = AccountId::public_account_id(&pub_key); PublicAccountPublicInitialData { account_id, balance: *balance, @@ -133,7 +133,7 @@ impl InitialData { .iter() .map(|(priv_key, _)| { let pub_key = PublicKey::new_from_private_key(priv_key); - let account_id = AccountId::public_account_id(&pub_key, None); + let account_id = AccountId::public_account_id(&pub_key); InitialAccountData::Public(PublicAccountPrivateInitialData { account_id, pub_sign_key: priv_key.clone(), @@ -141,7 +141,7 @@ impl InitialData { }) .chain(self.private_accounts.iter().map(|(key_chain, account)| { let account_id = - AccountId::private_account_id(&key_chain.nullifier_public_key, None); + AccountId::private_account_id(&key_chain.nullifier_public_key, Identifier(0_u128)); InitialAccountData::Private(Box::new(PrivateAccountPrivateInitialData { account_id, account: account.clone(), diff --git a/integration_tests/tests/tps.rs b/integration_tests/tests/tps.rs index c124dbcf..58e1b001 100644 --- a/integration_tests/tests/tps.rs +++ b/integration_tests/tests/tps.rs @@ -28,7 +28,7 @@ use nssa::{ }; use nssa_core::{ MembershipProof, NullifierPublicKey, PrivateKey, PublicKey, - account::{AccountWithMetadata, Nonce, data::Data}, + account::{AccountWithMetadata, Identifier, Nonce, data::Data}, encryption::ViewingPublicKey, }; use sequencer_service_rpc::RpcClient as _; @@ -49,7 +49,7 @@ impl TpsTestManager { private_key_bytes[..8].copy_from_slice(&i.to_le_bytes()); let private_key = PrivateKey::try_new(private_key_bytes).unwrap(); let public_key = PublicKey::new_from_private_key(&private_key); - let account_id = AccountId::public_account_id(&public_key, None); + let account_id = AccountId::public_account_id(&public_key); (private_key, account_id) }) .collect(); @@ -212,7 +212,7 @@ fn build_privacy_transaction() -> PrivacyPreservingTransaction { let sender_vsk = [99; 32]; let sender_vpk = ViewingPublicKey::from_scalar(sender_vsk); let sender_npk = NullifierPublicKey::from(&sender_nsk); - let sender_id = AccountId::private_account_id(&sender_npk, None); + let sender_id = AccountId::private_account_id(&sender_npk, Identifier(0_u128)); let sender_pre = AccountWithMetadata::new( Account { balance: 100, @@ -221,17 +221,17 @@ fn build_privacy_transaction() -> PrivacyPreservingTransaction { data: Data::default(), }, true, - AccountId::private_account_id(&sender_npk, None), + AccountId::private_account_id(&sender_npk, Identifier(0_u128)), ); let recipient_nsk = [2; 32]; let recipient_vsk = [99; 32]; let recipient_vpk = ViewingPublicKey::from_scalar(recipient_vsk); let recipient_npk = NullifierPublicKey::from(&recipient_nsk); - let recipient_id = AccountId::private_account_id(&recipient_npk, None); + let recipient_id = AccountId::private_account_id(&recipient_npk, Identifier(0_u128)); let recipient_pre = AccountWithMetadata::new( Account::default(), false, - AccountId::private_account_id(&recipient_npk, None), + AccountId::private_account_id(&recipient_npk, Identifier(0_u128)), ); let eph_holder_from = EphemeralKeyHolder::new(&sender_npk); diff --git a/integration_tests/tests/wallet_ffi.rs b/integration_tests/tests/wallet_ffi.rs index 23045023..bf37ea8d 100644 --- a/integration_tests/tests/wallet_ffi.rs +++ b/integration_tests/tests/wallet_ffi.rs @@ -22,7 +22,7 @@ use anyhow::Result; use integration_tests::{BlockingTestContext, TIME_TO_WAIT_FOR_BLOCK_SECONDS}; use log::info; use nssa::{Account, AccountId, program::Program}; -use nssa_core::{PrivateKey, PublicKey, program::DEFAULT_PROGRAM_ID}; +use nssa_core::{PrivateKey, PublicKey, account::Identifier, program::DEFAULT_PROGRAM_ID}; use tempfile::tempdir; use wallet_ffi::{ FfiAccount, FfiAccountList, FfiBytes32, FfiPrivateAccountKeys, FfiPublicAccountKey, @@ -332,7 +332,7 @@ fn wallet_ffi_save_and_load_persistent_storage() -> Result<()> { }; assert_eq!( - nssa::AccountId::private_account_id(&private_account_keys.npk(), None), + nssa::AccountId::private_account_id(&private_account_keys.npk(), Identifier(0_u128)), out_private_account_id.into() ); @@ -607,7 +607,7 @@ fn test_wallet_ffi_get_private_account_keys() -> Result<()> { fn test_wallet_ffi_account_id_to_base58() -> Result<()> { let private_key = PrivateKey::new_os_random(); let public_key = PublicKey::new_from_private_key(&private_key); - let account_id = AccountId::public_account_id(&public_key, None); + let account_id = AccountId::public_account_id(&public_key); let ffi_bytes: FfiBytes32 = (&account_id).into(); let ptr = unsafe { wallet_ffi_account_id_to_base58(&raw const ffi_bytes) }; @@ -626,7 +626,7 @@ fn test_wallet_ffi_account_id_to_base58() -> Result<()> { fn wallet_ffi_base58_to_account_id() -> Result<()> { let private_key = PrivateKey::new_os_random(); let public_key = PublicKey::new_from_private_key(&private_key); - let account_id = AccountId::public_account_id(&public_key, None); + let account_id = AccountId::public_account_id(&public_key); let account_id_str = account_id.to_string(); let account_id_c_str = CString::new(account_id_str.clone())?; let account_id: AccountId = unsafe { diff --git a/nssa/core/src/signature/mod.rs b/nssa/core/src/signature/mod.rs index 197fdc2b..467c5048 100644 --- a/nssa/core/src/signature/mod.rs +++ b/nssa/core/src/signature/mod.rs @@ -74,7 +74,8 @@ impl Signature { } #[cfg(feature = "test-utils")] - pub fn new_for_tests(value: [u8; 64]) -> Self { + #[must_use] + pub const fn new_for_tests(value: [u8; 64]) -> Self { Self { value } } } diff --git a/nssa/src/lib.rs b/nssa/src/lib.rs index 593a1bfa..b3c440c7 100644 --- a/nssa/src/lib.rs +++ b/nssa/src/lib.rs @@ -15,7 +15,6 @@ pub use privacy_preserving_transaction::{ pub use program_deployment_transaction::ProgramDeploymentTransaction; pub use program_methods::PRIVACY_PRESERVING_CIRCUIT_ID; pub use public_transaction::PublicTransaction; -pub use signature::{PrivateKey, PublicKey, Signature}; pub use state::{ CLOCK_01_PROGRAM_ACCOUNT_ID, CLOCK_10_PROGRAM_ACCOUNT_ID, CLOCK_50_PROGRAM_ACCOUNT_ID, CLOCK_PROGRAM_ACCOUNT_IDS, V03State, diff --git a/nssa/src/public_transaction/transaction.rs b/nssa/src/public_transaction/transaction.rs index cb2d0eb0..69dd107c 100644 --- a/nssa/src/public_transaction/transaction.rs +++ b/nssa/src/public_transaction/transaction.rs @@ -61,7 +61,7 @@ impl PublicTransaction { #[cfg(test)] pub mod tests { - use nssa_core::{PrivateKey, PublicKey, Signature}; + use nssa_core::{PrivateKey, PublicKey}; use sha2::{Digest as _, digest::FixedOutput as _}; use crate::{ @@ -205,6 +205,8 @@ pub mod tests { #[cfg(feature = "test-utils")] #[test] fn all_signatures_must_be_valid() { + use nssa_core::Signature; + let (key1, key2, addr1, addr2) = keys_for_tests(); let state = state_for_tests(); let nonces = vec![0_u128.into(), 0_u128.into()]; diff --git a/nssa/src/state.rs b/nssa/src/state.rs index efed7e8f..5e898dde 100644 --- a/nssa/src/state.rs +++ b/nssa/src/state.rs @@ -357,7 +357,6 @@ pub mod tests { use std::collections::HashMap; use nssa_core::account::Identifier; - #[allow(unused_imports)] use nssa_core::{ BlockId, Commitment, Nullifier, NullifierPublicKey, NullifierSecretKey, PrivateKey, PublicKey, SharedSecretKey, Timestamp, @@ -378,7 +377,6 @@ pub mod tests { }, program::Program, public_transaction, - signature::PrivateKey, state::{ CLOCK_01_PROGRAM_ACCOUNT_ID, CLOCK_10_PROGRAM_ACCOUNT_ID, CLOCK_50_PROGRAM_ACCOUNT_ID, CLOCK_PROGRAM_ACCOUNT_IDS, MAX_NUMBER_CHAINED_CALLS, @@ -2595,7 +2593,7 @@ pub mod tests { fn unauthorized_public_account_claiming_fails() { let program = Program::authenticated_transfer_program(); let account_key = PrivateKey::try_new([9; 32]).unwrap(); - let account_id = AccountId::from(&PublicKey::new_from_private_key(&account_key)); + let account_id = AccountId::public_account_id(&PublicKey::new_from_private_key(&account_key)); let mut state = V03State::new_with_genesis_accounts(&[], &[], 0); assert_eq!(state.get_account_by_id(account_id), Account::default()); @@ -2616,7 +2614,7 @@ pub mod tests { fn authorized_public_account_claiming_succeeds() { let program = Program::authenticated_transfer_program(); let account_key = PrivateKey::try_new([10; 32]).unwrap(); - let account_id = AccountId::from(&PublicKey::new_from_private_key(&account_key)); + let account_id = AccountId::public_account_id(&PublicKey::new_from_private_key(&account_key)); let mut state = V03State::new_with_genesis_accounts(&[], &[], 0); assert_eq!(state.get_account_by_id(account_id), Account::default()); @@ -2912,7 +2910,6 @@ pub mod tests { ); } - // TODO: Marvin check this #[test_case::test_case(1; "single call")] #[test_case::test_case(2; "two calls")] fn private_chained_call(number_of_calls: u32) { @@ -3839,7 +3836,7 @@ pub mod tests { V03State::new_with_genesis_accounts(&[(recipient_id, 0)], &[], genesis_timestamp) .with_test_programs(); let key1 = PrivateKey::try_new([1; 32]).unwrap(); - let sender_id = AccountId::from(&PublicKey::new_from_private_key(&key1)); + let sender_id = AccountId::public_account_id(&PublicKey::new_from_private_key(&key1)); state.force_insert_account( sender_id, Account { @@ -3882,7 +3879,7 @@ pub mod tests { V03State::new_with_genesis_accounts(&[(recipient_id, 0)], &[], genesis_timestamp) .with_test_programs(); let key1 = PrivateKey::try_new([1; 32]).unwrap(); - let sender_id = AccountId::from(&PublicKey::new_from_private_key(&key1)); + let sender_id = AccountId::public_account_id(&PublicKey::new_from_private_key(&key1)); state.force_insert_account( sender_id, Account { diff --git a/sequencer/core/src/lib.rs b/sequencer/core/src/lib.rs index 7e8b42e0..2bd90f66 100644 --- a/sequencer/core/src/lib.rs +++ b/sequencer/core/src/lib.rs @@ -16,6 +16,7 @@ use mempool::{MemPool, MemPoolHandle}; #[cfg(feature = "mock")] pub use mock::SequencerCoreWithMockClients; use nssa::{AccountId, V03State}; +use nssa_core::account::Identifier; pub use storage::error::DbError; use testnet_initial_state::initial_state; @@ -113,7 +114,7 @@ impl SequencerCore { - let account_id = AccountId::private_account_id(&npk, None); + let account_id = AccountId::private_account_id(&npk, Identifier(0_u128)); let acc = nssa_core::account::Account::default(); let auth_acc = AccountWithMetadata::new(acc, false, account_id); let pre = AccountPreparedData {