From 6fa96f69173c340731da861d98db7ba6cfdcd5fe Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 15 Oct 2024 05:19:57 +0000 Subject: [PATCH] zcash_client_sqlite: Migrate from `schemer` to `schemerz` --- Cargo.lock | 18 +++++++++--------- Cargo.toml | 4 ++-- supply-chain/audits.toml | 12 ++++++++++++ supply-chain/config.toml | 8 -------- supply-chain/imports.lock | 14 ++++++++++++++ zcash_client_sqlite/CHANGELOG.md | 3 +++ zcash_client_sqlite/Cargo.toml | 4 ++-- zcash_client_sqlite/src/chain/init.rs | 4 ++-- .../src/chain/migrations/blockmeta.rs | 6 +++--- zcash_client_sqlite/src/wallet/db.rs | 4 ++-- zcash_client_sqlite/src/wallet/init.rs | 14 +++++++------- .../src/wallet/init/migrations.rs | 2 +- .../init/migrations/add_account_birthdays.rs | 4 ++-- .../init/migrations/add_transaction_views.rs | 4 ++-- .../wallet/init/migrations/add_utxo_account.rs | 7 +++---- .../wallet/init/migrations/addresses_table.rs | 5 ++--- .../migrations/ensure_orchard_ua_receiver.rs | 4 ++-- .../init/migrations/ephemeral_addresses.rs | 6 ++---- .../migrations/fix_broken_commitment_trees.rs | 7 +++---- .../wallet/init/migrations/full_account_ids.rs | 4 ++-- .../wallet/init/migrations/initial_setup.rs | 6 ++---- .../wallet/init/migrations/nullifier_map.rs | 4 ++-- .../init/migrations/orchard_received_notes.rs | 4 ++-- .../init/migrations/orchard_shardtree.rs | 4 ++-- .../migrations/received_notes_nullable_nf.rs | 6 ++---- .../init/migrations/receiving_key_scopes.rs | 7 +++---- .../migrations/sapling_memo_consistency.rs | 4 ++-- .../init/migrations/sent_notes_to_internal.rs | 6 ++---- .../init/migrations/shardtree_support.rs | 7 +++---- .../init/migrations/spend_key_available.rs | 6 ++---- .../init/migrations/support_legacy_sqlite.rs | 6 ++---- .../init/migrations/tx_retrieval_queue.rs | 4 ++-- .../src/wallet/init/migrations/ufvk_support.rs | 7 +++---- .../src/wallet/init/migrations/utxos_table.rs | 6 ++---- .../wallet/init/migrations/utxos_to_txos.rs | 6 ++---- .../v_sapling_shard_unscanned_ranges.rs | 4 ++-- .../init/migrations/v_transactions_net.rs | 7 +++---- .../v_transactions_note_uniqueness.rs | 4 ++-- .../v_transactions_shielding_balance.rs | 4 ++-- .../v_transactions_transparent_history.rs | 4 ++-- .../v_tx_outputs_use_legacy_false.rs | 4 ++-- .../wallet/init/migrations/wallet_summaries.rs | 4 ++-- 42 files changed, 123 insertions(+), 125 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d81ef639d..dfd62758d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3695,10 +3695,10 @@ dependencies = [ ] [[package]] -name = "schemer" -version = "0.2.1" +name = "schemerz" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d8f9478fd2936195fc941a8666b0d0894d5bf3631cbb884a8ce8ba631f339" +checksum = "ef620a7502b464270648afce68f6e736a87380854b3e4a6debd5a42e3e88c954" dependencies = [ "daggy", "log", @@ -3707,13 +3707,13 @@ dependencies = [ ] [[package]] -name = "schemer-rusqlite" -version = "0.2.2" +name = "schemerz-rusqlite" +version = "0.290.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fb5ac1fa52c58e2c6a618e3149d464e7ad8d0effca74990ea29c1fe2338b3b1" +checksum = "51240765dba899b938627b7e0e8fdceb211fe2b2310385cf9ddc9c2a733d671d" dependencies = [ "rusqlite", - "schemer", + "schemerz", "uuid", ] @@ -5925,8 +5925,8 @@ dependencies = [ "regex", "rusqlite", "sapling-crypto", - "schemer", - "schemer-rusqlite", + "schemerz", + "schemerz-rusqlite", "secrecy", "shardtree", "static_assertions", diff --git a/Cargo.toml b/Cargo.toml index 89f067c7e9..a43f23e6b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -124,8 +124,8 @@ subtle = "2.2.3" # CocoaPods, due to being bound to React Native. We need to ensure that the SQLite # version required for `rusqlite` is a version that is available through CocoaPods. rusqlite = { version = "0.29.0", features = ["bundled"] } -schemer = "0.2" -schemer-rusqlite = "0.2.2" +schemerz = "0.1" +schemerz-rusqlite = "0.290" time = "0.3.22" uuid = "1.1" diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml index 1c94159afd..ceb57dc0a2 100644 --- a/supply-chain/audits.toml +++ b/supply-chain/audits.toml @@ -717,6 +717,18 @@ user-id = 169181 # Kris Nuttycombe (nuttycom) start = "2024-08-12" end = "2025-08-12" +[[trusted.schemerz]] +criteria = "safe-to-deploy" +user-id = 6289 # Jack Grigg (str4d) +start = "2024-10-15" +end = "2025-10-15" + +[[trusted.schemerz-rusqlite]] +criteria = "safe-to-deploy" +user-id = 6289 # Jack Grigg (str4d) +start = "2024-10-15" +end = "2025-10-15" + [[trusted.shardtree]] criteria = "safe-to-deploy" user-id = 169181 # Kris Nuttycombe (nuttycom) diff --git a/supply-chain/config.toml b/supply-chain/config.toml index 3a91af1c79..b1fb9e7ed5 100644 --- a/supply-chain/config.toml +++ b/supply-chain/config.toml @@ -1042,14 +1042,6 @@ criteria = "safe-to-deploy" version = "0.5.0" criteria = "safe-to-deploy" -[[exemptions.schemer]] -version = "0.2.1" -criteria = "safe-to-deploy" - -[[exemptions.schemer-rusqlite]] -version = "0.2.2" -criteria = "safe-to-deploy" - [[exemptions.scopeguard]] version = "1.1.0" criteria = "safe-to-deploy" diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock index 02f393f119..fe35403d10 100644 --- a/supply-chain/imports.lock +++ b/supply-chain/imports.lock @@ -76,6 +76,20 @@ user-id = 169181 user-login = "nuttycom" user-name = "Kris Nuttycombe" +[[publisher.schemerz]] +version = "0.1.0" +when = "2024-10-15" +user-id = 6289 +user-login = "str4d" +user-name = "Jack Grigg" + +[[publisher.schemerz-rusqlite]] +version = "0.290.0" +when = "2024-10-15" +user-id = 6289 +user-login = "str4d" +user-name = "Jack Grigg" + [[publisher.shardtree]] version = "0.5.0" when = "2024-10-04" diff --git a/zcash_client_sqlite/CHANGELOG.md b/zcash_client_sqlite/CHANGELOG.md index c013d0a028..88c52485e9 100644 --- a/zcash_client_sqlite/CHANGELOG.md +++ b/zcash_client_sqlite/CHANGELOG.md @@ -11,6 +11,9 @@ and this library adheres to Rust's notion of - Exposed `AccountId::from_u32` and `AccountId::as_u32` conversions under the `unstable` feature flag. +### Changed +- Migrated from `schemer` to our fork `schemerz`. + ## [0.12.1] - 2024-10-10 ### Fixed diff --git a/zcash_client_sqlite/Cargo.toml b/zcash_client_sqlite/Cargo.toml index e1db2d2130..f37bdfa17e 100644 --- a/zcash_client_sqlite/Cargo.toml +++ b/zcash_client_sqlite/Cargo.toml @@ -67,8 +67,8 @@ shardtree = { workspace = true, features = ["legacy-api"] } # - SQLite databases rusqlite = { workspace = true, features = ["time", "array"] } -schemer.workspace = true -schemer-rusqlite.workspace = true +schemerz.workspace = true +schemerz-rusqlite.workspace = true time.workspace = true uuid.workspace = true regex = "1.4" diff --git a/zcash_client_sqlite/src/chain/init.rs b/zcash_client_sqlite/src/chain/init.rs index 53f6d50aed..8da54d7759 100644 --- a/zcash_client_sqlite/src/chain/init.rs +++ b/zcash_client_sqlite/src/chain/init.rs @@ -5,8 +5,8 @@ use crate::BlockDb; use { super::migrations, crate::FsBlockDb, - schemer::{Migrator, MigratorError}, - schemer_rusqlite::RusqliteAdapter, + schemerz::{Migrator, MigratorError}, + schemerz_rusqlite::RusqliteAdapter, }; /// Sets up the internal structure of the cache database. diff --git a/zcash_client_sqlite/src/chain/migrations/blockmeta.rs b/zcash_client_sqlite/src/chain/migrations/blockmeta.rs index 854ccd6fcf..72f8fc5716 100644 --- a/zcash_client_sqlite/src/chain/migrations/blockmeta.rs +++ b/zcash_client_sqlite/src/chain/migrations/blockmeta.rs @@ -1,4 +1,4 @@ -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; pub fn all_migrations() -> Vec>> { vec![Box::new(init::Migration {})] @@ -6,8 +6,8 @@ pub fn all_migrations() -> Vec Wallet /// In order to correctly apply migrations to accounts derived from a seed, sometimes the /// optional `seed` argument is required. This function should first be invoked with /// `seed` set to `None`; if a pending migration requires the seed, the function returns -/// `Err(schemer::MigratorError::Migration { error: WalletMigrationError::SeedRequired, .. })`. +/// `Err(schemerz::MigratorError::Migration { error: WalletMigrationError::SeedRequired, .. })`. /// The caller can then re-call this function with the necessary seed. /// /// > Note that currently only one seed can be provided; as such, wallets containing @@ -251,8 +251,8 @@ fn sqlite_client_error_to_wallet_migration_error(e: SqliteClientError) -> Wallet /// _relevance_: if any account in the wallet for which [`Account::source`] is /// [`AccountSource::Derived`] can be derived from the given seed, the seed is relevant to /// the wallet. If the given seed is not relevant, the function returns -/// `Err(schemer::MigratorError::Migration { error: WalletMigrationError::SeedNotRelevant, .. })` -/// or `Err(schemer::MigratorError::Adapter(WalletMigrationError::SeedNotRelevant))`. +/// `Err(schemerz::MigratorError::Migration { error: WalletMigrationError::SeedNotRelevant, .. })` +/// or `Err(schemerz::MigratorError::Adapter(WalletMigrationError::SeedNotRelevant))`. /// /// We do not check whether the seed is relevant to any imported account, because that /// would require brute-forcing the ZIP 32 account index space. Consequentially, imported @@ -480,7 +480,7 @@ mod tests { db::TABLE_SAPLING_TREE_CHECKPOINTS, db::TABLE_SAPLING_TREE_SHARDS, db::TABLE_SCAN_QUEUE, - db::TABLE_SCHEMER_MIGRATIONS, + db::TABLE_SCHEMERZ_MIGRATIONS, db::TABLE_SENT_NOTES, db::TABLE_SQLITE_SEQUENCE, db::TABLE_TRANSACTIONS, @@ -1069,7 +1069,7 @@ mod tests { ); assert_matches!( init_wallet_db(&mut db_data, Some(Secret::new(other_seed.to_vec()))), - Err(schemer::MigratorError::Adapter( + Err(schemerz::MigratorError::Adapter( WalletMigrationError::SeedNotRelevant )) ); diff --git a/zcash_client_sqlite/src/wallet/init/migrations.rs b/zcash_client_sqlite/src/wallet/init/migrations.rs index 21676e4886..5d9ac61831 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations.rs @@ -31,7 +31,7 @@ mod wallet_summaries; use std::rc::Rc; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use secrecy::SecretVec; use uuid::Uuid; use zcash_protocol::consensus; diff --git a/zcash_client_sqlite/src/wallet/init/migrations/add_account_birthdays.rs b/zcash_client_sqlite/src/wallet/init/migrations/add_account_birthdays.rs index 0f0ca63352..a6116f3748 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/add_account_birthdays.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/add_account_birthdays.rs @@ -2,7 +2,7 @@ use std::collections::HashSet; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use zcash_primitives::consensus::{self, NetworkUpgrade}; @@ -18,7 +18,7 @@ pub(super) struct Migration

{ pub(super) params: P, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/add_transaction_views.rs b/zcash_client_sqlite/src/wallet/init/migrations/add_transaction_views.rs index 27fcef5936..5b87e864c0 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/add_transaction_views.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/add_transaction_views.rs @@ -2,7 +2,7 @@ use std::collections::HashSet; use rusqlite::{self, types::ToSql, OptionalExtension}; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use zcash_primitives::{ @@ -25,7 +25,7 @@ const DEPENDENCIES: &[Uuid] = &[ pub(crate) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/add_utxo_account.rs b/zcash_client_sqlite/src/wallet/init/migrations/add_utxo_account.rs index cf430641ed..f7b93b1ef3 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/add_utxo_account.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/add_utxo_account.rs @@ -1,7 +1,6 @@ //! A migration that adds an identifier for the account that received a UTXO to the utxos table -use rusqlite; -use schemer; -use schemer_rusqlite::RusqliteMigration; + +use schemerz_rusqlite::RusqliteMigration; use std::collections::HashSet; use uuid::Uuid; use zcash_primitives::consensus; @@ -34,7 +33,7 @@ pub(super) struct Migration

{ pub(super) _params: P, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/addresses_table.rs b/zcash_client_sqlite/src/wallet/init/migrations/addresses_table.rs index cbdd681e7b..984fc72331 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/addresses_table.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/addresses_table.rs @@ -1,8 +1,7 @@ use std::collections::HashSet; use rusqlite::{named_params, Transaction}; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use zcash_client_backend::{address::Address, keys::UnifiedFullViewingKey}; use zcash_keys::{address::UnifiedAddress, encoding::AddressCodec, keys::UnifiedAddressRequest}; @@ -26,7 +25,7 @@ pub(crate) struct Migration { pub(crate) params: P, } -impl schemer::Migration for Migration

{ +impl schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/ensure_orchard_ua_receiver.rs b/zcash_client_sqlite/src/wallet/init/migrations/ensure_orchard_ua_receiver.rs index 31a57f44ce..5f884a6998 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/ensure_orchard_ua_receiver.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/ensure_orchard_ua_receiver.rs @@ -2,7 +2,7 @@ use std::collections::HashSet; use rusqlite::named_params; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use zcash_client_backend::keys::{ @@ -21,7 +21,7 @@ pub(super) struct Migration

{ pub(super) params: P, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/ephemeral_addresses.rs b/zcash_client_sqlite/src/wallet/init/migrations/ephemeral_addresses.rs index c93872e64e..c628ad8792 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/ephemeral_addresses.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/ephemeral_addresses.rs @@ -1,9 +1,7 @@ //! The migration that records ephemeral addresses for each account. use std::collections::HashSet; -use rusqlite; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use zcash_protocol::consensus; @@ -23,7 +21,7 @@ pub(super) struct Migration

{ pub(super) params: P, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/fix_broken_commitment_trees.rs b/zcash_client_sqlite/src/wallet/init/migrations/fix_broken_commitment_trees.rs index 714d990fce..bf6d4b1561 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/fix_broken_commitment_trees.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/fix_broken_commitment_trees.rs @@ -2,9 +2,8 @@ //! reorg handling. use std::collections::HashSet; -use rusqlite::{self, OptionalExtension}; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use rusqlite::OptionalExtension; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use zcash_protocol::consensus::{self, BlockHeight}; @@ -21,7 +20,7 @@ pub(super) struct Migration

{ pub(super) params: P, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/full_account_ids.rs b/zcash_client_sqlite/src/wallet/init/migrations/full_account_ids.rs index 91ad456cfb..79166a66e3 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/full_account_ids.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/full_account_ids.rs @@ -2,7 +2,7 @@ use std::{collections::HashSet, rc::Rc}; use crate::wallet::{account_kind_code, init::WalletMigrationError}; use rusqlite::{named_params, OptionalExtension, Transaction}; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use secrecy::{ExposeSecret, SecretVec}; use uuid::Uuid; use zcash_client_backend::{ @@ -33,7 +33,7 @@ const DEPENDENCIES: &[Uuid] = &[ wallet_summaries::MIGRATION_ID, ]; -impl schemer::Migration for Migration

{ +impl schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/initial_setup.rs b/zcash_client_sqlite/src/wallet/init/migrations/initial_setup.rs index f72b401213..92b2ba6b42 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/initial_setup.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/initial_setup.rs @@ -1,9 +1,7 @@ //! The migration that performs the initial setup of the wallet database. use std::collections::HashSet; -use rusqlite; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use crate::wallet::init::WalletMigrationError; @@ -13,7 +11,7 @@ pub(super) const MIGRATION_ID: Uuid = Uuid::from_u128(0xbc4f5e57_d600_4b6c_990f_ pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/nullifier_map.rs b/zcash_client_sqlite/src/wallet/init/migrations/nullifier_map.rs index 5c2e9fb08f..44e86da47f 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/nullifier_map.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/nullifier_map.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use tracing::debug; use uuid::Uuid; @@ -17,7 +17,7 @@ const DEPENDENCIES: &[Uuid] = &[received_notes_nullable_nf::MIGRATION_ID]; pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/orchard_received_notes.rs b/zcash_client_sqlite/src/wallet/init/migrations/orchard_received_notes.rs index 66931cccf3..908dadcc83 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/orchard_received_notes.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/orchard_received_notes.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use zcash_client_backend::PoolType; @@ -16,7 +16,7 @@ const DEPENDENCIES: &[Uuid] = &[full_account_ids::MIGRATION_ID]; pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/orchard_shardtree.rs b/zcash_client_sqlite/src/wallet/init/migrations/orchard_shardtree.rs index 5357b5e03d..afb1a61ccd 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/orchard_shardtree.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/orchard_shardtree.rs @@ -4,7 +4,7 @@ use std::collections::HashSet; use rusqlite::{named_params, OptionalExtension}; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use tracing::debug; use uuid::Uuid; use zcash_client_backend::data_api::scanning::ScanPriority; @@ -21,7 +21,7 @@ pub(super) struct Migration

{ pub(super) params: P, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/received_notes_nullable_nf.rs b/zcash_client_sqlite/src/wallet/init/migrations/received_notes_nullable_nf.rs index 4b1dabdc49..42bdb120a3 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/received_notes_nullable_nf.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/received_notes_nullable_nf.rs @@ -3,9 +3,7 @@ //! table prior to being mined. use std::collections::HashSet; -use rusqlite; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use super::v_transactions_net; @@ -17,7 +15,7 @@ const DEPENDENCIES: &[Uuid] = &[v_transactions_net::MIGRATION_ID]; pub(crate) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/receiving_key_scopes.rs b/zcash_client_sqlite/src/wallet/init/migrations/receiving_key_scopes.rs index 84b8d8ceed..9b113f36f8 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/receiving_key_scopes.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/receiving_key_scopes.rs @@ -4,9 +4,8 @@ use std::collections::HashSet; use group::ff::PrimeField; use incrementalmerkletree::Position; -use rusqlite::{self, named_params}; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use rusqlite::named_params; +use schemerz_rusqlite::RusqliteMigration; use shardtree::{store::ShardStore, ShardTree}; use uuid::Uuid; @@ -44,7 +43,7 @@ pub(super) struct Migration

{ pub(super) params: P, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/sapling_memo_consistency.rs b/zcash_client_sqlite/src/wallet/init/migrations/sapling_memo_consistency.rs index 590d773d64..86f624e2d6 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/sapling_memo_consistency.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/sapling_memo_consistency.rs @@ -5,7 +5,7 @@ use std::collections::{BTreeMap, HashMap, HashSet}; use rusqlite::named_params; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use zcash_client_backend::{decrypt_transaction, keys::UnifiedFullViewingKey}; use zcash_primitives::{consensus, transaction::TxId, zip32::AccountId}; @@ -25,7 +25,7 @@ pub(super) struct Migration

{ pub(super) params: P, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/sent_notes_to_internal.rs b/zcash_client_sqlite/src/wallet/init/migrations/sent_notes_to_internal.rs index 881e80397d..c335af556c 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/sent_notes_to_internal.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/sent_notes_to_internal.rs @@ -2,9 +2,7 @@ //! on an internal address to the sent_notes table. use std::collections::HashSet; -use rusqlite; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use super::ufvk_support; @@ -17,7 +15,7 @@ const DEPENDENCIES: &[Uuid] = &[ufvk_support::MIGRATION_ID]; pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/shardtree_support.rs b/zcash_client_sqlite/src/wallet/init/migrations/shardtree_support.rs index 88743518e6..8fa7105add 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/shardtree_support.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/shardtree_support.rs @@ -5,9 +5,8 @@ use std::collections::{BTreeSet, HashSet}; use incrementalmerkletree::{Marking, Retention}; -use rusqlite::{self, named_params, params}; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use rusqlite::{named_params, params}; +use schemerz_rusqlite::RusqliteMigration; use shardtree::{error::ShardTreeError, store::caching::CachingShardStore, ShardTree}; use tracing::{debug, trace}; use uuid::Uuid; @@ -39,7 +38,7 @@ pub(super) struct Migration

{ pub(super) params: P, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/spend_key_available.rs b/zcash_client_sqlite/src/wallet/init/migrations/spend_key_available.rs index d38be3ab50..feb25917b2 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/spend_key_available.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/spend_key_available.rs @@ -1,9 +1,7 @@ //! The migration that records ephemeral addresses for each account. use std::collections::HashSet; -use rusqlite; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use crate::wallet::init::WalletMigrationError; @@ -17,7 +15,7 @@ const DEPENDENCIES: &[Uuid] = &[full_account_ids::MIGRATION_ID]; #[allow(dead_code)] pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/support_legacy_sqlite.rs b/zcash_client_sqlite/src/wallet/init/migrations/support_legacy_sqlite.rs index 29385a30ef..52ab2dd944 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/support_legacy_sqlite.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/support_legacy_sqlite.rs @@ -1,9 +1,7 @@ //! Modifies definitions to avoid keywords that may not be available in older SQLite versions. use std::collections::HashSet; -use rusqlite; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use crate::wallet::init::{migrations::tx_retrieval_queue, WalletMigrationError}; @@ -14,7 +12,7 @@ const DEPENDENCIES: &[Uuid] = &[tx_retrieval_queue::MIGRATION_ID]; pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/tx_retrieval_queue.rs b/zcash_client_sqlite/src/wallet/init/migrations/tx_retrieval_queue.rs index 5c94abbc2c..e8082cc83e 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/tx_retrieval_queue.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/tx_retrieval_queue.rs @@ -1,7 +1,7 @@ //! Adds tables for tracking transactions to be downloaded for transparent output and/or memo retrieval. use rusqlite::{named_params, Transaction}; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use std::collections::HashSet; use uuid::Uuid; use zcash_client_backend::data_api::DecryptedTransaction; @@ -29,7 +29,7 @@ pub(super) struct Migration

{ pub(super) params: P, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/ufvk_support.rs b/zcash_client_sqlite/src/wallet/init/migrations/ufvk_support.rs index f4354d1d7e..b05e9b83fe 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/ufvk_support.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/ufvk_support.rs @@ -1,9 +1,8 @@ //! Migration that adds support for unified full viewing keys. use std::{collections::HashSet, rc::Rc}; -use rusqlite::{self, named_params, params}; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use rusqlite::{named_params, params}; +use schemerz_rusqlite::RusqliteMigration; use secrecy::{ExposeSecret, SecretVec}; use uuid::Uuid; @@ -34,7 +33,7 @@ pub(super) struct Migration

{ pub(super) seed: Option>>, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/utxos_table.rs b/zcash_client_sqlite/src/wallet/init/migrations/utxos_table.rs index 09f5fe16c8..4cac9202ab 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/utxos_table.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/utxos_table.rs @@ -1,9 +1,7 @@ //! The migration that adds initial support for transparent UTXOs to the wallet. use std::collections::HashSet; -use rusqlite; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use crate::wallet::init::{migrations::initial_setup, WalletMigrationError}; @@ -14,7 +12,7 @@ const DEPENDENCIES: &[Uuid] = &[initial_setup::MIGRATION_ID]; pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/utxos_to_txos.rs b/zcash_client_sqlite/src/wallet/init/migrations/utxos_to_txos.rs index 687ddf51f4..53055d04d0 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/utxos_to_txos.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/utxos_to_txos.rs @@ -2,9 +2,7 @@ //! outputs, and adds `spent_note_count` and `is_shielding` to `v_transactions`. use std::collections::HashSet; -use rusqlite; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use crate::wallet::init::{migrations::orchard_received_notes, WalletMigrationError}; @@ -15,7 +13,7 @@ const DEPENDENCIES: &[Uuid] = &[orchard_received_notes::MIGRATION_ID]; pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/v_sapling_shard_unscanned_ranges.rs b/zcash_client_sqlite/src/wallet/init/migrations/v_sapling_shard_unscanned_ranges.rs index cf7465d2f7..9c83c20cfb 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/v_sapling_shard_unscanned_ranges.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/v_sapling_shard_unscanned_ranges.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use zcash_client_backend::data_api::{scanning::ScanPriority, SAPLING_SHARD_HEIGHT}; use zcash_primitives::consensus::{self, NetworkUpgrade}; @@ -20,7 +20,7 @@ pub(super) struct Migration

{ pub(super) params: P, } -impl

schemer::Migration for Migration

{ +impl

schemerz::Migration for Migration

{ fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_net.rs b/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_net.rs index db0d43f311..cd7cd71545 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_net.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_net.rs @@ -2,9 +2,8 @@ //! as received value. use std::collections::HashSet; -use rusqlite::{self, named_params}; -use schemer; -use schemer_rusqlite::RusqliteMigration; +use rusqlite::named_params; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use zcash_client_backend::PoolType; @@ -17,7 +16,7 @@ const DEPENDENCIES: &[Uuid] = &[add_transaction_views::MIGRATION_ID]; pub(crate) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_note_uniqueness.rs b/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_note_uniqueness.rs index 3d48d6abff..e07fc010b2 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_note_uniqueness.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_note_uniqueness.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use crate::wallet::init::WalletMigrationError; @@ -16,7 +16,7 @@ const DEPENDENCIES: &[Uuid] = &[v_transactions_shielding_balance::MIGRATION_ID]; pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_shielding_balance.rs b/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_shielding_balance.rs index a783f972ef..a8f38fd1d1 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_shielding_balance.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_shielding_balance.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use crate::wallet::init::WalletMigrationError; @@ -16,7 +16,7 @@ const DEPENDENCIES: &[Uuid] = &[v_tx_outputs_use_legacy_false::MIGRATION_ID]; pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_transparent_history.rs b/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_transparent_history.rs index 4904c252cb..f9dae5583a 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_transparent_history.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/v_transactions_transparent_history.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use crate::wallet::init::WalletMigrationError; @@ -16,7 +16,7 @@ const DEPENDENCIES: &[Uuid] = &[sapling_memo_consistency::MIGRATION_ID]; pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/v_tx_outputs_use_legacy_false.rs b/zcash_client_sqlite/src/wallet/init/migrations/v_tx_outputs_use_legacy_false.rs index 2d40519453..3b53100d35 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/v_tx_outputs_use_legacy_false.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/v_tx_outputs_use_legacy_false.rs @@ -4,7 +4,7 @@ use std::collections::HashSet; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use crate::wallet::init::WalletMigrationError; @@ -17,7 +17,7 @@ const DEPENDENCIES: &[Uuid] = &[v_transactions_transparent_history::MIGRATION_ID pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID } diff --git a/zcash_client_sqlite/src/wallet/init/migrations/wallet_summaries.rs b/zcash_client_sqlite/src/wallet/init/migrations/wallet_summaries.rs index 18940c61b5..77ee6e8fd4 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/wallet_summaries.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/wallet_summaries.rs @@ -2,7 +2,7 @@ use std::collections::HashSet; -use schemer_rusqlite::RusqliteMigration; +use schemerz_rusqlite::RusqliteMigration; use uuid::Uuid; use crate::wallet::init::WalletMigrationError; @@ -15,7 +15,7 @@ const DEPENDENCIES: &[Uuid] = &[v_sapling_shard_unscanned_ranges::MIGRATION_ID]; pub(super) struct Migration; -impl schemer::Migration for Migration { +impl schemerz::Migration for Migration { fn id(&self) -> Uuid { MIGRATION_ID }