From 353839b17be8a0840e7780fa2e7d6305b88283bc Mon Sep 17 00:00:00 2001 From: Nicolas Pennie Date: Wed, 5 Apr 2023 19:06:49 -0700 Subject: [PATCH 01/23] Add structured logging and reduce log noisiness (#48) --- README.md | 1 + das_api/Cargo.lock | 1 + digital_asset_types/Cargo.lock | 1 + digital_asset_types/Cargo.toml | 1 + digital_asset_types/src/dapi/change_logs.rs | 6 +- migration/Cargo.lock | 1 + nft_ingester/Cargo.lock | 104 ++++++++++++++++++ nft_ingester/Cargo.toml | 5 + nft_ingester/src/account_updates.rs | 2 +- nft_ingester/src/backfiller.rs | 8 +- nft_ingester/src/config.rs | 10 ++ nft_ingester/src/main.rs | 8 +- nft_ingester/src/metrics.rs | 2 +- .../src/program_transformers/bubblegum/db.rs | 7 +- .../src/program_transformers/bubblegum/mod.rs | 35 +++--- nft_ingester/src/program_transformers/mod.rs | 6 +- nft_ingester/src/tasks/mod.rs | 20 +++- 17 files changed, 177 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index bb8b6b033..a2ba44a32 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,7 @@ count ingester.ingest_error time ingester.bgtask.proc_time count ingester.bgtask.success count ingester.bgtask.error +count ingester.bgtask.network_error time ingester.bgtask.bus_time count ingester.bgtask.identical diff --git a/das_api/Cargo.lock b/das_api/Cargo.lock index 31f8b7900..0468b1329 100644 --- a/das_api/Cargo.lock +++ b/das_api/Cargo.lock @@ -1068,6 +1068,7 @@ dependencies = [ "bs58 0.4.0", "futures", "jsonpath_lib", + "log", "mime_guess", "num-derive", "num-traits", diff --git a/digital_asset_types/Cargo.lock b/digital_asset_types/Cargo.lock index a287dbb94..bf91dc45a 100644 --- a/digital_asset_types/Cargo.lock +++ b/digital_asset_types/Cargo.lock @@ -1036,6 +1036,7 @@ dependencies = [ "bs58 0.4.0", "futures", "jsonpath_lib", + "log", "mime_guess", "num-derive", "num-traits", diff --git a/digital_asset_types/Cargo.toml b/digital_asset_types/Cargo.toml index a12e798a1..ee2633239 100644 --- a/digital_asset_types/Cargo.toml +++ b/digital_asset_types/Cargo.toml @@ -32,3 +32,4 @@ async-trait = "0.1.60" tokio = { version = "1.22.0", features = ["full"] } schemars = "0.8.6" schemars_derive = "0.8.6" +log = "0.4.17" diff --git a/digital_asset_types/src/dapi/change_logs.rs b/digital_asset_types/src/dapi/change_logs.rs index 45442edd6..841925d20 100644 --- a/digital_asset_types/src/dapi/change_logs.rs +++ b/digital_asset_types/src/dapi/change_logs.rs @@ -1,5 +1,6 @@ use sea_orm::sea_query::Expr; use sea_orm::{DatabaseConnection, DbBackend}; +use log::debug; use { crate::dao::asset, crate::dao::cl_items, @@ -35,8 +36,6 @@ pub async fn get_proof_for_asset( vec![asset_id], )) .filter(cl_items::Column::Level.eq(0i64)); - let sql = sel.clone().build(DbBackend::Postgres); - println!("find leaf sql {} ", sql.sql); let leaf: Option = sel.one(db).await?; if leaf.is_none() { return Err(DbErr::RecordNotFound("Asset Proof Not Found".to_string())); @@ -62,7 +61,6 @@ pub async fn get_proof_for_asset( query.sql = query .sql .replace("SELECT", "SELECT DISTINCT ON (cl_items.node_idx)"); - println!("sql {} ", query.sql); let nodes: Vec = db.query_all(query).await.map(|qr| { qr.iter() .map(|q| SimpleChangeLog::from_query_result(q, "").unwrap()) @@ -81,7 +79,7 @@ pub async fn get_proof_for_asset( } } for n in final_node_list.iter() { - println!( + debug!( "level {} index {} seq {} hash {}", n.level, n.node_idx, diff --git a/migration/Cargo.lock b/migration/Cargo.lock index 30c527396..b0bdf40bb 100644 --- a/migration/Cargo.lock +++ b/migration/Cargo.lock @@ -1167,6 +1167,7 @@ dependencies = [ "bs58 0.4.0", "futures", "jsonpath_lib", + "log", "mime_guess", "num-derive", "num-traits", diff --git a/nft_ingester/Cargo.lock b/nft_ingester/Cargo.lock index 4b04d0292..2fed3afe5 100644 --- a/nft_ingester/Cargo.lock +++ b/nft_ingester/Cargo.lock @@ -1304,6 +1304,7 @@ dependencies = [ "bs58 0.4.0", "futures", "jsonpath_lib", + "log", "mime_guess", "num-derive", "num-traits", @@ -2371,6 +2372,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata", +] + [[package]] name = "md-5" version = "0.10.5" @@ -2655,6 +2665,7 @@ dependencies = [ "tokio", "tokio-postgres", "tokio-stream", + "tracing-subscriber", "url", "uuid", ] @@ -2681,6 +2692,16 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num" version = "0.2.1" @@ -2912,6 +2933,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "parking" version = "2.0.0" @@ -3569,6 +3596,15 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax", +] + [[package]] name = "regex-syntax" version = "0.6.28" @@ -4254,6 +4290,15 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "sharded-slab" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +dependencies = [ + "lazy_static", +] + [[package]] name = "shell-words" version = "1.1.0" @@ -5321,6 +5366,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + [[package]] name = "time" version = "0.1.45" @@ -5574,6 +5629,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +dependencies = [ + "lazy_static", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", ] [[package]] @@ -5742,6 +5840,12 @@ dependencies = [ "serde", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vcpkg" version = "0.2.15" diff --git a/nft_ingester/Cargo.toml b/nft_ingester/Cargo.toml index cc8590954..aade059ff 100644 --- a/nft_ingester/Cargo.toml +++ b/nft_ingester/Cargo.toml @@ -52,6 +52,11 @@ anchor-lang = "=0.26.0" borsh = "0.9.1" stretto = { version = "0.7", features = ["async"] } tokio-stream = "0.1.12" +tracing-subscriber = { version = "0.3.16", features = [ + "json", + "env-filter", + "ansi", +] } [dependencies.num-integer] version = "0.1.44" diff --git a/nft_ingester/src/account_updates.rs b/nft_ingester/src/account_updates.rs index 91ecce05e..97e5fa061 100644 --- a/nft_ingester/src/account_updates.rs +++ b/nft_ingester/src/account_updates.rs @@ -41,7 +41,7 @@ pub fn account_worker( tasks.spawn(handle_account(Arc::clone(&manager), item)); } if len > 0 { - debug!("Processed {} account", len); + debug!("Processed {} accounts", len); } } Err(e) => { diff --git a/nft_ingester/src/backfiller.rs b/nft_ingester/src/backfiller.rs index 35c972593..4e85a84f6 100644 --- a/nft_ingester/src/backfiller.rs +++ b/nft_ingester/src/backfiller.rs @@ -459,7 +459,7 @@ impl<'a, T: Messenger> Backfiller<'a, T> { cn: &impl ConnectionTrait, ) -> Result, IngesterError> { let mut all_trees: HashMap = self.fetch_trees_by_gpa().await?; - info!("Number of Trees on Chain {}", all_trees.len()); + debug!("Number of Trees on Chain {}", all_trees.len()); let get_locked_or_failed_trees = Statement::from_string( DbBackend::Postgres, "SELECT DISTINCT tree FROM backfill_items WHERE failed = true\n\ @@ -490,7 +490,11 @@ impl<'a, T: Messenger> Backfiller<'a, T> { .into_iter() .map(|(k, s)| MissingTree { tree: k, slot: s.0 }) .collect::>(); - info!("Number of Missing local trees: {}", missing_trees.len()); + if missing_trees.len() > 0 { + info!("Number of Missing local trees: {}", missing_trees.len()); + } else { + debug!("No missing trees"); + } Ok(missing_trees) } diff --git a/nft_ingester/src/config.rs b/nft_ingester/src/config.rs index 38770fc65..9b05d3e37 100644 --- a/nft_ingester/src/config.rs +++ b/nft_ingester/src/config.rs @@ -4,6 +4,8 @@ use figment::{providers::Env, value::Value, Figment}; use plerkle_messenger::MessengerConfig; use rand::{distributions::Alphanumeric, thread_rng, Rng}; use serde::Deserialize; +use std::env; +use tracing_subscriber::fmt; use crate::error::IngesterError; @@ -112,3 +114,11 @@ pub fn setup_config() -> IngesterConfig { config.code_version = Some(CODE_VERSION); config } + +pub fn init_logger() { + let env_filter = env::var("RUST_LOG") + .or::>(Ok("info".to_string())) + .unwrap(); + let t = tracing_subscriber::fmt().with_env_filter(env_filter); + t.event_format(fmt::format::json()).init(); +} diff --git a/nft_ingester/src/main.rs b/nft_ingester/src/main.rs index a710a26be..76c81e934 100644 --- a/nft_ingester/src/main.rs +++ b/nft_ingester/src/main.rs @@ -10,13 +10,11 @@ mod stream; pub mod tasks; mod transaction_notifications; -use env_logger; - use crate::{ account_updates::account_worker, ack::ack_worker, backfiller::setup_backfiller, - config::{setup_config, IngesterRole}, + config::{init_logger, setup_config, IngesterRole}, database::setup_database, error::IngesterError, metrics::setup_metrics, @@ -34,12 +32,12 @@ use plerkle_messenger::{ }; use tokio::{ signal, - task::{JoinError, JoinSet}, + task::{JoinSet}, }; #[tokio::main(flavor = "multi_thread")] pub async fn main() -> Result<(), IngesterError> { - env_logger::init(); + init_logger(); info!("Starting nft_ingester"); // Setup Configuration and Metrics --------------------------------------------- // Pull Env variables into config struct diff --git a/nft_ingester/src/metrics.rs b/nft_ingester/src/metrics.rs index 73456db7e..0d39cbed7 100644 --- a/nft_ingester/src/metrics.rs +++ b/nft_ingester/src/metrics.rs @@ -86,7 +86,7 @@ pub fn capture_result( ret_id = Some(id); } Err(err) => { - println!("Error handling account update: {:?}", err); + error!("Error handling account update: {:?}", err); metric! { statsd_count!("ingester.ingest_update_error", 1, label.0 => &label.1, "stream" => stream, "error" => "u"); } diff --git a/nft_ingester/src/program_transformers/bubblegum/db.rs b/nft_ingester/src/program_transformers/bubblegum/db.rs index fd1f6ee0e..53eb72128 100644 --- a/nft_ingester/src/program_transformers/bubblegum/db.rs +++ b/nft_ingester/src/program_transformers/bubblegum/db.rs @@ -1,7 +1,8 @@ use crate::error::IngesterError; use digital_asset_types::dao::{asset, asset_creators, backfill_items, cl_items}; +use log::{info, debug}; use sea_orm::{ - entity::*, query::*, sea_query::OnConflict, ColumnTrait, DatabaseTransaction, DbBackend, DbErr, + entity::*, query::*, sea_query::OnConflict, ColumnTrait, DbBackend, DbErr, EntityTrait, }; use spl_account_compression::events::ChangeLogEventV1; @@ -36,7 +37,7 @@ where let tree_id = change_log_event.id.as_ref(); for p in change_log_event.path.iter() { let node_idx = p.index as i64; - println!( + debug!( "seq {}, index {} level {}, node {:?}", change_log_event.seq, p.index, @@ -96,7 +97,7 @@ where // sequence number. So in this case we set at flag to force checking the tree. let force_chk = rows.is_empty() && change_log_event.seq > 1; - println!("Adding to backfill_items table at level {}", i - 1); + info!("Adding to backfill_items table at level {}", i - 1); let item = backfill_items::ActiveModel { tree: Set(tree_id.to_vec()), seq: Set(change_log_event.seq as i64), diff --git a/nft_ingester/src/program_transformers/bubblegum/mod.rs b/nft_ingester/src/program_transformers/bubblegum/mod.rs index e826688f8..f8444d26a 100644 --- a/nft_ingester/src/program_transformers/bubblegum/mod.rs +++ b/nft_ingester/src/program_transformers/bubblegum/mod.rs @@ -3,6 +3,7 @@ use blockbuster::{ instruction::InstructionBundle, programs::bubblegum::{BubblegumInstruction, InstructionName}, }; +use log::debug; use sea_orm::{ConnectionTrait, TransactionTrait}; use tokio::sync::mpsc::UnboundedSender; @@ -33,52 +34,52 @@ where let ix_type = &parsing_result.instruction; match ix_type { InstructionName::Unknown => { - println!("Unknown instruction:"); + debug!("Unknown instruction:"); } InstructionName::MintV1 => { - println!("MintV1 instruction:"); + debug!("MintV1 instruction:"); } InstructionName::MintToCollectionV1 => { - println!("MintToCollectionV1 instruction:"); + debug!("MintToCollectionV1 instruction:"); } InstructionName::Redeem => { - println!("Redeem instruction:"); + debug!("Redeem instruction:"); } InstructionName::CancelRedeem => { - println!("CancelRedeem instruction:"); + debug!("CancelRedeem instruction:"); } InstructionName::Transfer => { - println!("Transfer instruction:"); + debug!("Transfer instruction:"); } InstructionName::Delegate => { - println!("Delegate instruction:"); + debug!("Delegate instruction:"); } InstructionName::DecompressV1 => { - println!("DecompressV1 instruction:"); + debug!("DecompressV1 instruction:"); } InstructionName::Compress => { - println!("Compress instruction:"); + debug!("Compress instruction:"); } InstructionName::Burn => { - println!("Burn instruction:"); + debug!("Burn instruction:"); } InstructionName::CreateTree => { - println!("CreateTree instruction:"); + debug!("CreateTree instruction:"); } InstructionName::VerifyCreator => { - println!("VerifyCreator instruction:"); + debug!("VerifyCreator instruction:"); } InstructionName::UnverifyCreator => { - println!("UnverifyCreator instruction:"); + debug!("UnverifyCreator instruction:"); } InstructionName::VerifyCollection => { - println!("VerifyCollection instruction:"); + debug!("VerifyCollection instruction:"); } InstructionName::UnverifyCollection => { - println!("UnverifyCollection instruction:"); + debug!("UnverifyCollection instruction:"); } InstructionName::SetAndVerifyCollection => { - println!("SetAndVerifyCollection instruction:"); + debug!("SetAndVerifyCollection instruction:"); } } @@ -121,7 +122,7 @@ where InstructionName::SetAndVerifyCollection => { collection_verification::process(parsing_result, bundle, txn, true).await?; } - _ => println!("Bubblegum: Not Implemented Instruction"), + _ => debug!("Bubblegum: Not Implemented Instruction"), } Ok(()) } diff --git a/nft_ingester/src/program_transformers/mod.rs b/nft_ingester/src/program_transformers/mod.rs index 374f7c8ea..d7952d3b7 100644 --- a/nft_ingester/src/program_transformers/mod.rs +++ b/nft_ingester/src/program_transformers/mod.rs @@ -7,7 +7,7 @@ use blockbuster::{ token_metadata::TokenMetadataParser, ProgramParseResult, }, }; -use log::{debug, error}; +use log::{debug, error, info}; use plerkle_serialization::{AccountInfo, Pubkey as FBPubkey, TransactionInfo}; use sea_orm::{DatabaseConnection, SqlxPostgresConnector, TransactionTrait}; use solana_sdk::pubkey::Pubkey; @@ -69,7 +69,7 @@ impl ProgramTransformer { &self, tx: &'a TransactionInfo<'a>, ) -> Result<(), IngesterError> { - println!("Handling Transaction: {:?}", tx.signature()); + info!("Handling Transaction: {:?}", tx.signature()); let instructions = self.break_transaction(&tx); let accounts = tx.account_keys().unwrap_or_default(); let slot = tx.slot(); @@ -113,7 +113,7 @@ impl ProgramTransformer { }; if let Some(program) = self.match_program(&ix.program) { - println!("Found a ix for program: {:?}", program.key()); + debug!("Found a ix for program: {:?}", program.key()); let result = program.handle_instruction(&ix)?; let concrete = result.result_type(); match concrete { diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index fd85f997f..af25cf150 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -4,7 +4,7 @@ use cadence_macros::{is_global_default_set, statsd_count, statsd_histogram}; use chrono::{Duration, NaiveDateTime, Utc}; use crypto::{digest::Digest, sha2::Sha256}; use digital_asset_types::dao::{sea_orm_active_enums::TaskStatus, tasks}; -use log::{debug, error}; +use log::{debug, error, warn}; use sea_orm::{ entity::*, query::*, sea_query::Expr, ActiveValue::Set, ColumnTrait, DatabaseConnection, DeleteResult, SqlxPostgresConnector, @@ -119,13 +119,23 @@ impl TaskManager { } else { task.locked_by = Set(None); } - metric! { - statsd_count!("ingester.bgtask.error", 1, "type" => task_name); - } task.status = Set(TaskStatus::Failed); task.errors = Set(Some(e.to_string())); task.locked_until = Set(None); - error!("Task Run Error: {}", e); + + if e == IngesterError::BatchInitNetworkingError { + // Network errors are common for off-chain JSONs. + // Logging these as errors is far too noisy. + metric! { + statsd_count!("ingester.bgtask.network_error", 1, "type" => task_name); + } + warn!("Task failed due to network error: {}", e); + } else { + metric! { + statsd_count!("ingester.bgtask.error", 1, "type" => task_name); + } + error!("Task Run Error: {}", e); + } } } Ok(task) From 05ec5adc589d6fdfd4cda1624aebd8d83f93c8a6 Mon Sep 17 00:00:00 2001 From: Nicolas Pennie Date: Wed, 5 Apr 2023 18:59:01 -0700 Subject: [PATCH 02/23] Fix GetAssetsByCreator query (#8) --- das_api/src/api/api_impl.rs | 8 ++++---- digital_asset_types/src/dao/scopes/asset.rs | 20 +++++-------------- .../src/dapi/assets_by_creator.rs | 6 +++--- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/das_api/src/api/api_impl.rs b/das_api/src/api/api_impl.rs index 40a6acb26..e147aad02 100644 --- a/das_api/src/api/api_impl.rs +++ b/das_api/src/api/api_impl.rs @@ -9,8 +9,8 @@ use digital_asset_types::{ SearchAssetsQuery, }, dapi::{ - get_asset, get_assets_by_authority, get_assets_by_creators, get_assets_by_group, - get_assets_by_owner, get_proof_for_asset, search_assets, + get_asset, get_assets_by_authority, get_assets_by_group, + get_assets_by_owner, get_proof_for_asset, search_assets, get_assets_by_creator, }, rpc::{filter::SearchConditionType, response::GetGroupingResponse}, rpc::{OwnershipModel, RoyaltyModel}, @@ -205,9 +205,9 @@ impl ApiContract for DasApi { self.validate_pagination(&limit, &page, &before, &after)?; let sort_by = sort_by.unwrap_or_default(); let only_verified = only_verified.unwrap_or_default(); - get_assets_by_creators( + get_assets_by_creator( &self.db_connection, - vec![creator_address_bytes], + creator_address_bytes, only_verified, sort_by, limit.map(|x| x as u64).unwrap_or(1000), diff --git a/digital_asset_types/src/dao/scopes/asset.rs b/digital_asset_types/src/dao/scopes/asset.rs index 6c6b1e33d..bc8c88a6a 100644 --- a/digital_asset_types/src/dao/scopes/asset.rs +++ b/digital_asset_types/src/dao/scopes/asset.rs @@ -30,29 +30,19 @@ where pub async fn get_by_creator( conn: &impl ConnectionTrait, - creators: Vec>, + creator: Vec, only_verified: bool, sort_by: asset::Column, sort_direction: Order, pagination: &Pagination, limit: u64, ) -> Result, DbErr> { - if creators.is_empty() { - return Ok(vec![]); - } - if creators.len() > 5 { - return Err(DbErr::Custom("Too many creators".to_string())); - } - let mut condition = Condition::any(); - for creator in creators { - condition = condition.add(asset_creators::Column::Creator.eq(creator)); - } + let mut condition = Condition::all() + .add(asset_creators::Column::Creator.eq(creator)) + .add(asset::Column::Supply.gt(0)); if only_verified { - condition = Condition::all() - .add(condition) - .add(asset_creators::Column::Verified.eq(true)); + condition = condition.add(asset_creators::Column::Verified.eq(true)); } - condition = condition.add(asset::Column::Supply.gt(0)); get_by_related_condition( conn, condition, diff --git a/digital_asset_types/src/dapi/assets_by_creator.rs b/digital_asset_types/src/dapi/assets_by_creator.rs index 150763cb1..e69a12f92 100644 --- a/digital_asset_types/src/dapi/assets_by_creator.rs +++ b/digital_asset_types/src/dapi/assets_by_creator.rs @@ -6,9 +6,9 @@ use sea_orm::DbErr; use super::common::{build_asset_response, create_pagination, create_sorting}; -pub async fn get_assets_by_creators( +pub async fn get_assets_by_creator( db: &DatabaseConnection, - creators: Vec>, + creator: Vec, only_verified: bool, sorting: AssetSorting, limit: u64, @@ -20,7 +20,7 @@ pub async fn get_assets_by_creators( let (sort_direction, sort_column) = create_sorting(sorting); let assets = scopes::asset::get_by_creator( db, - creators, + creator, only_verified, sort_column, sort_direction, From 9270e83bc0dbbae97e34b457cfd62c415dccdabf Mon Sep 17 00:00:00 2001 From: Nicolas Pennie Date: Wed, 5 Apr 2023 22:02:59 -0400 Subject: [PATCH 03/23] Bump to 0.7.1 --- das_api/Cargo.lock | 2 +- das_api/Cargo.toml | 2 +- nft_ingester/Cargo.lock | 2 +- nft_ingester/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/das_api/Cargo.lock b/das_api/Cargo.lock index 0468b1329..9165e05b4 100644 --- a/das_api/Cargo.lock +++ b/das_api/Cargo.lock @@ -992,7 +992,7 @@ dependencies = [ [[package]] name = "das_api" -version = "0.6.8" +version = "0.7.1" dependencies = [ "async-trait", "bs58 0.4.0", diff --git a/das_api/Cargo.toml b/das_api/Cargo.toml index c6c499c45..39b25a118 100644 --- a/das_api/Cargo.toml +++ b/das_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "das_api" -version = "0.6.8" +version = "0.7.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/nft_ingester/Cargo.lock b/nft_ingester/Cargo.lock index 2fed3afe5..15d58d4ee 100644 --- a/nft_ingester/Cargo.lock +++ b/nft_ingester/Cargo.lock @@ -2616,7 +2616,7 @@ dependencies = [ [[package]] name = "nft_ingester" -version = "0.7.0" +version = "0.7.1" dependencies = [ "anchor-lang", "async-trait", diff --git a/nft_ingester/Cargo.toml b/nft_ingester/Cargo.toml index aade059ff..662043048 100644 --- a/nft_ingester/Cargo.toml +++ b/nft_ingester/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nft_ingester" -version = "0.7.0" +version = "0.7.1" edition = "2021" [dependencies] From 72f94cf677bc414b7cd4bffe92c3de04f728fad4 Mon Sep 17 00:00:00 2001 From: linuskendall Date: Thu, 13 Apr 2023 11:23:56 +0100 Subject: [PATCH 04/23] Handle HTTP errors Handle and log http errors separately. --- nft_ingester/src/error/mod.rs | 2 ++ nft_ingester/src/tasks/common/mod.rs | 12 ++++++---- nft_ingester/src/tasks/mod.rs | 33 ++++++++++++++++++---------- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/nft_ingester/src/error/mod.rs b/nft_ingester/src/error/mod.rs index 80b132f70..eca96f5df 100644 --- a/nft_ingester/src/error/mod.rs +++ b/nft_ingester/src/error/mod.rs @@ -48,6 +48,8 @@ pub enum IngesterError { UnrecoverableTaskError, #[error("Cache Storage Write Error {0}")] CacheStorageWriteError(String), + #[error("HttpError {status_code}")] + HttpError { status_code: String }, } impl From for IngesterError { diff --git a/nft_ingester/src/tasks/common/mod.rs b/nft_ingester/src/tasks/common/mod.rs index 1389c91f9..7dd6944f6 100644 --- a/nft_ingester/src/tasks/common/mod.rs +++ b/nft_ingester/src/tasks/common/mod.rs @@ -55,12 +55,16 @@ impl DownloadMetadataTask { let client = ClientBuilder::new() .timeout(Duration::from_secs(3)) .build()?; - let val: serde_json::Value = Client::get(&client, uri) // Need to check for malicious sites ? + let response = Client::get(&client, uri) // Need to check for malicious sites ? .send() - .await? - .json() .await?; - Ok(val) + + if response.status() != reqwest::StatusCode::OK { + Err(IngesterError::HttpError{ status_code: response.status().as_str().to_string() }) + } else { + let val: serde_json::Value = response.json().await?; + Ok(val) + } } } diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index af25cf150..f12b6fa18 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -123,18 +123,29 @@ impl TaskManager { task.errors = Set(Some(e.to_string())); task.locked_until = Set(None); - if e == IngesterError::BatchInitNetworkingError { - // Network errors are common for off-chain JSONs. - // Logging these as errors is far too noisy. - metric! { - statsd_count!("ingester.bgtask.network_error", 1, "type" => task_name); - } - warn!("Task failed due to network error: {}", e); - } else { - metric! { - statsd_count!("ingester.bgtask.error", 1, "type" => task_name); + match e { + IngesterError::BatchInitNetworkingError => { + // Network errors are common for off-chain JSONs. + // Logging these as errors is far too noisy. + metric! { + statsd_count!("ingester.bgtask.network_error", 1, "type" => task_name); + } + warn!("Task failed due to network error: {}", e); + }, + IngesterError::HttpError { ref status_code } => { + metric! { + statsd_count!("ingester.bgtask.http_error", 1, + "status" => &status_code, + "type" => task_name); + } + warn!("Task failed due to HTTP error: {}", e); + }, + _ => { + metric! { + statsd_count!("ingester.bgtask.error", 1, "type" => task_name); + } + error!("Task Run Error: {}", e); } - error!("Task Run Error: {}", e); } } } From 01b34ebc1eb075ee9913b8c058daad776703376b Mon Sep 17 00:00:00 2001 From: linuskendall Date: Mon, 17 Apr 2023 19:11:25 +0100 Subject: [PATCH 05/23] Make bgtask runner configurable Partially addresses metaplex-foundation/digital-asset-rpc-infrastructure#50. --- nft_ingester/Cargo.lock | 237 +++++++++++++++++++++++++++++++--- nft_ingester/Cargo.toml | 3 +- nft_ingester/src/config.rs | 32 ++++- nft_ingester/src/main.rs | 30 ++++- nft_ingester/src/tasks/mod.rs | 73 +++++++++-- 5 files changed, 337 insertions(+), 38 deletions(-) diff --git a/nft_ingester/Cargo.lock b/nft_ingester/Cargo.lock index 15d58d4ee..d73a77b33 100644 --- a/nft_ingester/Cargo.lock +++ b/nft_ingester/Cargo.lock @@ -285,6 +285,55 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e579a7752471abc2a8268df8b20005e3eadd975f585398f17efcfd8d4927371" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" + +[[package]] +name = "anstyle-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcd8291a340dd8ac70e18878bc4501dd7b4ff970cfa21c207d36ece51ea88fd" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + [[package]] name = "anyhow" version = "1.0.69" @@ -903,7 +952,7 @@ checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", "bitflags", - "clap_lex", + "clap_lex 0.2.4", "indexmap", "once_cell", "strsim 0.10.0", @@ -911,6 +960,43 @@ dependencies = [ "textwrap 0.16.0", ] +[[package]] +name = "clap" +version = "4.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b802d85aaf3a1cdb02b224ba472ebdea62014fccfcb269b95a4d76443b5ee5a" +dependencies = [ + "clap_builder", + "clap_derive", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14a1a858f532119338887a4b8e1af9c60de8249cd7bafd68036a489e261e37b6" +dependencies = [ + "anstream", + "anstyle", + "bitflags", + "clap_lex 0.4.1", + "once_cell", + "strsim 0.10.0", +] + +[[package]] +name = "clap_derive" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" +dependencies = [ + "heck 0.4.1", + "proc-macro2 1.0.52", + "quote 1.0.26", + "syn 2.0.12", +] + [[package]] name = "clap_lex" version = "0.2.4" @@ -920,6 +1006,12 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "clap_lex" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" + [[package]] name = "codespan-reporting" version = "0.11.1" @@ -930,6 +1022,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "combine" version = "4.6.6" @@ -1589,6 +1687,8 @@ dependencies = [ "atomic", "pear", "serde", + "serde_yaml 0.9.21", + "toml", "uncased", "version_check", ] @@ -2627,6 +2727,7 @@ dependencies = [ "cadence", "cadence-macros", "chrono", + "clap 4.2.2", "digital_asset_types", "env_logger 0.10.0", "figment", @@ -4182,6 +4283,19 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "serde_yaml" +version = "0.9.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "sha-1" version = "0.10.1" @@ -4454,7 +4568,7 @@ dependencies = [ "lazy_static", "serde", "serde_derive", - "serde_yaml", + "serde_yaml 0.8.26", "solana-clap-utils", "solana-sdk", "url", @@ -5297,6 +5411,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79d9531f94112cfc3e4c8f5f02cb2b58f72c97b7efd85f70203cc6d8efda5927" +dependencies = [ + "proc-macro2 1.0.52", + "quote 1.0.26", + "unicode-ident", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -5797,6 +5922,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "unsafe-libyaml" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" + [[package]] name = "untrusted" version = "0.7.1" @@ -5830,6 +5961,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "1.3.0" @@ -6050,13 +6187,13 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -6065,7 +6202,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", ] [[package]] @@ -6074,13 +6220,28 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] @@ -6089,42 +6250,84 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + [[package]] name = "windows_i686_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + [[package]] name = "windows_i686_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + [[package]] name = "winnow" version = "0.3.5" diff --git a/nft_ingester/Cargo.toml b/nft_ingester/Cargo.toml index 662043048..7b8e73df4 100644 --- a/nft_ingester/Cargo.toml +++ b/nft_ingester/Cargo.toml @@ -35,7 +35,7 @@ uuid = "1.0.0" async-trait = "0.1.53" num-traits = "0.2.15" blockbuster = { version = "0.7.3" } -figment = { version = "0.10.6", features = ["env"] } +figment = { version = "0.10.6", features = ["env", "toml", "yaml"] } cadence = "0.29.0" cadence-macros = "0.29.0" solana-sdk = "~1.14" @@ -57,6 +57,7 @@ tracing-subscriber = { version = "0.3.16", features = [ "env-filter", "ansi", ] } +clap = { version = "4.2.2", features = ["derive", "cargo"] } [dependencies.num-integer] version = "0.1.44" diff --git a/nft_ingester/src/config.rs b/nft_ingester/src/config.rs index 9b05d3e37..b224679d1 100644 --- a/nft_ingester/src/config.rs +++ b/nft_ingester/src/config.rs @@ -1,13 +1,17 @@ -use std::fmt::{Display, Formatter}; +use std::{fmt::{Display, Formatter}, sync::Arc}; -use figment::{providers::Env, value::Value, Figment}; +use figment::{providers::{Env, Format, Yaml}, value::Value, Figment}; use plerkle_messenger::MessengerConfig; use rand::{distributions::Alphanumeric, thread_rng, Rng}; use serde::Deserialize; use std::env; +use std::path::PathBuf; use tracing_subscriber::fmt; -use crate::error::IngesterError; +use crate::{ + error::IngesterError, + tasks::BackgroundTaskRunnerConfig, +}; #[derive(Deserialize, PartialEq, Debug, Clone)] pub struct IngesterConfig { @@ -23,8 +27,10 @@ pub struct IngesterConfig { pub account_stream_worker_count: Option, pub transaction_stream_worker_count: Option, pub code_version: Option<&'static str>, + pub background_task_runner_config: Option, } + impl IngesterConfig { /// Get the db url out of the dict, this is built a a dict so that future extra db parameters can be easily shoved in. /// this panics if the key is not present @@ -76,6 +82,7 @@ pub const RPC_URL_KEY: &str = "url"; pub const RPC_COMMITMENT_KEY: &str = "commitment"; pub const CODE_VERSION: &str = env!("CARGO_PKG_VERSION"); + #[derive(Deserialize, PartialEq, Eq, Debug, Clone)] pub enum IngesterRole { All, @@ -84,6 +91,12 @@ pub enum IngesterRole { Ingester, } +impl Default for IngesterRole { + fn default() -> Self { + IngesterRole::All + } +} + impl Display for IngesterRole { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { match self { @@ -103,9 +116,16 @@ pub fn rand_string() -> String { .collect() } -pub fn setup_config() -> IngesterConfig { - let mut config: IngesterConfig = Figment::new() - .join(Env::prefixed("INGESTER_")) +pub fn setup_config(config_file: Option<&PathBuf>) -> IngesterConfig { + let mut figment = Figment::new() + .join(Env::prefixed("INGESTER_")); + + if let Some(config_file) = config_file { + figment = figment.join(Yaml::file(config_file)); + } + + let mut config: IngesterConfig = + figment .extract() .map_err(|config_error| IngesterError::ConfigurationError { msg: format!("{}", config_error), diff --git a/nft_ingester/src/main.rs b/nft_ingester/src/main.rs index 76c81e934..903b46434 100644 --- a/nft_ingester/src/main.rs +++ b/nft_ingester/src/main.rs @@ -35,19 +35,44 @@ use tokio::{ task::{JoinSet}, }; +use std::path::PathBuf; +use clap::{arg, command, value_parser, ArgAction, Command}; + #[tokio::main(flavor = "multi_thread")] pub async fn main() -> Result<(), IngesterError> { init_logger(); info!("Starting nft_ingester"); + + let matches = command!() + .arg( + arg!( + -c --config "Sets a custom config file" + ) + // We don't have syntax yet for optional options, so manually calling `required` + .required(false) + .value_parser(value_parser!(PathBuf)), + ) + .get_matches(); + + let config_path = matches.get_one::("config"); + if let Some(config_path) = config_path { + println!("Loading config from: {}", config_path.display()); + } + // Setup Configuration and Metrics --------------------------------------------- + // Pull Env variables into config struct - let config = setup_config(); + let config = setup_config(config_path); + // Optionally setup metrics if config demands it setup_metrics(&config); + // One pool many clones, this thing is thread safe and send sync let database_pool = setup_database(config.clone()).await; + // The role determines the processes that get run. let role = config.clone().role.unwrap_or(IngesterRole::All); + info!("Starting Program with Role {}", role); // Tasks Setup ----------------------------------------------- // This joinset maages all the tasks that are spawned. @@ -121,7 +146,8 @@ pub async fn main() -> Result<(), IngesterError> { // Setup Stream Size Timers, these are small processes that run every 60 seconds and farm metrics for the size of the streams. // If metrics are disabled, these will not run. if role == IngesterRole::BackgroundTaskRunner || role == IngesterRole::All { - tasks.spawn(background_task_manager.start_runner()); + let background_runner_config = config.clone().background_task_runner_config;; + tasks.spawn(background_task_manager.start_runner(background_runner_config)); } // Backfiller Setup ------------------------------------------ if role == IngesterRole::Backfiller || role == IngesterRole::All { diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index f12b6fa18..2122999bd 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -16,6 +16,7 @@ use tokio::{ task::JoinHandle, time, }; +use serde::Deserialize; mod common; pub use common::*; @@ -32,9 +33,32 @@ pub trait BgTask: Send + Sync { ) -> Result<(), IngesterError>; } -const RETRY_INTERVAL: u64 = 1000; -const DELETE_INTERVAL: u64 = 30000; -const MAX_TASK_BATCH_SIZE: u64 = 100; +pub const RETRY_INTERVAL: u64 = 1000; +pub const DELETE_INTERVAL: u64 = 30000; +pub const MAX_TASK_BATCH_SIZE: u64 = 100; +pub const PURGE_TIME: u64 = 3600; + +/** + * Configuration for the background task runner, to be used in config file loading e.g. + */ +#[derive(Deserialize, PartialEq, Debug, Clone)] +pub struct BackgroundTaskRunnerConfig { + pub delete_interval: Option, + pub retry_interval: Option, + pub purge_time: Option, + pub batch_size: Option, +} + +impl Default for BackgroundTaskRunnerConfig { + fn default() -> Self { + BackgroundTaskRunnerConfig { + delete_interval: Some(DELETE_INTERVAL), + retry_interval: Some(RETRY_INTERVAL), + purge_time: Some(PURGE_TIME), + batch_size: Some(MAX_TASK_BATCH_SIZE), + } + } +} pub struct TaskData { pub name: &'static str, @@ -154,6 +178,7 @@ impl TaskManager { pub async fn get_pending_tasks( conn: &DatabaseConnection, + batch_size: u64, ) -> Result, IngesterError> { tasks::Entity::find() .filter( @@ -170,7 +195,7 @@ impl TaskManager { ), ) .order_by_desc(tasks::Column::CreatedAt) - .limit(MAX_TASK_BATCH_SIZE) + .limit(batch_size) .all(conn) .await .map_err(|e| e.into()) @@ -244,8 +269,8 @@ impl TaskManager { }) } - pub async fn purge_old_tasks(conn: &DatabaseConnection) -> Result { - let cod = Expr::cust("NOW() - created_at::timestamp > interval '60 minute'"); //TOdo parametrize + pub async fn purge_old_tasks(conn: &DatabaseConnection, task_max_age: time::Duration) -> Result { + let cod = Expr::cust_with_values("NOW() - created_at::timestamp > interval '? seconds'", [task_max_age.as_secs()]); tasks::Entity::delete_many() .filter(Condition::all().add(cod)) .exec(conn) @@ -305,16 +330,38 @@ impl TaskManager { }) } - pub fn start_runner(&self) -> JoinHandle<()> { + pub fn start_runner(&self, config: Option) -> JoinHandle<()> { let task_map = self.registered_task_types.clone(); - let pool = self.pool.clone(); let instance_name = self.instance_name.clone(); + + // Load the config values + // For backwards compatibility reasons, the logic is a bit convoluted. + let config = config.unwrap_or_default(); + + let delete_interval = tokio::time::Duration::from_millis( + config.delete_interval.unwrap_or( + BackgroundTaskRunnerConfig::default().delete_interval.unwrap() + )); + + let retry_interval = tokio::time::Duration::from_millis( + config.retry_interval.unwrap_or( + BackgroundTaskRunnerConfig::default().retry_interval.unwrap())); + + let purge_time = tokio::time::Duration::from_secs( + config.purge_time.unwrap_or( + BackgroundTaskRunnerConfig::default().purge_time.unwrap())); + + let batch_size = config.batch_size.unwrap_or( + BackgroundTaskRunnerConfig::default().batch_size.unwrap()); + + // Loop to purge tasks + let pool = self.pool.clone(); tokio::spawn(async move { let conn = SqlxPostgresConnector::from_sqlx_postgres_pool(pool.clone()); - let mut interval = time::interval(tokio::time::Duration::from_millis(DELETE_INTERVAL)); + let mut interval = time::interval(delete_interval); loop { interval.tick().await; // ticks immediately - let delete_res = TaskManager::purge_old_tasks(&conn).await; + let delete_res = TaskManager::purge_old_tasks(&conn, purge_time).await; match delete_res { Ok(res) => { debug!("deleted {} tasks entries", res.rows_affected); @@ -325,13 +372,15 @@ impl TaskManager { }; } }); + + // Loop to check for tasks that need to be executed and execute them let pool = self.pool.clone(); tokio::spawn(async move { - let mut interval = time::interval(tokio::time::Duration::from_millis(RETRY_INTERVAL)); + let mut interval = time::interval(retry_interval); let conn = SqlxPostgresConnector::from_sqlx_postgres_pool(pool.clone()); loop { interval.tick().await; // ticks immediately - let tasks_res = TaskManager::get_pending_tasks(&conn).await; + let tasks_res = TaskManager::get_pending_tasks(&conn, batch_size).await; match tasks_res { Ok(tasks) => { debug!("tasks that need to be executed: {}", tasks.len()); From 3ce846985f1140a464508a9b7137c8d8b78d7f4e Mon Sep 17 00:00:00 2001 From: linuskendall Date: Mon, 17 Apr 2023 21:51:23 +0100 Subject: [PATCH 06/23] Enable configurable retries Enable configurable retries for the bgtask. --- nft_ingester/src/config.rs | 1 - nft_ingester/src/main.rs | 12 ++++++++++-- nft_ingester/src/tasks/common/mod.rs | 18 ++++++++++++------ nft_ingester/src/tasks/mod.rs | 7 +++++++ 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/nft_ingester/src/config.rs b/nft_ingester/src/config.rs index b224679d1..8dba535c2 100644 --- a/nft_ingester/src/config.rs +++ b/nft_ingester/src/config.rs @@ -30,7 +30,6 @@ pub struct IngesterConfig { pub background_task_runner_config: Option, } - impl IngesterConfig { /// Get the db url out of the dict, this is built a a dict so that future extra db parameters can be easily shoved in. /// this panics if the key is not present diff --git a/nft_ingester/src/main.rs b/nft_ingester/src/main.rs index 903b46434..de1aecb30 100644 --- a/nft_ingester/src/main.rs +++ b/nft_ingester/src/main.rs @@ -35,7 +35,10 @@ use tokio::{ task::{JoinSet}, }; -use std::path::PathBuf; +use std::{ + path::PathBuf, + time +}; use clap::{arg, command, value_parser, ArgAction, Command}; #[tokio::main(flavor = "multi_thread")] @@ -81,7 +84,12 @@ pub async fn main() -> Result<(), IngesterError> { // BACKGROUND TASKS -------------------------------------------- //Setup definitions for background tasks - let bg_task_definitions: Vec> = vec![Box::new(DownloadMetadataTask {})]; + let task_runner_config = config.background_task_runner_config.clone().unwrap_or_default(); + let bg_task_definitions: Vec> = vec![Box::new(DownloadMetadataTask { + lock_duration: task_runner_config.lock_duration, + max_attempts: task_runner_config.max_attempts, + timeout: task_runner_config.timeout, + })]; let mut background_task_manager = TaskManager::new(rand_string(), database_pool.clone(), bg_task_definitions); diff --git a/nft_ingester/src/tasks/common/mod.rs b/nft_ingester/src/tasks/common/mod.rs index 7dd6944f6..0a5087162 100644 --- a/nft_ingester/src/tasks/common/mod.rs +++ b/nft_ingester/src/tasks/common/mod.rs @@ -48,12 +48,16 @@ impl FromTaskData for DownloadMetadata { } #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct DownloadMetadataTask {} +pub struct DownloadMetadataTask { + pub lock_duration: Option, + pub max_attempts: Option, + pub timeout: Option, +} impl DownloadMetadataTask { - async fn request_metadata(uri: String) -> Result { + async fn request_metadata(uri: String, timeout: Duration) -> Result { let client = ClientBuilder::new() - .timeout(Duration::from_secs(3)) + .timeout(timeout) .build()?; let response = Client::get(&client, uri) // Need to check for malicious sites ? .send() @@ -75,11 +79,11 @@ impl BgTask for DownloadMetadataTask { } fn lock_duration(&self) -> i64 { - 5 + self.lock_duration.unwrap_or(5) } fn max_attempts(&self) -> i16 { - 3 + self.max_attempts.unwrap_or(3) } async fn task( @@ -90,7 +94,9 @@ impl BgTask for DownloadMetadataTask { let download_metadata: DownloadMetadata = serde_json::from_value(data)?; let meta_url = Url::parse(&download_metadata.uri); let body = match meta_url { - Ok(_) => DownloadMetadataTask::request_metadata(download_metadata.uri).await?, + Ok(_) => DownloadMetadataTask::request_metadata( + download_metadata.uri, + self.timeout.unwrap_or(Duration::from_secs(3))).await?, _ => serde_json::Value::String("Invalid Uri".to_string()), //TODO -> enumize this. }; let model = asset_data::ActiveModel { diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index 2122999bd..d2022881f 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -17,6 +17,7 @@ use tokio::{ time, }; use serde::Deserialize; +use std::time::Duration as StdDuration; mod common; pub use common::*; @@ -47,6 +48,9 @@ pub struct BackgroundTaskRunnerConfig { pub retry_interval: Option, pub purge_time: Option, pub batch_size: Option, + pub lock_duration: Option, + pub max_attempts: Option, + pub timeout: Option, } impl Default for BackgroundTaskRunnerConfig { @@ -56,6 +60,9 @@ impl Default for BackgroundTaskRunnerConfig { retry_interval: Some(RETRY_INTERVAL), purge_time: Some(PURGE_TIME), batch_size: Some(MAX_TASK_BATCH_SIZE), + lock_duration: Some(5), + max_attempts: Some(3), + timeout: Some(StdDuration::from_secs(3)), } } } From f0c3ccf934c1d9d2bf85e0ef74d82f1ebe3dcffd Mon Sep 17 00:00:00 2001 From: linuskendall Date: Mon, 17 Apr 2023 22:25:41 +0100 Subject: [PATCH 07/23] Add purged task metric --- nft_ingester/src/tasks/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index d2022881f..0d16f72a3 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -363,6 +363,7 @@ impl TaskManager { // Loop to purge tasks let pool = self.pool.clone(); + let task_name = instance_name.clone(); tokio::spawn(async move { let conn = SqlxPostgresConnector::from_sqlx_postgres_pool(pool.clone()); let mut interval = time::interval(delete_interval); @@ -372,8 +373,14 @@ impl TaskManager { match delete_res { Ok(res) => { debug!("deleted {} tasks entries", res.rows_affected); + metric! { + statsd_count!("ingester.bgtask.purged_tasks", i64::try_from(res.rows_affected).unwrap_or(1), "type" => &task_name); + } } Err(e) => { + metric! { + statsd_count!("ingester.bgtask.purge_error", 1, "type" => &task_name); + } error!("error deleting tasks: {}", e); } }; From 6f415a58f0391bb73594c67de97f75d5fa6bb4f2 Mon Sep 17 00:00:00 2001 From: linuskendall Date: Mon, 17 Apr 2023 22:27:16 +0100 Subject: [PATCH 08/23] add new task metric --- nft_ingester/src/tasks/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index 0d16f72a3..5aba8658c 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -324,6 +324,9 @@ impl TaskManager { } continue; } + metric! { + statsd_count!("ingester.bgtask.new", 1, "type" => &e.task_type); + } TaskManager::new_task_handler( pool.clone(), instance_name.clone(), From 05d19269ad86c1bf63a3570c1195efa041959a43 Mon Sep 17 00:00:00 2001 From: linuskendall Date: Mon, 17 Apr 2023 22:28:44 +0100 Subject: [PATCH 09/23] Fixed nft ingester --- nft_ingester/src/tasks/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index 5aba8658c..1545c5434 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -325,7 +325,7 @@ impl TaskManager { continue; } metric! { - statsd_count!("ingester.bgtask.new", 1, "type" => &e.task_type); + statsd_count!("ingester.bgtask.new", 1, "type" => &task.name); } TaskManager::new_task_handler( pool.clone(), From b2420e1fcae1b31f270593871f74686a22ccac46 Mon Sep 17 00:00:00 2001 From: linuskendall Date: Mon, 17 Apr 2023 22:50:15 +0100 Subject: [PATCH 10/23] Fix the reading of task timeout --- nft_ingester/src/main.rs | 2 +- nft_ingester/src/tasks/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nft_ingester/src/main.rs b/nft_ingester/src/main.rs index de1aecb30..18413f660 100644 --- a/nft_ingester/src/main.rs +++ b/nft_ingester/src/main.rs @@ -88,7 +88,7 @@ pub async fn main() -> Result<(), IngesterError> { let bg_task_definitions: Vec> = vec![Box::new(DownloadMetadataTask { lock_duration: task_runner_config.lock_duration, max_attempts: task_runner_config.max_attempts, - timeout: task_runner_config.timeout, + timeout: Some(time::Duration::from_secs(task_runner_config.timeout.unwrap_or(3))), })]; let mut background_task_manager = diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index 1545c5434..fe534eb45 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -50,7 +50,7 @@ pub struct BackgroundTaskRunnerConfig { pub batch_size: Option, pub lock_duration: Option, pub max_attempts: Option, - pub timeout: Option, + pub timeout: Option, } impl Default for BackgroundTaskRunnerConfig { @@ -62,7 +62,7 @@ impl Default for BackgroundTaskRunnerConfig { batch_size: Some(MAX_TASK_BATCH_SIZE), lock_duration: Some(5), max_attempts: Some(3), - timeout: Some(StdDuration::from_secs(3)), + timeout: Some(3), } } } From 5f63e1b3f47dee93a611c006d2afac0554c30d5c Mon Sep 17 00:00:00 2001 From: linuskendall Date: Mon, 17 Apr 2023 23:06:26 +0100 Subject: [PATCH 11/23] Set slow statements to debug --- nft_ingester/src/database.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nft_ingester/src/database.rs b/nft_ingester/src/database.rs index 209480135..5b02a6c10 100644 --- a/nft_ingester/src/database.rs +++ b/nft_ingester/src/database.rs @@ -20,7 +20,7 @@ pub async fn setup_database(config: IngesterConfig) -> PgPool { let mut options: PgConnectOptions = url.parse().unwrap(); options.log_statements(log::LevelFilter::Trace); - options.log_slow_statements(log::LevelFilter::Info, std::time::Duration::from_millis(500)); + options.log_slow_statements(log::LevelFilter::Debug, std::time::Duration::from_millis(500)); let pool = PgPoolOptions::new() .min_connections(BARE_MINIMUM_CONNECTIONS) From f3020b0318073c8e749694c2bec2a3645183bce1 Mon Sep 17 00:00:00 2001 From: linuskendall Date: Mon, 17 Apr 2023 23:15:11 +0100 Subject: [PATCH 12/23] Remove task name --- nft_ingester/src/tasks/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index fe534eb45..be17e939b 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -377,12 +377,12 @@ impl TaskManager { Ok(res) => { debug!("deleted {} tasks entries", res.rows_affected); metric! { - statsd_count!("ingester.bgtask.purged_tasks", i64::try_from(res.rows_affected).unwrap_or(1), "type" => &task_name); + statsd_count!("ingester.bgtask.purged_tasks", i64::try_from(res.rows_affected).unwrap_or(1)); } } Err(e) => { metric! { - statsd_count!("ingester.bgtask.purge_error", 1, "type" => &task_name); + statsd_count!("ingester.bgtask.purge_error", 1); } error!("error deleting tasks: {}", e); } From b178907e254a307a7a3f3278deaafd31ab22e6ea Mon Sep 17 00:00:00 2001 From: linuskendall Date: Tue, 18 Apr 2023 00:03:32 +0100 Subject: [PATCH 13/23] Fix purge task --- nft_ingester/src/tasks/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index be17e939b..436248bfd 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -277,7 +277,7 @@ impl TaskManager { } pub async fn purge_old_tasks(conn: &DatabaseConnection, task_max_age: time::Duration) -> Result { - let cod = Expr::cust_with_values("NOW() - created_at::timestamp > interval '? seconds'", [task_max_age.as_secs()]); + let cod = Expr::cust_with_values("NOW() - created_at::timestamp > interval ? seconds", [task_max_age.as_secs()]); tasks::Entity::delete_many() .filter(Condition::all().add(cod)) .exec(conn) From 392a2f3dfe6dec9755b63fde219d4ab00191fe00 Mon Sep 17 00:00:00 2001 From: ethyi <37843741+ethyi@users.noreply.github.com> Date: Wed, 19 Apr 2023 06:03:56 -0700 Subject: [PATCH 14/23] acc forwarder (#11) * acc forwarder * version to .0.1 --- tests/acc_forwarder/Cargo.lock | 4624 +++++++++++++++++++++++++++++ tests/acc_forwarder/Cargo.toml | 25 + tests/acc_forwarder/README.md | 25 + tests/acc_forwarder/src/main.rs | 160 + tests/acc_forwarder/test.scenario | 3 + 5 files changed, 4837 insertions(+) create mode 100644 tests/acc_forwarder/Cargo.lock create mode 100644 tests/acc_forwarder/Cargo.toml create mode 100644 tests/acc_forwarder/README.md create mode 100644 tests/acc_forwarder/src/main.rs create mode 100644 tests/acc_forwarder/test.scenario diff --git a/tests/acc_forwarder/Cargo.lock b/tests/acc_forwarder/Cargo.lock new file mode 100644 index 000000000..92ed97106 --- /dev/null +++ b/tests/acc_forwarder/Cargo.lock @@ -0,0 +1,4624 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "acc_forwarder" +version = "0.0.1" +dependencies = [ + "base64 0.20.0", + "bs58", + "clap 4.1.4", + "figment", + "flatbuffers", + "futures", + "futures-util", + "mpl-token-metadata", + "plerkle_messenger", + "plerkle_serialization", + "redis", + "reqwest", + "serde_json", + "solana-client", + "solana-sdk", + "solana-transaction-status", + "thiserror", + "tokio", + "tokio-stream", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aead" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +dependencies = [ + "generic-array", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher 0.3.0", + "cpufeatures", + "opaque-debug", +] + +[[package]] +name = "aes-gcm-siv" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" +dependencies = [ + "aead", + "aes", + "cipher 0.3.0", + "ctr", + "polyval", + "subtle", + "zeroize", +] + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.8", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anyhow" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" + +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + +[[package]] +name = "asn1-rs" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf6690c370453db30743b373a60ba498fc0d6d83b11f4abfd87a84a075db5dd4" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time 0.3.17", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-compression" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-mutex" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-trait" +version = "0.1.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "atomic" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" + +[[package]] +name = "base64" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" + +[[package]] +name = "base64ct" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake3" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.6", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate 0.1.5", + "proc-macro2 1.0.51", + "syn 1.0.107", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "brotli" +version = "3.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "2.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bumpalo" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aca418a974d83d40a0c1f0c5cba6ff4bc28d8df099109ca459a2118d40b6322" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "caps" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190baaad529bcfbde9e1a19022c42781bdb6ff9de25721abdb8fd98c0807730b" +dependencies = [ + "libc", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-integer", + "num-traits", + "serde", + "time 0.1.45", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "cipher" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "ansi_term", + "atty", + "bitflags", + "strsim 0.8.0", + "textwrap 0.11.0", + "unicode-width", + "vec_map", +] + +[[package]] +name = "clap" +version = "3.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +dependencies = [ + "atty", + "bitflags", + "clap_lex 0.2.4", + "indexmap", + "once_cell", + "strsim 0.10.0", + "termcolor", + "textwrap 0.16.0", +] + +[[package]] +name = "clap" +version = "4.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" +dependencies = [ + "bitflags", + "clap_derive", + "clap_lex 0.3.1", + "is-terminal", + "once_cell", + "strsim 0.10.0", + "termcolor", +] + +[[package]] +name = "clap_derive" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "clap_lex" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + +[[package]] +name = "combine" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +dependencies = [ + "bytes", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "console" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.42.0", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501a375961cef1a0d44767200e66e4a559283097e91d0730b1d75dfb2f8a1494" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + +[[package]] +name = "constant_time_eq" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + +[[package]] +name = "cpufeatures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.7.1", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "ctr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher 0.3.0", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "cxx" +version = "1.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90d59d9acd2a682b4e40605a242f6670eaa58c5957471cbf85e8aa6a0b97a5e8" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebfa40bda659dd5c864e65f4c9a2b0aff19bea56b017b9b77c73d3766a453a38" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2 1.0.51", + "quote 1.0.23", + "scratch", + "syn 1.0.107", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "457ce6757c5c70dc6ecdbda6925b958aae7f959bda7d8fb9bde889e34a09dc03" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf883b7aacd7b2aeb2a7b338648ee19f57c140d4ee8e52c68979c6b2f7f2263" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "data-encoding" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" + +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid", +] + +[[package]] +name = "der-parser" +version = "8.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d4bc9b0db0a0df9ae64634ac5bdefb7afcb534e182275ca0beadbe486701c1" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint 0.4.3", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "derivation-path" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" + +[[package]] +name = "dialoguer" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3c796f3b0b408d9fd581611b47fa850821fcb84aa640b83a3c1a5be2d691f2" +dependencies = [ + "console", + "shell-words", + "tempfile", + "zeroize", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +dependencies = [ + "block-buffer 0.10.3", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "dlopen" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937" +dependencies = [ + "dlopen_derive", + "lazy_static", + "libc", + "winapi", +] + +[[package]] +name = "dlopen_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581" +dependencies = [ + "libc", + "quote 0.6.13", + "syn 0.15.44", +] + +[[package]] +name = "eager" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-dalek-bip32" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" +dependencies = [ + "derivation-path", + "ed25519-dalek", + "hmac 0.12.1", + "sha2 0.10.6", +] + +[[package]] +name = "either" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-iterator" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2953d1df47ac0eb70086ccabf0275aa8da8591a28bd358ee2b52bd9f9e3ff9e9" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8958699f9359f0b04e691a13850d48b7de329138023876d07cbd024c2c820598" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "enum_dispatch" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f36e95862220b211a6e2aa5eca09b4fa391b13cd52ceb8035a24bf65a79de2" +dependencies = [ + "once_cell", + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "figment" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e56602b469b2201400dec66a66aec5a9b8761ee97cd1b8c96ab2483fcc16cc9" +dependencies = [ + "atomic", + "serde", + "uncased", + "version_check", +] + +[[package]] +name = "flatbuffers" +version = "23.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77f5399c2c9c50ae9418e522842ad362f61ee48b346ac106807bd355a8a7c619" +dependencies = [ + "bitflags", + "rustc_version", +] + +[[package]] +name = "flate2" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" + +[[package]] +name = "futures-executor" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" + +[[package]] +name = "futures-macro" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "futures-sink" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" + +[[package]] +name = "futures-task" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" + +[[package]] +name = "futures-util" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "h2" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + +[[package]] +name = "histogram" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.6", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", +] + +[[package]] +name = "http" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +dependencies = [ + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +dependencies = [ + "cxx", + "cxx-build", +] + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "indexmap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indicatif" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +dependencies = [ + "console", + "lazy_static", + "number_prefix", + "regex", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" +dependencies = [ + "libc", + "windows-sys 0.45.0", +] + +[[package]] +name = "ipnet" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" + +[[package]] +name = "is-terminal" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" +dependencies = [ + "hermit-abi 0.3.1", + "io-lifetimes", + "rustix", + "windows-sys 0.45.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" + +[[package]] +name = "jobserver" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "keccak" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.139" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "link-cplusplus" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +dependencies = [ + "cc", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + +[[package]] +name = "lock_api" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memmap2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.45.0", +] + +[[package]] +name = "mpl-token-auth-rules" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24dcb2b0ec0e9246f6f035e0336ba3359c21f6928dfd90281999e2c8e8ab53eb" +dependencies = [ + "borsh", + "mpl-token-metadata-context-derive", + "num-derive", + "num-traits", + "rmp-serde", + "serde", + "shank", + "solana-program", + "solana-zk-token-sdk", + "thiserror", +] + +[[package]] +name = "mpl-token-metadata" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "410acbbc7d543108cc4d93f98290da008716c801f04a923cd83de2ec86244c1f" +dependencies = [ + "arrayref", + "borsh", + "mpl-token-auth-rules", + "mpl-token-metadata-context-derive", + "mpl-utils", + "num-derive", + "num-traits", + "shank", + "solana-program", + "spl-associated-token-account", + "spl-token", + "thiserror", +] + +[[package]] +name = "mpl-token-metadata-context-derive" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12989bc45715b0ee91944855130131479f9c772e198a910c3eb0ea327d5bffc3" +dependencies = [ + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "mpl-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc48e64c50dba956acb46eec86d6968ef0401ef37031426da479f1f2b592066" +dependencies = [ + "arrayref", + "borsh", + "solana-program", + "spl-token", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nom8" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" +dependencies = [ + "memchr", +] + +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +dependencies = [ + "hermit-abi 0.2.6", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e" +dependencies = [ + "proc-macro-crate 1.3.0", + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl" +version = "0.10.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" +dependencies = [ + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "os_str_bytes" +version = "6.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys 0.45.0", +] + +[[package]] +name = "paste" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.6", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "percentage" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" +dependencies = [ + "num", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + +[[package]] +name = "pkg-config" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + +[[package]] +name = "plerkle_messenger" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef845a57af05e18a5cc47dbfa207246e66148ffbcb67e02b3e3eaceb20ffc44" +dependencies = [ + "async-mutex", + "async-trait", + "blake3", + "figment", + "futures", + "log", + "redis", + "serde", + "thiserror", +] + +[[package]] +name = "plerkle_serialization" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b468c4528b0e3d4f7db608e08bfcfb5893892f8cd6fd7a427458eb537bdc0311" +dependencies = [ + "bs58", + "chrono", + "flatbuffers", + "serde", + "solana-sdk", + "solana-transaction-status", + "thiserror", +] + +[[package]] +name = "polyval" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" +dependencies = [ + "once_cell", + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "quinn" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b435e71d9bfa0d8889927231970c51fb89c58fa63bffcab117c9c7a41e5ef8f" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "fxhash", + "quinn-proto", + "quinn-udp", + "rustls", + "thiserror", + "tokio", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-proto" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fce546b9688f767a57530652488420d419a8b1f44a478b451c3d1ab6d992a55" +dependencies = [ + "bytes", + "fxhash", + "rand 0.8.5", + "ring", + "rustls", + "rustls-native-certs", + "rustls-pemfile 0.2.1", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-udp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07946277141531aea269befd949ed16b2c85a780ba1043244eda0969e538e54" +dependencies = [ + "futures-util", + "libc", + "quinn-proto", + "socket2", + "tokio", + "tracing", +] + +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + +[[package]] +name = "quote" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +dependencies = [ + "proc-macro2 1.0.51", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.8", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "rcgen" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" +dependencies = [ + "pem", + "ring", + "time 0.3.17", + "yasna", +] + +[[package]] +name = "redis" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa8455fa3621f6b41c514946de66ea0531f57ca017b2e6c7cc368035ea5b46df" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "combine", + "futures", + "futures-util", + "itoa", + "native-tls", + "percent-encoding", + "pin-project-lite", + "ryu", + "sha1_smol", + "tokio", + "tokio-native-tls", + "tokio-util", + "url", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +dependencies = [ + "getrandom 0.2.8", + "redox_syscall", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + +[[package]] +name = "reqwest" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" +dependencies = [ + "async-compression", + "base64 0.21.0", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile 1.0.2", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + +[[package]] +name = "rmp" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44519172358fd6d58656c86ab8e7fbc9e1490c3e8f14d35ed78ca0dd07403c9f" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5b13be192e0220b8afb7222aa5813cb62cc269ebb5cac346ca6487681d2913e" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "rpassword" +version = "6.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf099a1888612545b683d2661a1940089f6c2e5a8e38979b2159da876bfd956" +dependencies = [ + "libc", + "serde", + "serde_json", + "winapi", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustix" +version = "0.36.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.45.0", +] + +[[package]] +name = "rustls" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +dependencies = [ + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +dependencies = [ + "openssl-probe", + "rustls-pemfile 1.0.2", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +dependencies = [ + "base64 0.21.0", +] + +[[package]] +name = "rustversion" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" + +[[package]] +name = "ryu" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" + +[[package]] +name = "schannel" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +dependencies = [ + "windows-sys 0.42.0", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "scratch" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" + +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "security-framework" +version = "2.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" + +[[package]] +name = "serde" +version = "1.0.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "serde_json" +version = "1.0.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +dependencies = [ + "indexmap", + "ryu", + "serde", + "yaml-rust", +] + +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.6", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.6", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +dependencies = [ + "digest 0.10.6", + "keccak", +] + +[[package]] +name = "shank" +version = "0.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63e565b5e95ad88ab38f312e89444c749360641c509ef2de0093b49f55974a5" +dependencies = [ + "shank_macro", +] + +[[package]] +name = "shank_macro" +version = "0.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63927d22a1e8b74bda98cc6e151fcdf178b7abb0dc6c4f81e0bbf5ffe2fc4ec8" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "shank_macro_impl", + "syn 1.0.107", +] + +[[package]] +name = "shank_macro_impl" +version = "0.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ce03403df682f80f4dc1efafa87a4d0cb89b03726d0565e6364bdca5b9a441" +dependencies = [ + "anyhow", + "proc-macro2 1.0.51", + "quote 1.0.23", + "serde", + "syn 1.0.107", +] + +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "solana-account-decoder" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b34f8342ffa6180a3368e51b933abf0ef09dc8333b4a41b76bb3085e530608c" +dependencies = [ + "Inflector", + "base64 0.13.1", + "bincode", + "bs58", + "bv", + "lazy_static", + "serde", + "serde_derive", + "serde_json", + "solana-address-lookup-table-program", + "solana-config-program", + "solana-sdk", + "solana-vote-program", + "spl-token", + "spl-token-2022", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-address-lookup-table-program" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15112ecf013f15e53d5a50fd413f93b47343a5b911f96ee143ffab2f497eff66" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive", + "num-traits", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-clap-utils" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "223a78a2945a50fc49ce4ec58e079aa6c2f33fdf29387bffab224a9f51908714" +dependencies = [ + "chrono", + "clap 2.34.0", + "rpassword", + "solana-perf", + "solana-remote-wallet", + "solana-sdk", + "thiserror", + "tiny-bip39", + "uriparse", + "url", +] + +[[package]] +name = "solana-cli-config" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "917eb35225a067b87ab797f454e553aea34dcc4ed495b1e9413a5a7de35194a0" +dependencies = [ + "dirs-next", + "lazy_static", + "serde", + "serde_derive", + "serde_yaml", + "solana-clap-utils", + "solana-sdk", + "url", +] + +[[package]] +name = "solana-client" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a396056359554ef0882be7f9cf4eb6942df761055cd8f7771a04bcd78e40fe" +dependencies = [ + "async-mutex", + "async-trait", + "base64 0.13.1", + "bincode", + "bs58", + "bytes", + "clap 2.34.0", + "crossbeam-channel", + "enum_dispatch", + "futures", + "futures-util", + "indexmap", + "indicatif", + "itertools", + "jsonrpc-core", + "lazy_static", + "log", + "quinn", + "quinn-proto", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rayon", + "reqwest", + "rustls", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-clap-utils", + "solana-faucet", + "solana-measure", + "solana-metrics", + "solana-net-utils", + "solana-sdk", + "solana-streamer", + "solana-transaction-status", + "solana-version", + "solana-vote-program", + "spl-token-2022", + "thiserror", + "tokio", + "tokio-stream", + "tokio-tungstenite", + "tungstenite", + "url", +] + +[[package]] +name = "solana-config-program" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388bc028b037da5752bd2e6910afe8007232ddc58eb2c7a2523f1c6d818abe90" +dependencies = [ + "bincode", + "chrono", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-faucet" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91a52f211164c9403c1ea11318b388d8d4bcfe3a886f7f70f695ade5409e359f" +dependencies = [ + "bincode", + "byteorder", + "clap 2.34.0", + "crossbeam-channel", + "log", + "serde", + "serde_derive", + "solana-clap-utils", + "solana-cli-config", + "solana-logger", + "solana-metrics", + "solana-sdk", + "solana-version", + "spl-memo", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f651fd3d06d9aa6c66d2ceb7230278ddad59403dc1cc4abf82a69970dc6f631d" +dependencies = [ + "ahash", + "blake3", + "block-buffer 0.9.0", + "bs58", + "bv", + "byteorder", + "cc", + "either", + "generic-array", + "getrandom 0.1.16", + "hashbrown 0.12.3", + "im", + "lazy_static", + "log", + "memmap2", + "once_cell", + "rand_core 0.6.4", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.6", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301bb4bd66f592d4b799db0fb0ed1ae9fc7a8453476961faef1223127091574b" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "rustc_version", + "syn 1.0.107", +] + +[[package]] +name = "solana-logger" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "305cf85e48a7660df7a483762dcf7989d4b3f6e3de2153f2f9f98ba3785a0bd6" +dependencies = [ + "env_logger", + "lazy_static", + "log", +] + +[[package]] +name = "solana-measure" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a19c00ebaf498911266b63bc55f78916bf3c6fe236316af8144e024df14c6d7" +dependencies = [ + "log", + "solana-sdk", +] + +[[package]] +name = "solana-metrics" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2dbc83864877ece6f686ba04e1230fc933916ca21bbf3aff9aac393918a3c63" +dependencies = [ + "crossbeam-channel", + "gethostname", + "lazy_static", + "log", + "reqwest", + "solana-sdk", +] + +[[package]] +name = "solana-net-utils" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daaace80b5fe18adf86447cbe53f4a8424fa1be5d6f49ed816efd32769221c84" +dependencies = [ + "bincode", + "clap 3.2.23", + "crossbeam-channel", + "log", + "nix", + "rand 0.7.3", + "serde", + "serde_derive", + "socket2", + "solana-logger", + "solana-sdk", + "solana-version", + "tokio", + "url", +] + +[[package]] +name = "solana-perf" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3259b43ea1f93f825176bf1310ba7ace17541e0aae4c9167986a92d903ef92eb" +dependencies = [ + "ahash", + "bincode", + "bv", + "caps", + "curve25519-dalek", + "dlopen", + "dlopen_derive", + "fnv", + "lazy_static", + "libc", + "log", + "nix", + "rand 0.7.3", + "rayon", + "serde", + "solana-metrics", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-program" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a52d34820e44c56a23ef540a9c996873885c4834e7e36bc5901990c675603c" +dependencies = [ + "base64 0.13.1", + "bincode", + "bitflags", + "blake3", + "borsh", + "borsh-derive", + "bs58", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.8", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "log", + "memoffset 0.6.5", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.6", + "sha3 0.10.6", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-program-runtime" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bc5a5da86d34d458ce0fd67992f1a82b15b775b7c38e791e8a17ec3a08803ac" +dependencies = [ + "base64 0.13.1", + "bincode", + "eager", + "enum-iterator", + "itertools", + "libc", + "libloading", + "log", + "num-derive", + "num-traits", + "rand 0.7.3", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-measure", + "solana-metrics", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-rayon-threadlimit" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ca466115ea5d65863c8ce717efde714308dd60931244ea42ba394fac471a7c" +dependencies = [ + "lazy_static", + "num_cpus", +] + +[[package]] +name = "solana-remote-wallet" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0bdffc62c46598a541fab68355e313b5bae3429bcd4910761f4f6f63b849f5" +dependencies = [ + "console", + "dialoguer", + "log", + "num-derive", + "num-traits", + "parking_lot", + "qstring", + "semver", + "solana-sdk", + "thiserror", + "uriparse", +] + +[[package]] +name = "solana-sdk" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9ac3ab8b970c3e4c07d0c2b184a0be449075e933c81f0e27cd9fcab2b122020" +dependencies = [ + "assert_matches", + "base64 0.13.1", + "bincode", + "bitflags", + "borsh", + "bs58", + "bytemuck", + "byteorder", + "chrono", + "derivation-path", + "digest 0.10.6", + "ed25519-dalek", + "ed25519-dalek-bip32", + "generic-array", + "hmac 0.12.1", + "itertools", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num-derive", + "num-traits", + "pbkdf2 0.11.0", + "qstring", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.6", + "sha3 0.10.6", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-program", + "solana-sdk-macro", + "thiserror", + "uriparse", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a7f28d94a4ed37c6eb7c62221da0e2206f11af051e91c045f2cce60111d3020" +dependencies = [ + "bs58", + "proc-macro2 1.0.51", + "quote 1.0.23", + "rustversion", + "syn 1.0.107", +] + +[[package]] +name = "solana-streamer" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc73adca6270314a92480d944d991f3697b4bd66322ea39233ee5102a7a6760" +dependencies = [ + "crossbeam-channel", + "futures-util", + "histogram", + "indexmap", + "itertools", + "libc", + "log", + "nix", + "pem", + "percentage", + "pkcs8", + "quinn", + "rand 0.7.3", + "rcgen", + "rustls", + "solana-metrics", + "solana-perf", + "solana-sdk", + "thiserror", + "tokio", + "x509-parser", +] + +[[package]] +name = "solana-transaction-status" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c614df6e742e7be647b05775b3a0414fc0570f009e180d86554b3d6797f77e" +dependencies = [ + "Inflector", + "base64 0.13.1", + "bincode", + "borsh", + "bs58", + "lazy_static", + "log", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-address-lookup-table-program", + "solana-measure", + "solana-metrics", + "solana-sdk", + "solana-vote-program", + "spl-associated-token-account", + "spl-memo", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "solana-version" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "359aecee536123048ae876b938688b4a87fa879bd1e8e752406f871656b98153" +dependencies = [ + "log", + "rustc_version", + "semver", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", +] + +[[package]] +name = "solana-vote-program" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68586a5b4862cd840a4e3e17d8428714a0f01757e5221b1d6ac1dd3ba2237b9b" +dependencies = [ + "bincode", + "log", + "num-derive", + "num-traits", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-metrics", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-zk-token-sdk" +version = "1.14.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b25e1c3a45dfb9e4307cd5f655e0fb2efc64eb5011e517a8f6abc9c88c44566" +dependencies = [ + "aes-gcm-siv", + "arrayref", + "base64 0.13.1", + "bincode", + "bytemuck", + "byteorder", + "cipher 0.4.3", + "curve25519-dalek", + "getrandom 0.1.16", + "itertools", + "lazy_static", + "merlin", + "num-derive", + "num-traits", + "rand 0.7.3", + "serde", + "serde_json", + "sha3 0.9.1", + "solana-program", + "solana-sdk", + "subtle", + "thiserror", + "zeroize", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "spl-associated-token-account" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc000f0fdf1f12f99d77d398137c1751345b18c88258ce0f99b7872cf6c9bd6" +dependencies = [ + "assert_matches", + "borsh", + "num-derive", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "spl-memo" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-token" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-token-2022" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0edb869dbe159b018f17fb9bfa67118c30f232d7f54a73742bc96794dff77ed8" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "solana-zk-token-sdk", + "spl-memo", + "spl-token", + "thiserror", +] + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", + "unicode-xid 0.2.4", +] + +[[package]] +name = "tempfile" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +dependencies = [ + "cfg-if", + "fastrand", + "libc", + "redox_syscall", + "remove_dir_all", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "textwrap" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" + +[[package]] +name = "thiserror" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "time" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", +] + +[[package]] +name = "time" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +dependencies = [ + "itoa", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" + +[[package]] +name = "time-macros" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +dependencies = [ + "time-core", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "tracing", + "windows-sys 0.42.0", +] + +[[package]] +name = "tokio-macros" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +dependencies = [ + "rustls", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-stream" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" +dependencies = [ + "futures-util", + "log", + "rustls", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki", + "webpki-roots", +] + +[[package]] +name = "tokio-util" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" + +[[package]] +name = "toml_edit" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" +dependencies = [ + "indexmap", + "nom8", + "toml_datetime", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", +] + +[[package]] +name = "tracing-core" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + +[[package]] +name = "tungstenite" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" +dependencies = [ + "base64 0.13.1", + "byteorder", + "bytes", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls", + "sha-1", + "thiserror", + "url", + "utf-8", + "webpki", + "webpki-roots", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "uncased" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b01702b0fd0b3fadcf98e098780badda8742d4f4a7676615cad90e8ac73622" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" + +[[package]] +name = "unicode-ident" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "universal-hash" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "uriparse" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" +dependencies = [ + "fnv", + "lazy_static", +] + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +dependencies = [ + "quote 1.0.23", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" + +[[package]] +name = "web-sys" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs", + "base64 0.13.1", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time 0.3.17", +] + +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "yasna" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aed2e7a52e3744ab4d0c05c20aa065258e84c49fd4226f5191b2ed29712710b4" +dependencies = [ + "time 0.3.17", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +dependencies = [ + "proc-macro2 1.0.51", + "quote 1.0.23", + "syn 1.0.107", + "synstructure", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.7+zstd.1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5" +dependencies = [ + "cc", + "libc", + "pkg-config", +] diff --git a/tests/acc_forwarder/Cargo.toml b/tests/acc_forwarder/Cargo.toml new file mode 100644 index 000000000..68da8e2d8 --- /dev/null +++ b/tests/acc_forwarder/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "acc_forwarder" +version = "0.0.1" +edition = "2021" + +[dependencies] +redis = { version = "0.22.3", features = ["aio", "tokio-comp", "streams", "tokio-native-tls-comp"] } +futures = {version = "0.3.25"} +futures-util = "0.3.0" +base64 = "0.20.0" +thiserror = "1.0.31" +serde_json = "1.0.81" +tokio = { version = "1.23.0", features = ["full", "tracing"] } +plerkle_messenger = { version = "1.5.2", features = ['redis'] } +plerkle_serialization = { version = "1.5.2" } +flatbuffers = "23.1.21" +clap = { version = "4.1.4", features = ["derive"] } +solana-client = { version = "=1.14.15"} +solana-sdk = { version = "=1.14.15"} +solana-transaction-status = { version = "=1.14.15"} +figment = { version = "0.10.8" } +bs58 = "0.4.0" +tokio-stream = "0.1.11" +mpl-token-metadata = { version = "1.8.3"} +reqwest = { version = "0.11", features = ["json"] } diff --git a/tests/acc_forwarder/README.md b/tests/acc_forwarder/README.md new file mode 100644 index 000000000..067098d2e --- /dev/null +++ b/tests/acc_forwarder/README.md @@ -0,0 +1,25 @@ +# Account Forwarder + +Account Forwarder is a tool designed to replay account changes, primarily originating from geyser. It forwards serialized account information to a specified Redis endpoint. + +## Usage + +### Send a single account + +To forward information about a single account, run the following command: + +`cargo run -- --redis-url --rpc-url single --account ` + +### Send mint, metadata, and owned token account + +To forward mint, metadata, and owned token account information for a specific mint, use the following command: + +`cargo run -- --redis-url --rpc-url mint --mint ` + +### Process accounts from a file + +To forward account information for multiple accounts listed in a file, execute the following command: + +`cargo run -- --redis-url --rpc-url scenario --scenario-file ` + +Replace , , , and with the appropriate values for your use case. diff --git a/tests/acc_forwarder/src/main.rs b/tests/acc_forwarder/src/main.rs new file mode 100644 index 000000000..beeadc336 --- /dev/null +++ b/tests/acc_forwarder/src/main.rs @@ -0,0 +1,160 @@ +use std::str::FromStr; + +use clap::Parser; + +use figment::{map, value::Value}; +use mpl_token_metadata::pda::find_metadata_account; +use plerkle_messenger::MessengerConfig; +use plerkle_serialization::{ + serializer::serialize_account, solana_geyser_plugin_interface_shims::ReplicaAccountInfoV2, +}; +use serde_json::json; +use solana_client::nonblocking::rpc_client::RpcClient; +use solana_sdk::{account::Account, commitment_config::CommitmentConfig, pubkey::Pubkey}; +#[derive(Parser)] +#[command(next_line_help = true)] +struct Cli { + #[arg(long)] + redis_url: String, + #[arg(long)] + rpc_url: String, + #[command(subcommand)] + action: Action, +} +#[derive(clap::Subcommand, Clone)] +enum Action { + Single { + #[arg(long)] + account: String, + }, + Mint { + // puts in mint, token, and metadata account + #[arg(long)] + mint: String, + }, + Scenario { + #[arg(long)] + scenario_file: String, + }, +} +const STREAM: &str = "ACC"; + +#[tokio::main] +async fn main() { + let cli = Cli::parse(); + let config_wrapper = Value::from(map! { + "redis_connection_str" => cli.redis_url, + "pipeline_size_bytes" => 1u128.to_string(), + }); + let config = config_wrapper.into_dict().unwrap(); + let messenger_config = MessengerConfig { + messenger_type: plerkle_messenger::MessengerType::Redis, + connection_config: config, + }; + let mut messenger = plerkle_messenger::select_messenger(messenger_config) + .await + .unwrap(); + messenger.add_stream(STREAM).await.unwrap(); + messenger.set_buffer_size(STREAM, 10000000000000000).await; + + let client = RpcClient::new(cli.rpc_url.clone()); + + let cmd = cli.action; + + match cmd { + Action::Single { account } => send_account(&account, &client, &mut messenger).await, + Action::Mint { mint } => { + let mint_key = Pubkey::from_str(&mint).expect("Failed to parse mint as pubkey"); + let metadata_account = find_metadata_account(&mint_key).0.to_string(); + + let token_account = get_token_account(&client.url(), &mint).await; + let mint_accounts = vec![mint, metadata_account, token_account]; + for account in mint_accounts { + send_account(&account, &client, &mut messenger).await; + } + } + Action::Scenario { scenario_file } => { + let scenario = std::fs::read_to_string(scenario_file).unwrap(); + let scenario: Vec = scenario.lines().map(|s| s.to_string()).collect(); + for account in scenario { + send_account(&account, &client, &mut messenger).await; + } + } + } +} + +// returns token account belonging to mint +pub async fn get_token_account(endpoint: &str, mint: &str) -> String { + let client = reqwest::Client::new(); + let body = json!({ + "jsonrpc": "2.0", + "id": "acc-forwarder", + "method": "getTokenLargestAccounts", + "params": [mint] + }); + + let result = client + .post(endpoint) + .json(&body) + .send() + .await + .map_err(|err| { + println!("Failed to call rpc for getTokenLargestAccounts, {}", err); + }) + .unwrap(); + + let result = result + .json::() + .await + .map_err(|err| { + println!("Failed to parse json for getTokenLargestAccounts, {}", err); + }) + .unwrap(); + result["result"]["value"][0]["address"] + .as_str() + .unwrap_or_else(|| "") + .to_string() +} +pub async fn send_account( + account: &str, + client: &RpcClient, + messenger: &mut Box, +) { + let account_key = Pubkey::from_str(account).expect("Failed to parse mint as pubkey"); + let get_account_response = client + .get_account_with_commitment(&account_key, CommitmentConfig::confirmed()) + .await + .expect("Failed to get account"); + let account_data = get_account_response + .value + .expect(&format!("Account {} not found", account)); + let slot = get_account_response.context.slot; + send(account_key, account_data, slot, messenger).await +} + +pub async fn send( + pubkey: Pubkey, + account_data: Account, + slot: u64, + messenger: &mut Box, +) { + let fbb = flatbuffers::FlatBufferBuilder::new(); + + let account_info = ReplicaAccountInfoV2 { + pubkey: &pubkey.to_bytes(), + lamports: account_data.lamports, + owner: &account_data.owner.to_bytes(), + executable: account_data.executable, + rent_epoch: account_data.rent_epoch, + data: &account_data.data, + write_version: 0, + txn_signature: None, + }; + let is_startup = false; + + let fbb = serialize_account(fbb, &account_info, slot, is_startup); + let bytes = fbb.finished_data(); + + messenger.send(STREAM, bytes).await.unwrap(); + println!("Sent account {} to stream", pubkey.to_string()); +} diff --git a/tests/acc_forwarder/test.scenario b/tests/acc_forwarder/test.scenario new file mode 100644 index 000000000..4a9b64364 --- /dev/null +++ b/tests/acc_forwarder/test.scenario @@ -0,0 +1,3 @@ +6p4YzAX6Ba93Ju42s3XvLUe5199j5YLZ4N9RW8CxMe6Y +D1APVxjAiDwzFsPfhLbVyAC2xPyTaeAcCdGd2HYWfLjg +ESUeHTug4nDk8McJG7Uooc7PyuCHRVx1iTskjHtE5mzP \ No newline at end of file From 6b276941333cf57803ad35d4574445dad455d8f8 Mon Sep 17 00:00:00 2001 From: linuskendall Date: Thu, 20 Apr 2023 16:43:14 +0100 Subject: [PATCH 15/23] Fixing unused imports Cleaning out unused imports. --- digital_asset_types/src/dao/full_asset.rs | 1 - digital_asset_types/src/dao/mod.rs | 3 --- digital_asset_types/src/dapi/common/asset.rs | 9 ++++----- nft_ingester/src/account_updates.rs | 8 +++----- nft_ingester/src/backfiller.rs | 4 ++-- nft_ingester/src/database.rs | 1 - .../src/program_transformers/bubblegum/decompress.rs | 3 +-- nft_ingester/src/program_transformers/mod.rs | 4 ++-- nft_ingester/src/program_transformers/token/mod.rs | 2 +- nft_ingester/src/transaction_notifications.rs | 9 ++++----- 10 files changed, 17 insertions(+), 27 deletions(-) diff --git a/digital_asset_types/src/dao/full_asset.rs b/digital_asset_types/src/dao/full_asset.rs index a8a3dd391..fda932d21 100644 --- a/digital_asset_types/src/dao/full_asset.rs +++ b/digital_asset_types/src/dao/full_asset.rs @@ -1,5 +1,4 @@ use crate::dao::{asset, asset_authority, asset_creators, asset_data, asset_grouping}; -use sea_orm::FromQueryResult; #[derive(Clone, Debug, PartialEq)] pub struct FullAsset { diff --git a/digital_asset_types/src/dao/mod.rs b/digital_asset_types/src/dao/mod.rs index 3c0e2ff65..bd874f32b 100644 --- a/digital_asset_types/src/dao/mod.rs +++ b/digital_asset_types/src/dao/mod.rs @@ -3,19 +3,16 @@ mod generated; pub mod scopes; pub use full_asset::*; pub use generated::*; -use solana_sdk::pubkey::Pubkey; use self::sea_orm_active_enums::{ OwnerType, RoyaltyTargetType, SpecificationAssetClass, SpecificationVersions, }; use sea_orm::{ entity::*, - query::*, sea_query::Expr, sea_query::{ConditionType, IntoCondition}, Condition, DbErr, RelationDef, }; -use serde::{self, Deserialize, Serialize}; pub struct GroupingSize { pub size: u64, diff --git a/digital_asset_types/src/dapi/common/asset.rs b/digital_asset_types/src/dapi/common/asset.rs index 54d658edb..d454e34af 100644 --- a/digital_asset_types/src/dapi/common/asset.rs +++ b/digital_asset_types/src/dapi/common/asset.rs @@ -1,7 +1,7 @@ -use crate::dao::sea_orm_active_enums::{SpecificationAssetClass, SpecificationVersions}; +use crate::dao::sea_orm_active_enums::SpecificationVersions; use crate::dao::Pagination; use crate::dao::{asset, asset_authority, asset_creators, asset_data, asset_grouping}; -use crate::dao::{FullAsset, FullAssetList}; +use crate::dao::FullAsset; use crate::rpc::filter::{AssetSortBy, AssetSortDirection, AssetSorting}; use crate::rpc::response::{AssetError, AssetList}; @@ -12,10 +12,9 @@ use crate::rpc::{ use jsonpath_lib::JsonPathError; use mime_guess::Mime; -use sea_orm::DatabaseConnection; -use sea_orm::{entity::*, query::*, DbErr}; +use sea_orm::DbErr; use serde_json::Value; -use std::collections::{BTreeMap, HashMap}; +use std::collections::HashMap; use std::path::Path; use url::Url; diff --git a/nft_ingester/src/account_updates.rs b/nft_ingester/src/account_updates.rs index 97e5fa061..f25933fd4 100644 --- a/nft_ingester/src/account_updates.rs +++ b/nft_ingester/src/account_updates.rs @@ -1,16 +1,14 @@ use std::{ - collections::{HashMap, HashSet}, sync::Arc, }; use crate::{ - config::rand_string, error::IngesterError, metric, metrics::capture_result, + metric, metrics::capture_result, program_transformers::ProgramTransformer, tasks::TaskData, }; -use cadence_macros::{is_global_default_set, statsd_count, statsd_gauge, statsd_time}; +use cadence_macros::{is_global_default_set, statsd_count, statsd_time}; use chrono::Utc; -use futures::{stream::FuturesUnordered, StreamExt}; -use log::{debug, error, info}; +use log::{debug, error}; use plerkle_messenger::{ConsumptionType, Messenger, MessengerConfig, RecvData, ACCOUNT_STREAM}; use plerkle_serialization::root_as_account_info; use sqlx::{Pool, Postgres}; diff --git a/nft_ingester/src/backfiller.rs b/nft_ingester/src/backfiller.rs index 4e85a84f6..a1d95729d 100644 --- a/nft_ingester/src/backfiller.rs +++ b/nft_ingester/src/backfiller.rs @@ -37,7 +37,7 @@ use solana_transaction_status::{ use spl_account_compression::state::{ merkle_tree_get_size, ConcurrentMerkleTreeHeader, CONCURRENT_MERKLE_TREE_HEADER_SIZE_V1, }; -use sqlx::{self, postgres::PgListener, Pool, Postgres}; +use sqlx::{self, Pool, Postgres}; use std::{ cmp, collections::{HashMap, HashSet}, @@ -206,7 +206,7 @@ impl<'a, T: Messenger> Backfiller<'a, T> { let db = SqlxPostgresConnector::from_sqlx_postgres_pool(pool.clone()); // Get database listener channel. - let channel = config + let _channel = config .database_config .get(DATABASE_LISTENER_CHANNEL_KEY) .and_then(|u| u.clone().into_string()) diff --git a/nft_ingester/src/database.rs b/nft_ingester/src/database.rs index 209480135..435ad229a 100644 --- a/nft_ingester/src/database.rs +++ b/nft_ingester/src/database.rs @@ -2,7 +2,6 @@ use sqlx::{postgres::{PgPoolOptions, PgConnectOptions}, PgPool, ConnectOptions}; use crate::{ config::{IngesterConfig, IngesterRole}, - error, }; const BARE_MINIMUM_CONNECTIONS: u32 = 5; const DEFAULT_MAX: u32 = 125; diff --git a/nft_ingester/src/program_transformers/bubblegum/decompress.rs b/nft_ingester/src/program_transformers/bubblegum/decompress.rs index b76ccdd74..fa81a42be 100644 --- a/nft_ingester/src/program_transformers/bubblegum/decompress.rs +++ b/nft_ingester/src/program_transformers/bubblegum/decompress.rs @@ -1,9 +1,8 @@ -use super::{save_changelog_event, update_asset}; use crate::error::IngesterError; use blockbuster::{instruction::InstructionBundle, programs::bubblegum::BubblegumInstruction}; use digital_asset_types::dao::asset; use sea_orm::{ - entity::*, query::*, ColumnTrait, ConnectionTrait, DatabaseTransaction, DbBackend, EntityTrait, + entity::*, query::*, ColumnTrait, ConnectionTrait, DbBackend, EntityTrait, }; pub async fn decompress<'c, T>( diff --git a/nft_ingester/src/program_transformers/mod.rs b/nft_ingester/src/program_transformers/mod.rs index d7952d3b7..3f74411d3 100644 --- a/nft_ingester/src/program_transformers/mod.rs +++ b/nft_ingester/src/program_transformers/mod.rs @@ -7,9 +7,9 @@ use blockbuster::{ token_metadata::TokenMetadataParser, ProgramParseResult, }, }; -use log::{debug, error, info}; +use log::{debug, info}; use plerkle_serialization::{AccountInfo, Pubkey as FBPubkey, TransactionInfo}; -use sea_orm::{DatabaseConnection, SqlxPostgresConnector, TransactionTrait}; +use sea_orm::{DatabaseConnection, SqlxPostgresConnector}; use solana_sdk::pubkey::Pubkey; use sqlx::PgPool; use std::collections::{HashMap, HashSet, VecDeque}; diff --git a/nft_ingester/src/program_transformers/token/mod.rs b/nft_ingester/src/program_transformers/token/mod.rs index d2b38dd9c..86d5f0178 100644 --- a/nft_ingester/src/program_transformers/token/mod.rs +++ b/nft_ingester/src/program_transformers/token/mod.rs @@ -7,7 +7,7 @@ use sea_orm::{ DatabaseConnection, DbBackend, EntityTrait, }; use solana_sdk::program_option::COption; -use spl_token::state::{AccountState, Mint, Account}; +use spl_token::state::{AccountState}; use tokio::sync::mpsc::UnboundedSender; pub async fn handle_token_program_account<'a, 'b, 'c>( diff --git a/nft_ingester/src/transaction_notifications.rs b/nft_ingester/src/transaction_notifications.rs index b71096d7a..6e66fb799 100644 --- a/nft_ingester/src/transaction_notifications.rs +++ b/nft_ingester/src/transaction_notifications.rs @@ -1,13 +1,12 @@ use std::sync::Arc; use crate::{ - config::rand_string, error::IngesterError, metric, metrics::capture_result, + metric, metrics::capture_result, program_transformers::ProgramTransformer, tasks::TaskData, }; -use cadence_macros::{is_global_default_set, statsd_count, statsd_gauge, statsd_time}; +use cadence_macros::{is_global_default_set, statsd_count, statsd_time}; use chrono::Utc; -use futures::{stream::FuturesUnordered, StreamExt}; -use log::{debug, error, info}; +use log::{debug, error}; use plerkle_messenger::{ ConsumptionType, Messenger, MessengerConfig, RecvData, TRANSACTION_STREAM, }; @@ -15,7 +14,7 @@ use plerkle_serialization::root_as_transaction_info; use sqlx::{Pool, Postgres}; use tokio::{ - sync::{mpsc::UnboundedSender, Semaphore}, + sync::mpsc::UnboundedSender, task::{JoinHandle, JoinSet}, time::Instant, }; From f2cbafd708f5cd2ed1b76443ff39c02d1fb4498f Mon Sep 17 00:00:00 2001 From: linuskendall Date: Thu, 20 Apr 2023 17:07:29 +0100 Subject: [PATCH 16/23] Hopefully final fix for interval handling --- nft_ingester/src/tasks/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index 436248bfd..478815688 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -277,7 +277,8 @@ impl TaskManager { } pub async fn purge_old_tasks(conn: &DatabaseConnection, task_max_age: time::Duration) -> Result { - let cod = Expr::cust_with_values("NOW() - created_at::timestamp > interval ? seconds", [task_max_age.as_secs()]); + let interval = format!("interval {} seconds", task_max_age.as_secs()); + let cod = Expr::cust_with_values("NOW() - created_at::timestamp > ?", [interval]); tasks::Entity::delete_many() .filter(Condition::all().add(cod)) .exec(conn) From b8efdf24c232df953eb9cc9b152874dbd3c3bf20 Mon Sep 17 00:00:00 2001 From: linuskendall Date: Thu, 20 Apr 2023 23:54:54 +0100 Subject: [PATCH 17/23] Fix interval --- nft_ingester/src/tasks/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nft_ingester/src/tasks/mod.rs b/nft_ingester/src/tasks/mod.rs index 478815688..3ea951116 100644 --- a/nft_ingester/src/tasks/mod.rs +++ b/nft_ingester/src/tasks/mod.rs @@ -4,7 +4,7 @@ use cadence_macros::{is_global_default_set, statsd_count, statsd_histogram}; use chrono::{Duration, NaiveDateTime, Utc}; use crypto::{digest::Digest, sha2::Sha256}; use digital_asset_types::dao::{sea_orm_active_enums::TaskStatus, tasks}; -use log::{debug, error, warn}; +use log::{debug, info, error, warn}; use sea_orm::{ entity::*, query::*, sea_query::Expr, ActiveValue::Set, ColumnTrait, DatabaseConnection, DeleteResult, SqlxPostgresConnector, @@ -277,8 +277,8 @@ impl TaskManager { } pub async fn purge_old_tasks(conn: &DatabaseConnection, task_max_age: time::Duration) -> Result { - let interval = format!("interval {} seconds", task_max_age.as_secs()); - let cod = Expr::cust_with_values("NOW() - created_at::timestamp > ?", [interval]); + let interval = format!("NOW() - created_at::timestamp > interval '{} seconds'", task_max_age.as_secs()); + let cod = Expr::cust(&interval); tasks::Entity::delete_many() .filter(Condition::all().add(cod)) .exec(conn) @@ -376,7 +376,7 @@ impl TaskManager { let delete_res = TaskManager::purge_old_tasks(&conn, purge_time).await; match delete_res { Ok(res) => { - debug!("deleted {} tasks entries", res.rows_affected); + info!("deleted {} tasks entries", res.rows_affected); metric! { statsd_count!("ingester.bgtask.purged_tasks", i64::try_from(res.rows_affected).unwrap_or(1)); } From 3c92328dd51ace98a9d088c8f3fee9cabda13274 Mon Sep 17 00:00:00 2001 From: Nicolas Pennie Date: Sun, 7 May 2023 20:25:07 -0700 Subject: [PATCH 18/23] fix(das-api): fix getAssetProof --- digital_asset_types/src/dapi/change_logs.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/digital_asset_types/src/dapi/change_logs.rs b/digital_asset_types/src/dapi/change_logs.rs index 841925d20..a710c0a5a 100644 --- a/digital_asset_types/src/dapi/change_logs.rs +++ b/digital_asset_types/src/dapi/change_logs.rs @@ -1,6 +1,6 @@ +use log::debug; use sea_orm::sea_query::Expr; use sea_orm::{DatabaseConnection, DbBackend}; -use log::debug; use { crate::dao::asset, crate::dao::cl_items, @@ -66,16 +66,14 @@ pub async fn get_proof_for_asset( .map(|q| SimpleChangeLog::from_query_result(q, "").unwrap()) .collect() })?; - if nodes.len() != expected_proof_size { - for node in nodes.iter() { - if node.level < final_node_list.len().try_into().unwrap() { - final_node_list[node.level as usize] = node.to_owned(); - } + for node in nodes.iter() { + if node.level < final_node_list.len().try_into().unwrap() { + final_node_list[node.level as usize] = node.to_owned(); } - for (i, (n, nin)) in final_node_list.iter_mut().zip(req_indexes).enumerate() { - if *n == SimpleChangeLog::default() { - *n = make_empty_node(i as i64, nin); - } + } + for (i, (n, nin)) in final_node_list.iter_mut().zip(req_indexes).enumerate() { + if *n == SimpleChangeLog::default() { + *n = make_empty_node(i as i64, nin); } } for n in final_node_list.iter() { From f25e468a7007f03c6a9f5a52e45daf2ceb6b2b73 Mon Sep 17 00:00:00 2001 From: Richard Wu Date: Tue, 9 May 2023 15:18:46 -0400 Subject: [PATCH 19/23] Fix before/after cursors. (#67) --- das_api/src/api/api_impl.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/das_api/src/api/api_impl.rs b/das_api/src/api/api_impl.rs index e147aad02..5bb531898 100644 --- a/das_api/src/api/api_impl.rs +++ b/das_api/src/api/api_impl.rs @@ -9,8 +9,8 @@ use digital_asset_types::{ SearchAssetsQuery, }, dapi::{ - get_asset, get_assets_by_authority, get_assets_by_group, - get_assets_by_owner, get_proof_for_asset, search_assets, get_assets_by_creator, + get_asset, get_assets_by_authority, get_assets_by_creator, get_assets_by_group, + get_assets_by_owner, get_proof_for_asset, search_assets, }, rpc::{filter::SearchConditionType, response::GetGroupingResponse}, rpc::{OwnershipModel, RoyaltyModel}, @@ -148,8 +148,8 @@ impl ApiContract for DasApi { sort_by, limit.map(|x| x as u64).unwrap_or(1000), page.map(|x| x as u64), - before.map(|x| x.as_bytes().to_vec()), - after.map(|x| x.as_bytes().to_vec()), + before.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), + after.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), ) .await .map_err(Into::into) @@ -179,8 +179,8 @@ impl ApiContract for DasApi { sort_by, limit.map(|x| x as u64).unwrap_or(1000), page.map(|x| x as u64), - before.map(|x| x.as_bytes().to_vec()), - after.map(|x| x.as_bytes().to_vec()), + before.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), + after.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), ) .await .map_err(Into::into) @@ -212,8 +212,8 @@ impl ApiContract for DasApi { sort_by, limit.map(|x| x as u64).unwrap_or(1000), page.map(|x| x as u64), - before.map(|x| x.as_bytes().to_vec()), - after.map(|x| x.as_bytes().to_vec()), + before.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), + after.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), ) .await .map_err(Into::into) @@ -242,8 +242,8 @@ impl ApiContract for DasApi { sort_by, limit.map(|x| x as u64).unwrap_or(1000), page.map(|x| x as u64), - before.map(|x| x.as_bytes().to_vec()), - after.map(|x| x.as_bytes().to_vec()), + before.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), + after.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), ) .await .map_err(Into::into) @@ -333,8 +333,8 @@ impl ApiContract for DasApi { sort_by, limit.map(|x| x as u64).unwrap_or(1000), page.map(|x| x as u64), - before.map(|x| x.as_bytes().to_vec()), - after.map(|x| x.as_bytes().to_vec()), + before.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), + after.map(|x| bs58::decode(x).into_vec().unwrap_or_default()), ) .await .map_err(Into::into) From dae6d7bab03507b72ceacb442e5666c167cb03a7 Mon Sep 17 00:00:00 2001 From: Linus Kendall Date: Wed, 31 May 2023 02:57:45 +0530 Subject: [PATCH 20/23] Fix edition nonce (#78) --- digital_asset_types/src/dapi/common/asset.rs | 4 ++-- digital_asset_types/src/rpc/asset.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/digital_asset_types/src/dapi/common/asset.rs b/digital_asset_types/src/dapi/common/asset.rs index d454e34af..b36b14036 100644 --- a/digital_asset_types/src/dapi/common/asset.rs +++ b/digital_asset_types/src/dapi/common/asset.rs @@ -267,8 +267,8 @@ pub fn asset_to_rpc(asset: FullAsset) -> Result { .and_then(|v| v.as_bool()) .unwrap_or(false); let edition_nonce = safe_select(chain_data_selector, "$.edition_nonce") - .and_then(|v| v.as_u64()) - .unwrap_or(0); + .and_then(|v| v.as_u64()); + Ok(RpcAsset { interface: interface.clone(), id: bs58::encode(asset.id).into_string(), diff --git a/digital_asset_types/src/rpc/asset.rs b/digital_asset_types/src/rpc/asset.rs index 8d9984a55..9357ed493 100644 --- a/digital_asset_types/src/rpc/asset.rs +++ b/digital_asset_types/src/rpc/asset.rs @@ -331,7 +331,7 @@ pub struct Uses { pub struct Supply { pub print_max_supply: u64, pub print_current_supply: u64, - pub edition_nonce: u64, + pub edition_nonce: Option, } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] From 6ae6d5f5ce937d4c0fc181fbdf5a6f4f4e55fe6b Mon Sep 17 00:00:00 2001 From: Nicolas Pennie Date: Wed, 14 Jun 2023 23:37:47 -0700 Subject: [PATCH 21/23] fix(ingester): fix compressed nft burn indexing (#24) (#80) * fix(ingester): fix compressed nft burn indexing * Small fix for asssetId calculation --- .gitignore | 3 + .../program_transformers/bubblegum/burn.rs | 57 +++++++++++-------- .../src/program_transformers/bubblegum/db.rs | 13 +++-- 3 files changed, 45 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index cf8733f83..9d1a43d5b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ db-data .idea **/target/ +# Generated by Redis +dump.rdb + # These are backup files generated by rustfmt **/*.rs.bk ledger diff --git a/nft_ingester/src/program_transformers/bubblegum/burn.rs b/nft_ingester/src/program_transformers/bubblegum/burn.rs index 745276cc1..af0b64ac4 100644 --- a/nft_ingester/src/program_transformers/bubblegum/burn.rs +++ b/nft_ingester/src/program_transformers/bubblegum/burn.rs @@ -1,12 +1,9 @@ -use crate::{ - error::IngesterError, -}; -use super::{update_asset, save_changelog_event}; -use blockbuster::{ - instruction::InstructionBundle, - programs::bubblegum::{BubblegumInstruction, LeafSchema}, -}; +use super::{save_changelog_event, update_asset}; +use crate::error::IngesterError; +use anchor_lang::prelude::Pubkey; +use blockbuster::{instruction::InstructionBundle, programs::bubblegum::BubblegumInstruction}; use digital_asset_types::dao::asset; +use log::debug; use sea_orm::{entity::*, ConnectionTrait, TransactionTrait}; pub async fn burn<'c, T>( @@ -17,25 +14,39 @@ pub async fn burn<'c, T>( where T: ConnectionTrait + TransactionTrait, { - if let (Some(le), Some(cl)) = (&parsing_result.leaf_update, &parsing_result.tree_update) { + if let Some(cl) = &parsing_result.tree_update { let seq = save_changelog_event(cl, bundle.slot, txn).await?; - return match le.schema { - LeafSchema::V1 { id, .. } => { - let id_bytes = id.to_bytes().to_vec(); - let asset_to_update = asset::ActiveModel { - id: Unchanged(id_bytes.clone()), - burnt: Set(true), - seq: Set(seq as i64), // gummyroll seq - ..Default::default() - }; - // Don't send sequence number with this update, because we will always - // run this update even if it's from a backfill/replay. - update_asset(txn, id_bytes, None, asset_to_update).await - } - _ => Err(IngesterError::NotImplemented), + let leaf_index = cl.index; + let (asset_id, _) = Pubkey::find_program_address( + &[ + "asset".as_bytes(), + cl.id.as_ref(), + u32_to_u8_array(leaf_index).as_ref(), + ], + &mpl_bubblegum::ID, + ); + debug!("Indexing burn for asset id: {:?}", asset_id); + let id_bytes = asset_id.to_bytes().to_vec(); + let asset_to_update = asset::ActiveModel { + id: Unchanged(id_bytes.clone()), + burnt: Set(true), + seq: Set(seq as i64), + ..Default::default() }; + // Don't send sequence number with this update, because we will always + // run this update even if it's from a backfill/replay. + update_asset(txn, id_bytes, None, asset_to_update).await?; + return Ok(()); } Err(IngesterError::ParsingError( "Ix not parsed correctly".to_string(), )) } + +// PDA lookup requires an 8-byte array. +fn u32_to_u8_array(value: u32) -> [u8; 8] { + let bytes: [u8; 4] = value.to_le_bytes(); + let mut result: [u8; 8] = [0; 8]; + result[..4].copy_from_slice(&bytes); + result +} diff --git a/nft_ingester/src/program_transformers/bubblegum/db.rs b/nft_ingester/src/program_transformers/bubblegum/db.rs index 53eb72128..86362f2f6 100644 --- a/nft_ingester/src/program_transformers/bubblegum/db.rs +++ b/nft_ingester/src/program_transformers/bubblegum/db.rs @@ -1,9 +1,8 @@ use crate::error::IngesterError; use digital_asset_types::dao::{asset, asset_creators, backfill_items, cl_items}; -use log::{info, debug}; +use log::{debug, info, warn}; use sea_orm::{ - entity::*, query::*, sea_query::OnConflict, ColumnTrait, DbBackend, DbErr, - EntityTrait, + entity::*, query::*, sea_query::OnConflict, ColumnTrait, DbBackend, DbErr, EntityTrait, }; use spl_account_compression::events::ChangeLogEventV1; @@ -127,11 +126,11 @@ where let update_one = if let Some(seq) = seq { asset::Entity::update(model).filter( Condition::all() - .add(asset::Column::Id.eq(id)) + .add(asset::Column::Id.eq(id.clone())) .add(asset::Column::Seq.lte(seq)), ) } else { - asset::Entity::update(model).filter(asset::Column::Id.eq(id)) + asset::Entity::update(model).filter(asset::Column::Id.eq(id.clone())) }; match update_one.exec(txn).await { @@ -139,6 +138,10 @@ where Err(err) => match err { DbErr::RecordNotFound(ref s) => { if s.contains("None of the database rows are affected") { + warn!( + "Update failed. No asset found for id {}.", + bs58::encode(id).into_string() + ); Ok(()) } else { Err(IngesterError::from(err)) From 5d3e7a878d3c98662809e07c1754dd1c78e3f860 Mon Sep 17 00:00:00 2001 From: Alex Tsymbal Date: Wed, 21 Jun 2023 04:48:58 +0400 Subject: [PATCH 22/23] feat(das-api): support searching assets by `jsonUri` parameter (#79) * add dto parameter * add dao condition * upd asset_data fetching to ensure single presence of asset_data in query * use asset.asset_data key for linking between asset/asset_data * fix: breaking arg order for array queries * chore: consistent arg order in `SearchAssets` destructuring * fix: breaking arg count for array params in searchAssets --- das_api/src/api/api_impl.rs | 2 + das_api/src/api/mod.rs | 3 +- digital_asset_types/src/dao/mod.rs | 19 ++++++++ digital_asset_types/src/dao/scopes/asset.rs | 54 +++++++++++++-------- 4 files changed, 56 insertions(+), 22 deletions(-) diff --git a/das_api/src/api/api_impl.rs b/das_api/src/api/api_impl.rs index 5bb531898..583167776 100644 --- a/das_api/src/api/api_impl.rs +++ b/das_api/src/api/api_impl.rs @@ -276,6 +276,7 @@ impl ApiContract for DasApi { page, before, after, + json_uri } = payload; // Deserialize search assets query self.validate_pagination(&limit, &page, &before, &after)?; @@ -324,6 +325,7 @@ impl ApiContract for DasApi { royalty_target, royalty_amount, burnt, + json_uri, }; let sort_by = sort_by.unwrap_or_default(); // Execute query diff --git a/das_api/src/api/mod.rs b/das_api/src/api/mod.rs index 8b072f55a..e758b2bfb 100644 --- a/das_api/src/api/mod.rs +++ b/das_api/src/api/mod.rs @@ -79,11 +79,12 @@ pub struct SearchAssets { pub page: Option, pub before: Option, pub after: Option, + #[serde(default)] + pub json_uri: Option, } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)] #[serde(rename_all = "camelCase")] - pub struct GetAssetsByAuthority { pub authority_address: String, pub sort_by: Option, diff --git a/digital_asset_types/src/dao/mod.rs b/digital_asset_types/src/dao/mod.rs index bd874f32b..f2528ec9d 100644 --- a/digital_asset_types/src/dao/mod.rs +++ b/digital_asset_types/src/dao/mod.rs @@ -52,6 +52,7 @@ pub struct SearchAssetsQuery { pub royalty_target: Option>, pub royalty_amount: Option, pub burnt: Option, + pub json_uri: Option, } impl SearchAssetsQuery { @@ -110,6 +111,9 @@ impl SearchAssetsQuery { if self.grouping.is_some() { num_conditions += 1; } + if self.json_uri.is_some() { + num_conditions += 1; + } num_conditions } @@ -222,6 +226,21 @@ impl SearchAssetsQuery { joins.push(rel); } + if let Some(ju) = self.json_uri.to_owned() { + let cond = Condition::all() + .add(asset_data::Column::MetadataUrl.eq(ju)); + conditions = conditions.add(cond); + let rel = asset_data::Relation::Asset + .def() + .rev() + .on_condition(|left, right| { + Expr::tbl(right, asset_data::Column::Id) + .eq(Expr::tbl(left, asset::Column::AssetData)) + .into_condition() + }); + joins.push(rel); + } + Ok(( match self.negate { None | Some(false) => conditions, diff --git a/digital_asset_types/src/dao/scopes/asset.rs b/digital_asset_types/src/dao/scopes/asset.rs index bc8c88a6a..3de1a7e3c 100644 --- a/digital_asset_types/src/dao/scopes/asset.rs +++ b/digital_asset_types/src/dao/scopes/asset.rs @@ -3,7 +3,7 @@ use crate::dao::{ Pagination, }; use sea_orm::{entity::*, query::*, ConnectionTrait, DbErr, Order}; -use std::collections::BTreeMap; +use std::collections::{BTreeMap, HashMap}; pub fn paginate<'db, T>(pagination: &Pagination, limit: u64, stmt: T) -> T where @@ -156,7 +156,6 @@ where E: RelationTrait, { let mut stmt = asset::Entity::find() - .find_also_related(asset_data::Entity) .filter(condition) .join(JoinType::LeftJoin, relation.def()) .distinct_on([(asset::Entity, asset::Column::Id)]) @@ -172,27 +171,40 @@ where pub async fn get_related_for_assets( conn: &impl ConnectionTrait, - assets: Vec<(asset::Model, Option)>, + assets: Vec, ) -> Result, DbErr> { - let mut ids = Vec::with_capacity(assets.len()); - // Using BTreeMap to preserve order. - let mut assets_map = assets.into_iter().fold(BTreeMap::new(), |mut x, asset| { - if let Some(ad) = asset.1 { - let id = asset.0.id.clone(); - let fa = FullAsset { - asset: asset.0, - data: ad, - authorities: vec![], - creators: vec![], - groups: vec![], - }; + let asset_ids = assets.iter().map(|a| a.id.clone()) + .collect::>(); - x.insert(id.clone(), fa); - ids.push(id); - } - x - }); + let asset_data: Vec = asset_data::Entity::find() + .filter(asset_data::Column::Id.is_in(asset_ids)) + .all(conn) + .await?; + let asset_data_map = asset_data + .into_iter() + .fold(HashMap::new(), |mut acc, ad| { + acc.insert(ad.id.clone(), ad); + acc + }); + // Using BTreeMap to preserve order. + let mut assets_map = assets + .into_iter() + .fold(BTreeMap::new(), |mut acc, asset| { + if let Some(ad) = asset.asset_data.clone().and_then(|ad_id| asset_data_map.get(&ad_id)) { + let id = asset.id.clone(); + let fa = FullAsset { + asset: asset, + data: ad.clone(), + authorities: vec![], + creators: vec![], + groups: vec![], + }; + acc.insert(id, fa); + }; + acc + }); + let ids = assets_map.keys().cloned().collect::>(); let authorities = asset_authority::Entity::find() .filter(asset_authority::Column::AssetId.is_in(ids.clone())) .order_by_asc(asset_authority::Column::AssetId) @@ -248,7 +260,7 @@ pub async fn get_assets_by_condition( .order_by(sort_by, sort_direction); stmt = paginate(pagination, limit, stmt); - let asset_list = stmt.find_also_related(asset_data::Entity).all(conn).await?; + let asset_list = stmt.all(conn).await?; get_related_for_assets(conn, asset_list).await } From a4d0f146c6e04e8e33f87feac126fc91d75c8fb2 Mon Sep 17 00:00:00 2001 From: Tahsin Tunan Date: Thu, 22 Jun 2023 22:31:11 +0600 Subject: [PATCH 23/23] fix: use IndexMap instead of BTreeMap --- digital_asset_types/src/dao/scopes/asset.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/digital_asset_types/src/dao/scopes/asset.rs b/digital_asset_types/src/dao/scopes/asset.rs index cb91cf339..18f2467c5 100644 --- a/digital_asset_types/src/dao/scopes/asset.rs +++ b/digital_asset_types/src/dao/scopes/asset.rs @@ -2,8 +2,9 @@ use crate::dao::{ asset, asset_authority, asset_creators, asset_data, asset_grouping, cl_audits, FullAsset, GroupingSize, Pagination, }; +use indexmap::IndexMap; use sea_orm::{entity::*, query::*, ConnectionTrait, DbErr, Order}; -use std::collections::{BTreeMap, HashMap}; +use std::collections::HashMap; pub fn paginate<'db, T>(pagination: &Pagination, limit: u64, stmt: T) -> T where @@ -182,8 +183,8 @@ pub async fn get_related_for_assets( acc }); - // Using BTreeMap to preserve order. - let mut assets_map = assets.into_iter().fold(BTreeMap::new(), |mut acc, asset| { + // Using IndexMap to preserve order. + let mut assets_map = assets.into_iter().fold(IndexMap::new(), |mut acc, asset| { if let Some(ad) = asset .asset_data .clone()