From e273788e45f70b736bad3572c722382ae77cac04 Mon Sep 17 00:00:00 2001 From: requesco Date: Wed, 20 Dec 2023 11:01:05 +0200 Subject: [PATCH 01/14] feat: dynamic data slot for each field --- Cargo.lock | 1 + digital_asset_types/src/dao/converters.rs | 2 +- digital_asset_types/src/dao/scopes/asset.rs | 35 +++--- digital_asset_types/src/dapi/mod.rs | 2 +- digital_asset_types/src/dapi/search_assets.rs | 7 +- nft_ingester/src/api/builder.rs | 1 - nft_ingester/src/api/mod.rs | 4 +- nft_ingester/src/api/validation.rs | 2 +- .../src/bubblegum_updates_processor.rs | 105 ++++++++---------- nft_ingester/src/mplx_updates_processor.rs | 48 ++++---- nft_ingester/src/token_updates_processor.rs | 84 ++++---------- rocks-db/src/asset.rs | 57 ++++++---- rocks-db/src/batch_client.rs | 32 +++--- 13 files changed, 174 insertions(+), 206 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 319475c01..b5323d453 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1680,6 +1680,7 @@ dependencies = [ "mime_guess", "num-derive", "num-traits", + "postgre-client", "reqwest", "rocks-db", "schemars", diff --git a/digital_asset_types/src/dao/converters.rs b/digital_asset_types/src/dao/converters.rs index 81d9dbdc0..6d082ef28 100644 --- a/digital_asset_types/src/dao/converters.rs +++ b/digital_asset_types/src/dao/converters.rs @@ -23,7 +23,7 @@ impl TryFrom for postgre_client::model::SearchAssetsFilter { .grouping .map(|(key, val)| { if key != "collection" { - return Err(ConversionError::IncompatibleGroupingKey(key)) + return Err(ConversionError::IncompatibleGroupingKey(key)); } Ok(val) }) diff --git a/digital_asset_types/src/dao/scopes/asset.rs b/digital_asset_types/src/dao/scopes/asset.rs index becf7ae71..61f5fb7e2 100644 --- a/digital_asset_types/src/dao/scopes/asset.rs +++ b/digital_asset_types/src/dao/scopes/asset.rs @@ -477,6 +477,7 @@ fn convert_rocks_offchain_data( let ch_data: serde_json::Value = serde_json::from_str( dynamic_data .onchain_data + .1 .clone() .unwrap_or_default() .as_ref(), @@ -490,7 +491,7 @@ fn convert_rocks_offchain_data( metadata_url: offchain_data.url.clone(), metadata_mutability: Mutability::Immutable, metadata: Json::from_str(metadata.as_str()).map_err(|e| DbErr::Custom(e.to_string()))?, - slot_updated: dynamic_data.slot_updated as i64, + slot_updated: 0, // TODO reindex: None, }) } @@ -523,14 +524,10 @@ fn convert_rocks_asset_model( } else { Some(leaf.tree_id.to_bytes().to_vec()) }; - let slot_updated = vec![ - dynamic_data.slot_updated, - owner.slot_updated, - leaf.slot_updated, - ] - .into_iter() - .max() - .unwrap(); // unwrap here is save, because vec is not empty + let slot_updated = vec![owner.slot_updated, leaf.slot_updated] + .into_iter() + .max() + .unwrap(); // unwrap here is save, because vec is not empty Ok(asset::Model { id: static_data.pubkey.to_bytes().to_vec(), @@ -540,29 +537,30 @@ fn convert_rocks_asset_model( owner: Some(owner.owner.to_bytes().to_vec()), owner_type: owner.owner_type.clone().into(), delegate: owner.delegate.map(|pk| pk.to_bytes().to_vec()), - frozen: dynamic_data.is_frozen, + frozen: dynamic_data.is_frozen.1, supply: dynamic_data .supply + .1 .map(|supply| supply as i64) .unwrap_or_default(), supply_mint: Some(static_data.pubkey.to_bytes().to_vec()), - compressed: dynamic_data.is_compressed, - compressible: dynamic_data.is_compressible, - seq: dynamic_data.seq.map(|u| u.try_into().ok()).flatten(), + compressed: dynamic_data.is_compressed.1, + compressible: dynamic_data.is_compressible.1, + seq: dynamic_data.seq.1.map(|u| u.try_into().ok()).flatten(), tree_id, leaf: leaf.leaf.clone(), nonce: leaf.nonce.map(|nonce| nonce as i64), royalty_target_type: static_data.royalty_target_type.clone().into(), royalty_target: None, // TODO - royalty_amount: dynamic_data.royalty_amount as i32, + royalty_amount: dynamic_data.royalty_amount.1 as i32, asset_data: Some(static_data.pubkey.to_bytes().to_vec()), - burnt: dynamic_data.is_burnt, + burnt: dynamic_data.is_burnt.1, created_at: Some(static_data.created_at), slot_updated: Some(slot_updated as i64), data_hash: leaf.data_hash.map(|h| h.to_string()), creator_hash: leaf.creator_hash.map(|h| h.to_string()), owner_delegate_seq: owner.owner_delegate_seq.map(|seq| seq as i64), - was_decompressed: dynamic_data.was_decompressed, + was_decompressed: dynamic_data.was_decompressed.1, leaf_seq: leaf.leaf_seq.map(|seq| seq as i64), }) } @@ -666,6 +664,7 @@ fn convert_rocks_creators_model( dynamic_data .creators + .1 .iter() .enumerate() .map(|(position, creator)| asset_creators::Model { @@ -674,8 +673,8 @@ fn convert_rocks_creators_model( creator: creator.creator.to_bytes().to_vec(), share: creator.creator_share as i32, verified: creator.creator_verified, - seq: Some(dynamic_data.slot_updated as i64), - slot_updated: Some(dynamic_data.slot_updated as i64), + seq: Some(0), // TODO + slot_updated: Some(0), // TODO position: position as i16, }) .collect::>() diff --git a/digital_asset_types/src/dapi/mod.rs b/digital_asset_types/src/dapi/mod.rs index 7a06d9b30..bfae837bd 100644 --- a/digital_asset_types/src/dapi/mod.rs +++ b/digital_asset_types/src/dapi/mod.rs @@ -14,4 +14,4 @@ pub use assets_by_owner::*; pub use change_logs::*; pub use get_asset::*; pub use get_asset_batch::*; -pub use search_assets::*; \ No newline at end of file +pub use search_assets::*; diff --git a/digital_asset_types/src/dapi/search_assets.rs b/digital_asset_types/src/dapi/search_assets.rs index c5e87e564..7928a3b9a 100644 --- a/digital_asset_types/src/dapi/search_assets.rs +++ b/digital_asset_types/src/dapi/search_assets.rs @@ -20,7 +20,8 @@ pub async fn search_assets( before: Option, after: Option, ) -> Result { - let filter_result: &Result = &filter.try_into(); + let filter_result: &Result = + &filter.try_into(); if let Err(ConversionError::IncompatibleGroupingKey(_)) = filter_result { // If the error is IncompatibleGroupingKey, return an empty response return Ok(AssetList { @@ -29,7 +30,9 @@ pub async fn search_assets( ..AssetList::default() }); } - let filter = filter_result.as_ref().map_err(|e| DbErr::Custom(e.to_string()))?; + let filter = filter_result + .as_ref() + .map_err(|e| DbErr::Custom(e.to_string()))?; let keys = index_client .get_asset_pubkeys_filtered(filter, &sort_by.into(), limit, page, before, after) .await diff --git a/nft_ingester/src/api/builder.rs b/nft_ingester/src/api/builder.rs index 882af6959..1f49cf71c 100644 --- a/nft_ingester/src/api/builder.rs +++ b/nft_ingester/src/api/builder.rs @@ -124,7 +124,6 @@ impl RpcApiBuilder { }); module.add_alias("searchAssets", "search_assets"); - Ok(module) } } diff --git a/nft_ingester/src/api/mod.rs b/nft_ingester/src/api/mod.rs index 1bd3779a4..e3dcaeba0 100644 --- a/nft_ingester/src/api/mod.rs +++ b/nft_ingester/src/api/mod.rs @@ -127,7 +127,7 @@ pub struct SearchAssets { pub limit: Option, pub page: Option, // before and after are base64 encoded sorting keys, which is NOT a pubkey, passing any non empty base64 encoded string will not cause an error - pub before: Option, + pub before: Option, pub after: Option, #[serde(default)] pub json_uri: Option, @@ -154,7 +154,7 @@ impl TryFrom for digital_asset_types::dao::SearchAssetsQuery { .transpose()?; Ok(digital_asset_types::dao::SearchAssetsQuery { negate: search_assets.negate, - condition_type: search_assets.condition_type.map(|s| s.into()), + condition_type: search_assets.condition_type.map(|s| s.into()), owner_address: validate_opt_pubkey(&search_assets.owner_address)?, owner_type: search_assets.owner_type.map(|s| s.into()), creator_address: validate_opt_pubkey(&search_assets.creator_address)?, diff --git a/nft_ingester/src/api/validation.rs b/nft_ingester/src/api/validation.rs index 5b78c506b..536feb49f 100644 --- a/nft_ingester/src/api/validation.rs +++ b/nft_ingester/src/api/validation.rs @@ -15,4 +15,4 @@ pub fn validate_opt_pubkey(pubkey: &Option) -> Result>, D None }; Ok(opt_bytes) -} \ No newline at end of file +} diff --git a/nft_ingester/src/bubblegum_updates_processor.rs b/nft_ingester/src/bubblegum_updates_processor.rs index 89cfb2388..5894f6bec 100644 --- a/nft_ingester/src/bubblegum_updates_processor.rs +++ b/nft_ingester/src/bubblegum_updates_processor.rs @@ -370,12 +370,11 @@ impl BubblegumTxProcessor { let asset_data = self.rocks_client.asset_dynamic_data.get(asset_id).unwrap(); if let Some(current_asset_data) = asset_data { let mut new_asset_data = current_asset_data.clone(); - new_asset_data.is_burnt = true; - new_asset_data.supply = Some(0); - new_asset_data.seq = Some(cl.seq); - new_asset_data.slot_updated = bundle.slot; + new_asset_data.is_burnt = (bundle.slot, true); + new_asset_data.supply = (bundle.slot, Some(0)); + new_asset_data.seq = (bundle.slot, Some(cl.seq)); - if let Some(current_seq) = current_asset_data.seq { + if let Some(current_seq) = current_asset_data.seq.1 { if current_seq < cl.seq { if let Err(e) = self .rocks_client @@ -397,17 +396,16 @@ impl BubblegumTxProcessor { } else { let new_asset_data = AssetDynamicDetails { pubkey: asset_id, - is_compressible: false, - is_compressed: true, - is_frozen: false, - supply: Some(0), - seq: Some(cl.seq), - is_burnt: true, - was_decompressed: false, - onchain_data: None, - creators: vec![], - royalty_amount: 0, - slot_updated: bundle.slot, + is_compressible: (bundle.slot, false), + is_compressed: (bundle.slot, true), + is_frozen: (bundle.slot, false), + supply: (bundle.slot, Some(0)), + seq: (bundle.slot, Some(cl.seq)), + is_burnt: (bundle.slot, true), + was_decompressed: (bundle.slot, false), + onchain_data: (bundle.slot, None), + creators: (bundle.slot, vec![]), + royalty_amount: (bundle.slot, 0), }; if let Err(e) = self .rocks_client @@ -550,23 +548,22 @@ impl BubblegumTxProcessor { let asset_dynamic_details = AssetDynamicDetails { pubkey: id, - is_compressible: false, - is_compressed: true, - is_frozen: false, - supply: Some(1), - seq: Some(cl.seq), - is_burnt: false, - was_decompressed: false, - onchain_data: Some(chain_data.to_string()), - creators, - royalty_amount: args.seller_fee_basis_points, - slot_updated: bundle.slot, + is_compressible: (bundle.slot, false), + is_compressed: (bundle.slot, true), + is_frozen: (bundle.slot, false), + supply: (bundle.slot, Some(1)), + seq: (bundle.slot, Some(cl.seq)), + is_burnt: (bundle.slot, false), + was_decompressed: (bundle.slot, false), + onchain_data: (bundle.slot, Some(chain_data.to_string())), + creators: (bundle.slot, creators), + royalty_amount: (bundle.slot, args.seller_fee_basis_points), }; if let Err(e) = self .rocks_client .asset_dynamic_data - .put(id, &asset_dynamic_details) + .merge(id, &asset_dynamic_details) { error!("Error while saving dynamic data for cNFT: {}", e); }; @@ -766,9 +763,8 @@ impl BubblegumTxProcessor { let asset_data = self.rocks_client.asset_dynamic_data.get(id).unwrap(); if let Some(current_asset_data) = asset_data { let mut new_asset_data = current_asset_data.clone(); - new_asset_data.seq = None; - new_asset_data.was_decompressed = true; - new_asset_data.slot_updated = bundle.slot; + new_asset_data.seq = (bundle.slot, None); + new_asset_data.was_decompressed = (bundle.slot, true); if let Err(e) = self .rocks_client @@ -780,17 +776,16 @@ impl BubblegumTxProcessor { } else { let new_asset_data = AssetDynamicDetails { pubkey: id, - is_compressible: true, - is_compressed: false, - is_frozen: false, - supply: Some(1), - seq: None, - is_burnt: false, - was_decompressed: true, - onchain_data: None, - creators: vec![], - royalty_amount: 0, - slot_updated: bundle.slot, + is_compressible: (bundle.slot, true), + is_compressed: (bundle.slot, false), + is_frozen: (bundle.slot, false), + supply: (bundle.slot, Some(1)), + seq: (bundle.slot, None), + is_burnt: (bundle.slot, false), + was_decompressed: (bundle.slot, true), + onchain_data: (bundle.slot, None), + creators: (bundle.slot, vec![]), + royalty_amount: (bundle.slot, 0), }; if let Err(e) = self .rocks_client @@ -858,10 +853,9 @@ impl BubblegumTxProcessor { let asset_data = self.rocks_client.asset_dynamic_data.get(id).unwrap(); if let Some(current_asset_data) = asset_data { let mut new_asset_data = current_asset_data.clone(); - new_asset_data.seq = Some(cl.seq); - new_asset_data.slot_updated = bundle.slot; + new_asset_data.seq = (bundle.slot, Some(cl.seq)); - for crt in new_asset_data.creators.iter_mut() { + for crt in new_asset_data.creators.1.iter_mut() { if crt.creator == *creator { crt.creator_verified = *verify; } @@ -883,17 +877,16 @@ impl BubblegumTxProcessor { let new_asset_data = AssetDynamicDetails { pubkey: id, - is_compressible: false, - is_compressed: true, - is_frozen: false, - supply: Some(1), - seq: Some(cl.seq), - is_burnt: false, - was_decompressed: false, - onchain_data: None, - creators: vec![creator], - royalty_amount: 0, - slot_updated: bundle.slot, + is_compressible: (bundle.slot, false), + is_compressed: (bundle.slot, true), + is_frozen: (bundle.slot, false), + supply: (bundle.slot, Some(1)), + seq: (bundle.slot, Some(cl.seq)), + is_burnt: (bundle.slot, false), + was_decompressed: (bundle.slot, false), + onchain_data: (bundle.slot, None), + creators: (bundle.slot, vec![creator]), + royalty_amount: (bundle.slot, 0), }; if let Err(e) = self .rocks_client diff --git a/nft_ingester/src/mplx_updates_processor.rs b/nft_ingester/src/mplx_updates_processor.rs index 1250f5f95..e6cfc4b76 100644 --- a/nft_ingester/src/mplx_updates_processor.rs +++ b/nft_ingester/src/mplx_updates_processor.rs @@ -174,7 +174,6 @@ impl MplxAccsProcessor { onchain_data: asset.onchain_data.clone(), creators: asset.creators.clone(), royalty_amount: asset.royalty_amount, - slot_updated: asset.slot_updated, } } else { asset.clone() @@ -194,9 +193,7 @@ impl MplxAccsProcessor { self.metrics .inc_process("accounts_saving_dynamic", MetricStatus::SUCCESS); - let upd_res = self - .rocks_db - .asset_updated(asset.slot_updated as u64, asset.pubkey.clone()); + let upd_res = self.rocks_db.asset_updated(0, asset.pubkey.clone()); // TODO if let Err(e) = upd_res { error!("Error while updating assets update idx: {}", e); @@ -332,27 +329,28 @@ impl MplxAccsProcessor { models.asset_dynamic.push(AssetDynamicDetails { pubkey: mint.clone(), - is_compressible: false, - is_compressed: false, - is_frozen: false, - supply, - seq: None, - is_burnt: false, - was_decompressed: false, - onchain_data: Some(chain_data.to_string()), - creators: data - .clone() - .creators - .unwrap_or_default() - .iter() - .map(|creator| Creator { - creator: creator.address, - creator_verified: creator.verified, - creator_share: creator.share, - }) - .collect(), - royalty_amount: data.seller_fee_basis_points, - slot_updated: metadata_info.slot, + is_compressible: (metadata_info.slot, false), + is_compressed: (metadata_info.slot, false), + is_frozen: (metadata_info.slot, false), + supply: (metadata_info.slot, supply), + seq: (metadata_info.slot, None), + is_burnt: (metadata_info.slot, false), + was_decompressed: (metadata_info.slot, false), + onchain_data: (metadata_info.slot, Some(chain_data.to_string())), + creators: ( + metadata_info.slot, + data.clone() + .creators + .unwrap_or_default() + .iter() + .map(|creator| Creator { + creator: creator.address, + creator_verified: creator.verified, + creator_share: creator.share, + }) + .collect(), + ), + royalty_amount: (metadata_info.slot, data.seller_fee_basis_points), }); models.tasks.push(Task { diff --git a/nft_ingester/src/token_updates_processor.rs b/nft_ingester/src/token_updates_processor.rs index a0f39ae07..889c218dc 100644 --- a/nft_ingester/src/token_updates_processor.rs +++ b/nft_ingester/src/token_updates_processor.rs @@ -171,72 +171,32 @@ impl TokenAccsProcessor { let begin_processing = Instant::now(); for mint in mint_accs_to_save.iter() { - let existing_value = self.rocks_db.asset_dynamic_data.get(mint.pubkey.clone()); - - match existing_value { - Ok(existing_value) => { - let mut value_to_insert = None; - - if let Some(existing_value) = existing_value { - if existing_value.slot_updated < mint.slot_updated as u64 { - let updated_dynamic_data = AssetDynamicDetails { - pubkey: mint.pubkey.clone(), - is_compressible: existing_value.is_compressible, - is_compressed: existing_value.is_compressed, - is_frozen: existing_value.is_frozen, - supply: Some(mint.supply as u64), - seq: Some(mint.slot_updated as u64), - is_burnt: existing_value.is_burnt, - was_decompressed: existing_value.was_decompressed, - onchain_data: existing_value.onchain_data.clone(), - creators: existing_value.creators.clone(), - royalty_amount: existing_value.royalty_amount, - slot_updated: mint.slot_updated as u64, - }; - value_to_insert = Some(updated_dynamic_data); - } - } else { - let new_dynamic_data = AssetDynamicDetails { - pubkey: mint.pubkey.clone(), - supply: Some(mint.supply as u64), - seq: Some(mint.slot_updated as u64), - slot_updated: mint.slot_updated as u64, - ..Default::default() - }; - value_to_insert = Some(new_dynamic_data); - } + let res = self.rocks_db.asset_dynamic_data.merge( + mint.pubkey.clone(), + &AssetDynamicDetails { + pubkey: mint.pubkey.clone(), + supply: (mint.slot_updated as u64, Some(mint.supply as u64)), + seq: (mint.slot_updated as u64, Some(mint.slot_updated as u64)), + ..Default::default() + }, + ); - if let Some(data) = value_to_insert { - let res = self - .rocks_db - .asset_dynamic_data - .put(data.pubkey.clone(), &data); - - match res { - Err(e) => { - self.metrics - .inc_process("mint_update_supply", MetricStatus::FAILURE); - error!("Error while saving mints: {}", e); - } - Ok(_) => { - self.metrics - .inc_process("mint_update_supply", MetricStatus::SUCCESS); - let upd_res = self.rocks_db.asset_updated( - mint.slot_updated as u64, - mint.pubkey.clone(), - ); - - if let Err(e) = upd_res { - error!("Error while updating assets update idx: {}", e); - } - } - } - } - } + match res { Err(e) => { self.metrics .inc_process("mint_update_supply", MetricStatus::FAILURE); - error!("Error while fetching mints: {}", e); + error!("Error while saving mints: {}", e); + } + Ok(_) => { + self.metrics + .inc_process("mint_update_supply", MetricStatus::SUCCESS); + let upd_res = self + .rocks_db + .asset_updated(mint.slot_updated as u64, mint.pubkey.clone()); + + if let Err(e) = upd_res { + error!("Error while updating assets update idx: {}", e); + } } } } diff --git a/rocks-db/src/asset.rs b/rocks-db/src/asset.rs index 679a1516f..1328146df 100644 --- a/rocks-db/src/asset.rs +++ b/rocks-db/src/asset.rs @@ -1,6 +1,6 @@ use crate::key_encoders::{decode_pubkey, decode_u64x2_pubkey, encode_pubkey, encode_u64x2_pubkey}; use crate::Result; -use bincode::deserialize; +use bincode::{deserialize, serialize}; use blockbuster::token_metadata::state::{TokenStandard, Uses}; use log::{error, warn}; use rocksdb::MergeOperands; @@ -62,17 +62,16 @@ pub struct AssetStaticDetails { #[derive(Serialize, Deserialize, Debug, Clone, Default)] pub struct AssetDynamicDetails { pub pubkey: Pubkey, - pub is_compressible: bool, - pub is_compressed: bool, - pub is_frozen: bool, - pub supply: Option, - pub seq: Option, - pub is_burnt: bool, - pub was_decompressed: bool, - pub onchain_data: Option, - pub creators: Vec, - pub royalty_amount: u16, - pub slot_updated: u64, + pub is_compressible: (u64, bool), + pub is_compressed: (u64, bool), + pub is_frozen: (u64, bool), + pub supply: (u64, Option), + pub seq: (u64, Option), + pub is_burnt: (u64, bool), + pub was_decompressed: (u64, bool), + pub onchain_data: (u64, Option), + pub creators: (u64, Vec), + pub royalty_amount: (u64, u16), } #[derive(Serialize, Deserialize, Debug, Default, Clone)] @@ -246,13 +245,11 @@ impl AssetDynamicDetails { existing_val: Option<&[u8]>, operands: &MergeOperands, ) -> Option> { - let mut result = vec![]; - let mut slot = 0; + let mut result: Option = None; if let Some(existing_val) = existing_val { match deserialize::(existing_val) { Ok(value) => { - slot = value.slot_updated; - result = existing_val.to_vec(); + result = Some(value); } Err(e) => { error!( @@ -263,13 +260,31 @@ impl AssetDynamicDetails { } } + fn update_field(current: &mut (u64, T), new: &(u64, T)) { + if new.0 > current.0 { + *current = new.clone(); + } + } + for op in operands { match deserialize::(&op) { Ok(new_val) => { - if new_val.slot_updated > slot { - slot = new_val.slot_updated; - result = op.to_vec(); - } + result = Some(if let Some(mut current_val) = result { + update_field(&mut current_val.is_compressible, &new_val.is_compressible); + update_field(&mut current_val.is_compressed, &new_val.is_compressed); + update_field(&mut current_val.is_frozen, &new_val.is_frozen); + update_field(&mut current_val.supply, &new_val.supply); + update_field(&mut current_val.seq, &new_val.seq); + update_field(&mut current_val.is_burnt, &new_val.is_burnt); + update_field(&mut current_val.creators, &new_val.creators); + update_field(&mut current_val.royalty_amount, &new_val.royalty_amount); + update_field(&mut current_val.was_decompressed, &new_val.was_decompressed); + update_field(&mut current_val.onchain_data, &new_val.onchain_data); + + current_val + } else { + new_val + }); } Err(e) => { error!("RocksDB: AssetDynamicDetails deserialize new_val: {}", e) @@ -277,7 +292,7 @@ impl AssetDynamicDetails { } } - Some(result) + result.and_then(|result| serialize(&result).ok()) } } diff --git a/rocks-db/src/batch_client.rs b/rocks-db/src/batch_client.rs index 0094616c1..a02483311 100644 --- a/rocks-db/src/batch_client.rs +++ b/rocks-db/src/batch_client.rs @@ -104,25 +104,25 @@ impl AssetIndexReader for Storage { for dynamic_info in asset_dynamic_details.iter() { if let Some(data) = dynamic_info { if let Some(existed_index) = asset_indexes.get_mut(&data.pubkey) { - existed_index.is_compressible = data.is_compressible; - existed_index.is_compressed = data.is_compressed; - existed_index.is_frozen = data.is_frozen; - existed_index.supply = data.supply.map_or(0, |s| s as i64); - existed_index.is_burnt = data.is_burnt; - existed_index.creators = data.creators.clone(); - existed_index.royalty_amount = data.royalty_amount as i64; - existed_index.slot_updated = data.slot_updated as i64; + existed_index.is_compressible = data.is_compressible.1; + existed_index.is_compressed = data.is_compressed.1; + existed_index.is_frozen = data.is_frozen.1; + existed_index.supply = data.supply.1.map_or(0, |s| s as i64); + existed_index.is_burnt = data.is_burnt.1; + existed_index.creators = data.creators.clone().1; + existed_index.royalty_amount = data.royalty_amount.1 as i64; + existed_index.slot_updated = 0; // TODO } else { let asset_index = AssetIndex { pubkey: data.pubkey, - is_compressible: data.is_compressible, - is_compressed: data.is_compressed, - is_frozen: data.is_frozen, - supply: data.supply.map_or(0, |s| s as i64), - is_burnt: data.is_burnt, - creators: data.creators.clone(), - royalty_amount: data.royalty_amount as i64, - slot_updated: data.slot_updated as i64, + is_compressible: data.is_compressible.1, + is_compressed: data.is_compressed.1, + is_frozen: data.is_frozen.1, + supply: data.supply.1.map_or(0, |s| s as i64), + is_burnt: data.is_burnt.1, + creators: data.creators.clone().1, + royalty_amount: data.royalty_amount.1 as i64, + slot_updated: 0, // TODO ..Default::default() }; From ff69252ed5b32d435a179aa40d314eac351d8278 Mon Sep 17 00:00:00 2001 From: requesco Date: Wed, 20 Dec 2023 12:54:12 +0200 Subject: [PATCH 02/14] merge --- .../src/bubblegum_updates_processor.rs | 2 +- nft_ingester/src/mplx_updates_processor.rs | 2 +- rocks-db/src/asset.rs | 2 +- rocks-db/src/batch_client.rs | 35 +++++++++---------- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/nft_ingester/src/bubblegum_updates_processor.rs b/nft_ingester/src/bubblegum_updates_processor.rs index 71d5bae0d..3eb5772b5 100644 --- a/nft_ingester/src/bubblegum_updates_processor.rs +++ b/nft_ingester/src/bubblegum_updates_processor.rs @@ -760,7 +760,7 @@ impl BubblegumTxProcessor { new_asset_data.seq = (bundle.slot, None); new_asset_data.was_decompressed = (bundle.slot, true); - if let Err(e) = self.rocks_client.asset_dynamic_data.put(id, &asset_data) { + if let Err(e) = self.rocks_client.asset_dynamic_data.put(id, &new_asset_data) { error!("Error while saving asset data for cNFT: {}", e); }; } else { diff --git a/nft_ingester/src/mplx_updates_processor.rs b/nft_ingester/src/mplx_updates_processor.rs index 5b7405838..e834ec436 100644 --- a/nft_ingester/src/mplx_updates_processor.rs +++ b/nft_ingester/src/mplx_updates_processor.rs @@ -191,7 +191,7 @@ impl MplxAccsProcessor { let upd_res = self .rocks_db - .asset_updated(asset.slot_updated, asset.pubkey); + .asset_updated(0, asset.pubkey); // TODO if let Err(e) = upd_res { error!("Error while updating assets update idx: {}", e); diff --git a/rocks-db/src/asset.rs b/rocks-db/src/asset.rs index 0a72d8f6e..2e9c03204 100644 --- a/rocks-db/src/asset.rs +++ b/rocks-db/src/asset.rs @@ -1,4 +1,4 @@ -use bincode::deserialize; +use bincode::{deserialize, serialize}; use blockbuster::token_metadata::state::{TokenStandard, Uses}; use log::{error, warn}; use rocksdb::MergeOperands; diff --git a/rocks-db/src/batch_client.rs b/rocks-db/src/batch_client.rs index 3ba95f9ba..97d54208e 100644 --- a/rocks-db/src/batch_client.rs +++ b/rocks-db/src/batch_client.rs @@ -101,33 +101,32 @@ impl AssetIndexReader for Storage { } for dynamic_info in asset_dynamic_details.iter().flatten() { - if let Some(data) = dynamic_info { - if let Some(existed_index) = asset_indexes.get_mut(&data.pubkey) { - existed_index.is_compressible = data.is_compressible.1; - existed_index.is_compressed = data.is_compressed.1; - existed_index.is_frozen = data.is_frozen.1; - existed_index.supply = data.supply.1.map_or(0, |s| s as i64); - existed_index.is_burnt = data.is_burnt.1; - existed_index.creators = data.creators.clone().1; - existed_index.royalty_amount = data.royalty_amount.1 as i64; + if let Some(existed_index) = asset_indexes.get_mut(&dynamic_info.pubkey) { + existed_index.is_compressible = dynamic_info.is_compressible.1; + existed_index.is_compressed = dynamic_info.is_compressed.1; + existed_index.is_frozen = dynamic_info.is_frozen.1; + existed_index.supply = dynamic_info.supply.1.map_or(0, |s| s as i64); + existed_index.is_burnt = dynamic_info.is_burnt.1; + existed_index.creators = dynamic_info.creators.clone().1; + existed_index.royalty_amount = dynamic_info.royalty_amount.1 as i64; existed_index.slot_updated = 0; // TODO } else { let asset_index = AssetIndex { - pubkey: data.pubkey, - is_compressible: data.is_compressible.1, - is_compressed: data.is_compressed.1, - is_frozen: data.is_frozen.1, - supply: data.supply.1.map_or(0, |s| s as i64), - is_burnt: data.is_burnt.1, - creators: data.creators.clone().1, - royalty_amount: data.royalty_amount.1 as i64, + pubkey: dynamic_info.pubkey, + is_compressible: dynamic_info.is_compressible.1, + is_compressed: dynamic_info.is_compressed.1, + is_frozen: dynamic_info.is_frozen.1, + supply: dynamic_info.supply.1.map_or(0, |s| s as i64), + is_burnt: dynamic_info.is_burnt.1, + creators: dynamic_info.creators.clone().1, + royalty_amount: dynamic_info.royalty_amount.1 as i64, slot_updated: 0, // TODO ..Default::default() }; asset_indexes.insert(asset_index.pubkey, asset_index); } - } + } for data in asset_authority_details.iter().flatten() { From 562853397ccf399d09d796309ceadce5fbbec794 Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 00:58:25 +0200 Subject: [PATCH 03/14] clippy + rm unused imports --- Cargo.lock | 1807 ++--------------- entities/src/models.rs | 4 +- grafana/dashboards/.gitkeep | 0 .../dashboards/READ API-1664573020969.json | 333 --- grafana/datasources/local-graphite.yaml | 6 - helm/api/.helmignore | 23 - helm/api/Chart.yaml | 24 - helm/api/templates/_helpers.tpl | 67 - helm/api/templates/deployment.yaml | 110 - helm/api/templates/envoy-config.yaml | 85 - helm/api/templates/hpa.yaml | 28 - helm/api/templates/ingress.yaml | 61 - helm/api/templates/secret.yaml | 7 - helm/api/templates/service.yaml | 15 - helm/api/templates/serviceaccount.yaml | 12 - helm/api/values.yaml | 94 - helm/ingest/.helmignore | 23 - helm/ingest/Chart.yaml | 24 - helm/ingest/templates/_helpers.tpl | 66 - .../templates/deployment-backfiller.yaml | 104 - .../deployment-background-tasks.yaml | 104 - helm/ingest/templates/deployment-load.yaml | 59 - helm/ingest/templates/deployment.yaml | 108 - helm/ingest/templates/hpa.yaml | 28 - helm/ingest/templates/migrator-secret.yaml | 10 - helm/ingest/templates/migrator.yaml | 31 - helm/ingest/templates/secret.yaml | 10 - helm/ingest/templates/serviceaccount.yaml | 12 - helm/ingest/values.yaml | 92 - nft_ingester/Cargo.toml | 33 - nft_ingester/scripts/run_ingester.bash | 2 + nft_ingester/src/api/api_impl.rs | 3 +- nft_ingester/src/api/mod.rs | 1 - nft_ingester/src/api/service.rs | 18 - .../src/bubblegum_updates_processor.rs | 8 +- nft_ingester/src/db_v2.rs | 2 +- nft_ingester/src/mplx_updates_processor.rs | 2 +- nft_ingester/src/token_updates_processor.rs | 6 +- postgre-client/src/asset_index_client.rs | 4 +- rocks-db/src/asset.rs | 3 +- .../accountsdb-plugin-config.json | 21 - 41 files changed, 222 insertions(+), 3228 deletions(-) delete mode 100644 grafana/dashboards/.gitkeep delete mode 100644 grafana/dashboards/READ API-1664573020969.json delete mode 100644 grafana/datasources/local-graphite.yaml delete mode 100644 helm/api/.helmignore delete mode 100644 helm/api/Chart.yaml delete mode 100644 helm/api/templates/_helpers.tpl delete mode 100644 helm/api/templates/deployment.yaml delete mode 100644 helm/api/templates/envoy-config.yaml delete mode 100644 helm/api/templates/hpa.yaml delete mode 100644 helm/api/templates/ingress.yaml delete mode 100644 helm/api/templates/secret.yaml delete mode 100644 helm/api/templates/service.yaml delete mode 100644 helm/api/templates/serviceaccount.yaml delete mode 100644 helm/api/values.yaml delete mode 100644 helm/ingest/.helmignore delete mode 100644 helm/ingest/Chart.yaml delete mode 100644 helm/ingest/templates/_helpers.tpl delete mode 100644 helm/ingest/templates/deployment-backfiller.yaml delete mode 100644 helm/ingest/templates/deployment-background-tasks.yaml delete mode 100644 helm/ingest/templates/deployment-load.yaml delete mode 100644 helm/ingest/templates/deployment.yaml delete mode 100644 helm/ingest/templates/hpa.yaml delete mode 100644 helm/ingest/templates/migrator-secret.yaml delete mode 100644 helm/ingest/templates/migrator.yaml delete mode 100644 helm/ingest/templates/secret.yaml delete mode 100644 helm/ingest/templates/serviceaccount.yaml delete mode 100644 helm/ingest/values.yaml delete mode 100644 solana-test-validator-geyser-config/accountsdb-plugin-config.json diff --git a/Cargo.lock b/Cargo.lock index 185bb79b8..bc7a5869d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -129,8 +129,8 @@ checksum = "cf7d535e1381be3de2c0716c0a1c1e32ad9df1042cddcf7bc18d743569e53319" dependencies = [ "anchor-syn", "anyhow", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "regex", "syn 1.0.109", ] @@ -144,8 +144,8 @@ dependencies = [ "anchor-syn", "anyhow", "bs58 0.4.0", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "rustversion", "syn 1.0.109", ] @@ -157,7 +157,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1be64a48e395fe00b8217287f226078be2cf32dae42fdf8a885b997945c3d28" dependencies = [ "anchor-syn", - "proc-macro2 1.0.67", + "proc-macro2", "syn 1.0.109", ] @@ -168,8 +168,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38ea6713d1938c0da03656ff8a693b17dc0396da66d1ba320557f07e86eca0d4" dependencies = [ "anchor-syn", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -181,8 +181,8 @@ checksum = "d401f11efb3644285685f8339829a9786d43ed7490bb1699f33c478d04d5a582" dependencies = [ "anchor-syn", "anyhow", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -195,8 +195,8 @@ dependencies = [ "anchor-syn", "anyhow", "heck 0.3.3", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -208,8 +208,8 @@ checksum = "6ad769993b5266714e8939e47fbdede90e5c030333c7522d99a4d4748cf26712" dependencies = [ "anchor-syn", "anyhow", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -221,8 +221,8 @@ checksum = "4e677fae4a016a554acdd0e3b7f178d3acafaa7e7ffac6b8690cf4e171f1c116" dependencies = [ "anchor-syn", "anyhow", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -234,8 +234,8 @@ checksum = "340beef6809d1c3fcc7ae219153d981e95a8a277ff31985bd7050e32645dc9a8" dependencies = [ "anchor-syn", "anyhow", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -272,9 +272,9 @@ dependencies = [ "anyhow", "bs58 0.3.1", "heck 0.3.3", - "proc-macro2 1.0.67", + "proc-macro2", "proc-macro2-diagnostics 0.9.1", - "quote 1.0.33", + "quote", "serde", "serde_json", "sha2 0.9.9", @@ -297,15 +297,6 @@ 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 = "anstream" version = "0.5.0" @@ -378,45 +369,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "asn1-rs" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" -dependencies = [ - "asn1-rs-derive", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time 0.3.29", -] - -[[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.67", - "quote 1.0.33", - "syn 1.0.109", - "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.67", - "quote 1.0.33", - "syn 1.0.109", -] - [[package]] name = "assert_matches" version = "1.5.0" @@ -434,20 +386,6 @@ dependencies = [ "futures-core", ] -[[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-compression" version = "0.4.3" @@ -517,8 +455,8 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -528,8 +466,8 @@ version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -598,7 +536,7 @@ dependencies = [ "matchit 0.5.0", "memchr", "mime", - "percent-encoding 2.3.0", + "percent-encoding", "pin-project-lite", "serde", "sync_wrapper", @@ -627,7 +565,7 @@ dependencies = [ "matchit 0.7.3", "memchr", "mime", - "percent-encoding 2.3.0", + "percent-encoding", "pin-project-lite", "rustversion", "serde", @@ -707,8 +645,8 @@ checksum = "33b8de67cc41132507eeece2584804efcb15f85ba516e34c944b7667f480397a" dependencies = [ "heck 0.3.3", "proc-macro-error", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -736,12 +674,6 @@ version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - [[package]] name = "bincode" version = "1.3.3" @@ -764,8 +696,8 @@ dependencies = [ "lazycell", "peeking_take_while", "prettyplease 0.2.15", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "regex", "rustc-hash", "shlex", @@ -908,7 +840,7 @@ dependencies = [ "borsh-derive-internal 0.9.3", "borsh-schema-derive-internal 0.9.3", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.67", + "proc-macro2", "syn 1.0.109", ] @@ -921,7 +853,7 @@ dependencies = [ "borsh-derive-internal 0.10.3", "borsh-schema-derive-internal 0.10.3", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.67", + "proc-macro2", "syn 1.0.109", ] @@ -931,8 +863,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -942,8 +874,8 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -953,8 +885,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -964,8 +896,8 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1045,8 +977,8 @@ version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1065,8 +997,8 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -1121,16 +1053,6 @@ dependencies = [ "cadence", ] -[[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.83" @@ -1207,37 +1129,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim 0.8.0", - "textwrap 0.11.0", - "unicode-width", - "vec_map", -] - -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_lex 0.2.4", - "indexmap 1.9.3", - "once_cell", - "strsim 0.10.0", - "termcolor", - "textwrap 0.16.0", -] - [[package]] name = "clap" version = "4.4.5" @@ -1256,8 +1147,8 @@ checksum = "122ec64120a49b4563ccaedcbea7818d069ed8e9aa6d829b82d8a4128936b2ab" dependencies = [ "anstream", "anstyle", - "clap_lex 0.5.1", - "strsim 0.10.0", + "clap_lex", + "strsim", ] [[package]] @@ -1267,20 +1158,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] -[[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.5.1" @@ -1325,19 +1207,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "console" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.45.0", -] - [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -1358,12 +1227,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "const-oid" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" - [[package]] name = "const_fn" version = "0.4.9" @@ -1376,12 +1239,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "core-foundation" version = "0.9.3" @@ -1551,9 +1408,9 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.67", - "quote 1.0.33", - "strsim 0.10.0", + "proc-macro2", + "quote", + "strsim", "syn 1.0.109", ] @@ -1564,39 +1421,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", - "quote 1.0.33", + "quote", "syn 1.0.109", ] -[[package]] -name = "data-encoding" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" - -[[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.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" -dependencies = [ - "asn1-rs", - "displaydoc", - "nom", - "num-bigint 0.4.4", - "num-traits", - "rusticata-macros", -] - [[package]] name = "deranged" version = "0.3.8" @@ -1612,31 +1440,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2 1.0.67", - "quote 1.0.33", - "rustc_version 0.4.0", - "syn 1.0.109", -] - -[[package]] -name = "dialoguer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" -dependencies = [ - "console", - "shell-words", - "tempfile", - "zeroize", -] - [[package]] name = "difflib" version = "0.4.0" @@ -1673,7 +1476,7 @@ dependencies = [ "borsh-derive 0.9.3", "bs58 0.4.0", "entities", - "futures 0.3.28", + "futures", "hex", "indexmap 1.9.3", "jsonpath_lib", @@ -1694,7 +1497,7 @@ dependencies = [ "spl-concurrent-merkle-tree", "thiserror", "tokio", - "url 2.4.1", + "url", ] [[package]] @@ -1706,16 +1509,6 @@ dependencies = [ "dirs-sys", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if 1.0.0", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.3.7" @@ -1727,57 +1520,12 @@ dependencies = [ "winapi", ] -[[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 = "discard" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" -[[package]] -name = "displaydoc" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" -dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", - "syn 2.0.37", -] - -[[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 = "dotenvy" version = "0.15.7" @@ -1852,12 +1600,6 @@ dependencies = [ "serde", ] -[[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.33" @@ -1899,8 +1641,8 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1910,23 +1652,11 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8958699f9359f0b04e691a13850d48b7de329138023876d07cbd024c2c820598" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] -[[package]] -name = "enum_dispatch" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" -dependencies = [ - "once_cell", - "proc-macro2 1.0.67", - "quote 1.0.33", - "syn 2.0.37", -] - [[package]] name = "env_logger" version = "0.9.3" @@ -1975,12 +1705,6 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - [[package]] name = "fastrand" version = "1.9.0" @@ -2011,7 +1735,7 @@ dependencies = [ "atomic", "pear", "serde", - "serde_yaml 0.9.25", + "serde_yaml", "toml 0.7.8", "uncased", "version_check", @@ -2097,7 +1821,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ - "percent-encoding 2.3.0", + "percent-encoding", ] [[package]] @@ -2106,24 +1830,12 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "funty" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - [[package]] name = "futures" version = "0.3.28" @@ -2164,7 +1876,6 @@ dependencies = [ "futures-core", "futures-task", "futures-util", - "num_cpus", ] [[package]] @@ -2205,8 +1916,8 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -2228,7 +1939,6 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ - "futures 0.1.31", "futures-channel", "futures-core", "futures-io", @@ -2241,21 +1951,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "gcc" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" - [[package]] name = "generic-array" version = "0.14.7" @@ -2335,7 +2030,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f3d68c8343245dc047982651b5afb8bd659c9959ed72efe5a73bf22684e5fd" dependencies = [ "arc-swap", - "futures 0.3.28", + "futures", "log", "reqwest", "serde", @@ -2354,7 +2049,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8af59a261bcf42f45d1b261232847b9b850ba0a1419d6100698246fb66e9240" dependencies = [ "arc-swap", - "futures 0.3.28", + "futures", "log", "reqwest", "serde", @@ -2431,16 +2126,6 @@ dependencies = [ "hashbrown 0.14.0", ] -[[package]] -name = "hdrhistogram" -version = "7.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f19b9f54f7c7f55e31401bb647626ce0cf0f67b0004982ce815b3ee72a02aa8" -dependencies = [ - "byteorder", - "num-traits", -] - [[package]] name = "headers" version = "0.3.9" @@ -2504,12 +2189,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "histogram" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" - [[package]] name = "hkdf" version = "0.12.3" @@ -2635,7 +2314,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" dependencies = [ "bytes", - "futures 0.3.28", + "futures", "headers", "http", "hyper", @@ -2714,17 +2393,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.4.0" @@ -2771,18 +2439,6 @@ dependencies = [ "hashbrown 0.14.0", ] -[[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 = "inlinable_string" version = "0.1.15" @@ -2824,15 +2480,6 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" -[[package]] -name = "iri-string" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0f7638c1e223529f1bfdc48c8b133b9e0b434094d1d28473161ee48b235f78" -dependencies = [ - "nom", -] - [[package]] name = "is-terminal" version = "0.4.9" @@ -2906,29 +2553,13 @@ dependencies = [ "serde_json", ] -[[package]] -name = "jsonrpc-client-transports" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a" -dependencies = [ - "derive_more", - "futures 0.3.28", - "jsonrpc-core", - "jsonrpc-pubsub", - "log", - "serde", - "serde_json", - "url 1.7.2", -] - [[package]] name = "jsonrpc-core" version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" dependencies = [ - "futures 0.3.28", + "futures", "futures-executor", "futures-util", "log", @@ -2938,66 +2569,29 @@ dependencies = [ ] [[package]] -name = "jsonrpc-core-client" +name = "jsonrpc-http-server" version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0" +checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff" dependencies = [ - "futures 0.3.28", - "jsonrpc-client-transports", + "futures", + "hyper", + "jsonrpc-core", + "jsonrpc-server-utils", + "log", + "net2", + "parking_lot 0.11.2", + "unicase", ] [[package]] -name = "jsonrpc-derive" +name = "jsonrpc-server-utils" version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" -dependencies = [ - "proc-macro-crate 0.1.5", - "proc-macro2 1.0.67", - "quote 1.0.33", - "syn 1.0.109", -] - -[[package]] -name = "jsonrpc-http-server" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff" -dependencies = [ - "futures 0.3.28", - "hyper", - "jsonrpc-core", - "jsonrpc-server-utils", - "log", - "net2", - "parking_lot 0.11.2", - "unicase", -] - -[[package]] -name = "jsonrpc-pubsub" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011" -dependencies = [ - "futures 0.3.28", - "jsonrpc-core", - "lazy_static", - "log", - "parking_lot 0.11.2", - "rand 0.7.3", - "serde", -] - -[[package]] -name = "jsonrpc-server-utils" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4" +checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4" dependencies = [ "bytes", - "futures 0.3.28", + "futures", "globset", "jsonrpc-core", "lazy_static", @@ -3120,12 +2714,6 @@ dependencies = [ "vcpkg", ] -[[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.3.8" @@ -3183,12 +2771,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.5.0" @@ -3349,8 +2931,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ "cfg-if 1.0.0", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -3361,8 +2943,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad2765371d0978ba4ace4ebef047baa62fc068b431e468444b5610dd441c639b" dependencies = [ "cfg-if 1.0.0", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -3404,7 +2986,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18e4d3002ea881e94a238798faf87a006a687297a24bd4b3f810fbb63611173d" dependencies = [ - "quote 1.0.33", + "quote", "syn 1.0.109", ] @@ -3469,7 +3051,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12989bc45715b0ee91944855130131479f9c772e198a910c3eb0ea327d5bffc3" dependencies = [ - "quote 1.0.33", + "quote", "syn 1.0.109", ] @@ -3479,7 +3061,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5a739019e11d93661a64ef5fe108ab17c79b35961e944442ff6efdd460ad01a" dependencies = [ - "quote 1.0.33", + "quote", "syn 1.0.109", ] @@ -3533,95 +3115,50 @@ dependencies = [ name = "nft_ingester" version = "0.7.2" dependencies = [ - "anchor-lang", - "async-trait", - "base64 0.21.5", "bincode", "blockbuster", - "borsh 0.9.3", "bs58 0.4.0", - "cadence", - "cadence-macros", "chrono", - "clap 4.4.5", - "crossbeam-channel", + "clap", "digital_asset_types", "entities", "env_logger 0.10.0", "figment", "flatbuffers", - "futures 0.3.28", - "futures-util", "hex", - "hyper", "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", "jsonrpc-http-server", - "lazy_static", "libc", "log", "metrics-utils", - "mockall 0.11.4", "mpl-bubblegum", "mpl-token-metadata", "num-integer", "num-traits", - "open-rpc-derive", "open-rpc-schema", "plerkle_messenger", "plerkle_serialization", "postgre-client", - "rand 0.8.5", - "redis", - "regex", "reqwest", "rocks-db", - "rust-crypto", "schemars", - "schemars_derive", "sea-orm", - "sea-query 0.28.5", - "semver 1.0.19", "serde", "serde_derive", "serde_json", - "solana-account-decoder", "solana-bigtable-connection", - "solana-client", - "solana-geyser-plugin-interface", "solana-sdk", - "solana-sdk-macro", "solana-storage-bigtable", "solana-transaction-status", "spl-account-compression", - "spl-concurrent-merkle-tree", "spl-token", "sqlx", "stretto", "thiserror", "tokio", - "tokio-postgres", - "tokio-stream", "tokio-util 0.7.10", - "tower", - "tower-http", "tracing-subscriber", - "url 2.4.1", "utils", - "uuid", -] - -[[package]] -name = "nix" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" -dependencies = [ - "bitflags 1.3.2", - "cfg-if 1.0.0", - "libc", - "memoffset 0.6.5", ] [[package]] @@ -3650,31 +3187,6 @@ dependencies = [ "winapi", ] -[[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.4" @@ -3686,24 +3198,14 @@ dependencies = [ "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.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -3717,29 +3219,6 @@ dependencies = [ "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.16" @@ -3775,17 +3254,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "object" version = "0.32.1" @@ -3795,15 +3268,6 @@ dependencies = [ "memchr", ] -[[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.19.0" @@ -3816,18 +3280,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -[[package]] -name = "open-rpc-derive" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3de03a56750973a83c76a40fb4b81969d42fad152cd0e787e25c79dcf54e3f" -dependencies = [ - "open-rpc-schema", - "proc-macro2 1.0.67", - "quote 1.0.33", - "syn 1.0.109", -] - [[package]] name = "open-rpc-schema" version = "0.0.4" @@ -3861,8 +3313,8 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -3894,12 +3346,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "os_str_bytes" -version = "6.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" - [[package]] name = "ouroboros" version = "0.15.6" @@ -3918,8 +3364,8 @@ checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" dependencies = [ "Inflector", "proc-macro-error", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -4024,9 +3470,9 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da9f0f13dac8069c139e8300a6510e3f4143ecf5259c60b116a9b271b4ca0d54" dependencies = [ - "proc-macro2 1.0.67", + "proc-macro2", "proc-macro2-diagnostics 0.10.1", - "quote 1.0.33", + "quote", "syn 2.0.37", ] @@ -4036,36 +3482,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" -[[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 = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "percent-encoding" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" -[[package]] -name = "percentage" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" -dependencies = [ - "num", -] - [[package]] name = "petgraph" version = "0.6.4" @@ -4076,24 +3498,6 @@ dependencies = [ "indexmap 2.0.1", ] -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project" version = "1.1.3" @@ -4109,8 +3513,8 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -4126,17 +3530,6 @@ 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.27" @@ -4155,7 +3548,7 @@ dependencies = [ "cadence", "cadence-macros", "figment", - "futures 0.3.28", + "futures", "log", "redis", "serde", @@ -4225,35 +3618,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "postgres-protocol" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" -dependencies = [ - "base64 0.21.5", - "byteorder", - "bytes", - "fallible-iterator", - "hmac 0.12.1", - "md-5", - "memchr", - "rand 0.8.5", - "sha2 0.10.8", - "stringprep", -] - -[[package]] -name = "postgres-types" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2234cdee9408b523530a9b6d2d6b373d1db34f6a8e51dc03ded1828d7fb67c" -dependencies = [ - "bytes", - "fallible-iterator", - "postgres-protocol", -] - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -4307,7 +3671,7 @@ version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ - "proc-macro2 1.0.67", + "proc-macro2", "syn 1.0.109", ] @@ -4317,7 +3681,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ - "proc-macro2 1.0.67", + "proc-macro2", "syn 2.0.37", ] @@ -4347,8 +3711,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", "version_check", ] @@ -4359,8 +3723,8 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "version_check", ] @@ -4370,15 +3734,6 @@ version = "0.5.20+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" -[[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.67" @@ -4394,8 +3749,8 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", "version_check", "yansi 0.5.1", @@ -4407,8 +3762,8 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", "version_check", "yansi 1.0.0-rc.1", @@ -4432,8 +3787,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -4509,8 +3864,8 @@ checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" dependencies = [ "anyhow", "itertools 0.10.5", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -4522,8 +3877,8 @@ checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools 0.10.5", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -4570,8 +3925,8 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -4581,69 +3936,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" dependencies = [ - "percent-encoding 2.3.0", -] - -[[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 0.20.9", - "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 0.20.9", - "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 0.4.9", - "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", + "percent-encoding", ] [[package]] @@ -4652,7 +3945,7 @@ version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ - "proc-macro2 1.0.67", + "proc-macro2", ] [[package]] @@ -4661,29 +3954,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" -dependencies = [ - "libc", - "rand 0.4.6", -] - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi", -] - [[package]] name = "rand" version = "0.7.3" @@ -4728,21 +3998,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.5.1" @@ -4799,27 +4054,6 @@ dependencies = [ "crossbeam-utils", ] -[[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.29", - "yasna", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "redis" version = "0.22.3" @@ -4830,18 +4064,18 @@ dependencies = [ "async-trait", "bytes", "combine", - "futures 0.3.28", + "futures", "futures-util", "itoa", "native-tls", - "percent-encoding 2.3.0", + "percent-encoding", "pin-project-lite", "ryu", "sha1_smol", "tokio", "tokio-native-tls", "tokio-util 0.7.10", - "url 2.4.1", + "url", ] [[package]] @@ -4941,7 +4175,7 @@ version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "async-compression 0.4.3", + "async-compression", "base64 0.21.5", "bytes", "encoding_rs", @@ -4959,10 +4193,10 @@ dependencies = [ "mime", "native-tls", "once_cell", - "percent-encoding 2.3.0", + "percent-encoding", "pin-project-lite", "rustls 0.21.7", - "rustls-pemfile 1.0.3", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", @@ -4972,7 +4206,7 @@ dependencies = [ "tokio-rustls 0.24.1", "tokio-util 0.7.10", "tower-service", - "url 2.4.1", + "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", @@ -5019,8 +4253,8 @@ version = "0.7.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -5086,31 +4320,6 @@ dependencies = [ "librocksdb-sys", ] -[[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 = "rust-crypto" -version = "0.2.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" -dependencies = [ - "gcc", - "libc", - "rand 0.3.23", - "rustc-serialize", - "time 0.1.45", -] - [[package]] name = "rust_decimal" version = "1.32.0" @@ -5139,12 +4348,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" - [[package]] name = "rustc_version" version = "0.2.3" @@ -5163,15 +4366,6 @@ dependencies = [ "semver 1.0.19", ] -[[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.37.23" @@ -5223,27 +4417,6 @@ dependencies = [ "sct", ] -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile 1.0.3", - "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.3" @@ -5302,8 +4475,8 @@ version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "serde_derive_internals", "syn 1.0.109", ] @@ -5333,7 +4506,7 @@ dependencies = [ "async-stream", "async-trait", "chrono", - "futures 0.3.28", + "futures", "futures-util", "log", "ouroboros", @@ -5348,7 +4521,7 @@ dependencies = [ "thiserror", "time 0.3.29", "tracing", - "url 2.4.1", + "url", "uuid", ] @@ -5360,8 +4533,8 @@ checksum = "7216195de9c6b2474fd0efab486173dccd0eff21f28cc54aa4c0205d52fb3af0" dependencies = [ "bae", "heck 0.3.3", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -5410,8 +4583,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34cdc022b4f606353fe5dc85b09713a04e433323b70163e81513b141c6ae6eb5" dependencies = [ "heck 0.3.3", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", "thiserror", ] @@ -5423,8 +4596,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63f62030c60f3a691f5fe251713b4e220b306e50a71e1d6f9cce1f24bb781978" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", "thiserror", ] @@ -5445,8 +4618,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69b4397b825df6ccf1e98bcdabef3bbcfc47ff5853983467850eeab878384f21" dependencies = [ "heck 0.3.3", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "rustversion", "syn 1.0.109", ] @@ -5525,8 +4698,8 @@ version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -5536,8 +4709,8 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -5591,23 +4764,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ "darling", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 1.0.109", ] -[[package]] -name = "serde_yaml" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" -dependencies = [ - "indexmap 1.9.3", - "ryu", - "serde", - "yaml-rust", -] - [[package]] name = "serde_yaml" version = "0.9.25" @@ -5621,17 +4782,6 @@ dependencies = [ "unsafe-libyaml", ] -[[package]] -name = "sha-1" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sha1" version = "0.6.1" @@ -5719,8 +4869,8 @@ version = "0.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63927d22a1e8b74bda98cc6e151fcdf178b7abb0dc6c4f81e0bbf5ffe2fc4ec8" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "shank_macro_impl", "syn 1.0.109", ] @@ -5732,8 +4882,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ce03403df682f80f4dc1efafa87a4d0cb89b03726d0565e6364bdca5b9a441" dependencies = [ "anyhow", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "serde", "syn 1.0.109", ] @@ -5747,12 +4897,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - [[package]] name = "shlex" version = "1.2.0" @@ -5786,12 +4930,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a30f10c911c0355f80f1c2faa8096efc4a58cdf8590b954d5b395efa071c711" -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - [[package]] name = "sized-chunks" version = "0.6.5" @@ -5963,94 +5101,6 @@ dependencies = [ "zstd", ] -[[package]] -name = "solana-clap-utils" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068a69fcd0c3ba13b3dfbdcfc4bd9b10a0008e514fe19caa760166fdfa23b513" -dependencies = [ - "chrono", - "clap 2.34.0", - "rpassword", - "solana-perf", - "solana-remote-wallet", - "solana-sdk", - "thiserror", - "tiny-bip39", - "uriparse", - "url 2.4.1", -] - -[[package]] -name = "solana-cli-config" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51778706d4d106784345ca3ad9cff1b02c8269f68b4c2249e0f2d1c3d6f9fd84" -dependencies = [ - "dirs-next", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml 0.8.26", - "solana-clap-utils", - "solana-sdk", - "url 2.4.1", -] - -[[package]] -name = "solana-client" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c341f150d44e2df07f2447cab472b9ca2b635a4ed4d6367174a6bccc840f639" -dependencies = [ - "async-mutex", - "async-trait", - "base64 0.13.1", - "bincode", - "bs58 0.4.0", - "bytes", - "clap 2.34.0", - "crossbeam-channel", - "enum_dispatch", - "futures 0.3.28", - "futures-util", - "indexmap 1.9.3", - "indicatif", - "itertools 0.10.5", - "jsonrpc-core", - "lazy_static", - "log", - "quinn", - "quinn-proto", - "rand 0.7.3", - "rand_chacha 0.2.2", - "rayon", - "reqwest", - "rustls 0.20.9", - "semver 1.0.19", - "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 2.4.1", -] - [[package]] name = "solana-config-program" version = "1.14.19" @@ -6065,30 +5115,6 @@ dependencies = [ "solana-sdk", ] -[[package]] -name = "solana-faucet" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fafcff7541e125332b5d1d82abe6780d80e7788ce77322c816b656f226d2b5e3" -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.19" @@ -6129,8 +5155,8 @@ version = "1.14.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fe7b34164abb41e85e6a9365c4eb1fae29cae6483fab76aa4146b0d47f09157" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "rustc_version 0.4.0", "syn 1.0.109", ] @@ -6150,18 +5176,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "solana-geyser-plugin-interface" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10765f28fa3b9b49add49b2083888f4ffade3d3b5f1346214267c0ab7f5aac5b" -dependencies = [ - "log", - "solana-sdk", - "solana-transaction-status", - "thiserror", -] - [[package]] name = "solana-logger" version = "1.14.19" @@ -6185,65 +5199,16 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a327cdbf1b682eef2178d09047e3145c86649a2e6b901eb607d0f4903827220d" -dependencies = [ - "crossbeam-channel", - "gethostname", - "lazy_static", - "log", - "reqwest", - "solana-sdk", -] - -[[package]] -name = "solana-net-utils" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e7a5e6106c76c78b18e03bfe8cb5ca934bd22583bda19b2cfcc99601c7ff5e" -dependencies = [ - "bincode", - "clap 3.2.25", - "crossbeam-channel", - "log", - "nix", - "rand 0.7.3", - "serde", - "serde_derive", - "socket2 0.4.9", - "solana-logger", - "solana-sdk", - "solana-version", - "tokio", - "url 2.4.1", -] - -[[package]] -name = "solana-perf" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0921ebf363c78b6beb9232225080bd91c3a3644477e5e8e9df86f1cd840063" -dependencies = [ - "ahash 0.7.6", - "bincode", - "bv", - "caps", - "curve25519-dalek", - "dlopen", - "dlopen_derive", - "fnv", +version = "1.14.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a327cdbf1b682eef2178d09047e3145c86649a2e6b901eb607d0f4903827220d" +dependencies = [ + "crossbeam-channel", + "gethostname", "lazy_static", - "libc", "log", - "nix", - "rand 0.7.3", - "rayon", - "serde", - "solana-metrics", - "solana-rayon-threadlimit", + "reqwest", "solana-sdk", - "solana-vote-program", ] [[package]] @@ -6322,35 +5287,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "solana-rayon-threadlimit" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34812569689b66b8cbce23ea109b8c015850f67e4868904aa89c03c6e1e76f1" -dependencies = [ - "lazy_static", - "num_cpus", -] - -[[package]] -name = "solana-remote-wallet" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e232be06d37264c286c53ab36703d11c5b41fb72accab9abbd87d032a09df6bc" -dependencies = [ - "console", - "dialoguer", - "log", - "num-derive", - "num-traits", - "parking_lot 0.12.1", - "qstring", - "semver 1.0.19", - "solana-sdk", - "thiserror", - "uriparse", -] - [[package]] name = "solana-sdk" version = "1.14.19" @@ -6409,8 +5345,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25df5b25f9974c31c30680438be2774e38e62fc03f77386a79171b9938a87f00" dependencies = [ "bs58 0.4.0", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "rustversion", "syn 1.0.109", ] @@ -6427,7 +5363,7 @@ dependencies = [ "bzip2", "enum-iterator 0.8.1", "flate2", - "futures 0.3.28", + "futures", "goauth 0.13.1", "http", "hyper", @@ -6466,35 +5402,6 @@ dependencies = [ "tonic-build 0.8.4", ] -[[package]] -name = "solana-streamer" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "553ebf87e2a44e166ec7ed00fc67e0363aa4e9b698981692df26747206cf6f1b" -dependencies = [ - "crossbeam-channel", - "futures-util", - "histogram", - "indexmap 1.9.3", - "itertools 0.10.5", - "libc", - "log", - "nix", - "pem", - "percentage", - "pkcs8", - "quinn", - "rand 0.7.3", - "rcgen", - "rustls 0.20.9", - "solana-metrics", - "solana-perf", - "solana-sdk", - "thiserror", - "tokio", - "x509-parser", -] - [[package]] name = "solana-transaction-status" version = "1.14.19" @@ -6524,22 +5431,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "solana-version" -version = "1.14.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff1cb7ab07d0d0214ccf1263152c0b5a60a81affb7b838be3dc8229bc8b28c4" -dependencies = [ - "log", - "rustc_version 0.4.0", - "semver 1.0.19", - "serde", - "serde_derive", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sdk", -] - [[package]] name = "solana-vote-program" version = "1.14.19" @@ -6598,16 +5489,6 @@ 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-account-compression" version = "0.1.10" @@ -6752,14 +5633,14 @@ dependencies = [ "log", "md-5", "memchr", - "num-bigint 0.4.4", + "num-bigint", "once_cell", "paste", - "percent-encoding 2.3.0", + "percent-encoding", "rand 0.8.5", "rust_decimal", "rustls 0.20.9", - "rustls-pemfile 1.0.3", + "rustls-pemfile", "serde", "serde_json", "sha1 0.10.6", @@ -6771,7 +5652,7 @@ dependencies = [ "thiserror", "time 0.3.29", "tokio-stream", - "url 2.4.1", + "url", "uuid", "webpki-roots 0.22.6", "whoami", @@ -6788,15 +5669,15 @@ dependencies = [ "heck 0.4.1", "hex", "once_cell", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "serde", "serde_json", "sha2 0.10.8", "sqlx-core", "sqlx-rt", "syn 1.0.109", - "url 2.4.1", + "url", ] [[package]] @@ -6845,8 +5726,8 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "serde", "serde_derive", "syn 1.0.109", @@ -6859,8 +5740,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" dependencies = [ "base-x", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "serde", "serde_derive", "serde_json", @@ -6884,7 +5765,7 @@ dependencies = [ "async-io", "atomic", "crossbeam-channel", - "futures 0.3.28", + "futures", "parking_lot 0.12.1", "rand 0.8.5", "seahash", @@ -6904,12 +5785,6 @@ dependencies = [ "unicode-normalization", ] -[[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" @@ -6922,25 +5797,14 @@ 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.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "unicode-ident", ] @@ -6950,8 +5814,8 @@ version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "unicode-ident", ] @@ -6961,18 +5825,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", - "syn 1.0.109", - "unicode-xid 0.2.4", -] - [[package]] name = "system-configuration" version = "0.5.1" @@ -7046,7 +5898,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e2b1567ca8a2b819ea7b28c92be35d9f76fb9edb214321dcc86eb96023d1f87" dependencies = [ "bollard-stubs", - "futures 0.3.28", + "futures", "hex", "hmac 0.12.1", "log", @@ -7056,21 +5908,6 @@ dependencies = [ "sha2 0.10.8", ] -[[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.50" @@ -7086,8 +5923,8 @@ version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -7101,17 +5938,6 @@ dependencies = [ "once_cell", ] -[[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.2.27" @@ -7172,8 +5998,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "standback", "syn 1.0.109", ] @@ -7248,8 +6074,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -7263,32 +6089,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-postgres" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d340244b32d920260ae7448cb72b6e238bddc3d4f7603394e7dd46ed8e48f5b8" -dependencies = [ - "async-trait", - "byteorder", - "bytes", - "fallible-iterator", - "futures-channel", - "futures-util", - "log", - "parking_lot 0.12.1", - "percent-encoding 2.3.0", - "phf", - "pin-project-lite", - "postgres-protocol", - "postgres-types", - "rand 0.8.5", - "socket2 0.5.5", - "tokio", - "tokio-util 0.7.10", - "whoami", -] - [[package]] name = "tokio-rustls" version = "0.23.4" @@ -7321,22 +6121,6 @@ dependencies = [ "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 0.20.9", - "tokio", - "tokio-rustls 0.23.4", - "tungstenite", - "webpki", - "webpki-roots 0.22.6", -] - [[package]] name = "tokio-util" version = "0.6.10" @@ -7428,11 +6212,11 @@ dependencies = [ "http-body", "hyper", "hyper-timeout", - "percent-encoding 2.3.0", + "percent-encoding", "pin-project", "prost 0.10.4", "prost-derive 0.10.1", - "rustls-pemfile 1.0.3", + "rustls-pemfile", "tokio", "tokio-rustls 0.23.4", "tokio-stream", @@ -7462,11 +6246,11 @@ dependencies = [ "http-body", "hyper", "hyper-timeout", - "percent-encoding 2.3.0", + "percent-encoding", "pin-project", "prost 0.11.9", "prost-derive 0.11.9", - "rustls-pemfile 1.0.3", + "rustls-pemfile", "tokio", "tokio-rustls 0.23.4", "tokio-stream", @@ -7485,9 +6269,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9263bf4c9bfaae7317c1c2faf7f18491d2fe476f70c414b73bf5d445b00ffa1" dependencies = [ "prettyplease 0.1.25", - "proc-macro2 1.0.67", + "proc-macro2", "prost-build 0.10.4", - "quote 1.0.33", + "quote", "syn 1.0.109", ] @@ -7498,9 +6282,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" dependencies = [ "prettyplease 0.1.25", - "proc-macro2 1.0.67", + "proc-macro2", "prost-build 0.11.9", - "quote 1.0.33", + "quote", "syn 1.0.109", ] @@ -7512,7 +6296,6 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "hdrhistogram", "indexmap 1.9.3", "pin-project", "pin-project-lite", @@ -7531,8 +6314,6 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" dependencies = [ - "async-compression 0.3.15", - "base64 0.13.1", "bitflags 1.3.2", "bytes", "futures-core", @@ -7540,19 +6321,10 @@ dependencies = [ "http", "http-body", "http-range-header", - "httpdate", - "iri-string", - "mime", - "mime_guess", - "percent-encoding 2.3.0", "pin-project-lite", - "tokio", - "tokio-util 0.7.10", "tower", "tower-layer", "tower-service", - "tracing", - "uuid", ] [[package]] @@ -7585,8 +6357,8 @@ version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] @@ -7668,28 +6440,6 @@ 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 0.20.9", - "sha-1", - "thiserror", - "url 2.4.1", - "utf-8", - "webpki", - "webpki-roots 0.22.6", -] - [[package]] name = "typenum" version = "1.17.0" @@ -7741,24 +6491,6 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - -[[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 = "unicode_categories" version = "0.1.1" @@ -7797,17 +6529,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.4.1" @@ -7815,16 +6536,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", - "idna 0.4.0", - "percent-encoding 2.3.0", + "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 = "utf8parse" version = "0.2.1" @@ -7872,12 +6587,6 @@ 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" @@ -7905,12 +6614,6 @@ 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" @@ -7936,8 +6639,8 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", "wasm-bindgen-shared", ] @@ -7960,7 +6663,7 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ - "quote 1.0.33", + "quote", "wasm-bindgen-macro-support", ] @@ -7970,8 +6673,8 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -8104,15 +6807,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -8131,21 +6825,6 @@ dependencies = [ "windows-targets 0.52.0", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "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.5" @@ -8176,12 +6855,6 @@ dependencies = [ "windows_x86_64_msvc 0.52.0", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -8194,12 +6867,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" -[[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.5" @@ -8212,12 +6879,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" -[[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.5" @@ -8230,12 +6891,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" -[[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.5" @@ -8248,12 +6903,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" -[[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.5" @@ -8266,12 +6915,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" -[[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.5" @@ -8284,12 +6927,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" -[[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.5" @@ -8330,24 +6967,6 @@ dependencies = [ "tap", ] -[[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.29", -] - [[package]] name = "xattr" version = "1.1.3" @@ -8365,15 +6984,6 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9828b178da53440fa9c766a3d2f73f7cf5d0ac1fe3980c1e5018d899fd19e07b" -[[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 = "yansi" version = "0.5.1" @@ -8386,15 +6996,6 @@ version = "1.0.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377" -[[package]] -name = "yasna" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" -dependencies = [ - "time 0.3.29", -] - [[package]] name = "zeroize" version = "1.3.0" @@ -8410,8 +7011,8 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2 1.0.67", - "quote 1.0.33", + "proc-macro2", + "quote", "syn 2.0.37", ] diff --git a/entities/src/models.rs b/entities/src/models.rs index b7a9a4bd6..211f25b9a 100644 --- a/entities/src/models.rs +++ b/entities/src/models.rs @@ -110,8 +110,8 @@ pub struct ChainDataV1 { impl ChainDataV1 { pub fn sanitize(&mut self) { - self.name = self.name.trim().replace("\0", "").to_string(); - self.symbol = self.symbol.trim().replace("\0", "").to_string(); + self.name = self.name.trim().replace('\0', ""); + self.symbol = self.symbol.trim().replace('\0', ""); } } diff --git a/grafana/dashboards/.gitkeep b/grafana/dashboards/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/grafana/dashboards/READ API-1664573020969.json b/grafana/dashboards/READ API-1664573020969.json deleted file mode 100644 index 5bd44877a..000000000 --- a/grafana/dashboards/READ API-1664573020969.json +++ /dev/null @@ -1,333 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 1, - "links": [], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "graphite", - "uid": "P1D261A8554D2DA69" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 5, - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max", - "min", - "mean" - ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "graphite", - "uid": "P1D261A8554D2DA69" - }, - "refId": "A", - "target": "stats.timers.das_ingester.ingester.account_proc_time.mean_90" - } - ], - "title": "ACCOUNT UPDATE PROCESSING TIME", - "type": "timeseries" - }, - { - "datasource": { - "type": "graphite", - "uid": "P1D261A8554D2DA69" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "Number of Events", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "displayName": "Events", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 3, - "options": { - "legend": { - "calcs": [ - "sum" - ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "graphite", - "uid": "P1D261A8554D2DA69" - }, - "hide": false, - "refCount": 0, - "refId": "TXN", - "target": "aggregate(seriesByTag('name=stats_counts.plerkle.account_seen_event'), 'sum')" - } - ], - "title": "ACCOUNT EVENTS", - "transparent": true, - "type": "timeseries" - }, - { - "datasource": { - "type": "graphite", - "uid": "P1D261A8554D2DA69" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "series", - "axisLabel": "Number of Events", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "displayName": "Events", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 2, - "options": { - "legend": { - "calcs": [ - "sum" - ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "graphite", - "uid": "P1D261A8554D2DA69" - }, - "hide": false, - "refCount": 0, - "refId": "TXN", - "target": "aggregate(seriesByTag('name=stats_counts.plerkle.transaction_seen_event'), 'sum')" - } - ], - "title": "TXN EVENTS", - "transparent": true, - "type": "timeseries" - } - ], - "schemaVersion": 37, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "READ API", - "uid": "OjmVXO44k", - "version": 3, - "weekStart": "" -} \ No newline at end of file diff --git a/grafana/datasources/local-graphite.yaml b/grafana/datasources/local-graphite.yaml deleted file mode 100644 index 50e3d3463..000000000 --- a/grafana/datasources/local-graphite.yaml +++ /dev/null @@ -1,6 +0,0 @@ -datasources: - - name: Graphite - type: graphite - url: http://graphite - access: proxy - isDefault: true diff --git a/helm/api/.helmignore b/helm/api/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/helm/api/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/helm/api/Chart.yaml b/helm/api/Chart.yaml deleted file mode 100644 index cc238c07a..000000000 --- a/helm/api/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: api -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" diff --git a/helm/api/templates/_helpers.tpl b/helm/api/templates/_helpers.tpl deleted file mode 100644 index 660601d5d..000000000 --- a/helm/api/templates/_helpers.tpl +++ /dev/null @@ -1,67 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "api.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{- define "api.secret" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}-secret -{{- end }} - - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "api.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "api.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "api.labels" -}} -helm.sh/chart: {{ include "api.chart" . }} -{{ include "api.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "api.selectorLabels" -}} -app.kubernetes.io/name: {{ include "api.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "api.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "api.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/helm/api/templates/deployment.yaml b/helm/api/templates/deployment.yaml deleted file mode 100644 index 0643a7b47..000000000 --- a/helm/api/templates/deployment.yaml +++ /dev/null @@ -1,110 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "api.fullname" . }} - labels: - {{- include "api.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "api.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "api.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "api.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - volumes: - - name: config-volume - configMap: - name: {{ include "api.fullname" . }}-proxy-config - containers: - - name: {{ .Chart.Name }} - env: - - name: APP_METRICS_HOST - value: 127.0.0.1 - - name: APP_METRICS_PORT - value: "8125" - - name: APP_ENV - value: "{{ .Values.env }}" - - name: APP_SERVER_PORT - value: "{{ .Values.app.server_port }}" - - name: APP_DATABASE_URL - valueFrom: - secretKeyRef: - name: {{ include "api.secret" . }} - key: APP_READER_DATABASE_URL - optional: false - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image }}" - imagePullPolicy: {{ .Values.imagePullPolicy }} - ports: - - name: http - containerPort: {{ .Values.app.server_port }} - protocol: TCP - livenessProbe: - httpGet: - path: /health - port: http - readinessProbe: - httpGet: - path: /health - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - - name: datadog - image: gcr.io/datadoghq/dogstatsd:latest - resources: - limits: - cpu: 1 - memory: 2048Mi - requests: - cpu: 500m - memory: 1024Mi - env: - - name: "DD_API_KEY" - value: "{{ .Values.metrics.data_dog_api_key }}" - ports: - - containerPort: 8125 - name: dogstatsdport - protocol: UDP - - name: proxy - image: "{{ .Values.proxy.image }}" - imagePullPolicy: {{ .Values.imagePullPolicy }} - volumeMounts: - - name: config-volume - mountPath: /etc/envoy.yaml - subPath: envoy.yaml - ports: - - name: proxy - containerPort: {{ .Values.service.port }} - protocol: TCP - resources: - {{- toYaml .Values.proxy.resources | nindent 12 }} - - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/helm/api/templates/envoy-config.yaml b/helm/api/templates/envoy-config.yaml deleted file mode 100644 index aca16f6db..000000000 --- a/helm/api/templates/envoy-config.yaml +++ /dev/null @@ -1,85 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "api.fullname" . }}-proxy-config -data: - envoy.yaml: | - static_resources: - listeners: - - name: main - address: - socket_address: - address: 0.0.0.0 - port_value: 9091 - filter_chains: - - filters: - - name: envoy.filters.network.http_connection_manager - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager - stat_prefix: ingress_http - codec_type: AUTO - route_config: - name: local_route - virtual_hosts: - - name: local_service - domains: ["*"] - routes: - - match: {prefix: "/"} - route: {cluster: service} - http_filters: - - name: envoy.filters.http.wasm - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm - config: - name: "proxy" - root_id: "proxy" - vm_config: - runtime: "envoy.wasm.runtime.v8" - configuration: - "@type": type.googleapis.com/google.protobuf.StringValue - value: "/{{.Values.proxy.auth}}" - code: - local: - filename: "/etc/rpc_proxy.wasm" - allow_precompiled: true - - name: envoy.filters.http.router - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router - clusters: - - name: service - connect_timeout: 0.25s - type: LOGICAL_DNS - lb_policy: round_robin - load_assignment: - cluster_name: service - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: 127.0.0.1 - port_value: 9090 - - name: rpc - connect_timeout: 0.25s - type: LOGICAL_DNS - lb_policy: round_robin - load_assignment: - cluster_name: rpc - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: {{ .Values.proxy.host }} - port_value: 80 - {{/* transport_socket:*/}} - {{/* name: envoy.transport_sockets.tls*/}} - {{/* typed_config:*/}} - {{/* "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext*/}} - {{/* sni: {{ .Values.proxy.sni }}*/}} - {{/* common_tls_context:*/}} - {{/* validation_context:*/}} - {{/* match_subject_alt_names:*/}} - {{/* - exact: {{ .Values.proxy.wildCard }}*/}} - {{/* trusted_ca:*/}} - {{/* filename: /etc/ssl/certs/ca-certificates.crt*/}} diff --git a/helm/api/templates/hpa.yaml b/helm/api/templates/hpa.yaml deleted file mode 100644 index 51c153626..000000000 --- a/helm/api/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "api.fullname" . }} - labels: - {{- include "api.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "api.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/helm/api/templates/ingress.yaml b/helm/api/templates/ingress.yaml deleted file mode 100644 index d7a5ccd53..000000000 --- a/helm/api/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "api.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "api.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/helm/api/templates/secret.yaml b/helm/api/templates/secret.yaml deleted file mode 100644 index 86657947c..000000000 --- a/helm/api/templates/secret.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "api.secret" . }} -data: - APP_DATABASE_URL: {{ .Values.api.db_url | b64enc | quote }} - APP_READER_DATABASE_URL: {{ .Values.api.reader_db_url | b64enc | quote }} \ No newline at end of file diff --git a/helm/api/templates/service.yaml b/helm/api/templates/service.yaml deleted file mode 100644 index 1459607f5..000000000 --- a/helm/api/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "api.fullname" . }} - labels: - {{- include "api.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: proxy - protocol: TCP - name: http - selector: - {{- include "api.selectorLabels" . | nindent 4 }} diff --git a/helm/api/templates/serviceaccount.yaml b/helm/api/templates/serviceaccount.yaml deleted file mode 100644 index f9b9dc911..000000000 --- a/helm/api/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "api.serviceAccountName" . }} - labels: - {{- include "api.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/helm/api/values.yaml b/helm/api/values.yaml deleted file mode 100644 index 25b87e720..000000000 --- a/helm/api/values.yaml +++ /dev/null @@ -1,94 +0,0 @@ -# Default values for api. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 -image: "" -imagePullPolicy: Always -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - - -api: - db_url: - redis_url: - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 -app: - server_port: 9090 -service: - type: ClusterIP - port: 9091 - -ingress: - enabled: true - className: "alb" - annotations: - alb.ingress.kubernetes.io/scheme: internet-facing - external-dns.alpha.kubernetes.io/hostname: rpc-devnet.aws.metaplex.com - alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}]' - alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-2:869291162248:certificate/ff00f95c-de27-4bc2-9e79-7ee44c77b9f9 - alb.ingress.kubernetes.io/target-type: ip - hosts: - - host: rpc-devnet.aws.metaplex.com - paths: - - path: / - pathType: Prefix - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local -proxy: - image: "" - resources: {} - sni: "" - wildcard: "" - auth: "" -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -metrics: - data_dog_api_key: diff --git a/helm/ingest/.helmignore b/helm/ingest/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/helm/ingest/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/helm/ingest/Chart.yaml b/helm/ingest/Chart.yaml deleted file mode 100644 index 67012bd42..000000000 --- a/helm/ingest/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: ingest -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" \ No newline at end of file diff --git a/helm/ingest/templates/_helpers.tpl b/helm/ingest/templates/_helpers.tpl deleted file mode 100644 index b21922e65..000000000 --- a/helm/ingest/templates/_helpers.tpl +++ /dev/null @@ -1,66 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "ingest.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{- define "ingest.secret" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}-secret -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "ingest.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "ingest.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "ingest.labels" -}} -helm.sh/chart: {{ include "ingest.chart" . }} -{{ include "ingest.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "ingest.selectorLabels" -}} -app.kubernetes.io/name: {{ include "ingest.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "ingest.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "ingest.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/helm/ingest/templates/deployment-backfiller.yaml b/helm/ingest/templates/deployment-backfiller.yaml deleted file mode 100644 index e51dfec82..000000000 --- a/helm/ingest/templates/deployment-backfiller.yaml +++ /dev/null @@ -1,104 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "ingest.fullname" . }}-backfiller - labels: - app: {{ include "ingest.fullname" . }}-backfiller -spec: - replicas: {{ .Values.backfiller.replicaCount }} - selector: - matchLabels: - app: {{ include "ingest.fullname" . }}-backfiller - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app: {{ include "ingest.fullname" . }}-backfiller - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "ingest.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: datadog - image: gcr.io/datadoghq/dogstatsd:latest - resources: - limits: - cpu: 1 - memory: 2048Mi - requests: - cpu: 500m - memory: 1024Mi - env: - - name: "DD_API_KEY" - value: "{{ .Values.metrics.data_dog_api_key }}" - ports: - - containerPort: 8125 - name: dogstatsdport - protocol: UDP - - name: {{ .Chart.Name }} - env: - - name: RUST_BACKTRACE - value: "1" - - name: RUST_LOG - value: "info" - - name: INGESTER_ENV - value: "{{ .Values.env }}" - - name: INGESTER_METRICS_HOST - value: 127.0.0.1 - - name: INGESTER_ROLE - value: "Backfiller" - - name: INGESTER_METRICS_PORT - value: "8125" - - name: INGESTER_DATABASE_CONFIG - valueFrom: - secretKeyRef: - name: {{ include "ingest.secret" . }} - key: INGESTER_DATABASE_CONFIG - optional: false - - name: INGESTER_RPC_CONFIG - valueFrom: - secretKeyRef: - name: {{ include "ingest.secret" . }} - key: INGESTER_RPC_CONFIG - optional: false - - name: INGESTER_MESSENGER_CONFIG - valueFrom: - secretKeyRef: - name: {{ include "ingest.secret" . }} - key: INGESTER_MESSENGER_CONFIG - optional: false - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image }}" - imagePullPolicy: {{ .Values.imagePullPolicy }} - readinessProbe: - exec: - command: - - echo - - "true" - livenessProbe: - exec: - command: - - echo - - "true" - resources: - {{- toYaml .Values.backfiller.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/helm/ingest/templates/deployment-background-tasks.yaml b/helm/ingest/templates/deployment-background-tasks.yaml deleted file mode 100644 index cd01c42e9..000000000 --- a/helm/ingest/templates/deployment-background-tasks.yaml +++ /dev/null @@ -1,104 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "ingest.fullname" . }}-background - labels: - app: {{ include "ingest.fullname" . }}-background -spec: - replicas: {{ .Values.bg.replicaCount }} - selector: - matchLabels: - app: {{ include "ingest.fullname" . }}-background - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app: {{ include "ingest.fullname" . }}-background - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "ingest.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: datadog - image: gcr.io/datadoghq/dogstatsd:latest - resources: - limits: - cpu: 1 - memory: 2048Mi - requests: - cpu: 500m - memory: 1024Mi - env: - - name: "DD_API_KEY" - value: "{{ .Values.metrics.data_dog_api_key }}" - ports: - - containerPort: 8125 - name: dogstatsdport - protocol: UDP - - name: {{ .Chart.Name }} - env: - - name: RUST_BACKTRACE - value: "1" - - name: RUST_LOG - value: "info" - - name: INGESTER_ENV - value: "{{ .Values.env }}" - - name: INGESTER_METRICS_HOST - value: 127.0.0.1 - - name: INGESTER_ROLE - value: "BackgroundTaskRunner" - - name: INGESTER_METRICS_PORT - value: "8125" - - name: INGESTER_DATABASE_CONFIG - valueFrom: - secretKeyRef: - name: {{ include "ingest.secret" . }} - key: INGESTER_DATABASE_CONFIG - optional: false - - name: INGESTER_RPC_CONFIG - valueFrom: - secretKeyRef: - name: {{ include "ingest.secret" . }} - key: INGESTER_RPC_CONFIG - optional: false - - name: INGESTER_MESSENGER_CONFIG - valueFrom: - secretKeyRef: - name: {{ include "ingest.secret" . }} - key: INGESTER_MESSENGER_CONFIG - optional: false - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image }}" - imagePullPolicy: {{ .Values.imagePullPolicy }} - readinessProbe: - exec: - command: - - echo - - "true" - livenessProbe: - exec: - command: - - echo - - "true" - resources: - {{- toYaml .Values.bg.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/helm/ingest/templates/deployment-load.yaml b/helm/ingest/templates/deployment-load.yaml deleted file mode 100644 index 917265339..000000000 --- a/helm/ingest/templates/deployment-load.yaml +++ /dev/null @@ -1,59 +0,0 @@ -{{- if .Values.generateLoad }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: load-generator - labels: - app: load -spec: - replicas: 1 - selector: - matchLabels: - app: load - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app: load - spec: - restartPolicy: Always - containers: - - name: load-gen - image: "{{.Values.load.image}}" - imagePullPolicy: {{ .Values.imagePullPolicy }} - env: - - name: SEED - value: {{.Values.load.seed}} - - name: NETWORK - value: {{.Values.load.network}} - - name: AMOUNT_OF_CHAOS - value: {{.Values.load.chaos | quote}} - - name: RPC_URL - value: {{.Values.load.rpc_url}} - readinessProbe: - initialDelaySeconds: 1 - failureThreshold: 30 - periodSeconds: 60 - exec: - command: - - echo - - "true" - livenessProbe: - initialDelaySeconds: 1 - failureThreshold: 30 - periodSeconds: 60 - exec: - command: - - echo - - "true" - resources: - requests: - memory: "128Mi" - cpu: "250m" - limits: - memory: "1024Mi" - cpu: "500m" -{{- end }} diff --git a/helm/ingest/templates/deployment.yaml b/helm/ingest/templates/deployment.yaml deleted file mode 100644 index 16fb4d049..000000000 --- a/helm/ingest/templates/deployment.yaml +++ /dev/null @@ -1,108 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "ingest.fullname" . }} - labels: - {{- include "ingest.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "ingest.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - ad.datadoghq.com/{{ .Chart.Name }}.logs: '[{"source":"ingester","service":"ingester","tags":"env:devnet"}]' - {{- end }} - labels: - {{- include "ingest.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "ingest.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - env: - - name: RUST_BACKTRACE - value: "1" - - name: RUST_LOG - value: "info" - - name: INGESTER_ENV - value: "{{ .Values.env }}" - - name: INGESTER_METRICS_HOST - value: 127.0.0.1 - - name: INGESTER_METRICS_PORT - value: "8125" - - name: INGESTER_ROLE - value: "Ingester" - - name: INGESTER_DATABASE_CONFIG - valueFrom: - secretKeyRef: - name: {{ include "ingest.secret" . }} - key: INGESTER_DATABASE_CONFIG - optional: false - - name: INGESTER_RPC_CONFIG - valueFrom: - secretKeyRef: - name: {{ include "ingest.secret" . }} - key: INGESTER_RPC_CONFIG - optional: false - - name: INGESTER_MESSENGER_CONFIG - valueFrom: - secretKeyRef: - name: {{ include "ingest.secret" . }} - key: INGESTER_MESSENGER_CONFIG - optional: false - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image }}" - imagePullPolicy: {{ .Values.imagePullPolicy }} - readinessProbe: - exec: - command: - - echo - - "true" - livenessProbe: - exec: - command: - - echo - - "true" - resources: - {{- toYaml .Values.resources | nindent 12 }} - - name: datadog - resources: - limits: - cpu: 1 - memory: 2048Mi - requests: - cpu: 500m - memory: 1024Mi - image: gcr.io/datadoghq/dogstatsd:latest - env: - - name: "DD_API_KEY" - value: "{{ .Values.metrics.data_dog_api_key }}" - ports: - - containerPort: 8125 - name: dogstatsdport - protocol: UDP - - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/helm/ingest/templates/hpa.yaml b/helm/ingest/templates/hpa.yaml deleted file mode 100644 index 04e1540b9..000000000 --- a/helm/ingest/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "ingest.fullname" . }} - labels: - {{- include "ingest.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "ingest.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/helm/ingest/templates/migrator-secret.yaml b/helm/ingest/templates/migrator-secret.yaml deleted file mode 100644 index 7d961cb14..000000000 --- a/helm/ingest/templates/migrator-secret.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "ingest.secret" . }}-migrator - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-weight": "-2" - "helm.sh/hook-delete-policy": hook-succeeded,hook-failed,before-hook-creation -data: - DATABASE_URL: {{ .Values.ingest.db_url | b64enc | quote }} diff --git a/helm/ingest/templates/migrator.yaml b/helm/ingest/templates/migrator.yaml deleted file mode 100644 index d5c5455aa..000000000 --- a/helm/ingest/templates/migrator.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "ingest.fullname" . }}-migrate - labels: - {{- include "ingest.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-weight": "2" - "helm.sh/hook-delete-policy": hook-succeeded,hook-failed,before-hook-creation -spec: - template: - metadata: - name: "{{.Release.Name}}" - labels: - app.kubernetes.io/managed-by: {{ .Release.Service | quote }} - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" - spec: - restartPolicy: Never - containers: - - name: migrator - image: "{{ .Values.migrator.image }}" - env: - - name: DATABASE_URL - valueFrom: - secretKeyRef: - name: {{ include "ingest.secret" . }}-migrator - key: DATABASE_URL - - diff --git a/helm/ingest/templates/secret.yaml b/helm/ingest/templates/secret.yaml deleted file mode 100644 index ea82296fe..000000000 --- a/helm/ingest/templates/secret.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "ingest.secret" . }} -data: - DATABASE_URL: {{ .Values.ingest.db_url | b64enc | quote }} - INGESTER_DATABASE_CONFIG: {{ ( printf "{listener_channel=\"backfill_item_added\", url=\"%s\"}" .Values.ingest.db_url ) | b64enc | quote }} - INGESTER_MESSENGER_CONFIG: {{ ( printf "{connection_config={batch_size=%d,idle_timeout=%d,message_wait_timeout=%d,redis_connection_str=%s}, messenger_type=\"Redis\"}" (mul .Values.ingest.batch_size 1) (mul .Values.ingest.idle_timeout 1 ) (mul .Values.ingest.message_wait_timeout 1 ) .Values.ingest.redis_url ) | b64enc | quote }} - INGESTER_RPC_CONFIG: {{ ( printf "{url=%s, commitment=\"finalized\"}" .Values.ingest.rpc_url ) | b64enc | quote }} - INGESTER_MAX_POSTGRES_CONNECTIONS: {{ (( printf "%d" (mul .Values.ingest.max_postgres_connections 1))) | b64enc | quote }} diff --git a/helm/ingest/templates/serviceaccount.yaml b/helm/ingest/templates/serviceaccount.yaml deleted file mode 100644 index c1c96ce30..000000000 --- a/helm/ingest/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "ingest.serviceAccountName" . }} - labels: - {{- include "ingest.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/helm/ingest/values.yaml b/helm/ingest/values.yaml deleted file mode 100644 index 9a783fb2b..000000000 --- a/helm/ingest/values.yaml +++ /dev/null @@ -1,92 +0,0 @@ -replicaCount: 1 -image: "" -migrator: - image: "" -imagePullPolicy: Always -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" -generateLoad: true -load: - image: "" - seed: - network: "devnet" - chaos: 1 - rpc_url: -ingest: - db_url: - redis_url: - rpc_url: - message_wait_timeout: 10 - batch_size: 100 - idle_timeout: 5000 - max_postgres_connections: 100 - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -resources: - limits: - cpu: 7 - memory: 4096Mi - requests: - cpu: 5 - memory: 1024Mi - -backfiller: - replicaCount: 1 - resources: - limits: - cpu: 2 - memory: 4096Mi - requests: - cpu: 2 - memory: 1024Mi - -bg: - replicaCount: 1 - resources: - limits: - cpu: 4 - memory: 4096Mi - requests: - cpu: 2 - memory: 1024Mi - -# need to shard consumer groups first -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 1 - targetCPUUtilizationPercentage: 90 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -metrics: - data_dog_api_key: - - diff --git a/nft_ingester/Cargo.toml b/nft_ingester/Cargo.toml index 8804ad9fe..fed2aadcd 100644 --- a/nft_ingester/Cargo.toml +++ b/nft_ingester/Cargo.toml @@ -9,52 +9,29 @@ serde_derive = "1.0.190" hex = "0.4.3" log = "0.4.17" env_logger = "0.10.0" -redis = { version = "0.22.3", features = ["aio", "tokio-comp", "streams", "tokio-native-tls-comp"] } -futures = { version = "0.3.25" } -futures-util = "0.3.27" -base64 = "0.21.0" thiserror = "1.0.31" serde_json = "1.0.81" tokio = { version = "1.26.0", features = ["full", "tracing"] } sqlx = { version = "0.6.2", features = ["macros", "runtime-tokio-rustls", "postgres", "uuid", "offline", "json"] } sea-orm = { version = "0.10.6", features = ["macros", "runtime-tokio-rustls", "sqlx-postgres", "with-chrono", "mock"] } -sea-query = { version = "0.28.1", features = ["postgres-array"] } chrono = "0.4.19" -tokio-postgres = "0.7.7" serde = "1.0.136" bs58 = "0.4.0" reqwest = "0.11.11" plerkle_messenger = { version = "1.5.2", features = ['redis'] } plerkle_serialization = { version = "1.5.2" } flatbuffers = "23.1.21" -lazy_static = "1.4.0" -regex = "1.5.5" mpl-bubblegum = { git = "https://github.com/metaplex-foundation/mpl-bubblegum.git", rev = "3cb3976d", features = ["no-entrypoint"] } spl-account-compression = "0.1.8" -spl-concurrent-merkle-tree = "0.1.3" -uuid = "1.0.0" -async-trait = "0.1.53" num-traits = "0.2.15" blockbuster = { git = "https://github.com/metaplex-foundation/blockbuster.git", rev = "552aba6a" } figment = { version = "0.10.6", features = ["env", "toml", "yaml"] } -cadence = "0.29.0" -cadence-macros = "0.29.0" solana-sdk = "~1.14" -solana-client = "~1.14" spl-token = { version = "3.5.0", features = ["no-entrypoint"] } solana-transaction-status = "~1.14" -solana-account-decoder = "~1.14" -solana-geyser-plugin-interface = { version = "~1.14" } -solana-sdk-macro = "~1.14" solana-storage-bigtable = "~1.14" solana-bigtable-connection = "1.10.31" -rand = "0.8.5" -rust-crypto = "0.2.36" -url = "2.3.1" -anchor-lang = "=0.26.0" -borsh = "0.9.1" stretto = { version = "0.7", features = ["async"] } -tokio-stream = "0.1.12" tokio-util = { version = "0.7.10", features = ["codec", "compat"] } tracing-subscriber = { version = "0.3.16", features = [ "json", @@ -67,21 +44,11 @@ metrics-utils = { path = "../metrics_utils" } rocks-db = { path = "../rocks-db" } postgre-client = { path = "../postgre-client" } digital_asset_types = { path = "../digital_asset_types", features = ["json_types", "sql_types"] } -tower-http = { version = "0.3.5", features = ["full"] } -tower = { version = "0.4.13", features = ["full"] } -hyper = "0.14.27" -open-rpc-derive = { version = "0.0.4" } open-rpc-schema = { version = "0.0.4" } schemars = "0.8.6" -schemars_derive = "0.8.6" jsonrpc-core = "18.0.0" jsonrpc-http-server = "18.0.0" libc = "0.2.144" -crossbeam-channel = "0.5.8" -jsonrpc-derive = "18.0.0" -jsonrpc-core-client = "18.0.0" -semver = "1.0.19" -mockall = "0.11.4" entities = { path = "../entities" } mpl-token-metadata = "1.13.2" diff --git a/nft_ingester/scripts/run_ingester.bash b/nft_ingester/scripts/run_ingester.bash index be907dbd3..4662a6923 100755 --- a/nft_ingester/scripts/run_ingester.bash +++ b/nft_ingester/scripts/run_ingester.bash @@ -33,6 +33,8 @@ export INGESTER_SLOT_UNTIL=0 export INGESTER_SLOT_START_FROM=236032212 export INGESTER_BIG_TABLE_CONFIG='{creds="./creds.json", timeout=1000}' +export ingester_synchronizer_batch_size=500 + cargo run --package nft_ingester --bin ingester # start with restore rocks DB #cargo run --package nft_ingester --bin ingester -- --restore-rocks-db diff --git a/nft_ingester/src/api/api_impl.rs b/nft_ingester/src/api/api_impl.rs index 8c0930c25..ad77c3407 100644 --- a/nft_ingester/src/api/api_impl.rs +++ b/nft_ingester/src/api/api_impl.rs @@ -11,6 +11,7 @@ use crate::api::{config::Config, validation::validate_pubkey}; use metrics_utils::ApiMetricsConfig; use rocks_db::Storage; use serde_json::{json, Value}; +use solana_sdk::pubkey::Pubkey; use { crate::api::*, sea_orm::{ConnectionTrait, DatabaseConnection, DbBackend, SqlxPostgresConnector, Statement}, @@ -203,7 +204,7 @@ impl DasApi { return Err(DasApiError::BatchSizeError(MAX_ITEMS_IN_BATCH_REQ)); } - let ids: Vec = payload + let ids: Vec = payload .ids .into_iter() .map(validate_pubkey) diff --git a/nft_ingester/src/api/mod.rs b/nft_ingester/src/api/mod.rs index 3bdbc98fd..cd441be1a 100644 --- a/nft_ingester/src/api/mod.rs +++ b/nft_ingester/src/api/mod.rs @@ -1,4 +1,3 @@ -use anchor_lang::solana_program::pubkey; use open_rpc_schema::schemars::JsonSchema; use serde::{Deserialize, Serialize}; diff --git a/nft_ingester/src/api/service.rs b/nft_ingester/src/api/service.rs index 1fe2cef5c..76113272d 100644 --- a/nft_ingester/src/api/service.rs +++ b/nft_ingester/src/api/service.rs @@ -1,7 +1,5 @@ use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; - -use cadence_macros::is_global_default_set; use log::{error, info}; use metrics_utils::utils::setup_metrics; @@ -9,7 +7,6 @@ use metrics_utils::{ApiMetricsConfig, MetricState, MetricsTrait}; use rocks_db::Storage; use {crate::api::DasApi, std::env, std::net::SocketAddr}; use { - crossbeam_channel::unbounded, jsonrpc_http_server::cors::AccessControlAllowHeaders, jsonrpc_http_server::{AccessControlAllowOrigin, DomainsValidation, ServerBuilder}, }; @@ -19,12 +16,6 @@ use crate::api::config::load_config; use crate::api::error::DasApiError; use crate::api::middleware::RpcRequestMiddleware; -pub fn safe_metric(f: F) { - if is_global_default_set() { - f() - } -} - pub const MAX_REQUEST_BODY_SIZE: usize = 50 * (1 << 10); // 50kB pub const RUNTIME_WORKER_THREAD_COUNT: usize = 2000; @@ -77,16 +68,7 @@ pub async fn start_api( .health_api(("/health", "health")) .start_http(&addr); - let (close_handle_sender, _close_handle_receiver) = unbounded(); - - if let Err(e) = server { - close_handle_sender.send(Err(e.to_string())).unwrap(); - panic!("{}", e); - } - let server = server.unwrap(); - close_handle_sender.send(Ok(server.close_handle())).unwrap(); - info!("API Server Started"); while keep_running.load(Ordering::SeqCst) { diff --git a/nft_ingester/src/bubblegum_updates_processor.rs b/nft_ingester/src/bubblegum_updates_processor.rs index 56a080143..2fb69e1d2 100644 --- a/nft_ingester/src/bubblegum_updates_processor.rs +++ b/nft_ingester/src/bubblegum_updates_processor.rs @@ -364,12 +364,12 @@ impl BubblegumTxProcessor { let asset_data = self.rocks_client.asset_dynamic_data.get(asset_id).unwrap(); if let Some(current_asset_data) = asset_data { - let mut new_asset_data = current_asset_data.clone(); + let mut new_asset_data = current_asset_data; new_asset_data.is_burnt = (bundle.slot, true); new_asset_data.supply = (bundle.slot, Some(0)); new_asset_data.seq = (bundle.slot, Some(cl.seq)); - if let Some(current_seq) = current_asset_data.seq.1 { + if let Some(current_seq) = new_asset_data.seq.1 { if current_seq < cl.seq { if let Err(e) = self .rocks_client @@ -755,7 +755,7 @@ impl BubblegumTxProcessor { let asset_data = self.rocks_client.asset_dynamic_data.get(id).unwrap(); if let Some(current_asset_data) = asset_data { - let mut new_asset_data = current_asset_data.clone(); + let mut new_asset_data = current_asset_data; new_asset_data.seq = (bundle.slot, None); new_asset_data.was_decompressed = (bundle.slot, true); @@ -841,7 +841,7 @@ impl BubblegumTxProcessor { let asset_data = self.rocks_client.asset_dynamic_data.get(id).unwrap(); if let Some(current_asset_data) = asset_data { - let mut new_asset_data = current_asset_data.clone(); + let mut new_asset_data = current_asset_data; new_asset_data.seq = (bundle.slot, Some(cl.seq)); for crt in new_asset_data.creators.1.iter_mut() { diff --git a/nft_ingester/src/db_v2.rs b/nft_ingester/src/db_v2.rs index d516f5f5d..a67dfd7a4 100644 --- a/nft_ingester/src/db_v2.rs +++ b/nft_ingester/src/db_v2.rs @@ -1,12 +1,12 @@ use std::collections::{HashMap, HashSet}; -use anchor_lang::prelude::Pubkey; use blockbuster::{ programs::bubblegum::Payload, token_metadata::state::{TokenStandard, UseMethod, Uses}, }; use mpl_bubblegum::state::leaf_schema::{LeafSchema, LeafSchemaEvent}; use num_traits::FromPrimitive; +use solana_sdk::pubkey::Pubkey; use spl_account_compression::events::ChangeLogEventV1; use sqlx::{ postgres::{PgConnectOptions, PgPoolOptions, Postgres}, diff --git a/nft_ingester/src/mplx_updates_processor.rs b/nft_ingester/src/mplx_updates_processor.rs index f12aef460..58228a10a 100644 --- a/nft_ingester/src/mplx_updates_processor.rs +++ b/nft_ingester/src/mplx_updates_processor.rs @@ -323,7 +323,7 @@ impl MplxAccsProcessor { let chain_data = json!(chain_data); models.asset_dynamic.push(AssetDynamicDetails { - pubkey: mint.clone(), + pubkey: mint, is_compressible: (metadata_info.slot, false), is_compressed: (metadata_info.slot, false), is_frozen: (metadata_info.slot, false), diff --git a/nft_ingester/src/token_updates_processor.rs b/nft_ingester/src/token_updates_processor.rs index 29bc7404b..f55e1a8fe 100644 --- a/nft_ingester/src/token_updates_processor.rs +++ b/nft_ingester/src/token_updates_processor.rs @@ -163,9 +163,9 @@ impl TokenAccsProcessor { for mint in mint_accs_to_save.iter() { let res = self.rocks_db.asset_dynamic_data.merge( - mint.pubkey.clone(), + mint.pubkey, &AssetDynamicDetails { - pubkey: mint.pubkey.clone(), + pubkey: mint.pubkey, supply: (mint.slot_updated as u64, Some(mint.supply as u64)), seq: (mint.slot_updated as u64, Some(mint.slot_updated as u64)), ..Default::default() @@ -183,7 +183,7 @@ impl TokenAccsProcessor { .inc_process("mint_update_supply", MetricStatus::SUCCESS); let upd_res = self .rocks_db - .asset_updated(mint.slot_updated as u64, mint.pubkey.clone()); + .asset_updated(mint.slot_updated as u64, mint.pubkey); if let Err(e) = upd_res { error!("Error while updating assets update idx: {}", e); diff --git a/postgre-client/src/asset_index_client.rs b/postgre-client/src/asset_index_client.rs index e40e7c65e..e2d6e25fd 100644 --- a/postgre-client/src/asset_index_client.rs +++ b/postgre-client/src/asset_index_client.rs @@ -74,7 +74,7 @@ impl AssetIndexStorage for PgClient { .flat_map(|asset_index| { asset_index.creators.iter().map(move |creator| { ( - asset_index.pubkey.clone(), + asset_index.pubkey, creator.clone(), asset_index.slot_updated, ) @@ -143,7 +143,7 @@ impl AssetIndexStorage for PgClient { .push_bind( asset_index .owner_type - .map(|owner_type| OwnerType::from(owner_type)), + .map(OwnerType::from), ) .push_bind(asset_index.owner.map(|owner| owner.to_bytes().to_vec())) .push_bind(asset_index.delegate.map(|k| k.to_bytes().to_vec())) diff --git a/rocks-db/src/asset.rs b/rocks-db/src/asset.rs index 18dcd34d1..db0c318bf 100644 --- a/rocks-db/src/asset.rs +++ b/rocks-db/src/asset.rs @@ -1,5 +1,4 @@ -use blockbuster::token_metadata::state::{TokenStandard, Uses}; -use bincode::deserialize; +use bincode::{deserialize, serialize}; use entities::enums::{SpecificationAssetClass, RoyaltyTargetType, OwnerType}; use log::{error, warn}; use rocksdb::MergeOperands; diff --git a/solana-test-validator-geyser-config/accountsdb-plugin-config.json b/solana-test-validator-geyser-config/accountsdb-plugin-config.json deleted file mode 100644 index 081789127..000000000 --- a/solana-test-validator-geyser-config/accountsdb-plugin-config.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "libpath": "/plugin/plugin.so", - "enable_metrics": true, - "metrics_port": 8125, - "metrics_uri": "graphite", - "env": "dev", - "accounts_selector" : { - "owners" : [ - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s", - "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", - "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", - "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", - "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY" - ] - }, - "transaction_selector" : { - "mentions" : [ - "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY" - ] - } -} From 8c3f7fc7110a09af2e1295e927c6a9908fa4fd62 Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 01:05:27 +0200 Subject: [PATCH 04/14] more fmt --- Makefile | 20 ++++------------ api.Dockerfile | 43 --------------------------------- backfiller.Dockerfile | 39 ------------------------------ docker-compose.yaml | 55 ------------------------------------------- load.Dockerfile | 34 -------------------------- 5 files changed, 4 insertions(+), 187 deletions(-) delete mode 100644 api.Dockerfile delete mode 100644 backfiller.Dockerfile delete mode 100644 load.Dockerfile diff --git a/Makefile b/Makefile index 0df235c70..02c72dc18 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,15 @@ -.PHONY: build start build-json-downloader start-json-downloader build-backfiller start-backfiller dev stop +.PHONY: build start dev stop SHELL := /bin/bash build: - @docker compose -f docker-compose.yaml build ingester-first-consumer ingester-second-consumer + @docker compose -f docker-compose.yaml build ingester-first-consumer start: - @docker compose -f docker-compose.yaml up -d ingester-first-consumer ingester-second-consumer - -build-json-downloader: - @docker compose -f docker-compose.yaml build - -start-json-downloader: - @docker compose -f docker-compose.yaml up -d - -build-backfiller: - @docker compose -f docker-compose.yaml build backfiller-consumer backfiller - -start-backfiller: - @docker compose -f docker-compose.yaml up -d backfiller-consumer backfiller + @docker compose -f docker-compose.yaml up -d ingester-first-consumer dev: @docker compose -f docker-compose.yaml up -d db stop: - @docker compose -f docker-compose.yaml stop ingester-first-consumer ingester-second-consumer backfiller + @docker compose -f docker-compose.yaml stop ingester-first-consumer diff --git a/api.Dockerfile b/api.Dockerfile deleted file mode 100644 index c0baa756a..000000000 --- a/api.Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM rust:1.70-bullseye AS chef -RUN cargo install cargo-chef -FROM chef AS planner -COPY das_api /rust/das_api/ -COPY nft_ingester /rust/nft_ingester/ -COPY digital_asset_types /rust/digital_asset_types/ -COPY aerospike-db /rust/aerospike-db/ -COPY metrics_utils /rust/metrics_utils -WORKDIR /rust/das_api -RUN cargo chef prepare --recipe-path recipe.json - -FROM chef AS builder -RUN apt-get update -y && \ - apt-get install -y build-essential make git -COPY digital_asset_types /rust/digital_asset_types -COPY nft_ingester /rust/nft_ingester -COPY aerospike-db /rust/aerospike-db -COPY metrics_utils /rust/metrics_utils -WORKDIR / -RUN mkdir -p /rust/das_api -WORKDIR /rust/das_api -COPY --from=planner /rust/das_api/recipe.json recipe.json -# Build dependencies - this is the caching Docker layer! -COPY das_api/Cargo.toml . -COPY das_api . -# Build application -RUN cargo build --release - -FROM rust:1.70-slim-bullseye -ARG APP=/usr/src/app -RUN apt update \ - && apt install -y curl ca-certificates tzdata \ - && rm -rf /var/lib/apt/lists/* -ENV TZ=Etc/UTC \ - APP_USER=appuser -RUN groupadd $APP_USER \ - && useradd -g $APP_USER $APP_USER \ - && mkdir -p ${APP} -COPY --from=builder /rust/das_api/target/release/das_api ${APP} -RUN chown -R $APP_USER:$APP_USER ${APP} -USER $APP_USER -WORKDIR ${APP} -CMD /usr/src/app/das_api diff --git a/backfiller.Dockerfile b/backfiller.Dockerfile deleted file mode 100644 index 0daa8d2c2..000000000 --- a/backfiller.Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# Initial stage: install cargo-chef -FROM rust:1.70-bullseye AS chef -RUN cargo install cargo-chef - -# Planning stage: determine dependencies -FROM chef AS planner -WORKDIR /rust -COPY Cargo.toml Cargo.toml -COPY nft_ingester ./nft_ingester -COPY digital_asset_types ./digital_asset_types -COPY das_api ./das_api -COPY metrics_utils ./metrics_utils -COPY rocks-db ./rocks-db -RUN cargo chef prepare --recipe-path recipe.json - -# Caching dependencies -FROM chef AS cacher -WORKDIR /rust -RUN apt update && apt install -y libclang-dev -COPY --from=planner /rust/recipe.json recipe.json -RUN cargo chef cook --release --recipe-path recipe.json - -# Building the services -FROM cacher AS builder -COPY . . -RUN cargo build --release --bin backfiller -RUN cargo build --release --bin backfiller_consumer - -# Final image -FROM rust:1.70-slim-bullseye -ARG APP=/usr/src/app -RUN apt update && apt install -y curl ca-certificates tzdata && rm -rf /var/lib/apt/lists/* -ENV TZ=Etc/UTC APP_USER=appuser -RUN groupadd $APP_USER && useradd -g $APP_USER $APP_USER && mkdir -p ${APP} - -COPY --from=builder /rust/target/release/backfiller ${APP}/backfiller -COPY --from=builder /rust/target/release/backfiller_consumer ${APP}/backfiller_consumer - -WORKDIR ${APP} \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 377ae7656..8e8639785 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -54,57 +54,6 @@ services: options: max-size: "2048m" - backfiller: - container_name: backfiller - restart: always - entrypoint: "./backfiller" - env_file: - - .env - depends_on: - - db - build: - context: . - dockerfile: backfiller.Dockerfile - volumes: - - ./creds.json:/usr/src/app/creds.json - logging: - options: - max-size: "2048m" - - backfiller-consumer: - container_name: backfiller-consumer - restart: always - entrypoint: "./backfiller_consumer" - env_file: - - .env - ports: - - "${INGESTER_BACKFILL_CONSUMER_METRICS_PORT}:${INGESTER_BACKFILL_CONSUMER_METRICS_PORT}" - depends_on: - - db - build: - context: . - dockerfile: backfiller.Dockerfile - logging: - options: - max-size: "2048m" - - bg_task_runner: - container_name: bg_task_runner - restart: always - entrypoint: "./bg_task_runner" - env_file: - - .env - ports: - - "${INGESTER_BG_TASK_RUNNER_METRICS_PORT}:${INGESTER_BG_TASK_RUNNER_METRICS_PORT}" - depends_on: - - db - build: - context: . - dockerfile: ingester.Dockerfile - logging: - options: - max-size: "2048m" - db: container_name: db image: 'postgres:14' @@ -121,7 +70,3 @@ services: logging: options: max-size: "100m" - -volumes: - grafana_data: { } - graphite_data: { } diff --git a/load.Dockerfile b/load.Dockerfile deleted file mode 100644 index 1335af606..000000000 --- a/load.Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -FROM rust:1.70-bullseye AS chef -RUN cargo install cargo-chef -FROM chef AS planner -COPY tests/load_generation /rust/load_generation/ -WORKDIR /rust/load_generation -RUN cargo chef prepare --recipe-path recipe.json -FROM chef AS builder -RUN apt-get update -y && \ - apt-get install -y build-essential make git -COPY tests/load_generation /rust/load_generation -RUN mkdir -p /rust/load_generation -WORKDIR /rust/load_generation -COPY --from=planner /rust/load_generation/recipe.json recipe.json -# Build dependencies - this is the caching Docker layer! -COPY tests/load_generation/Cargo.toml . -RUN cargo chef cook --release --recipe-path recipe.json -COPY tests/load_generation . -# Build application -RUN cargo build --release -FROM rust:1.63-slim-bullseye -ARG APP=/usr/src/app -RUN apt update \ - && apt install -y curl ca-certificates tzdata \ - && rm -rf /var/lib/apt/lists/* -ENV TZ=Etc/UTC \ - APP_USER=appuser -RUN groupadd $APP_USER \ - && useradd -g $APP_USER $APP_USER \ - && mkdir -p ${APP} -COPY --from=builder /rust/load_generation/target/release/load_generation ${APP} -RUN chown -R $APP_USER:$APP_USER ${APP} -USER $APP_USER -WORKDIR ${APP} -CMD /usr/src/app/load_generation From 9582fa386a475768dba795eb8eb7ddc93f046e96 Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 01:57:34 +0200 Subject: [PATCH 05/14] comments --- Cargo.lock | 2 +- digital_asset_types/src/dao/scopes/asset.rs | 28 ++--- nft_ingester/Cargo.toml | 8 +- nft_ingester/src/api/service.rs | 2 +- .../src/bubblegum_updates_processor.rs | 108 +++++++++--------- nft_ingester/src/index_syncronizer.rs | 2 +- nft_ingester/src/mplx_updates_processor.rs | 32 +++--- nft_ingester/src/token_updates_processor.rs | 8 +- postgre-client/src/asset_index_client.rs | 8 +- postgre-client/src/storage_traits.rs | 2 +- .../tests/asset_filter_client_test.rs | 12 +- rocks-db/src/asset.rs | 59 +++++++--- rocks-db/src/batch_client.rs | 49 ++++---- 13 files changed, 173 insertions(+), 147 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc7a5869d..0b35abc42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3131,9 +3131,9 @@ dependencies = [ "libc", "log", "metrics-utils", + "mockall 0.11.4", "mpl-bubblegum", "mpl-token-metadata", - "num-integer", "num-traits", "open-rpc-schema", "plerkle_messenger", diff --git a/digital_asset_types/src/dao/scopes/asset.rs b/digital_asset_types/src/dao/scopes/asset.rs index b093a8350..9f125e59d 100644 --- a/digital_asset_types/src/dao/scopes/asset.rs +++ b/digital_asset_types/src/dao/scopes/asset.rs @@ -363,7 +363,7 @@ fn convert_rocks_offchain_data( let ch_data: serde_json::Value = serde_json::from_str( dynamic_data .onchain_data - .1 + .value .clone() .unwrap_or_default() .as_ref(), @@ -377,7 +377,7 @@ fn convert_rocks_offchain_data( metadata_url: offchain_data.url.clone(), metadata_mutability: Mutability::Immutable, metadata: Json::from_str(metadata.as_str()).map_err(|e| DbErr::Custom(e.to_string()))?, - slot_updated: 0, // TODO + slot_updated: dynamic_data.get_slot_updated() as i64, reindex: None, }) } @@ -412,7 +412,7 @@ fn convert_rocks_asset_model( let slot_updated = vec![owner.slot_updated, leaf.slot_updated] .into_iter() .max() - .unwrap(); // unwrap here is save, because vec is not empty + .unwrap(); // unwrap here is safe, because vec is not empty Ok(asset::Model { id: static_data.pubkey.to_bytes().to_vec(), @@ -422,30 +422,30 @@ fn convert_rocks_asset_model( owner: Some(owner.owner.to_bytes().to_vec()), owner_type: owner.owner_type.into(), delegate: owner.delegate.map(|pk| pk.to_bytes().to_vec()), - frozen: dynamic_data.is_frozen.1, + frozen: dynamic_data.is_frozen.value, supply: dynamic_data .supply - .1 + .value .map(|supply| supply as i64) .unwrap_or_default(), supply_mint: Some(static_data.pubkey.to_bytes().to_vec()), - compressed: dynamic_data.is_compressed.1, - compressible: dynamic_data.is_compressible.1, - seq: dynamic_data.seq.1.and_then(|u| u.try_into().ok()), + compressed: dynamic_data.is_compressed.value, + compressible: dynamic_data.is_compressible.value, + seq: dynamic_data.seq.value.and_then(|u| u.try_into().ok()), tree_id, leaf: leaf.leaf.clone(), nonce: leaf.nonce.map(|nonce| nonce as i64), royalty_target_type: static_data.royalty_target_type.into(), royalty_target: None, // TODO - royalty_amount: dynamic_data.royalty_amount.1 as i32, + royalty_amount: dynamic_data.royalty_amount.value as i32, asset_data: Some(static_data.pubkey.to_bytes().to_vec()), - burnt: dynamic_data.is_burnt.1, + burnt: dynamic_data.is_burnt.value, created_at: Some(static_data.created_at), slot_updated: Some(slot_updated as i64), data_hash: leaf.data_hash.map(|h| h.to_string()), creator_hash: leaf.creator_hash.map(|h| h.to_string()), owner_delegate_seq: owner.owner_delegate_seq.map(|seq| seq as i64), - was_decompressed: dynamic_data.was_decompressed.1, + was_decompressed: dynamic_data.was_decompressed.value, leaf_seq: leaf.leaf_seq.map(|seq| seq as i64), }) } @@ -551,7 +551,7 @@ fn convert_rocks_creators_model( dynamic_data .creators - .1 + .value .iter() .enumerate() .map(|(position, creator)| asset_creators::Model { @@ -560,8 +560,8 @@ fn convert_rocks_creators_model( creator: creator.creator.to_bytes().to_vec(), share: creator.creator_share as i32, verified: creator.creator_verified, - seq: Some(0), // TODO - slot_updated: Some(0), // TODO + seq: dynamic_data.seq.value.map(|seq| seq as i64), + slot_updated: Some(dynamic_data.get_slot_updated() as i64), position: position as i16, }) .collect::>() diff --git a/nft_ingester/Cargo.toml b/nft_ingester/Cargo.toml index fed2aadcd..4652a9823 100644 --- a/nft_ingester/Cargo.toml +++ b/nft_ingester/Cargo.toml @@ -49,16 +49,10 @@ schemars = "0.8.6" jsonrpc-core = "18.0.0" jsonrpc-http-server = "18.0.0" libc = "0.2.144" +mockall = "0.11.4" entities = { path = "../entities" } mpl-token-metadata = "1.13.2" -[dev-dependencies] -tokio = { version = "1.35.0", features = ["macros", "test-util"] } - -[dependencies.num-integer] -version = "0.1.44" -default-features = false - [dependencies.utils] version = "0.1.8" git = "https://github.com/extrnode/solana-geyser-zmq" diff --git a/nft_ingester/src/api/service.rs b/nft_ingester/src/api/service.rs index 76113272d..46c5b8305 100644 --- a/nft_ingester/src/api/service.rs +++ b/nft_ingester/src/api/service.rs @@ -1,6 +1,6 @@ +use log::{error, info}; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; -use log::{error, info}; use metrics_utils::utils::setup_metrics; use metrics_utils::{ApiMetricsConfig, MetricState, MetricsTrait}; diff --git a/nft_ingester/src/bubblegum_updates_processor.rs b/nft_ingester/src/bubblegum_updates_processor.rs index 2fb69e1d2..9527841c0 100644 --- a/nft_ingester/src/bubblegum_updates_processor.rs +++ b/nft_ingester/src/bubblegum_updates_processor.rs @@ -15,10 +15,10 @@ use metrics_utils::IngesterMetricsConfig; use mpl_bubblegum::state::leaf_schema::LeafSchema; use mpl_bubblegum::InstructionName; use plerkle_serialization::{Pubkey as FBPubkey, TransactionInfo}; -use rocks_db::asset::AssetOwner; use rocks_db::asset::{ AssetAuthority, AssetCollection, AssetDynamicDetails, AssetLeaf, AssetStaticDetails, }; +use rocks_db::asset::{AssetOwner, Updated}; use serde_json::json; use solana_sdk::hash::Hash; use solana_sdk::pubkey::Pubkey; @@ -365,11 +365,11 @@ impl BubblegumTxProcessor { let asset_data = self.rocks_client.asset_dynamic_data.get(asset_id).unwrap(); if let Some(current_asset_data) = asset_data { let mut new_asset_data = current_asset_data; - new_asset_data.is_burnt = (bundle.slot, true); - new_asset_data.supply = (bundle.slot, Some(0)); - new_asset_data.seq = (bundle.slot, Some(cl.seq)); + new_asset_data.is_burnt = Updated::new(bundle.slot, true); + new_asset_data.supply = Updated::new(bundle.slot, Some(0)); + new_asset_data.seq = Updated::new(bundle.slot, Some(cl.seq)); - if let Some(current_seq) = new_asset_data.seq.1 { + if let Some(current_seq) = new_asset_data.seq.value { if current_seq < cl.seq { if let Err(e) = self .rocks_client @@ -389,16 +389,16 @@ impl BubblegumTxProcessor { } else { let new_asset_data = AssetDynamicDetails { pubkey: asset_id, - is_compressible: (bundle.slot, false), - is_compressed: (bundle.slot, true), - is_frozen: (bundle.slot, false), - supply: (bundle.slot, Some(0)), - seq: (bundle.slot, Some(cl.seq)), - is_burnt: (bundle.slot, true), - was_decompressed: (bundle.slot, false), - onchain_data: (bundle.slot, None), - creators: (bundle.slot, vec![]), - royalty_amount: (bundle.slot, 0), + is_compressible: Updated::new(bundle.slot, false), + is_compressed: Updated::new(bundle.slot, true), + is_frozen: Updated::new(bundle.slot, false), + supply: Updated::new(bundle.slot, Some(0)), + seq: Updated::new(bundle.slot, Some(cl.seq)), + is_burnt: Updated::new(bundle.slot, true), + was_decompressed: Updated::new(bundle.slot, false), + onchain_data: Updated::new(bundle.slot, None), + creators: Updated::new(bundle.slot, vec![]), + royalty_amount: Updated::new(bundle.slot, 0), }; if let Err(e) = self .rocks_client @@ -541,16 +541,16 @@ impl BubblegumTxProcessor { let asset_dynamic_details = AssetDynamicDetails { pubkey: id, - is_compressible: (bundle.slot, false), - is_compressed: (bundle.slot, true), - is_frozen: (bundle.slot, false), - supply: (bundle.slot, Some(1)), - seq: (bundle.slot, Some(cl.seq)), - is_burnt: (bundle.slot, false), - was_decompressed: (bundle.slot, false), - onchain_data: (bundle.slot, Some(chain_data.to_string())), - creators: (bundle.slot, creators), - royalty_amount: (bundle.slot, args.seller_fee_basis_points), + is_compressible: Updated::new(bundle.slot, false), + is_compressed: Updated::new(bundle.slot, true), + is_frozen: Updated::new(bundle.slot, false), + supply: Updated::new(bundle.slot, Some(1)), + seq: Updated::new(bundle.slot, Some(cl.seq)), + is_burnt: Updated::new(bundle.slot, false), + was_decompressed: Updated::new(bundle.slot, false), + onchain_data: Updated::new(bundle.slot, Some(chain_data.to_string())), + creators: Updated::new(bundle.slot, creators), + royalty_amount: Updated::new(bundle.slot, args.seller_fee_basis_points), }; if let Err(e) = self @@ -756,25 +756,29 @@ impl BubblegumTxProcessor { let asset_data = self.rocks_client.asset_dynamic_data.get(id).unwrap(); if let Some(current_asset_data) = asset_data { let mut new_asset_data = current_asset_data; - new_asset_data.seq = (bundle.slot, None); - new_asset_data.was_decompressed = (bundle.slot, true); + new_asset_data.seq = Updated::new(bundle.slot, None); + new_asset_data.was_decompressed = Updated::new(bundle.slot, true); - if let Err(e) = self.rocks_client.asset_dynamic_data.put(id, &new_asset_data) { + if let Err(e) = self + .rocks_client + .asset_dynamic_data + .put(id, &new_asset_data) + { error!("Error while saving asset data for cNFT: {}", e); }; } else { let new_asset_data = AssetDynamicDetails { pubkey: id, - is_compressible: (bundle.slot, true), - is_compressed: (bundle.slot, false), - is_frozen: (bundle.slot, false), - supply: (bundle.slot, Some(1)), - seq: (bundle.slot, None), - is_burnt: (bundle.slot, false), - was_decompressed: (bundle.slot, true), - onchain_data: (bundle.slot, None), - creators: (bundle.slot, vec![]), - royalty_amount: (bundle.slot, 0), + is_compressible: Updated::new(bundle.slot, true), + is_compressed: Updated::new(bundle.slot, false), + is_frozen: Updated::new(bundle.slot, false), + supply: Updated::new(bundle.slot, Some(1)), + seq: Updated::new(bundle.slot, None), + is_burnt: Updated::new(bundle.slot, false), + was_decompressed: Updated::new(bundle.slot, true), + onchain_data: Updated::new(bundle.slot, None), + creators: Updated::new(bundle.slot, vec![]), + royalty_amount: Updated::new(bundle.slot, 0), }; if let Err(e) = self .rocks_client @@ -842,9 +846,9 @@ impl BubblegumTxProcessor { let asset_data = self.rocks_client.asset_dynamic_data.get(id).unwrap(); if let Some(current_asset_data) = asset_data { let mut new_asset_data = current_asset_data; - new_asset_data.seq = (bundle.slot, Some(cl.seq)); + new_asset_data.seq = Updated::new(bundle.slot, Some(cl.seq)); - for crt in new_asset_data.creators.1.iter_mut() { + for crt in new_asset_data.creators.value.iter_mut() { if crt.creator == *creator { crt.creator_verified = *verify; } @@ -866,16 +870,16 @@ impl BubblegumTxProcessor { let new_asset_data = AssetDynamicDetails { pubkey: id, - is_compressible: (bundle.slot, false), - is_compressed: (bundle.slot, true), - is_frozen: (bundle.slot, false), - supply: (bundle.slot, Some(1)), - seq: (bundle.slot, Some(cl.seq)), - is_burnt: (bundle.slot, false), - was_decompressed: (bundle.slot, false), - onchain_data: (bundle.slot, None), - creators: (bundle.slot, vec![creator]), - royalty_amount: (bundle.slot, 0), + is_compressible: Updated::new(bundle.slot, false), + is_compressed: Updated::new(bundle.slot, true), + is_frozen: Updated::new(bundle.slot, false), + supply: Updated::new(bundle.slot, Some(1)), + seq: Updated::new(bundle.slot, Some(cl.seq)), + is_burnt: Updated::new(bundle.slot, false), + was_decompressed: Updated::new(bundle.slot, false), + onchain_data: Updated::new(bundle.slot, None), + creators: Updated::new(bundle.slot, vec![creator]), + royalty_amount: Updated::new(bundle.slot, 0), }; if let Err(e) = self .rocks_client @@ -969,9 +973,7 @@ fn use_method_from_mpl_bubblegum_state( value: &mpl_bubblegum::state::metaplex_adapter::UseMethod, ) -> entities::enums::UseMethod { match value { - mpl_bubblegum::state::metaplex_adapter::UseMethod::Burn => { - entities::enums::UseMethod::Burn - } + mpl_bubblegum::state::metaplex_adapter::UseMethod::Burn => entities::enums::UseMethod::Burn, mpl_bubblegum::state::metaplex_adapter::UseMethod::Multiple => { entities::enums::UseMethod::Multiple } diff --git a/nft_ingester/src/index_syncronizer.rs b/nft_ingester/src/index_syncronizer.rs index 406159c52..91fc8e2d9 100644 --- a/nft_ingester/src/index_syncronizer.rs +++ b/nft_ingester/src/index_syncronizer.rs @@ -117,9 +117,9 @@ where #[cfg(test)] mod tests { use super::*; + use entities::models::AssetIndex; use mockall; use postgre_client::storage_traits::MockAssetIndexStorage as MockIndexStorage; - use entities::models::AssetIndex; use rocks_db::storage_traits::MockAssetIndexStorage as MockPrimaryStorage; use std::collections::HashMap; use tokio; diff --git a/nft_ingester/src/mplx_updates_processor.rs b/nft_ingester/src/mplx_updates_processor.rs index 58228a10a..6b7d251b6 100644 --- a/nft_ingester/src/mplx_updates_processor.rs +++ b/nft_ingester/src/mplx_updates_processor.rs @@ -10,7 +10,9 @@ use tokio::time::Instant; use entities::enums::{RoyaltyTargetType, SpecificationAssetClass}; use entities::models::{ChainDataV1, Creator, Uses}; use metrics_utils::{IngesterMetricsConfig, MetricStatus}; -use rocks_db::asset::{AssetAuthority, AssetCollection, AssetDynamicDetails, AssetStaticDetails}; +use rocks_db::asset::{ + AssetAuthority, AssetCollection, AssetDynamicDetails, AssetStaticDetails, Updated, +}; use rocks_db::columns::Mint; use rocks_db::Storage; @@ -161,13 +163,13 @@ impl MplxAccsProcessor { is_compressible: existing_value.is_compressible, is_compressed: existing_value.is_compressed, is_frozen: existing_value.is_frozen, - supply: asset.supply, - seq: asset.seq, + supply: asset.supply.clone(), + seq: asset.seq.clone(), is_burnt: existing_value.is_burnt, was_decompressed: existing_value.was_decompressed, onchain_data: asset.onchain_data.clone(), creators: asset.creators.clone(), - royalty_amount: asset.royalty_amount, + royalty_amount: asset.royalty_amount.clone(), } } else { asset.clone() @@ -189,7 +191,7 @@ impl MplxAccsProcessor { let upd_res = self .rocks_db - .asset_updated(0, asset.pubkey); // TODO + .asset_updated(asset.get_slot_updated(), asset.pubkey); if let Err(e) = upd_res { error!("Error while updating assets update idx: {}", e); @@ -324,15 +326,15 @@ impl MplxAccsProcessor { models.asset_dynamic.push(AssetDynamicDetails { pubkey: mint, - is_compressible: (metadata_info.slot, false), - is_compressed: (metadata_info.slot, false), - is_frozen: (metadata_info.slot, false), - supply: (metadata_info.slot, supply), - seq: (metadata_info.slot, None), - is_burnt: (metadata_info.slot, false), - was_decompressed: (metadata_info.slot, false), - onchain_data: (metadata_info.slot, Some(chain_data.to_string())), - creators: ( + is_compressible: Updated::new(metadata_info.slot, false), + is_compressed: Updated::new(metadata_info.slot, false), + is_frozen: Updated::new(metadata_info.slot, false), + supply: Updated::new(metadata_info.slot, supply), + seq: Updated::new(metadata_info.slot, None), + is_burnt: Updated::new(metadata_info.slot, false), + was_decompressed: Updated::new(metadata_info.slot, false), + onchain_data: Updated::new(metadata_info.slot, Some(chain_data.to_string())), + creators: Updated::new( metadata_info.slot, data.clone() .creators @@ -345,7 +347,7 @@ impl MplxAccsProcessor { }) .collect(), ), - royalty_amount: (metadata_info.slot, data.seller_fee_basis_points), + royalty_amount: Updated::new(metadata_info.slot, data.seller_fee_basis_points), }); models.tasks.push(Task { diff --git a/nft_ingester/src/token_updates_processor.rs b/nft_ingester/src/token_updates_processor.rs index f55e1a8fe..ff68ccf4e 100644 --- a/nft_ingester/src/token_updates_processor.rs +++ b/nft_ingester/src/token_updates_processor.rs @@ -1,13 +1,13 @@ use crate::buffer::Buffer; use crate::db_v2::DBClient; +use entities::enums::OwnerType; use log::error; use metrics_utils::{IngesterMetricsConfig, MetricStatus}; -use rocks_db::asset::{AssetDynamicDetails, AssetOwner}; +use rocks_db::asset::{AssetDynamicDetails, AssetOwner, Updated}; use rocks_db::Storage; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use tokio::time::Instant; -use entities::enums::OwnerType; pub const BUFFER_PROCESSING_COUNTER: i32 = 10; @@ -166,8 +166,8 @@ impl TokenAccsProcessor { mint.pubkey, &AssetDynamicDetails { pubkey: mint.pubkey, - supply: (mint.slot_updated as u64, Some(mint.supply as u64)), - seq: (mint.slot_updated as u64, Some(mint.slot_updated as u64)), + supply: Updated::new(mint.slot_updated as u64, Some(mint.supply as u64)), + seq: Updated::new(mint.slot_updated as u64, Some(mint.slot_updated as u64)), ..Default::default() }, ); diff --git a/postgre-client/src/asset_index_client.rs b/postgre-client/src/asset_index_client.rs index e2d6e25fd..b50c4f116 100644 --- a/postgre-client/src/asset_index_client.rs +++ b/postgre-client/src/asset_index_client.rs @@ -1,8 +1,8 @@ use std::collections::{HashMap, HashSet}; use async_trait::async_trait; -use sqlx::{Postgres, QueryBuilder}; use solana_sdk::pubkey::Pubkey; +use sqlx::{Postgres, QueryBuilder}; use crate::{ model::{OwnerType, RoyaltyTargetType, SpecificationAssetClass, SpecificationVersions}, @@ -140,11 +140,7 @@ impl AssetIndexStorage for PgClient { .push_bind(RoyaltyTargetType::from(asset_index.royalty_target_type)) .push_bind(asset_index.royalty_amount) .push_bind(asset_index.slot_created) - .push_bind( - asset_index - .owner_type - .map(OwnerType::from), - ) + .push_bind(asset_index.owner_type.map(OwnerType::from)) .push_bind(asset_index.owner.map(|owner| owner.to_bytes().to_vec())) .push_bind(asset_index.delegate.map(|k| k.to_bytes().to_vec())) .push_bind(asset_index.authority.map(|k| k.to_bytes().to_vec())) diff --git a/postgre-client/src/storage_traits.rs b/postgre-client/src/storage_traits.rs index bfc9dbc41..148d5f1b3 100644 --- a/postgre-client/src/storage_traits.rs +++ b/postgre-client/src/storage_traits.rs @@ -1,6 +1,6 @@ use crate::model::{AssetSortedIndex, AssetSorting, SearchAssetsFilter}; -use entities::models::AssetIndex; use async_trait::async_trait; +use entities::models::AssetIndex; use mockall::automock; #[automock] diff --git a/postgre-client/tests/asset_filter_client_test.rs b/postgre-client/tests/asset_filter_client_test.rs index f64bb9214..e96822590 100644 --- a/postgre-client/tests/asset_filter_client_test.rs +++ b/postgre-client/tests/asset_filter_client_test.rs @@ -79,13 +79,13 @@ mod tests { let filter = SearchAssetsFilter { specification_version: Some(ref_value.specification_version.into()), specification_asset_class: Some(ref_value.specification_asset_class.into()), - owner_address: ref_value.owner.map(|k|k.to_bytes().to_vec()), - owner_type: ref_value.owner_type.map(|k|k.into()), + owner_address: ref_value.owner.map(|k| k.to_bytes().to_vec()), + owner_type: ref_value.owner_type.map(|k| k.into()), creator_address: Some(ref_value.creators[0].creator.to_bytes().to_vec()), creator_verified: Some(ref_value.creators[0].creator_verified), - authority_address: ref_value.authority.map(|k|k.to_bytes().to_vec()), - collection: ref_value.collection.map(|k|k.to_bytes().to_vec()), - delegate: ref_value.delegate.map(|k|k.to_bytes().to_vec()), + authority_address: ref_value.authority.map(|k| k.to_bytes().to_vec()), + collection: ref_value.collection.map(|k| k.to_bytes().to_vec()), + delegate: ref_value.delegate.map(|k| k.to_bytes().to_vec()), frozen: Some(ref_value.is_frozen), supply: Some(ref_value.supply as u64), supply_mint: Some(ref_value.pubkey.to_bytes().to_vec()), @@ -112,7 +112,7 @@ mod tests { let filter = SearchAssetsFilter { specification_version: Some(ref_value.specification_version.into()), specification_asset_class: Some(ref_value.specification_asset_class.into()), - owner_type: ref_value.owner_type.map(|k|k.into()), + owner_type: ref_value.owner_type.map(|k| k.into()), ..Default::default() }; let limit = 5; diff --git a/rocks-db/src/asset.rs b/rocks-db/src/asset.rs index db0c318bf..a35509e88 100644 --- a/rocks-db/src/asset.rs +++ b/rocks-db/src/asset.rs @@ -1,5 +1,5 @@ use bincode::{deserialize, serialize}; -use entities::enums::{SpecificationAssetClass, RoyaltyTargetType, OwnerType}; +use entities::enums::{OwnerType, RoyaltyTargetType, SpecificationAssetClass}; use log::{error, warn}; use rocksdb::MergeOperands; use serde::{Deserialize, Serialize}; @@ -20,19 +20,34 @@ pub struct AssetStaticDetails { pub created_at: i64, } +#[derive(Serialize, Deserialize, Debug, Clone, Default)] +pub struct Updated { + pub slot_updated: u64, + pub value: T, +} + +impl Updated { + pub fn new(slot_updated: u64, value: T) -> Self { + Self { + slot_updated, + value, + } + } +} + #[derive(Serialize, Deserialize, Debug, Clone, Default)] pub struct AssetDynamicDetails { pub pubkey: Pubkey, - pub is_compressible: (u64, bool), - pub is_compressed: (u64, bool), - pub is_frozen: (u64, bool), - pub supply: (u64, Option), - pub seq: (u64, Option), - pub is_burnt: (u64, bool), - pub was_decompressed: (u64, bool), - pub onchain_data: (u64, Option), - pub creators: (u64, Vec), - pub royalty_amount: (u64, u16), + pub is_compressible: Updated, + pub is_compressed: Updated, + pub is_frozen: Updated, + pub supply: Updated>, + pub seq: Updated>, + pub is_burnt: Updated, + pub was_decompressed: Updated, + pub onchain_data: Updated>, + pub creators: Updated>, + pub royalty_amount: Updated, } #[derive(Serialize, Deserialize, Debug, Default, Clone)] @@ -165,8 +180,8 @@ impl AssetDynamicDetails { } } - fn update_field(current: &mut (u64, T), new: &(u64, T)) { - if new.0 > current.0 { + fn update_field(current: &mut Updated, new: &Updated) { + if new.slot_updated > current.slot_updated { *current = new.clone(); } } @@ -199,6 +214,24 @@ impl AssetDynamicDetails { result.and_then(|result| serialize(&result).ok()) } + + pub fn get_slot_updated(&self) -> u64 { + [ + self.is_compressible.slot_updated, + self.is_compressed.slot_updated, + self.is_frozen.slot_updated, + self.supply.slot_updated, + self.seq.slot_updated, + self.is_burnt.slot_updated, + self.was_decompressed.slot_updated, + self.onchain_data.slot_updated, + self.creators.slot_updated, + self.royalty_amount.slot_updated, + ] + .into_iter() + .max() + .unwrap() // unwrap here is safe, because vec is not empty + } } impl AssetAuthority { diff --git a/rocks-db/src/batch_client.rs b/rocks-db/src/batch_client.rs index 72da6e3d5..7e43b5a07 100644 --- a/rocks-db/src/batch_client.rs +++ b/rocks-db/src/batch_client.rs @@ -102,32 +102,31 @@ impl AssetIndexReader for Storage { } for dynamic_info in asset_dynamic_details.iter().flatten() { - if let Some(existed_index) = asset_indexes.get_mut(&dynamic_info.pubkey) { - existed_index.is_compressible = dynamic_info.is_compressible.1; - existed_index.is_compressed = dynamic_info.is_compressed.1; - existed_index.is_frozen = dynamic_info.is_frozen.1; - existed_index.supply = dynamic_info.supply.1.map_or(0, |s| s as i64); - existed_index.is_burnt = dynamic_info.is_burnt.1; - existed_index.creators = dynamic_info.creators.clone().1; - existed_index.royalty_amount = dynamic_info.royalty_amount.1 as i64; - existed_index.slot_updated = 0; // TODO - } else { - let asset_index = AssetIndex { - pubkey: dynamic_info.pubkey, - is_compressible: dynamic_info.is_compressible.1, - is_compressed: dynamic_info.is_compressed.1, - is_frozen: dynamic_info.is_frozen.1, - supply: dynamic_info.supply.1.map_or(0, |s| s as i64), - is_burnt: dynamic_info.is_burnt.1, - creators: dynamic_info.creators.clone().1, - royalty_amount: dynamic_info.royalty_amount.1 as i64, - slot_updated: 0, // TODO - ..Default::default() - }; - - asset_indexes.insert(asset_index.pubkey, asset_index); - } + if let Some(existed_index) = asset_indexes.get_mut(&dynamic_info.pubkey) { + existed_index.is_compressible = dynamic_info.is_compressible.value; + existed_index.is_compressed = dynamic_info.is_compressed.value; + existed_index.is_frozen = dynamic_info.is_frozen.value; + existed_index.supply = dynamic_info.supply.value.map_or(0, |s| s as i64); + existed_index.is_burnt = dynamic_info.is_burnt.value; + existed_index.creators = dynamic_info.creators.clone().value; + existed_index.royalty_amount = dynamic_info.royalty_amount.value as i64; + existed_index.slot_updated = dynamic_info.get_slot_updated() as i64; + } else { + let asset_index = AssetIndex { + pubkey: dynamic_info.pubkey, + is_compressible: dynamic_info.is_compressible.value, + is_compressed: dynamic_info.is_compressed.value, + is_frozen: dynamic_info.is_frozen.value, + supply: dynamic_info.supply.value.map_or(0, |s| s as i64), + is_burnt: dynamic_info.is_burnt.value, + creators: dynamic_info.creators.clone().value, + royalty_amount: dynamic_info.royalty_amount.value as i64, + slot_updated: dynamic_info.get_slot_updated() as i64, + ..Default::default() + }; + asset_indexes.insert(asset_index.pubkey, asset_index); + } } for data in asset_authority_details.iter().flatten() { From 280b4eaca04eceb10cbb702ad539e89ff734d128 Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 03:06:25 +0200 Subject: [PATCH 06/14] add gapfilling --- Cargo.lock | 41 +-------- digital_asset_types/Cargo.toml | 12 --- digital_asset_types/src/dao/scopes/asset.rs | 10 +-- entities/src/enums.rs | 3 +- entities/src/models.rs | 2 +- nft_ingester/Cargo.toml | 1 - .../src/bubblegum_updates_processor.rs | 36 ++++---- nft_ingester/src/gapfiller.rs | 90 +++++++++++++++++++ nft_ingester/src/lib.rs | 1 + nft_ingester/src/token_updates_processor.rs | 9 +- rocks-db/src/asset.rs | 79 ++++++++-------- rocks-db/src/batch_client.rs | 18 ++-- 12 files changed, 174 insertions(+), 128 deletions(-) create mode 100644 nft_ingester/src/gapfiller.rs diff --git a/Cargo.lock b/Cargo.lock index 0b35abc42..f46f9b325 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1470,33 +1470,21 @@ dependencies = [ name = "digital_asset_types" version = "0.7.2" dependencies = [ - "async-trait", "blockbuster", - "borsh 0.9.3", - "borsh-derive 0.9.3", "bs58 0.4.0", "entities", - "futures", - "hex", - "indexmap 1.9.3", "jsonpath_lib", "log", "mime_guess", - "num-derive", - "num-traits", "postgre-client", - "reqwest", "rocks-db", "schemars", - "schemars_derive", "sea-orm", - "sea-query 0.28.5", "serde", "serde_json", "solana-sdk", "spl-concurrent-merkle-tree", "thiserror", - "tokio", "url", ] @@ -3125,7 +3113,6 @@ dependencies = [ "env_logger 0.10.0", "figment", "flatbuffers", - "hex", "jsonrpc-core", "jsonrpc-http-server", "libc", @@ -4512,7 +4499,7 @@ dependencies = [ "ouroboros", "rust_decimal", "sea-orm-macros", - "sea-query 0.27.2", + "sea-query", "sea-query-binder", "sea-strum", "serde", @@ -4546,21 +4533,12 @@ checksum = "a4f0fc4d8e44e1d51c739a68d336252a18bc59553778075d5e32649be6ec92ed" dependencies = [ "chrono", "rust_decimal", - "sea-query-derive 0.2.0", + "sea-query-derive", "serde_json", "time 0.3.29", "uuid", ] -[[package]] -name = "sea-query" -version = "0.28.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbab99b8cd878ab7786157b7eb8df96333a6807cc6e45e8888c85b51534b401a" -dependencies = [ - "sea-query-derive 0.3.0", -] - [[package]] name = "sea-query-binder" version = "0.2.2" @@ -4569,7 +4547,7 @@ checksum = "9c2585b89c985cfacfe0ec9fc9e7bb055b776c1a2581c4e3c6185af2b8bf8865" dependencies = [ "chrono", "rust_decimal", - "sea-query 0.27.2", + "sea-query", "serde_json", "sqlx", "time 0.3.29", @@ -4589,19 +4567,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sea-query-derive" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63f62030c60f3a691f5fe251713b4e220b306e50a71e1d6f9cce1f24bb781978" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 1.0.109", - "thiserror", -] - [[package]] name = "sea-strum" version = "0.23.0" diff --git a/digital_asset_types/Cargo.toml b/digital_asset_types/Cargo.toml index 2005c204a..d74f308ac 100644 --- a/digital_asset_types/Cargo.toml +++ b/digital_asset_types/Cargo.toml @@ -12,29 +12,17 @@ sql_types = ["sea-orm"] [dependencies] spl-concurrent-merkle-tree = { version = "0.1.3" } sea-orm = { optional = true, version = "0.10.6", features = ["macros", "runtime-tokio-rustls", "sqlx-postgres", "with-chrono", "mock"] } -sea-query = { version = "0.28.1", features = ["postgres-array"] } serde = { version = "1.0.137", optional = true } serde_json = { version = "1.0.81", optional = true, features = ["preserve_order"] } bs58 = "0.4.0" -borsh = { version = "0.9.3", optional = true } -borsh-derive = { version = "0.9.3", optional = true } solana-sdk = { version = "1.14.10" } -num-traits = "0.2.15" -num-derive = "0.3.3" thiserror = "1.0.31" blockbuster = { git = "https://github.com/metaplex-foundation/blockbuster.git", rev = "552aba6a" } jsonpath_lib = "0.3.0" mime_guess = "2.0.4" url = "2.3.1" -futures = "0.3.25" -reqwest = "0.11.13" -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" -indexmap = "1.9.3" -hex = "0.4.3" rocks-db = { path = "../rocks-db" } postgre-client = { path = "../postgre-client" } entities = { path = "../entities" } \ No newline at end of file diff --git a/digital_asset_types/src/dao/scopes/asset.rs b/digital_asset_types/src/dao/scopes/asset.rs index 9f125e59d..733d3a519 100644 --- a/digital_asset_types/src/dao/scopes/asset.rs +++ b/digital_asset_types/src/dao/scopes/asset.rs @@ -409,7 +409,7 @@ fn convert_rocks_asset_model( } else { Some(leaf.tree_id.to_bytes().to_vec()) }; - let slot_updated = vec![owner.slot_updated, leaf.slot_updated] + let slot_updated = vec![owner.get_slot_updated(), leaf.slot_updated] .into_iter() .max() .unwrap(); // unwrap here is safe, because vec is not empty @@ -419,9 +419,9 @@ fn convert_rocks_asset_model( alt_id: None, specification_version: Some(SpecificationVersions::V1), specification_asset_class: Some(static_data.specification_asset_class.into()), - owner: Some(owner.owner.to_bytes().to_vec()), - owner_type: owner.owner_type.into(), - delegate: owner.delegate.map(|pk| pk.to_bytes().to_vec()), + owner: Some(owner.owner.value.to_bytes().to_vec()), + owner_type: owner.owner_type.value.into(), + delegate: owner.delegate.value.map(|pk| pk.to_bytes().to_vec()), frozen: dynamic_data.is_frozen.value, supply: dynamic_data .supply @@ -444,7 +444,7 @@ fn convert_rocks_asset_model( slot_updated: Some(slot_updated as i64), data_hash: leaf.data_hash.map(|h| h.to_string()), creator_hash: leaf.creator_hash.map(|h| h.to_string()), - owner_delegate_seq: owner.owner_delegate_seq.map(|seq| seq as i64), + owner_delegate_seq: owner.owner_delegate_seq.value.map(|seq| seq as i64), was_decompressed: dynamic_data.was_decompressed.value, leaf_seq: leaf.leaf_seq.map(|seq| seq as i64), }) diff --git a/entities/src/enums.rs b/entities/src/enums.rs index df978c00b..3735b1ef1 100644 --- a/entities/src/enums.rs +++ b/entities/src/enums.rs @@ -33,8 +33,9 @@ pub enum SpecificationAssetClass { IdentityNft, } -#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq)] +#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Default)] pub enum OwnerType { + #[default] Unknown, Token, Single, diff --git a/entities/src/models.rs b/entities/src/models.rs index 211f25b9a..f6da76308 100644 --- a/entities/src/models.rs +++ b/entities/src/models.rs @@ -57,7 +57,7 @@ pub struct CompleteAssetDetails { pub is_burnt: (bool, u64), pub was_decompressed: (bool, u64), pub onchain_data: (Option, u64), // Serialized ChainDataV1 - pub creators: Vec, + pub creators: (Vec, u64), pub royalty_amount: (u16, u64), // From AssetAuthority as Tuple diff --git a/nft_ingester/Cargo.toml b/nft_ingester/Cargo.toml index 4652a9823..23cf84710 100644 --- a/nft_ingester/Cargo.toml +++ b/nft_ingester/Cargo.toml @@ -6,7 +6,6 @@ publish = false [dependencies] serde_derive = "1.0.190" -hex = "0.4.3" log = "0.4.17" env_logger = "0.10.0" thiserror = "1.0.31" diff --git a/nft_ingester/src/bubblegum_updates_processor.rs b/nft_ingester/src/bubblegum_updates_processor.rs index 9527841c0..16b4a270c 100644 --- a/nft_ingester/src/bubblegum_updates_processor.rs +++ b/nft_ingester/src/bubblegum_updates_processor.rs @@ -323,11 +323,10 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, - owner, - delegate: Some(delegate), - owner_type: OwnerType::Single, - owner_delegate_seq: Some(cl.seq), - slot_updated: bundle.slot, + owner: Updated::new(bundle.slot, owner), + delegate: Updated::new(bundle.slot, Some(delegate)), + owner_type: Updated::new(bundle.slot, OwnerType::Single), + owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { @@ -450,11 +449,10 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, - owner, - delegate: Some(delegate), - owner_type: OwnerType::Single, - owner_delegate_seq: Some(cl.seq), - slot_updated: bundle.slot, + owner: Updated::new(bundle.slot, owner), + delegate: Updated::new(bundle.slot, Some(delegate)), + owner_type: Updated::new(bundle.slot, OwnerType::Single), + owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { @@ -577,11 +575,10 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, - owner, - delegate: Some(delegate), - owner_type: OwnerType::Single, - owner_delegate_seq: Some(cl.seq), - slot_updated: bundle.slot, + owner: Updated::new(bundle.slot, owner), + delegate: Updated::new(bundle.slot, Some(delegate)), + owner_type: Updated::new(bundle.slot, OwnerType::Single), + owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.put(id, &asset_owner) { @@ -705,11 +702,10 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, - owner, - delegate: Some(delegate), - owner_type: OwnerType::Single, - owner_delegate_seq: Some(cl.seq), - slot_updated: bundle.slot, + owner: Updated::new(bundle.slot, owner), + delegate: Updated::new(bundle.slot, Some(delegate)), + owner_type: Updated::new(bundle.slot, OwnerType::Single), + owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { diff --git a/nft_ingester/src/gapfiller.rs b/nft_ingester/src/gapfiller.rs new file mode 100644 index 000000000..b99c7b755 --- /dev/null +++ b/nft_ingester/src/gapfiller.rs @@ -0,0 +1,90 @@ +use crate::error::IngesterError; +use entities::models::CompleteAssetDetails; +use rocks_db::asset::{AssetCollection, AssetLeaf, Updated}; +use rocks_db::{AssetAuthority, AssetDynamicDetails, AssetOwner, AssetStaticDetails, Storage}; +use serde_json::json; +use std::sync::Arc; + +pub fn insert_gap_data( + rocks_storage: Arc, + data: CompleteAssetDetails, +) -> Result<(), IngesterError> { + rocks_storage.asset_static_data.merge( + data.pubkey, + &AssetStaticDetails { + pubkey: data.pubkey, + specification_asset_class: data.specification_asset_class, + royalty_target_type: data.royalty_target_type, + created_at: data.created_at, + }, + )?; + + let chain_data = data.onchain_data.0.map(|d| json!(d).to_string()); + rocks_storage.asset_dynamic_data.merge( + data.pubkey, + &AssetDynamicDetails { + pubkey: data.pubkey, + is_compressible: Updated::new(data.is_compressible.1, data.is_compressible.0), + is_compressed: Updated::new(data.is_compressed.1, data.is_compressed.0), + is_frozen: Updated::new(data.is_frozen.1, data.is_frozen.0), + supply: Updated::new(data.supply.1, data.supply.0), + seq: Updated::new(data.seq.1, data.seq.0), + is_burnt: Updated::new(data.is_burnt.1, data.is_burnt.0), + was_decompressed: Updated::new(data.was_decompressed.1, data.was_decompressed.0), + onchain_data: Updated::new(data.onchain_data.1, chain_data), + creators: Updated::new(data.creators.1, data.creators.0), + royalty_amount: Updated::new(data.royalty_amount.1, data.royalty_amount.0), + }, + )?; + + rocks_storage.asset_authority_data.merge( + data.pubkey, + &AssetAuthority { + pubkey: data.pubkey, + authority: data.authority.0, + slot_updated: data.authority.1, + }, + )?; + + rocks_storage.asset_collection_data.merge( + data.pubkey, + &AssetCollection { + pubkey: data.pubkey, + collection: data.collection.collection, + is_collection_verified: data.collection.is_collection_verified, + collection_seq: data.collection.collection_seq, + slot_updated: data.collection.slot_updated, + }, + )?; + + data.leaves.iter().try_for_each(|leaf| { + rocks_storage.asset_leaf_data.merge( + data.pubkey, + &AssetLeaf { + pubkey: data.pubkey, + tree_id: leaf.tree_id, + leaf: leaf.leaf.clone(), + nonce: leaf.nonce, + data_hash: leaf.data_hash, + creator_hash: leaf.creator_hash, + leaf_seq: leaf.leaf_seq, + slot_updated: leaf.slot_updated, + }, + ) + })?; + + rocks_storage.asset_owner_data.merge( + data.pubkey, + &AssetOwner { + pubkey: data.pubkey, + owner: Updated::new(data.owner.1, data.owner.0), + delegate: Updated::new(data.delegate.1, data.delegate.0), + owner_type: Updated::new(data.owner_type.1, data.owner_type.0), + owner_delegate_seq: Updated::new(data.owner_delegate_seq.1, data.owner_delegate_seq.0), + }, + )?; + + // TODO CLItems + + Ok(()) +} diff --git a/nft_ingester/src/lib.rs b/nft_ingester/src/lib.rs index 1220fdc7f..6af174f85 100644 --- a/nft_ingester/src/lib.rs +++ b/nft_ingester/src/lib.rs @@ -5,6 +5,7 @@ pub mod config; pub mod db_v2; pub mod error; pub mod flatbuffer_mapper; +pub mod gapfiller; pub mod index_syncronizer; pub mod init; pub mod json_downloader; diff --git a/nft_ingester/src/token_updates_processor.rs b/nft_ingester/src/token_updates_processor.rs index ff68ccf4e..3628616a8 100644 --- a/nft_ingester/src/token_updates_processor.rs +++ b/nft_ingester/src/token_updates_processor.rs @@ -84,11 +84,10 @@ impl TokenAccsProcessor { acc.mint, &AssetOwner { pubkey: acc.mint, - owner: acc.owner, - delegate: acc.delegate, - owner_type: OwnerType::Token, - owner_delegate_seq: None, - slot_updated: acc.slot_updated as u64, + owner: Updated::new(acc.slot_updated as u64, acc.owner), + delegate: Updated::new(acc.slot_updated as u64, acc.delegate), + owner_type: Updated::new(acc.slot_updated as u64, OwnerType::Token), + owner_delegate_seq: Updated::new(acc.slot_updated as u64, None), }, ); diff --git a/rocks-db/src/asset.rs b/rocks-db/src/asset.rs index a35509e88..414cc2e9b 100644 --- a/rocks-db/src/asset.rs +++ b/rocks-db/src/asset.rs @@ -60,11 +60,10 @@ pub struct AssetAuthority { #[derive(Serialize, Deserialize, Debug, Clone)] pub struct AssetOwner { pub pubkey: Pubkey, - pub owner: Pubkey, - pub delegate: Option, - pub owner_type: OwnerType, - pub owner_delegate_seq: Option, - pub slot_updated: u64, + pub owner: Updated, + pub delegate: Updated>, + pub owner_type: Updated, + pub owner_delegate_seq: Updated>, } /// Leaf information about compressed asset @@ -91,6 +90,12 @@ pub struct AssetCollection { pub slot_updated: u64, } +fn update_field(current: &mut Updated, new: &Updated) { + if new.slot_updated > current.slot_updated { + *current = new.clone(); + } +} + impl TypedColumn for AssetStaticDetails { type KeyType = Pubkey; type ValueType = Self; @@ -165,9 +170,9 @@ impl AssetDynamicDetails { existing_val: Option<&[u8]>, operands: &MergeOperands, ) -> Option> { - let mut result: Option = None; + let mut result: Option = None; if let Some(existing_val) = existing_val { - match deserialize::(existing_val) { + match deserialize::(existing_val) { Ok(value) => { result = Some(value); } @@ -180,14 +185,8 @@ impl AssetDynamicDetails { } } - fn update_field(current: &mut Updated, new: &Updated) { - if new.slot_updated > current.slot_updated { - *current = new.clone(); - } - } - for op in operands { - match deserialize::(op) { + match deserialize::(op) { Ok(new_val) => { result = Some(if let Some(mut current_val) = result { update_field(&mut current_val.is_compressible, &new_val.is_compressible); @@ -292,15 +291,11 @@ impl AssetOwner { existing_val: Option<&[u8]>, operands: &MergeOperands, ) -> Option> { - let mut result = vec![]; - let mut slot = 0; - let mut owner_delegate_seq = None; + let mut result: Option = None; if let Some(existing_val) = existing_val { - match deserialize::(existing_val) { + match deserialize::(existing_val) { Ok(value) => { - slot = value.slot_updated; - owner_delegate_seq = value.owner_delegate_seq; - result = existing_val.to_vec(); + result = Some(value); } Err(e) => { error!("RocksDB: AssetOwner deserialize existing_val: {}", e) @@ -309,21 +304,21 @@ impl AssetOwner { } for op in operands { - match deserialize::(op) { + match deserialize::(op) { Ok(new_val) => { - if let Some(current_seq) = owner_delegate_seq { - if let Some(new_seq) = new_val.owner_delegate_seq { - if new_seq > current_seq { - owner_delegate_seq = new_val.owner_delegate_seq; - result = op.to_vec(); - } - } else { - warn!("RocksDB: AssetOwner deserialize new_val: new owner_delegate_seq is None"); - } - } else if new_val.slot_updated > slot { - slot = new_val.slot_updated; - result = op.to_vec(); - } + result = Some(if let Some(mut current_val) = result { + update_field(&mut current_val.owner_type, &new_val.owner_type); + update_field(&mut current_val.owner, &new_val.owner); + update_field( + &mut current_val.owner_delegate_seq, + &new_val.owner_delegate_seq, + ); + update_field(&mut current_val.delegate, &new_val.delegate); + + current_val + } else { + new_val + }); } Err(e) => { error!("RocksDB: AssetOwner deserialize new_val: {}", e) @@ -331,7 +326,19 @@ impl AssetOwner { } } - Some(result) + result.and_then(|result| serialize(&result).ok()) + } + + pub fn get_slot_updated(&self) -> u64 { + [ + self.owner.slot_updated, + self.delegate.slot_updated, + self.owner_type.slot_updated, + self.owner_delegate_seq.slot_updated, + ] + .into_iter() + .max() + .unwrap() // unwrap here is safe, because vec is not empty } } diff --git a/rocks-db/src/batch_client.rs b/rocks-db/src/batch_client.rs index 7e43b5a07..66c2ca2db 100644 --- a/rocks-db/src/batch_client.rs +++ b/rocks-db/src/batch_client.rs @@ -149,19 +149,19 @@ impl AssetIndexReader for Storage { for data in asset_owner_details.iter().flatten() { if let Some(existed_index) = asset_indexes.get_mut(&data.pubkey) { - existed_index.owner = Some(data.owner); - existed_index.delegate = data.delegate; - existed_index.owner_type = Some(data.owner_type); - if data.slot_updated as i64 > existed_index.slot_updated { - existed_index.slot_updated = data.slot_updated as i64; + existed_index.owner = Some(data.owner.value); + existed_index.delegate = data.delegate.value; + existed_index.owner_type = Some(data.owner_type.value); + if data.get_slot_updated() as i64 > existed_index.slot_updated { + existed_index.slot_updated = data.get_slot_updated() as i64; } } else { let asset_index = AssetIndex { pubkey: data.pubkey, - owner: Some(data.owner), - delegate: data.delegate, - owner_type: Some(data.owner_type), - slot_updated: data.slot_updated as i64, + owner: Some(data.owner.value), + delegate: data.delegate.value, + owner_type: Some(data.owner_type.value), + slot_updated: data.get_slot_updated() as i64, ..Default::default() }; From f8e7150c0659e20ab9adc7ce8c39b1e5e4add2a0 Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 03:53:34 +0200 Subject: [PATCH 07/14] cargo update + test --- Cargo.lock | 865 ++++++++++-------- digital_asset_types/Cargo.toml | 1 + rocks-db/src/asset.rs | 2 +- .../tests/batch_client_integration_tests.rs | 66 +- 4 files changed, 541 insertions(+), 393 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f46f9b325..746f9c356 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,31 +65,32 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if 1.0.0", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -299,9 +300,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" dependencies = [ "anstyle", "anstyle-parse", @@ -313,43 +314,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "59d2a3357dde987206219e78ecfbbb6e8dad06cbb65292758d3270e6254f7355" [[package]] name = "arc-swap" @@ -388,9 +389,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb42b2197bf15ccb092b62c74515dbd8b86d0effd934795f6687c93b6e679a2c" +checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" dependencies = [ "brotli", "flate2", @@ -414,9 +415,9 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.23", + "rustix 0.37.27", "slab", - "socket2 0.4.9", + "socket2 0.4.10", "waker-fn", ] @@ -457,18 +458,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -486,6 +487,15 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" +[[package]] +name = "atomic" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d818003e740b63afc82337e3160717f4f63078720a810b7b903e70a5d1d2994" +dependencies = [ + "bytemuck", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -615,7 +625,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ "futures-core", - "getrandom 0.2.10", + "getrandom 0.2.11", "instant", "pin-project-lite", "rand 0.8.5", @@ -701,7 +711,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -712,9 +722,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitmaps" @@ -823,12 +833,12 @@ dependencies = [ [[package]] name = "borsh" -version = "0.10.3" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" dependencies = [ - "borsh-derive 0.10.3", - "hashbrown 0.13.2", + "borsh-derive 1.3.0", + "cfg_aliases", ] [[package]] @@ -837,8 +847,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ - "borsh-derive-internal 0.9.3", - "borsh-schema-derive-internal 0.9.3", + "borsh-derive-internal", + "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", "proc-macro2", "syn 1.0.109", @@ -846,15 +856,16 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "0.10.3" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" dependencies = [ - "borsh-derive-internal 0.10.3", - "borsh-schema-derive-internal 0.10.3", - "proc-macro-crate 0.1.5", + "once_cell", + "proc-macro-crate 2.0.0", "proc-macro2", - "syn 1.0.109", + "quote", + "syn 2.0.42", + "syn_derive", ] [[package]] @@ -868,17 +879,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "borsh-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "borsh-schema-derive-internal" version = "0.9.3" @@ -890,22 +890,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "brotli" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -914,9 +903,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.4" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -936,9 +925,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" +checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" dependencies = [ "memchr", "serde", @@ -999,14 +988,14 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -1084,6 +1073,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "chrono" version = "0.4.31" @@ -1131,9 +1126,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.5" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824956d0dca8334758a5b7f7e50518d66ea319330cbceedcf76905c2f6ab30e3" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" dependencies = [ "clap_builder", "clap_derive", @@ -1141,9 +1136,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.5" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122ec64120a49b4563ccaedcbea7818d069ed8e9aa6d829b82d8a4128936b2ab" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" dependencies = [ "anstream", "anstyle", @@ -1153,21 +1148,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "cmake" @@ -1200,9 +1195,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -1241,9 +1236,9 @@ checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1251,15 +1246,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -1275,9 +1270,9 @@ dependencies = [ [[package]] name = "crc-catalog" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" @@ -1290,9 +1285,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "14c3242926edf34aec4ac3a77108ad4854bffaa2e4ddc1824124ce59231302d5" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -1300,9 +1295,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", @@ -1311,22 +1306,21 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" dependencies = [ "autocfg", "cfg-if 1.0.0", "crossbeam-utils", "memoffset 0.9.0", - "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "b9bcf5bdbfdd6030fb4a1c497b5d5fc5921aa2f60d359a17e249c0e6df3de153" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -1334,9 +1328,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" dependencies = [ "cfg-if 1.0.0", ] @@ -1427,10 +1421,11 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" dependencies = [ + "powerfmt", "serde", ] @@ -1485,6 +1480,7 @@ dependencies = [ "solana-sdk", "spl-concurrent-merkle-tree", "thiserror", + "tokio", "url", ] @@ -1534,9 +1530,9 @@ checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dyn-clone" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "eager" @@ -1660,9 +1656,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ "humantime", "is-terminal", @@ -1716,15 +1712,15 @@ checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" [[package]] name = "figment" -version = "0.10.10" +version = "0.10.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4547e226f4c9ab860571e070a9034192b3175580ecea38da34fcdb53a018c9a5" +checksum = "649f3e5d826594057e9a519626304d8da859ea8a0b18ce99500c586b8d45faee" dependencies = [ - "atomic", + "atomic 0.6.0", "pear", "serde", "serde_yaml", - "toml 0.7.8", + "toml 0.8.8", "uncased", "version_check", ] @@ -1765,9 +1761,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -1805,9 +1801,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1826,9 +1822,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -1857,9 +1853,9 @@ checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -1906,7 +1902,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -1975,9 +1971,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -1988,9 +1984,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -2000,15 +1996,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick", "bstr", - "fnv", "log", - "regex", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -2026,7 +2022,7 @@ dependencies = [ "serde_json", "simpl", "smpl_jwt 0.6.1", - "time 0.3.29", + "time 0.3.31", "tokio", ] @@ -2045,15 +2041,15 @@ dependencies = [ "serde_json", "simpl", "smpl_jwt 0.7.1", - "time 0.3.29", + "time 0.3.31", "tokio", ] [[package]] name = "h2" -version = "0.3.21" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -2061,7 +2057,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", "tokio", "tokio-util 0.7.10", @@ -2074,7 +2070,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", ] [[package]] @@ -2083,25 +2079,16 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.3", + "ahash 0.7.7", ] [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.6", "allocator-api2", ] @@ -2111,7 +2098,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] @@ -2179,9 +2166,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac 0.12.1", ] @@ -2218,18 +2205,18 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -2238,9 +2225,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -2273,9 +2260,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -2288,7 +2275,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.9", + "socket2 0.5.5", "tokio", "tower-service", "tracing", @@ -2315,14 +2302,14 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http", "hyper", - "rustls 0.21.7", + "rustls 0.21.10", "tokio", "tokio-rustls 0.24.1", ] @@ -2354,16 +2341,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -2383,9 +2370,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2419,12 +2406,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad227c3af19d4914570ad36d30409928b75967c298feb9ea1969db3a610bb14e" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] @@ -2464,9 +2451,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" @@ -2508,24 +2495,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -2613,9 +2600,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libloading" @@ -2627,6 +2614,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "librocksdb-sys" version = "0.11.0+8.1.1" @@ -2716,9 +2714,9 @@ checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -2783,9 +2781,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memmap2" @@ -2933,7 +2931,7 @@ dependencies = [ "cfg-if 1.0.0", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -3110,7 +3108,7 @@ dependencies = [ "clap", "digital_asset_types", "entities", - "env_logger 0.10.0", + "env_logger 0.10.1", "figment", "flatbuffers", "jsonrpc-core", @@ -3208,9 +3206,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] @@ -3281,11 +3279,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "cfg-if 1.0.0", "foreign-types", "libc", @@ -3302,7 +3300,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -3313,18 +3311,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.1.5+3.1.3" +version = "300.2.1+3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559068e4c12950d7dcaa1857a61725c0d38d4fc03ff8e070ab31a75d6e316491" +checksum = "3fe476c29791a5ca0d1273c697e96085bbabbbea2ef7afd5617e78a4b40332d3" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b" dependencies = [ "cc", "libc", @@ -3364,9 +3362,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parking" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e52c774a4c39359c1d1c52e43f73dd91a75a614652c825408eec30c95a9b2067" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -3386,7 +3384,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", + "parking_lot_core 0.9.9", ] [[package]] @@ -3405,13 +3403,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "smallvec", "windows-targets 0.48.5", ] @@ -3442,9 +3440,9 @@ dependencies = [ [[package]] name = "pear" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a386cd715229d399604b50d1361683fe687066f42d56f54be995bc6868f71c" +checksum = "4ccca0f6c17acc81df8e242ed473ec144cbf5c98037e69aa6d144780aad103c8" dependencies = [ "inlinable_string", "pear_codegen", @@ -3453,14 +3451,14 @@ dependencies = [ [[package]] name = "pear_codegen" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f0f13dac8069c139e8300a6510e3f4143ecf5259c60b116a9b271b4ca0d54" +checksum = "2e22670e8eb757cff11d6c199ca7b987f352f0346e0be4dd23869ec72cb53c77" dependencies = [ "proc-macro2", "proc-macro2-diagnostics 0.10.1", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -3471,9 +3469,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" @@ -3482,7 +3480,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.1", + "indexmap 2.1.0", ] [[package]] @@ -3502,7 +3500,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -3519,9 +3517,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" [[package]] name = "plerkle_messenger" @@ -3605,6 +3603,12 @@ dependencies = [ "uuid", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -3669,7 +3673,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -3688,7 +3692,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", ] [[package]] @@ -3723,9 +3736,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -3751,7 +3764,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", "version_check", "yansi 1.0.0-rc.1", ] @@ -3776,7 +3789,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -4000,7 +4013,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", ] [[package]] @@ -4074,15 +4087,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -4094,25 +4098,25 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.10", - "redox_syscall 0.2.16", + "getrandom 0.2.11", + "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.9.5" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.8", - "regex-syntax 0.7.5", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -4126,13 +4130,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.5", + "regex-syntax 0.8.2", ] [[package]] @@ -4143,9 +4147,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rend" @@ -4158,9 +4162,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ "async-compression", "base64 0.21.5", @@ -4182,7 +4186,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.7", + "rustls 0.21.10", "rustls-pemfile", "serde", "serde_json", @@ -4198,7 +4202,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 0.25.2", + "webpki-roots 0.25.3", "winreg", ] @@ -4211,20 +4215,35 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom 0.2.11", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "rkyv" -version = "0.7.42" +version = "0.7.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" +checksum = "527a97cdfef66f65998b5f3b637c26f5a5ec09cc52a3f9932313ac645f4190f5" dependencies = [ "bitvec", "bytecheck", + "bytes", "hashbrown 0.12.3", "ptr_meta", "rend", @@ -4236,9 +4255,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.42" +version = "0.7.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" +checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" dependencies = [ "proc-macro2", "quote", @@ -4276,7 +4295,7 @@ dependencies = [ "blockbuster", "chrono", "entities", - "env_logger 0.10.0", + "env_logger 0.10.1", "figment", "futures-util", "itertools 0.12.0", @@ -4309,12 +4328,12 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.32.0" +version = "1.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c4216490d5a413bc6d10fa4742bd7d4955941d062c0ef873141d6b0e7b30fd" +checksum = "06676aec5ccb8fc1da723cc8c0f9a46549f21ebb8753d3915c6c41db1e7f1dc4" dependencies = [ "arrayvec", - "borsh 0.10.3", + "borsh 1.3.0", "bytes", "num-traits", "rand 0.8.5", @@ -4350,14 +4369,14 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.19", + "semver 1.0.20", ] [[package]] name = "rustix" -version = "0.37.23" +version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", "errno", @@ -4373,7 +4392,7 @@ version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", "linux-raw-sys 0.4.12", @@ -4387,40 +4406,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct", "webpki", ] [[package]] name = "rustls" -version = "0.21.7" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring", + "ring 0.17.7", "rustls-webpki", "sct", ] [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ "base64 0.21.5", ] [[package]] name = "rustls-webpki" -version = "0.101.6" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -4431,9 +4450,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "schannel" @@ -4446,9 +4465,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -4458,9 +4477,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", @@ -4476,12 +4495,12 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -4506,7 +4525,7 @@ dependencies = [ "serde_json", "sqlx", "thiserror", - "time 0.3.29", + "time 0.3.31", "tracing", "url", "uuid", @@ -4535,7 +4554,7 @@ dependencies = [ "rust_decimal", "sea-query-derive", "serde_json", - "time 0.3.29", + "time 0.3.31", "uuid", ] @@ -4550,7 +4569,7 @@ dependencies = [ "sea-query", "serde_json", "sqlx", - "time 0.3.29", + "time 0.3.31", "uuid", ] @@ -4629,9 +4648,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "semver-parser" @@ -4665,7 +4684,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -4681,11 +4700,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ - "indexmap 2.0.1", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -4693,9 +4712,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -4736,11 +4755,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.25" +version = "0.9.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +checksum = "9269cfafc7e0257ee4a42f3f68a307f458c63d9e7c8ba4b58c5d15f1b7d7e8d3" dependencies = [ - "indexmap 2.0.1", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -4855,9 +4874,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b21f559e07218024e7e9f90f96f601825397de0e25420135f7f952453fed0b" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -4916,9 +4935,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "smpl_jwt" @@ -4949,14 +4968,14 @@ dependencies = [ "serde_derive", "serde_json", "simpl", - "time 0.3.29", + "time 0.3.31", ] [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -5086,7 +5105,7 @@ version = "1.14.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fa2f135bca5c1621c458e8a71979688455395a558dd582108921d51875a065e" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", "blake3", "block-buffer 0.9.0", "bs58 0.4.0", @@ -5195,7 +5214,7 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.10", + "getrandom 0.2.11", "itertools 0.10.5", "js-sys", "lazy_static", @@ -5454,6 +5473,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spl-account-compression" version = "0.1.10" @@ -5546,11 +5571,11 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" dependencies = [ - "itertools 0.11.0", + "itertools 0.12.0", "nom", "unicode_categories", ] @@ -5571,7 +5596,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", "atoi", "base64 0.13.1", "bitflags 1.3.2", @@ -5615,7 +5640,7 @@ dependencies = [ "sqlx-rt", "stringprep", "thiserror", - "time 0.3.29", + "time 0.3.31", "tokio-stream", "url", "uuid", @@ -5728,7 +5753,7 @@ checksum = "b6bcb902b974bc20b50c3ad3148022a366a46c9a676b587684ff46c237a3329e" dependencies = [ "async-channel", "async-io", - "atomic", + "atomic 0.5.3", "crossbeam-channel", "futures", "parking_lot 0.12.1", @@ -5775,15 +5800,27 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.37" +version = "2.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +checksum = "5b7d0a2c048d661a1a59fcd7355baa232f7ed34e0ee4df2eef3c1c1c0d3852d8" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.42", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -5843,9 +5880,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -5875,22 +5912,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -5920,15 +5957,16 @@ dependencies = [ [[package]] name = "time" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", - "time-macros 0.2.15", + "time-macros 0.2.16", ] [[package]] @@ -5949,9 +5987,9 @@ dependencies = [ [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" dependencies = [ "time-core", ] @@ -6005,9 +6043,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "bytes", @@ -6041,7 +6079,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -6071,7 +6109,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.7", + "rustls 0.21.10", "tokio", ] @@ -6127,21 +6165,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.21.0", ] [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -6152,7 +6190,29 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.1", + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -6324,7 +6384,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -6349,12 +6409,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -6370,9 +6430,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -6391,9 +6451,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee8098afad3fb0c54a9007aab6804558410503ad676d4633f9c2559a00ac0f" +checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" dependencies = [ "serde", "stable_deref_trait", @@ -6401,9 +6461,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" @@ -6431,9 +6491,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" @@ -6474,9 +6534,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] name = "untrusted" @@ -6484,6 +6544,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "uriparse" version = "0.6.4" @@ -6496,9 +6562,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -6514,7 +6580,7 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "utils" version = "0.1.8" -source = "git+https://github.com/extrnode/solana-geyser-zmq#a1df6c62a34ea371e17f00343b188440970b475e" +source = "git+https://github.com/extrnode/solana-geyser-zmq#49b43795865c32a68f75d50c61bcdb28cd6fde93" dependencies = [ "anyhow", "bincode", @@ -6535,7 +6601,7 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", "rand 0.8.5", "serde", ] @@ -6587,9 +6653,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -6597,24 +6663,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -6624,9 +6690,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6634,22 +6700,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "wasm-streams" @@ -6666,9 +6732,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -6676,12 +6742,12 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -6695,9 +6761,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "wg" @@ -6764,10 +6830,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ "windows-targets 0.48.5", ] @@ -6906,9 +6972,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.15" +version = "0.5.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "9b5c3db89721d50d0e2a673f5043fc4722f76dcc352d7b1ab8b8288bed4ed2c5" dependencies = [ "memchr", ] @@ -6945,9 +7011,9 @@ dependencies = [ [[package]] name = "xxhash-rust" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9828b178da53440fa9c766a3d2f73f7cf5d0ac1fe3980c1e5018d899fd19e07b" +checksum = "53be06678ed9e83edb1745eb72efc0bbcd7b5c3c35711a860906aed827a13d61" [[package]] name = "yansi" @@ -6961,6 +7027,26 @@ version = "1.0.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377" +[[package]] +name = "zerocopy" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.42", +] + [[package]] name = "zeroize" version = "1.3.0" @@ -6978,7 +7064,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.42", ] [[package]] @@ -7002,11 +7088,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/digital_asset_types/Cargo.toml b/digital_asset_types/Cargo.toml index d74f308ac..0093f754d 100644 --- a/digital_asset_types/Cargo.toml +++ b/digital_asset_types/Cargo.toml @@ -21,6 +21,7 @@ blockbuster = { git = "https://github.com/metaplex-foundation/blockbuster.git", jsonpath_lib = "0.3.0" mime_guess = "2.0.4" url = "2.3.1" +tokio = { version = "1.22.0", features = ["full"] } schemars = "0.8.6" log = "0.4.17" rocks-db = { path = "../rocks-db" } diff --git a/rocks-db/src/asset.rs b/rocks-db/src/asset.rs index 414cc2e9b..5a5cb2b62 100644 --- a/rocks-db/src/asset.rs +++ b/rocks-db/src/asset.rs @@ -20,7 +20,7 @@ pub struct AssetStaticDetails { pub created_at: i64, } -#[derive(Serialize, Deserialize, Debug, Clone, Default)] +#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq)] pub struct Updated { pub slot_updated: u64, pub value: T, diff --git a/rocks-db/tests/batch_client_integration_tests.rs b/rocks-db/tests/batch_client_integration_tests.rs index 74f042c86..17d3a7e47 100644 --- a/rocks-db/tests/batch_client_integration_tests.rs +++ b/rocks-db/tests/batch_client_integration_tests.rs @@ -1,13 +1,14 @@ use std::collections::HashSet; +use rocks_db::asset::Updated; use solana_sdk::pubkey::Pubkey; use tempfile::TempDir; use rocks_db::key_encoders::encode_u64x2_pubkey; use rocks_db::storage_traits::AssetUpdateIndexStorage; -use rocks_db::Storage; +use rocks_db::{AssetDynamicDetails, Storage}; -struct TestEnvironment { +pub struct TestEnvironment { storage: Storage, _temp_dir: TempDir, } @@ -368,3 +369,64 @@ fn test_process_asset_updates_batch_iteration_results() { last_seen_key = last_key.clone(); } } + +fn create_test_dynamic_data(pubkey: Pubkey, slot: u64) -> AssetDynamicDetails { + AssetDynamicDetails { + pubkey, + is_compressible: Updated::new(slot, false), + is_compressed: Updated::new(slot, false), + is_frozen: Updated::new(slot, false), + supply: Updated::new(slot, None), + seq: Updated::new(slot, None), + is_burnt: Updated::new(slot, false), + was_decompressed: Updated::new(slot, false), + onchain_data: Updated::new(slot, None), + creators: Updated::new(slot, Vec::new()), + royalty_amount: Updated::new(slot, 0), + } +} + +#[test] +fn test_multiple_slot_updates() { + let temp_dir = TempDir::new().expect("Failed to create a temporary directory"); + let storage = TestEnvironment::new(temp_dir, &[]).storage; + let pk = Pubkey::new_unique(); + let dynamic_data = create_test_dynamic_data(pk, 0); + + storage + .asset_dynamic_data + .merge(dynamic_data.pubkey, &dynamic_data) + .unwrap(); + + let new_data = AssetDynamicDetails { + pubkey: pk, + is_compressible: Updated::new(10, true), + is_compressed: Updated::new(0, true), + ..Default::default() + }; + storage + .asset_dynamic_data + .merge(dynamic_data.pubkey, &new_data) + .unwrap(); + + let selected_data = storage.asset_dynamic_data.get(pk).unwrap().unwrap(); + assert_eq!(selected_data.is_compressible, Updated::new(10, true)); + assert_eq!(selected_data.is_compressed, Updated::new(0, false)); // slot in new_data not greater than slot in start data, so that field must not change + + let new_data = AssetDynamicDetails { + pubkey: pk, + is_compressible: Updated::new(5, false), + is_compressed: Updated::new(0, true), + supply: Updated::new(3, Some(5)), + ..Default::default() + }; + storage + .asset_dynamic_data + .merge(dynamic_data.pubkey, &new_data) + .unwrap(); + + let selected_data = storage.asset_dynamic_data.get(pk).unwrap().unwrap(); + assert_eq!(selected_data.is_compressible, Updated::new(10, true)); + assert_eq!(selected_data.is_compressed, Updated::new(0, false)); + assert_eq!(selected_data.supply, Updated::new(3, Some(5))); +} From 6ae7ecd9e0bba68aef5dac2e53b8d1495bdc4516 Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 04:11:47 +0200 Subject: [PATCH 08/14] fmt --- nft_ingester/src/gapfiller.rs | 2 +- rocks-db/tests/batch_client_integration_tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nft_ingester/src/gapfiller.rs b/nft_ingester/src/gapfiller.rs index b99c7b755..3357f0c61 100644 --- a/nft_ingester/src/gapfiller.rs +++ b/nft_ingester/src/gapfiller.rs @@ -5,7 +5,7 @@ use rocks_db::{AssetAuthority, AssetDynamicDetails, AssetOwner, AssetStaticDetai use serde_json::json; use std::sync::Arc; -pub fn insert_gap_data( +pub fn insert_gaped_data( rocks_storage: Arc, data: CompleteAssetDetails, ) -> Result<(), IngesterError> { diff --git a/rocks-db/tests/batch_client_integration_tests.rs b/rocks-db/tests/batch_client_integration_tests.rs index 17d3a7e47..b0a0cedfe 100644 --- a/rocks-db/tests/batch_client_integration_tests.rs +++ b/rocks-db/tests/batch_client_integration_tests.rs @@ -8,7 +8,7 @@ use rocks_db::key_encoders::encode_u64x2_pubkey; use rocks_db::storage_traits::AssetUpdateIndexStorage; use rocks_db::{AssetDynamicDetails, Storage}; -pub struct TestEnvironment { +struct TestEnvironment { storage: Storage, _temp_dir: TempDir, } From c1cb1e45b912e358784744a0be5cad7964ee070d Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 13:32:54 +0200 Subject: [PATCH 09/14] add seq to Updated struct --- docker-compose.yaml | 9 - entities/src/models.rs | 47 +- migration/Cargo.lock | 5246 ----------------- migration/Cargo.toml | 22 - migration/README.md | 38 - migration/src/lib.rs | 68 - migration/src/m20220101_000001_init.rs | 41 - .../src/m20221020_052135_add_asset_hashes.rs | 56 - ...2_140350_add_creator_asset_unique_index.rs | 85 - ...82127_remove_creator_error_unique_index.rs | 26 - .../src/m20221026_155220_add_bg_tasks.rs | 95 - .../m20221104_094327_add_backfiller_failed.rs | 37 - .../m20221114_173041_add_collection_info.rs | 56 - .../m20221115_165700_add_backfiller_locked.rs | 37 - ...dd_backfiller_failed_and_locked_indeces.rs | 87 - .../m20230105_160722_drop_collection_info.rs | 56 - .../src/m20230106_051135_unique_groupings.rs | 54 - ...131_140613_change_token_account_indexes.rs | 96 - .../m20230203_205959_improve_upsert_perf.rs | 77 - ...0230224_093722_performance_improvements.rs | 141 - .../src/m20230310_162227_add_indexes_to_bg.rs | 84 - ...20230317_121944_remove_indexes_for_perf.rs | 82 - .../m20230510_183736_add_indices_to_assets.rs | 71 - .../m20230516_185005_add_reindex_to_assets.rs | 36 - ...0101_add_owner_delegate_sequence_number.rs | 34 - .../src/m20230601_120101_add_pnft_enum_val.rs | 27 - ...15_120101_remove_asset_null_constraints.rs | 50 - .../m20230620_120101_add_was_decompressed.rs | 39 - ...0230623_120101_add_leaf_sequence_number.rs | 34 - ..._remove_asset_creators_null_constraints.rs | 44 - ...0720_120101_add_asset_grouping_verified.rs | 37 - ..._remove_asset_grouping_null_constraints.rs | 46 - .../m20230724_120101_add_group_info_seq.rs | 36 - ...ve_not_null_constraint_from_group_value.rs | 35 - migration/src/main.rs | 6 - migrator.Dockerfile | 10 - .../src/bubblegum_updates_processor.rs | 179 +- nft_ingester/src/gapfiller.rs | 51 +- nft_ingester/src/mplx_updates_processor.rs | 28 +- nft_ingester/src/token_updates_processor.rs | 23 +- rocks-db/src/asset.rs | 20 +- .../tests/batch_client_integration_tests.rs | 56 +- 42 files changed, 200 insertions(+), 7202 deletions(-) delete mode 100644 migration/Cargo.lock delete mode 100644 migration/Cargo.toml delete mode 100644 migration/README.md delete mode 100644 migration/src/lib.rs delete mode 100644 migration/src/m20220101_000001_init.rs delete mode 100644 migration/src/m20221020_052135_add_asset_hashes.rs delete mode 100644 migration/src/m20221022_140350_add_creator_asset_unique_index.rs delete mode 100644 migration/src/m20221025_182127_remove_creator_error_unique_index.rs delete mode 100644 migration/src/m20221026_155220_add_bg_tasks.rs delete mode 100644 migration/src/m20221104_094327_add_backfiller_failed.rs delete mode 100644 migration/src/m20221114_173041_add_collection_info.rs delete mode 100644 migration/src/m20221115_165700_add_backfiller_locked.rs delete mode 100644 migration/src/m20221116_110500_add_backfiller_failed_and_locked_indeces.rs delete mode 100644 migration/src/m20230105_160722_drop_collection_info.rs delete mode 100644 migration/src/m20230106_051135_unique_groupings.rs delete mode 100644 migration/src/m20230131_140613_change_token_account_indexes.rs delete mode 100644 migration/src/m20230203_205959_improve_upsert_perf.rs delete mode 100644 migration/src/m20230224_093722_performance_improvements.rs delete mode 100644 migration/src/m20230310_162227_add_indexes_to_bg.rs delete mode 100644 migration/src/m20230317_121944_remove_indexes_for_perf.rs delete mode 100644 migration/src/m20230510_183736_add_indices_to_assets.rs delete mode 100644 migration/src/m20230516_185005_add_reindex_to_assets.rs delete mode 100644 migration/src/m20230526_120101_add_owner_delegate_sequence_number.rs delete mode 100644 migration/src/m20230601_120101_add_pnft_enum_val.rs delete mode 100644 migration/src/m20230615_120101_remove_asset_null_constraints.rs delete mode 100644 migration/src/m20230620_120101_add_was_decompressed.rs delete mode 100644 migration/src/m20230623_120101_add_leaf_sequence_number.rs delete mode 100644 migration/src/m20230712_120101_remove_asset_creators_null_constraints.rs delete mode 100644 migration/src/m20230720_120101_add_asset_grouping_verified.rs delete mode 100644 migration/src/m20230720_130101_remove_asset_grouping_null_constraints.rs delete mode 100644 migration/src/m20230724_120101_add_group_info_seq.rs delete mode 100644 migration/src/m20230726_013107_remove_not_null_constraint_from_group_value.rs delete mode 100644 migration/src/main.rs delete mode 100644 migrator.Dockerfile diff --git a/docker-compose.yaml b/docker-compose.yaml index 8e8639785..c0b482e8a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,14 +1,5 @@ version: "3.9" services: - migrator: - depends_on: - - db - environment: - DATABASE_URL: postgres://solana:solana@db:5432/v1 - build: - context: . - dockerfile: migrator.Dockerfile - ingester-first-consumer: container_name: ingester-first-consumer restart: always diff --git a/entities/src/models.rs b/entities/src/models.rs index f6da76308..63d23b7b0 100644 --- a/entities/src/models.rs +++ b/entities/src/models.rs @@ -49,25 +49,25 @@ pub struct CompleteAssetDetails { pub created_at: i64, // From AssetDynamicDetails as Tuples - pub is_compressible: (bool, u64), - pub is_compressed: (bool, u64), - pub is_frozen: (bool, u64), - pub supply: (Option, u64), - pub seq: (Option, u64), - pub is_burnt: (bool, u64), - pub was_decompressed: (bool, u64), - pub onchain_data: (Option, u64), // Serialized ChainDataV1 - pub creators: (Vec, u64), - pub royalty_amount: (u16, u64), + pub is_compressible: (bool, u64, Option), + pub is_compressed: (bool, u64, Option), + pub is_frozen: (bool, u64, Option), + pub supply: (Option, u64, Option), + pub seq: (Option, u64, Option), + pub is_burnt: (bool, u64, Option), + pub was_decompressed: (bool, u64, Option), + pub onchain_data: (Option, u64, Option), // Serialized ChainDataV1 + pub creators: (Vec, u64, Option), + pub royalty_amount: (u16, u64, Option), // From AssetAuthority as Tuple - pub authority: (Pubkey, u64), + pub authority: (Pubkey, u64, Option), // From AssetOwner as Tuples - pub owner: (Pubkey, u64), - pub delegate: (Option, u64), - pub owner_type: (OwnerType, u64), - pub owner_delegate_seq: (Option, u64), + pub owner: (Pubkey, u64, Option), + pub delegate: (Option, u64, Option), + pub owner_type: (OwnerType, u64, Option), + pub owner_delegate_seq: (Option, u64, Option), // Separate fields pub leaves: Vec, @@ -122,3 +122,20 @@ pub struct AssetCollection { pub collection_seq: Option, pub slot_updated: u64, } + +#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq)] +pub struct Updated { + pub slot_updated: u64, + pub seq: Option, + pub value: T, +} + +impl Updated { + pub fn new(slot_updated: u64, seq: Option, value: T) -> Self { + Self { + slot_updated, + seq, + value, + } + } +} diff --git a/migration/Cargo.lock b/migration/Cargo.lock deleted file mode 100644 index ea0cb79af..000000000 --- a/migration/Cargo.lock +++ /dev/null @@ -1,5246 +0,0 @@ -# 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 = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[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.10", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", -] - -[[package]] -name = "aho-corasick" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" -dependencies = [ - "memchr", -] - -[[package]] -name = "aliasable" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" - -[[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 = "allocator-api2" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" - -[[package]] -name = "anchor-attribute-access-control" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf7d535e1381be3de2c0716c0a1c1e32ad9df1042cddcf7bc18d743569e53319" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-account" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bcd731f21048a032be27c7791701120e44f3f6371358fc4261a7f716283d29" -dependencies = [ - "anchor-syn", - "anyhow", - "bs58 0.4.0", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-constant" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1be64a48e395fe00b8217287f226078be2cf32dae42fdf8a885b997945c3d28" -dependencies = [ - "anchor-syn", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-error" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ea6713d1938c0da03656ff8a693b17dc0396da66d1ba320557f07e86eca0d4" -dependencies = [ - "anchor-syn", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-event" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d401f11efb3644285685f8339829a9786d43ed7490bb1699f33c478d04d5a582" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-interface" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6700a6f5c888a9c33fe8afc0c64fd8575fa28d05446037306d0f96102ae4480" -dependencies = [ - "anchor-syn", - "anyhow", - "heck 0.3.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-program" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ad769993b5266714e8939e47fbdede90e5c030333c7522d99a4d4748cf26712" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-state" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e677fae4a016a554acdd0e3b7f178d3acafaa7e7ffac6b8690cf4e171f1c116" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-derive-accounts" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340beef6809d1c3fcc7ae219153d981e95a8a277ff31985bd7050e32645dc9a8" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-lang" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662ceafe667448ee4199a4be2ee83b6bb76da28566eee5cea05f96ab38255af8" -dependencies = [ - "anchor-attribute-access-control", - "anchor-attribute-account", - "anchor-attribute-constant", - "anchor-attribute-error", - "anchor-attribute-event", - "anchor-attribute-interface", - "anchor-attribute-program", - "anchor-attribute-state", - "anchor-derive-accounts", - "arrayref", - "base64 0.13.1", - "bincode", - "borsh 0.9.3", - "bytemuck", - "solana-program", - "thiserror", -] - -[[package]] -name = "anchor-syn" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0418bcb5daac3b8cb1b60d8fdb1d468ca36f5509f31fb51179326fae1028fdcc" -dependencies = [ - "anyhow", - "bs58 0.3.1", - "heck 0.3.3", - "proc-macro2", - "proc-macro2-diagnostics", - "quote", - "serde", - "serde_json", - "sha2 0.9.9", - "syn 1.0.109", - "thiserror", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[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 = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - -[[package]] -name = "async-attributes" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-compression" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b74f44609f0f91493e3082d3734d98497e094777144380ea4db9f9905dd5b6" -dependencies = [ - "brotli", - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "async-executor" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" -dependencies = [ - "async-lock", - "async-task", - "concurrent-queue", - "fastrand 1.9.0", - "futures-lite", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" -dependencies = [ - "async-channel", - "async-executor", - "async-io", - "async-lock", - "blocking", - "futures-lite", - "once_cell", - "tokio", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite", - "log", - "parking", - "polling", - "rustix 0.37.23", - "slab", - "socket2 0.4.9", - "waker-fn", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-std" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" -dependencies = [ - "async-attributes", - "async-channel", - "async-global-executor", - "async-io", - "async-lock", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[package]] -name = "async-task" -version = "4.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" - -[[package]] -name = "async-trait" -version = "0.1.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[package]] -name = "atoi" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" -dependencies = [ - "num-traits", -] - -[[package]] -name = "atomic-waker" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" - -[[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 = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "bae" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b8de67cc41132507eeece2584804efcb15f85ba516e34c944b7667f480397a" -dependencies = [ - "heck 0.3.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[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.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" - -[[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 = "bitflags" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" - -[[package]] -name = "bitmaps" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" -dependencies = [ - "typenum", -] - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "blake3" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", - "digest 0.10.7", -] - -[[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.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -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 = "blockbuster" -version = "0.7.3" -source = "git+https://github.com/metaplex-foundation/blockbuster.git?rev=552aba6a#552aba6a0d91867abf1d3d0ddaa94ef9620eeb3e" -dependencies = [ - "anchor-lang", - "async-trait", - "borsh 0.9.3", - "bs58 0.4.0", - "flatbuffers", - "lazy_static", - "log", - "mpl-bubblegum", - "mpl-candy-guard", - "mpl-candy-machine-core", - "mpl-token-metadata", - "plerkle_serialization", - "solana-sdk", - "spl-account-compression", - "spl-noop", - "spl-token", - "thiserror", -] - -[[package]] -name = "blocking" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" -dependencies = [ - "async-channel", - "async-lock", - "async-task", - "atomic-waker", - "fastrand 1.9.0", - "futures-lite", - "log", -] - -[[package]] -name = "borsh" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" -dependencies = [ - "borsh-derive 0.9.3", - "hashbrown 0.11.2", -] - -[[package]] -name = "borsh" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" -dependencies = [ - "borsh-derive 0.10.3", - "hashbrown 0.13.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 0.9.3", - "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" -dependencies = [ - "borsh-derive-internal 0.10.3", - "borsh-schema-derive-internal 0.10.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[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", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[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.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" - -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - -[[package]] -name = "bumpalo" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" - -[[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 = "bytecheck" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" -dependencies = [ - "bytecheck_derive", - "ptr_meta", - "simdutf8", -] - -[[package]] -name = "bytecheck_derive" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "bytemuck" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[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 = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "jobserver", - "libc", -] - -[[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.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "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.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_derive", - "clap_lex", - "indexmap 1.9.3", - "once_cell", - "strsim", - "termcolor", - "textwrap", -] - -[[package]] -name = "clap_derive" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" -dependencies = [ - "heck 0.4.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[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 = "concurrent-queue" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" -dependencies = [ - "crossbeam-utils", -] - -[[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.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" -dependencies = [ - "log", - "web-sys", -] - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[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.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "cpufeatures" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" -dependencies = [ - "libc", -] - -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" - -[[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.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset 0.9.0", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -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 = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "deranged" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" -dependencies = [ - "serde", -] - -[[package]] -name = "derivation-path" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" - -[[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.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "crypto-common", - "subtle", -] - -[[package]] -name = "digital_asset_types" -version = "0.7.2" -dependencies = [ - "async-trait", - "blockbuster", - "bs58 0.4.0", - "futures", - "indexmap 1.9.3", - "jsonpath_lib", - "log", - "mime_guess", - "num-derive", - "num-traits", - "reqwest", - "schemars", - "schemars_derive", - "sea-orm", - "sea-query 0.28.5", - "serde", - "serde_json", - "solana-sdk", - "spl-concurrent-merkle-tree", - "thiserror", - "tokio", - "url", -] - -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "dyn-clone" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" - -[[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.7", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -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 0.8.1", -] - -[[package]] -name = "enum-iterator" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7add3873b5dd076766ee79c8e406ad1a472c385476b9e38849f8eec24f1be689" -dependencies = [ - "enum-iterator-derive 1.2.1", -] - -[[package]] -name = "enum-iterator-derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8958699f9359f0b04e691a13850d48b7de329138023876d07cbd024c2c820598" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "enum-iterator-derive" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[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 = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys", -] - -[[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 = "fastrand" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" - -[[package]] -name = "feature-probe" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" - -[[package]] -name = "flatbuffers" -version = "23.5.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dac53e22462d78c16d64a1cd22371b54cc3fe94aa15e7886a2fa6e5d1ab8640" -dependencies = [ - "bitflags 1.3.2", - "rustc_version", -] - -[[package]] -name = "flate2" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" -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.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" - -[[package]] -name = "futures-executor" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-intrusive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" -dependencies = [ - "futures-core", - "lock_api", - "parking_lot 0.11.2", -] - -[[package]] -name = "futures-io" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" - -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-macro" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[package]] -name = "futures-sink" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" - -[[package]] -name = "futures-task" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" - -[[package]] -name = "futures-util" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -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.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" - -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "h2" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 1.9.3", - "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 0.7.6", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.6", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.3", -] - -[[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" -dependencies = [ - "ahash 0.8.3", - "allocator-api2", -] - -[[package]] -name = "hashlink" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" -dependencies = [ - "hashbrown 0.14.0", -] - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] - -[[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.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hkdf" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" -dependencies = [ - "hmac 0.12.1", -] - -[[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.7", -] - -[[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.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" -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.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[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.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.4.9", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" -dependencies = [ - "futures-util", - "http", - "hyper", - "rustls 0.21.6", - "tokio", - "tokio-rustls 0.24.1", -] - -[[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.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -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.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" -dependencies = [ - "equivalent", - "hashbrown 0.14.0", -] - -[[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.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.2", - "libc", - "windows-sys", -] - -[[package]] -name = "ipnet" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" - -[[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.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "jobserver" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "jsonpath_lib" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa63191d68230cccb81c5aa23abd53ed64d83337cacbb25a7b8c7979523774f" -dependencies = [ - "log", - "serde", - "serde_json", -] - -[[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - -[[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.147" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" - -[[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 = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" - -[[package]] -name = "lock_api" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -dependencies = [ - "value-bag", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "md-5" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" -dependencies = [ - "digest 0.10.7", -] - -[[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.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -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.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -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 = "migration" -version = "0.7.2" -dependencies = [ - "async-std", - "digital_asset_types", - "enum-iterator 1.4.1", - "enum-iterator-derive 1.2.1", - "sea-orm-migration", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "mime_guess" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] - -[[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.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", -] - -[[package]] -name = "mpl-bubblegum" -version = "0.9.2" -source = "git+https://github.com/metaplex-foundation/mpl-bubblegum.git?rev=3cb3976d#3cb3976d816a1cfd8815430052075becf00afeee" -dependencies = [ - "anchor-lang", - "bytemuck", - "mpl-token-metadata", - "num-traits", - "solana-program", - "spl-account-compression", - "spl-associated-token-account", - "spl-token", -] - -[[package]] -name = "mpl-candy-guard" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74716390c0cf2d13c97080706e4c281aba5083db523655a38dd56a2db2b085d8" -dependencies = [ - "anchor-lang", - "arrayref", - "mpl-candy-guard-derive", - "mpl-candy-machine-core", - "mpl-token-metadata", - "solana-gateway", - "solana-program", - "spl-associated-token-account", - "spl-token", -] - -[[package]] -name = "mpl-candy-guard-derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4d3002ea881e94a238798faf87a006a687297a24bd4b3f810fbb63611173d" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "mpl-candy-machine-core" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "979975275820465e1ae68742c2ca86af143d07097a0b174ed6f7687be697d8f3" -dependencies = [ - "anchor-lang", - "arrayref", - "mpl-token-metadata", - "solana-program", - "spl-associated-token-account", - "spl-token", -] - -[[package]] -name = "mpl-token-auth-rules" -version = "1.4.3-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a34d740606a10a9dac7507d0c9025d72e0ce311c68ae85b6634982cf69a9c6" -dependencies = [ - "borsh 0.9.3", - "bytemuck", - "mpl-token-metadata-context-derive 0.2.1", - "num-derive", - "num-traits", - "rmp-serde", - "serde", - "shank", - "solana-program", - "solana-zk-token-sdk", - "thiserror", -] - -[[package]] -name = "mpl-token-metadata" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "654976568c99887549e1291e7b7e55ae31a70732e56ebb25cb1cdfc08c018333" -dependencies = [ - "arrayref", - "borsh 0.9.3", - "mpl-token-auth-rules", - "mpl-token-metadata-context-derive 0.3.0", - "mpl-utils", - "num-derive", - "num-traits", - "serde", - "serde_with", - "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", - "syn 1.0.109", -] - -[[package]] -name = "mpl-token-metadata-context-derive" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a739019e11d93661a64ef5fe108ab17c79b35961e944442ff6efdd460ad01a" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "mpl-utils" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2e4f92aec317d5853c0cc4c03c55f5178511c45bb3dbb441aea63117bf3dc9" -dependencies = [ - "arrayref", - "solana-program", - "spl-token-2022", -] - -[[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 = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "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-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "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", - "quote", - "syn 1.0.109", -] - -[[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-traits" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.2", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "object" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[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.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[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.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "os_str_bytes" -version = "6.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" - -[[package]] -name = "ouroboros" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" -dependencies = [ - "aliasable", - "ouroboros_macro", -] - -[[package]] -name = "ouroboros_macro" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" -dependencies = [ - "Inflector", - "proc-macro-error", - "proc-macro2", - "quote", - "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.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - -[[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 0.9.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.3.5", - "smallvec", - "windows-targets", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[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.7", -] - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "pin-project-lite" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "plerkle_serialization" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b468c4528b0e3d4f7db608e08bfcfb5893892f8cd6fd7a427458eb537bdc0311" -dependencies = [ - "bs58 0.4.0", - "chrono", - "flatbuffers", - "serde", - "solana-sdk", - "solana-transaction-status", - "thiserror", -] - -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys", -] - -[[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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -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", - "quote", - "syn 1.0.109", - "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", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proc-macro2-diagnostics" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", - "yansi", -] - -[[package]] -name = "ptr_meta" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "qstring" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[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.10", -] - -[[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.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom 0.2.10", - "redox_syscall 0.2.16", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.3.6", - "regex-syntax 0.7.4", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.7.4", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" - -[[package]] -name = "rend" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" -dependencies = [ - "bytecheck", -] - -[[package]] -name = "reqwest" -version = "0.11.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" -dependencies = [ - "async-compression", - "base64 0.21.2", - "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 0.21.6", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-native-tls", - "tokio-rustls 0.24.1", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots 0.25.2", - "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 = "rkyv" -version = "0.7.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" -dependencies = [ - "bitvec", - "bytecheck", - "hashbrown 0.12.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "rmp" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" -dependencies = [ - "byteorder", - "num-traits", - "paste", -] - -[[package]] -name = "rmp-serde" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" -dependencies = [ - "byteorder", - "rmp", - "serde", -] - -[[package]] -name = "rust_decimal" -version = "1.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c4216490d5a413bc6d10fa4742bd7d4955941d062c0ef873141d6b0e7b30fd" -dependencies = [ - "arrayvec", - "borsh 0.10.3", - "bytes", - "num-traits", - "rand 0.8.5", - "rkyv", - "serde", - "serde_json", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[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 = "rustix" -version = "0.37.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys", -] - -[[package]] -name = "rustix" -version = "0.38.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" -dependencies = [ - "bitflags 2.4.0", - "errno", - "libc", - "linux-raw-sys 0.4.5", - "windows-sys", -] - -[[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" -version = "0.21.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" -dependencies = [ - "log", - "ring", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" -dependencies = [ - "base64 0.21.2", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "schannel" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "schemars" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 1.0.109", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sea-orm" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88694d01b528a94f90ad87f8d2f546d060d070eee180315c67d158cb69476034" -dependencies = [ - "async-stream", - "async-trait", - "chrono", - "futures", - "futures-util", - "log", - "ouroboros", - "rust_decimal", - "sea-orm-macros", - "sea-query 0.27.2", - "sea-query-binder", - "sea-strum", - "serde", - "serde_json", - "sqlx", - "thiserror", - "time 0.3.27", - "tracing", - "url", - "uuid", -] - -[[package]] -name = "sea-orm-cli" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ebe1f820fe8949cf6a57272ba9ebd0be766e47c9b85c04b3cabea40ab9459b3" -dependencies = [ - "chrono", - "clap", - "dotenvy", - "regex", - "sea-schema", - "tracing", - "tracing-subscriber", - "url", -] - -[[package]] -name = "sea-orm-macros" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7216195de9c6b2474fd0efab486173dccd0eff21f28cc54aa4c0205d52fb3af0" -dependencies = [ - "bae", - "heck 0.3.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "sea-orm-migration" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed3cdfa669e4c385922f902b9a58e0c2128782a4d0fe79c6c34f3b927565e5b" -dependencies = [ - "async-trait", - "clap", - "dotenvy", - "sea-orm", - "sea-orm-cli", - "sea-schema", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "sea-query" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f0fc4d8e44e1d51c739a68d336252a18bc59553778075d5e32649be6ec92ed" -dependencies = [ - "chrono", - "rust_decimal", - "sea-query-derive 0.2.0", - "serde_json", - "time 0.3.27", - "uuid", -] - -[[package]] -name = "sea-query" -version = "0.28.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbab99b8cd878ab7786157b7eb8df96333a6807cc6e45e8888c85b51534b401a" -dependencies = [ - "sea-query-derive 0.3.0", -] - -[[package]] -name = "sea-query-binder" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2585b89c985cfacfe0ec9fc9e7bb055b776c1a2581c4e3c6185af2b8bf8865" -dependencies = [ - "chrono", - "rust_decimal", - "sea-query 0.27.2", - "serde_json", - "sqlx", - "time 0.3.27", - "uuid", -] - -[[package]] -name = "sea-query-derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cdc022b4f606353fe5dc85b09713a04e433323b70163e81513b141c6ae6eb5" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "syn 1.0.109", - "thiserror", -] - -[[package]] -name = "sea-query-derive" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63f62030c60f3a691f5fe251713b4e220b306e50a71e1d6f9cce1f24bb781978" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 1.0.109", - "thiserror", -] - -[[package]] -name = "sea-schema" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d5fda574d980e9352b6c7abd6fc75697436fe0078cac2b548559b52643ad3b" -dependencies = [ - "futures", - "sea-query 0.27.2", - "sea-schema-derive", -] - -[[package]] -name = "sea-schema-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56821b7076f5096b8f726e2791ad255a99c82498e08ec477a65a96c461ff1927" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "sea-strum" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391d06a6007842cfe79ac6f7f53911b76dfd69fc9a6769f1cf6569d12ce20e1b" -dependencies = [ - "sea-strum_macros", -] - -[[package]] -name = "sea-strum_macros" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b4397b825df6ccf1e98bcdabef3bbcfc47ff5853983467850eeab878384f21" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" - -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" - -[[package]] -name = "serde" -version = "1.0.186" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bytes" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.186" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[package]] -name = "serde_derive_internals" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "serde_json" -version = "1.0.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" -dependencies = [ - "indexmap 2.0.0", - "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_with" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" -dependencies = [ - "serde", - "serde_with_macros", -] - -[[package]] -name = "serde_with_macros" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[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.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[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.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "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", - "quote", - "shank_macro_impl", - "syn 1.0.109", -] - -[[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", - "quote", - "serde", - "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 = "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 = "simdutf8" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" - -[[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.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" - -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "sol-did" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2546d424d6898908c205d99d3af07ad42e2e8aec8f0d459235dc0bd4e9866fe" -dependencies = [ - "borsh 0.9.3", - "num-derive", - "num-traits", - "solana-program", - "thiserror", -] - -[[package]] -name = "solana-account-decoder" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714067d617d791bbfc3c4fd30de9e18e7b5f29b5c0853b1a17581a3e88389e71" -dependencies = [ - "Inflector", - "base64 0.13.1", - "bincode", - "bs58 0.4.0", - "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.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de77d93db1d7bdf5854c0cad36acb21cf6c44d3119834241e64e6916c92f232" -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-config-program" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbfadb7f09be905a08ed50090436c2e6e4bab17a84b8a4e03a94d79e5ce1693e" -dependencies = [ - "bincode", - "chrono", - "serde", - "serde_derive", - "solana-program-runtime", - "solana-sdk", -] - -[[package]] -name = "solana-frozen-abi" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63117658963482734ad016e6b94d2d74599ad0f591ca63d5e0f831e233a85cdb" -dependencies = [ - "ahash 0.7.6", - "blake3", - "block-buffer 0.9.0", - "bs58 0.4.0", - "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.7", - "solana-frozen-abi-macro", - "subtle", - "thiserror", -] - -[[package]] -name = "solana-frozen-abi-macro" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9eca469f181dcc35c81fb9e0c31c37d0d9abd13805e7cd82446b843a0232246" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 1.0.109", -] - -[[package]] -name = "solana-gateway" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243daaf437dff89891d520c3e9be7b4a6940c30a1bda2ac094e621046f303eda" -dependencies = [ - "bitflags 1.3.2", - "borsh 0.9.3", - "num-derive", - "num-traits", - "sol-did", - "solana-program", - "thiserror", -] - -[[package]] -name = "solana-logger" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e6356aa0978dcdac6404fca123fbfa4c3a329e609fa9921d0e2d8c8cdd921cb" -dependencies = [ - "env_logger", - "lazy_static", - "log", -] - -[[package]] -name = "solana-measure" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f84a46c881fc5ea3b955d1f2313ffa477aab3ec501782a1387319d2e2376d97" -dependencies = [ - "log", - "solana-sdk", -] - -[[package]] -name = "solana-metrics" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39d25eb6904dd33790f4fe47e48171677fd5402a2df2d82aee5453679ea46774" -dependencies = [ - "crossbeam-channel", - "gethostname", - "lazy_static", - "log", - "reqwest", - "solana-sdk", -] - -[[package]] -name = "solana-program" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8481b0678be8450c423686483319076b2babf11f08cbc48aa6fae9f5cf1232ca" -dependencies = [ - "base64 0.13.1", - "bincode", - "bitflags 1.3.2", - "blake3", - "borsh 0.9.3", - "borsh-derive 0.9.3", - "bs58 0.4.0", - "bv", - "bytemuck", - "cc", - "console_error_panic_hook", - "console_log", - "curve25519-dalek", - "getrandom 0.2.10", - "itertools", - "js-sys", - "lazy_static", - "libc", - "libsecp256k1", - "log", - "memoffset 0.6.5", - "num-derive", - "num-traits", - "parking_lot 0.12.1", - "rand 0.7.3", - "rand_chacha 0.2.2", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "sha2 0.10.7", - "sha3 0.10.8", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sdk-macro", - "thiserror", - "tiny-bip39", - "wasm-bindgen", - "zeroize", -] - -[[package]] -name = "solana-program-runtime" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0b59b03f3fc3f27f9bac7e2d79923b9b9cde9a77bf9272724fc75f6a78af757" -dependencies = [ - "base64 0.13.1", - "bincode", - "eager", - "enum-iterator 0.8.1", - "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-sdk" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e67eb3cfd29f62d776fa248d57b730da8d927fa83c81b50cc6683b3f80c87429" -dependencies = [ - "assert_matches", - "base64 0.13.1", - "bincode", - "bitflags 1.3.2", - "borsh 0.9.3", - "bs58 0.4.0", - "bytemuck", - "byteorder", - "chrono", - "derivation-path", - "digest 0.10.7", - "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.7", - "sha3 0.10.8", - "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.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a86d529a78915940dcbdfd46d07fa7d64ac0e57a2688d7201fff5a55318653" -dependencies = [ - "bs58 0.4.0", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[package]] -name = "solana-transaction-status" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e8031a9c3bdc2488bdd8223d0dcc879960310be8b25f1296308cf2b4d9e02d0" -dependencies = [ - "Inflector", - "base64 0.13.1", - "bincode", - "borsh 0.9.3", - "bs58 0.4.0", - "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-vote-program" -version = "1.14.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61bb156d6953023d59b2473d18cdb135b4b26eef94e669a9ee3d412edeb6d1f8" -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.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2853efabded5dce340cb67dc1f28f6db75dac219d9d9142d81073e2c43c9b7a" -dependencies = [ - "aes-gcm-siv", - "arrayref", - "base64 0.13.1", - "bincode", - "bytemuck", - "byteorder", - "cipher 0.4.4", - "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 = "spl-account-compression" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a5417eae3c924553b872de5f1bca5945334a235f8d94841bd44c6dd7c6358c" -dependencies = [ - "anchor-lang", - "bytemuck", - "spl-concurrent-merkle-tree", - "spl-noop", -] - -[[package]] -name = "spl-associated-token-account" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" -dependencies = [ - "assert_matches", - "borsh 0.9.3", - "num-derive", - "num-traits", - "solana-program", - "spl-token", - "spl-token-2022", - "thiserror", -] - -[[package]] -name = "spl-concurrent-merkle-tree" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26dd605d33bdc8d2522a9f55207c3eac06737b2e8310f602e252b510e3db1210" -dependencies = [ - "bytemuck", - "solana-program", - "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-noop" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558536c75b5aed018113bfca39cddb414cd7ca77da7658d668e751d977830cda" -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.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive", - "num-traits", - "num_enum", - "solana-program", - "solana-zk-token-sdk", - "spl-memo", - "spl-token", - "thiserror", -] - -[[package]] -name = "sqlformat" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" -dependencies = [ - "itertools", - "nom", - "unicode_categories", -] - -[[package]] -name = "sqlx" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8de3b03a925878ed54a954f621e64bf55a3c1bd29652d0d1a17830405350188" -dependencies = [ - "sqlx-core", - "sqlx-macros", -] - -[[package]] -name = "sqlx-core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" -dependencies = [ - "ahash 0.7.6", - "atoi", - "base64 0.13.1", - "bitflags 1.3.2", - "byteorder", - "bytes", - "chrono", - "crc", - "crossbeam-queue", - "dirs", - "dotenvy", - "either", - "event-listener", - "futures-channel", - "futures-core", - "futures-intrusive", - "futures-util", - "hashlink", - "hex", - "hkdf", - "hmac 0.12.1", - "indexmap 1.9.3", - "itoa", - "libc", - "log", - "md-5", - "memchr", - "num-bigint", - "once_cell", - "paste", - "percent-encoding", - "rand 0.8.5", - "rust_decimal", - "rustls 0.20.8", - "rustls-pemfile", - "serde", - "serde_json", - "sha1", - "sha2 0.10.7", - "smallvec", - "sqlformat", - "sqlx-rt", - "stringprep", - "thiserror", - "time 0.3.27", - "tokio-stream", - "url", - "uuid", - "webpki-roots 0.22.6", - "whoami", -] - -[[package]] -name = "sqlx-macros" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9966e64ae989e7e575b19d7265cb79d7fc3cbbdf179835cb0d716f294c2049c9" -dependencies = [ - "dotenvy", - "either", - "heck 0.4.1", - "once_cell", - "proc-macro2", - "quote", - "serde_json", - "sha2 0.10.7", - "sqlx-core", - "sqlx-rt", - "syn 1.0.109", - "url", -] - -[[package]] -name = "sqlx-rt" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804d3f245f894e61b1e6263c84b23ca675d96753b5abfd5cc8597d86806e8024" -dependencies = [ - "once_cell", - "tokio", - "tokio-rustls 0.23.4", -] - -[[package]] -name = "stringprep" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[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 = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" -dependencies = [ - "cfg-if", - "fastrand 2.0.0", - "redox_syscall 0.3.5", - "rustix 0.38.8", - "windows-sys", -] - -[[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.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - -[[package]] -name = "thiserror" -version = "1.0.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[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" -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.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" -dependencies = [ - "deranged", - "itoa", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" - -[[package]] -name = "time-macros" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" -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.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot 0.12.1", - "pin-project-lite", - "signal-hook-registry", - "socket2 0.5.3", - "tokio-macros", - "windows-sys", -] - -[[package]] -name = "tokio-macros" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[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 0.20.8", - "tokio", - "webpki", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.6", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" -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.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" - -[[package]] -name = "toml_edit" -version = "0.19.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" -dependencies = [ - "indexmap 2.0.0", - "toml_datetime", - "winnow", -] - -[[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", - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[package]] -name = "tracing-core" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" -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-subscriber" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "try-lock" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - -[[package]] -name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" - -[[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-segmentation" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - -[[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.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "uuid" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" -dependencies = [ - "getrandom 0.2.10", - "serde", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "value-bag" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "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.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.29", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" - -[[package]] -name = "web-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" -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 = "webpki-roots" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" - -[[package]] -name = "whoami" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" -dependencies = [ - "wasm-bindgen", - "web-sys", -] - -[[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" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "winnow" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - -[[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.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.29", -] - -[[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.8+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" -dependencies = [ - "cc", - "libc", - "pkg-config", -] diff --git a/migration/Cargo.toml b/migration/Cargo.toml deleted file mode 100644 index a7f6a9f94..000000000 --- a/migration/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] -name = "migration" -version = "0.7.2" -edition = "2021" -publish = false - -[lib] -name = "migration" -path = "src/lib.rs" - -[dependencies] -async-std = { version = "^1", features = ["attributes", "tokio1", ] } -digital_asset_types = { path = "../digital_asset_types", features = ["json_types", "sql_types"] } -enum-iterator = "1.2.0" -enum-iterator-derive = "1.1.0" - -[dependencies.sea-orm-migration] -version = "0.10.6" -features = [ - "runtime-tokio-rustls", - "sqlx-postgres", -] diff --git a/migration/README.md b/migration/README.md deleted file mode 100644 index c7988d01a..000000000 --- a/migration/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Running Migrator CLI - -- Generate a new migration file - ```sh - DATABASE_URL=postgres://uname:passwd@host:5432/db cargo run -- generate MIGRATION_NAME - ``` -- Apply all pending migrations - ```sh - INIT_FILE_PATH=../init.sql DATABASE_URL=postgres://uname:passwd@host:5432/db cargo run -- up - ``` -- Apply first 10 pending migrations - ```sh - cargo run -- up -n 10 - ``` -- Rollback last applied migrations - ```sh - cargo run -- down - ``` -- Rollback last 10 applied migrations - ```sh - cargo run -- down -n 10 - ``` -- Drop all tables from the database, then reapply all migrations - ```sh - cargo run -- fresh - ``` -- Rollback all applied migrations, then reapply all migrations - ```sh - cargo run -- refresh - ``` -- Rollback all applied migrations - ```sh - cargo run -- reset - ``` -- Check the status of all migrations - ```sh - cargo run -- status - ``` diff --git a/migration/src/lib.rs b/migration/src/lib.rs deleted file mode 100644 index eb47577c8..000000000 --- a/migration/src/lib.rs +++ /dev/null @@ -1,68 +0,0 @@ -pub use sea_orm_migration::prelude::*; - -mod m20220101_000001_init; -mod m20221020_052135_add_asset_hashes; -mod m20221022_140350_add_creator_asset_unique_index; -mod m20221025_182127_remove_creator_error_unique_index; -mod m20221026_155220_add_bg_tasks; -mod m20221104_094327_add_backfiller_failed; -mod m20221114_173041_add_collection_info; -mod m20221115_165700_add_backfiller_locked; -mod m20221116_110500_add_backfiller_failed_and_locked_indeces; -mod m20230105_160722_drop_collection_info; -mod m20230106_051135_unique_groupings; -mod m20230131_140613_change_token_account_indexes; -mod m20230203_205959_improve_upsert_perf; -mod m20230224_093722_performance_improvements; -mod m20230310_162227_add_indexes_to_bg; -mod m20230317_121944_remove_indexes_for_perf; -mod m20230510_183736_add_indices_to_assets; -mod m20230516_185005_add_reindex_to_assets; -mod m20230526_120101_add_owner_delegate_sequence_number; -mod m20230601_120101_add_pnft_enum_val; -mod m20230615_120101_remove_asset_null_constraints; -mod m20230620_120101_add_was_decompressed; -mod m20230623_120101_add_leaf_sequence_number; -mod m20230712_120101_remove_asset_creators_null_constraints; -mod m20230720_120101_add_asset_grouping_verified; -mod m20230720_130101_remove_asset_grouping_null_constraints; -mod m20230724_120101_add_group_info_seq; -mod m20230726_013107_remove_not_null_constraint_from_group_value; - -pub struct Migrator; - -#[async_trait::async_trait] -impl MigratorTrait for Migrator { - fn migrations() -> Vec> { - vec![ - Box::new(m20220101_000001_init::Migration), - Box::new(m20221020_052135_add_asset_hashes::Migration), - Box::new(m20221022_140350_add_creator_asset_unique_index::Migration), - Box::new(m20221025_182127_remove_creator_error_unique_index::Migration), - Box::new(m20221026_155220_add_bg_tasks::Migration), - Box::new(m20221104_094327_add_backfiller_failed::Migration), - Box::new(m20221114_173041_add_collection_info::Migration), - Box::new(m20221115_165700_add_backfiller_locked::Migration), - Box::new(m20221116_110500_add_backfiller_failed_and_locked_indeces::Migration), - Box::new(m20230105_160722_drop_collection_info::Migration), - Box::new(m20230106_051135_unique_groupings::Migration), - Box::new(m20230131_140613_change_token_account_indexes::Migration), - Box::new(m20230203_205959_improve_upsert_perf::Migration), - Box::new(m20230224_093722_performance_improvements::Migration), - Box::new(m20230310_162227_add_indexes_to_bg::Migration), - Box::new(m20230317_121944_remove_indexes_for_perf::Migration), - Box::new(m20230510_183736_add_indices_to_assets::Migration), - Box::new(m20230516_185005_add_reindex_to_assets::Migration), - Box::new(m20230526_120101_add_owner_delegate_sequence_number::Migration), - Box::new(m20230601_120101_add_pnft_enum_val::Migration), - Box::new(m20230615_120101_remove_asset_null_constraints::Migration), - Box::new(m20230620_120101_add_was_decompressed::Migration), - Box::new(m20230623_120101_add_leaf_sequence_number::Migration), - Box::new(m20230726_013107_remove_not_null_constraint_from_group_value::Migration), - Box::new(m20230712_120101_remove_asset_creators_null_constraints::Migration), - Box::new(m20230720_120101_add_asset_grouping_verified::Migration), - Box::new(m20230720_130101_remove_asset_grouping_null_constraints::Migration), - Box::new(m20230724_120101_add_group_info_seq::Migration), - ] - } -} diff --git a/migration/src/m20220101_000001_init.rs b/migration/src/m20220101_000001_init.rs deleted file mode 100644 index da6768ef5..000000000 --- a/migration/src/m20220101_000001_init.rs +++ /dev/null @@ -1,41 +0,0 @@ -use sea_orm::Statement; -use sea_orm_migration::prelude::*; -use sea_orm_migration::sea_orm::ConnectionTrait; -use std::env; -use std::fs::File; -use std::io::Read; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - let init_file_path = env::var("INIT_FILE_PATH").expect("INIT_FILE_PATH must be set"); - let mut file = File::open(init_file_path).map_err(|e| DbErr::Custom(e.to_string()))?; - let mut sql = String::new(); - file.read_to_string(&mut sql) - .map_err(|e| DbErr::Custom(e.to_string()))?; - let sqls: Vec<&str> = sql.split("-- @@@@@@").collect(); - for sqlst in sqls { - let stmt = Statement::from_string(manager.get_database_backend(), sqlst.to_string()); - manager.get_connection().execute(stmt).await.map(|_| ())?; - } - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - let sql = r#" - DROP TABLE IF EXISTS `asset`; - DROP TABLE IF EXISTS `asset_data`;cd - DROP TABLE IF EXISTS `asset_authority`; - DROP TABLE IF EXISTS `asset_v1_account_attachments`; - DROP TABLE IF EXISTS `asset_grouping`; - DROP TABLE IF EXISTS `asset_creators`; - DROP TABLE IF EXISTS `tokens`; - DROP TABLE IF EXISTS `token_accounts`; - "#; - let stmt = Statement::from_string(manager.get_database_backend(), sql.to_owned()); - manager.get_connection().execute(stmt).await.map(|_| ()) - } -} diff --git a/migration/src/m20221020_052135_add_asset_hashes.rs b/migration/src/m20221020_052135_add_asset_hashes.rs deleted file mode 100644 index b2fe6f4c2..000000000 --- a/migration/src/m20221020_052135_add_asset_hashes.rs +++ /dev/null @@ -1,56 +0,0 @@ -use digital_asset_types::dao::asset; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .add_column( - ColumnDef::new(Alias::new("data_hash")) - .string() - .char_len(50), - ) - .to_owned(), - ) - .await?; - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .add_column( - ColumnDef::new(Alias::new("creator_hash")) - .string() - .char_len(50), - ) - .to_owned(), - ) - .await?; - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .drop_column(Alias::new("data_hash")) - .to_owned(), - ) - .await?; - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .drop_column(Alias::new("creator_hash")) - .to_owned(), - ) - .await?; - Ok(()) - } -} diff --git a/migration/src/m20221022_140350_add_creator_asset_unique_index.rs b/migration/src/m20221022_140350_add_creator_asset_unique_index.rs deleted file mode 100644 index 72deb33d9..000000000 --- a/migration/src/m20221022_140350_add_creator_asset_unique_index.rs +++ /dev/null @@ -1,85 +0,0 @@ -use digital_asset_types::dao::asset_creators; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .drop_index( - sea_query::Index::drop() - .name("asset_creator") - .table(asset_creators::Entity) - .to_owned(), - ) - .await?; - manager - .alter_table( - Table::alter() - .table(asset_creators::Entity) - .add_column( - ColumnDef::new(Alias::new("position")) - .small_integer() - .not_null() - .default(-1), - ) - .to_owned(), - ) - .await?; - manager - .create_index( - Index::create() - .unique() - .name("asset_creator_unique") - .col(asset_creators::Column::AssetId) - .col(asset_creators::Column::Creator) - .table(asset_creators::Entity) - .to_owned(), - ) - .await?; - manager - .create_index( - Index::create() - .unique() - .name("asset_creator_pos_unique") - .col(asset_creators::Column::AssetId) - .col(Alias::new("position")) - .table(asset_creators::Entity) - .to_owned(), - ) - .await?; - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .drop_index( - sea_query::Index::drop() - .name("asset_creator_unique") - .table(asset_creators::Entity) - .to_owned(), - ) - .await?; - manager - .drop_index( - sea_query::Index::drop() - .name("asset_creator_pos_unique") - .table(asset_creators::Entity) - .to_owned(), - ) - .await?; - manager - .create_index( - sea_query::Index::create() - .name("asset_creator") - .col(asset_creators::Column::AssetId) - .col(asset_creators::Column::Creator) - .table(asset_creators::Entity) - .to_owned(), - ) - .await?; - Ok(()) - } -} diff --git a/migration/src/m20221025_182127_remove_creator_error_unique_index.rs b/migration/src/m20221025_182127_remove_creator_error_unique_index.rs deleted file mode 100644 index 37d7f4b93..000000000 --- a/migration/src/m20221025_182127_remove_creator_error_unique_index.rs +++ /dev/null @@ -1,26 +0,0 @@ -use digital_asset_types::dao::asset_creators; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - manager - .drop_index( - sea_query::Index::drop() - .name("asset_creators_asset_id") - .table(asset_creators::Entity) - .to_owned(), - ) - .await?; - Ok(()) - } - - async fn down(&self, _manager: &SchemaManager) -> Result<(), DbErr> { - println!("Down migration not implemented"); - Ok(()) - } -} diff --git a/migration/src/m20221026_155220_add_bg_tasks.rs b/migration/src/m20221026_155220_add_bg_tasks.rs deleted file mode 100644 index 3debeaf9b..000000000 --- a/migration/src/m20221026_155220_add_bg_tasks.rs +++ /dev/null @@ -1,95 +0,0 @@ - -use enum_iterator::{all, Sequence}; -use sea_orm_migration::prelude::extension::postgres::Type; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .create_type( - Type::create() - .as_enum(Tasks::TaskStatus) - .values(vec![ - TaskStatus::Pending, - TaskStatus::Running, - TaskStatus::Success, - TaskStatus::Failed, - ]) - .to_owned(), - ) - .await?; - manager - .create_table( - Table::create() - .table(Tasks::Table) - .if_not_exists() - .col(ColumnDef::new(Tasks::Id).string().not_null().primary_key()) - .col(ColumnDef::new(Tasks::TaskType).string().not_null()) - .col(ColumnDef::new(Tasks::Data).json_binary().not_null()) - .col( - ColumnDef::new(Tasks::Status) - .enumeration( - Tasks::TaskStatus, - all::() - .map(|e| e) - .collect::>(), - ) - .not_null(), - ) - .col(ColumnDef::new(Tasks::CreatedAt).date_time().not_null()) - .col(ColumnDef::new(Tasks::LockedUntil).date_time().null()) - .col(ColumnDef::new(Tasks::LockedBy).string().null()) - .col( - ColumnDef::new(Tasks::MaxAttempts) - .small_integer() - .not_null() - .default(1), - ) - .col( - ColumnDef::new(Tasks::Attempts) - .small_integer() - .not_null() - .default(0), - ) - .col(ColumnDef::new(Tasks::Duration).integer().null()) - .col(ColumnDef::new(Tasks::Errors).text().null()) - .to_owned(), - ) - .await?; - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .drop_table(Table::drop().table(Tasks::Table).to_owned()) - .await - } -} -#[derive(Iden, Debug, PartialEq, Sequence)] -enum TaskStatus { - Pending, - Running, - Success, - Failed, -} - -#[derive(Iden)] -enum Tasks { - TaskStatus, - Table, - Id, - TaskType, - Data, - MaxAttempts, - Attempts, - Status, - LockedUntil, - LockedBy, - CreatedAt, - Duration, - Errors, -} diff --git a/migration/src/m20221104_094327_add_backfiller_failed.rs b/migration/src/m20221104_094327_add_backfiller_failed.rs deleted file mode 100644 index a5972ad46..000000000 --- a/migration/src/m20221104_094327_add_backfiller_failed.rs +++ /dev/null @@ -1,37 +0,0 @@ -use digital_asset_types::dao::backfill_items; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - manager - .alter_table( - Table::alter() - .table(backfill_items::Entity) - .add_column( - ColumnDef::new(Alias::new("failed")) - .boolean() - .not_null() - .default(false), - ) - .to_owned(), - ) - .await - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - manager - .alter_table( - Table::alter() - .table(backfill_items::Entity) - .drop_column(Alias::new("failed")) - .to_owned(), - ) - .await - } -} diff --git a/migration/src/m20221114_173041_add_collection_info.rs b/migration/src/m20221114_173041_add_collection_info.rs deleted file mode 100644 index d48b890c3..000000000 --- a/migration/src/m20221114_173041_add_collection_info.rs +++ /dev/null @@ -1,56 +0,0 @@ -use digital_asset_types::dao::asset; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .add_column(ColumnDef::new(Alias::new("collection")).binary()) - .to_owned(), - ) - .await?; - - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .add_column( - ColumnDef::new(Alias::new("collection_verified")) - .boolean() - .default(false) - .not_null(), - ) - .to_owned(), - ) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .drop_column(Alias::new("collection")) - .to_owned(), - ) - .await?; - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .drop_column(Alias::new("collection_verified")) - .to_owned(), - ) - .await?; - - Ok(()) - } -} diff --git a/migration/src/m20221115_165700_add_backfiller_locked.rs b/migration/src/m20221115_165700_add_backfiller_locked.rs deleted file mode 100644 index 0d5955c7d..000000000 --- a/migration/src/m20221115_165700_add_backfiller_locked.rs +++ /dev/null @@ -1,37 +0,0 @@ -use digital_asset_types::dao::backfill_items; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - manager - .alter_table( - Table::alter() - .table(backfill_items::Entity) - .add_column( - ColumnDef::new(Alias::new("locked")) - .boolean() - .not_null() - .default(false), - ) - .to_owned(), - ) - .await - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - manager - .alter_table( - Table::alter() - .table(backfill_items::Entity) - .drop_column(Alias::new("locked")) - .to_owned(), - ) - .await - } -} diff --git a/migration/src/m20221116_110500_add_backfiller_failed_and_locked_indeces.rs b/migration/src/m20221116_110500_add_backfiller_failed_and_locked_indeces.rs deleted file mode 100644 index 605568ff2..000000000 --- a/migration/src/m20221116_110500_add_backfiller_failed_and_locked_indeces.rs +++ /dev/null @@ -1,87 +0,0 @@ -use digital_asset_types::dao::backfill_items; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .create_index( - Index::create() - .name("backfill_items_failed_idx") - .col(backfill_items::Column::Failed) - .table(backfill_items::Entity) - .to_owned(), - ) - .await?; - manager - .create_index( - Index::create() - .name("backfill_items_tree_failed_idx") - .col(backfill_items::Column::Tree) - .col(backfill_items::Column::Failed) - .table(backfill_items::Entity) - .to_owned(), - ) - .await?; - manager - .create_index( - Index::create() - .name("backfill_items_locked_idx") - .col(backfill_items::Column::Locked) - .table(backfill_items::Entity) - .to_owned(), - ) - .await?; - manager - .create_index( - Index::create() - .name("backfill_items_tree_locked_idx") - .col(backfill_items::Column::Tree) - .col(backfill_items::Column::Locked) - .table(backfill_items::Entity) - .to_owned(), - ) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .drop_index( - sea_query::Index::drop() - .name("backfill_items_failed_idx") - .table(backfill_items::Entity) - .to_owned(), - ) - .await?; - manager - .drop_index( - sea_query::Index::drop() - .name("backfill_items_tree_failed_idx") - .table(backfill_items::Entity) - .to_owned(), - ) - .await?; - manager - .drop_index( - sea_query::Index::drop() - .name("backfill_items_locked_idx") - .table(backfill_items::Entity) - .to_owned(), - ) - .await?; - manager - .drop_index( - sea_query::Index::drop() - .name("backfill_items_tree_locked_idx") - .table(backfill_items::Entity) - .to_owned(), - ) - .await?; - Ok(()) - } -} diff --git a/migration/src/m20230105_160722_drop_collection_info.rs b/migration/src/m20230105_160722_drop_collection_info.rs deleted file mode 100644 index 833b91caa..000000000 --- a/migration/src/m20230105_160722_drop_collection_info.rs +++ /dev/null @@ -1,56 +0,0 @@ -use digital_asset_types::dao::asset; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .drop_column(Alias::new("collection")) - .to_owned(), - ) - .await?; - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .drop_column(Alias::new("collection_verified")) - .to_owned(), - ) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .add_column(ColumnDef::new(Alias::new("collection")).binary()) - .to_owned(), - ) - .await?; - - manager - .alter_table( - sea_query::Table::alter() - .table(asset::Entity) - .add_column( - ColumnDef::new(Alias::new("collection_verified")) - .boolean() - .default(false) - .not_null(), - ) - .to_owned(), - ) - .await?; - - Ok(()) - } -} diff --git a/migration/src/m20230106_051135_unique_groupings.rs b/migration/src/m20230106_051135_unique_groupings.rs deleted file mode 100644 index 5caa14c5c..000000000 --- a/migration/src/m20230106_051135_unique_groupings.rs +++ /dev/null @@ -1,54 +0,0 @@ -use digital_asset_types::dao::asset_grouping; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .drop_index( - sea_query::Index::drop() - .name("asset_grouping_value") - .table(asset_grouping::Entity) - .to_owned(), - ) - .await?; - manager - .create_index( - Index::create() - .unique() - .name("asset_grouping_key_unique") - .col(asset_grouping::Column::AssetId) - .col(asset_grouping::Column::GroupKey) - .table(asset_grouping::Entity) - .to_owned(), - ) - .await?; - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .drop_index( - sea_query::Index::drop() - .name("asset_grouping_key_unique") - .table(asset_grouping::Entity) - .to_owned(), - ) - .await?; - - manager - .create_index( - sea_query::Index::create() - .name("asset_grouping_value") - .col(asset_grouping::Column::AssetId) - .col(asset_grouping::Column::GroupKey) - .table(asset_grouping::Entity) - .to_owned(), - ) - .await?; - Ok(()) - } -} diff --git a/migration/src/m20230131_140613_change_token_account_indexes.rs b/migration/src/m20230131_140613_change_token_account_indexes.rs deleted file mode 100644 index 81a6925af..000000000 --- a/migration/src/m20230131_140613_change_token_account_indexes.rs +++ /dev/null @@ -1,96 +0,0 @@ -use digital_asset_types::dao::token_accounts; -use sea_orm_migration::{ - prelude::*, - sea_orm::{ConnectionTrait, DatabaseBackend, Statement}, -}; -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .drop_index( - sea_query::Index::drop() - .name("ta_amount") - .table(token_accounts::Entity) - .to_owned(), - ) - .await?; - - manager - .drop_index( - sea_query::Index::drop() - .name("ta_amount_del") - .table(token_accounts::Entity) - .to_owned(), - ) - .await?; - - manager - .drop_index( - sea_query::Index::drop() - .name("ta_slot_updated_idx") - .table(token_accounts::Entity) - .to_owned(), - ) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "ALTER TABLE token_accounts SET (fillfactor = 70);".to_string(), - )) - .await?; - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "ALTER TABLE token_accounts SET (fillfactor = 90);".to_string(), - )) - .await?; - manager - .create_index( - sea_query::Index::create() - .name("ta_amount") - .index_type(sea_query::IndexType::BTree) - .col(token_accounts::Column::Amount) - .table(token_accounts::Entity) - .to_owned(), - ) - .await?; - - manager - .create_index( - sea_query::Index::create() - .name("ta_amount_del") - .index_type(sea_query::IndexType::BTree) - .col(token_accounts::Column::DelegatedAmount) - .table(token_accounts::Entity) - .to_owned(), - ) - .await?; - - manager - .create_index( - sea_query::Index::create() - .name("ta_slot_updated_idx") - .index_type(sea_query::IndexType::BTree) - .table(token_accounts::Entity) - .to_owned(), - ) - .await?; - Ok(()) - } -} - -/// Learn more at https://docs.rs/sea-query#iden -#[derive(Iden)] -enum Index { - BRIN, -} diff --git a/migration/src/m20230203_205959_improve_upsert_perf.rs b/migration/src/m20230203_205959_improve_upsert_perf.rs deleted file mode 100644 index 1e3272689..000000000 --- a/migration/src/m20230203_205959_improve_upsert_perf.rs +++ /dev/null @@ -1,77 +0,0 @@ -use digital_asset_types::dao::{asset_data, tokens}; -use sea_orm_migration::{ - prelude::*, - sea_orm::{ConnectionTrait, DatabaseBackend, Statement}, -}; -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .drop_index( - sea_query::Index::drop() - .name("t_slot_updated_idx") - .table(tokens::Entity) - .to_owned(), - ) - .await?; - - manager - .drop_index( - sea_query::Index::drop() - .name("t_supply") - .table(tokens::Entity) - .to_owned(), - ) - .await?; - - manager - .drop_index( - sea_query::Index::drop() - .name("t_decimals") - .table(tokens::Entity) - .to_owned(), - ) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "ALTER TABLE tokens SET (fillfactor = 70);".to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "ALTER TABLE asset SET (fillfactor = 85);".to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "ALTER TABLE asset SET (fillfactor = 85);".to_string(), - )) - .await?; - - manager - .drop_index( - sea_query::Index::drop() - .name("slot_updated_idx") - .table(asset_data::Entity) - .to_owned(), - ) - .await?; - Ok(()) - } - - async fn down(&self, _manager: &SchemaManager) -> Result<(), DbErr> { - Ok(()) - } -} diff --git a/migration/src/m20230224_093722_performance_improvements.rs b/migration/src/m20230224_093722_performance_improvements.rs deleted file mode 100644 index a577d9223..000000000 --- a/migration/src/m20230224_093722_performance_improvements.rs +++ /dev/null @@ -1,141 +0,0 @@ - -use sea_orm_migration::{ - prelude::*, - sea_orm::{ConnectionTrait, DatabaseBackend, Statement}, -}; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "ALTER TABLE tokens SET (fillfactor = 95);".to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "ALTER TABLE asset SET (fillfactor = 95);".to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "ALTER TABLE asset SET (fillfactor = 95);".to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - DROP INDEX IF EXISTS ta_delegate; - " - .to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - DROP INDEX IF EXISTS asset_revision; - " - .to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - ALTER TABLE asset DROP CONSTRAINT IF EXISTS asset_asset_data_fkey; - " - .to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - DROP INDEX IF EXISTS asset_tree_leaf; - " - .to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - ALTER TABLE asset_authority DROP CONSTRAINT IF EXISTS asset_authority_asset_id_fkey; - " - .to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - ALTER TABLE asset_creators DROP CONSTRAINT IF EXISTS asset_creators_asset_id_fkey; - " - .to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - ALTER TABLE asset_grouping DROP CONSTRAINT IF EXISTS asset_grouping_asset_id_fkey; - " - .to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - ALTER TABLE asset_v1_account_attachments DROP CONSTRAINT IF EXISTS asset_v1_account_attachments_asset_id_fkey; - ".to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - DROP INDEX IF EXISTS asset_grouping_asset_id; - " - .to_string(), - )) - .await?; - - Ok(()) - } - - async fn down(&self, _manager: &SchemaManager) -> Result<(), DbErr> { - Ok(()) - } -} diff --git a/migration/src/m20230310_162227_add_indexes_to_bg.rs b/migration/src/m20230310_162227_add_indexes_to_bg.rs deleted file mode 100644 index b8f9a501f..000000000 --- a/migration/src/m20230310_162227_add_indexes_to_bg.rs +++ /dev/null @@ -1,84 +0,0 @@ -use digital_asset_types::dao::tasks; -use sea_orm_migration::{ - prelude::*, - sea_orm::{ConnectionTrait, DatabaseBackend, Statement}, -}; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "CREATE INDEX IF NOT EXISTS tasks_created_at ON tasks USING BRIN(created_at);" - .to_string(), - )) - .await?; - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "CREATE INDEX IF NOT EXISTS tasks_locked_until ON tasks USING BRIN(locked_until);" - .to_string(), - )) - .await?; - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "CREATE INDEX IF NOT EXISTS task_attempts ON tasks USING BRIN(attempts);" - .to_string(), - )) - .await?; - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "CREATE INDEX IF NOT EXISTS task_status ON tasks (status);" - .to_string(), - )) - .await?; - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - manager - .drop_index( - sea_query::Index::drop() - .name("tasks_created_at") - .table(tasks::Entity) - .to_owned(), - ) - .await?; - manager - .drop_index( - sea_query::Index::drop() - .name("tasks_locked_until") - .table(tasks::Entity) - .to_owned(), - ) - .await?; - manager - .drop_index( - sea_query::Index::drop() - .name("task_attempts") - .table(tasks::Entity) - .to_owned(), - ) - .await?; - manager - .drop_index( - sea_query::Index::drop() - .name("task_status") - .table(tasks::Entity) - .to_owned(), - ) - .await?; - Ok(()) - } -} \ No newline at end of file diff --git a/migration/src/m20230317_121944_remove_indexes_for_perf.rs b/migration/src/m20230317_121944_remove_indexes_for_perf.rs deleted file mode 100644 index 1643b8cea..000000000 --- a/migration/src/m20230317_121944_remove_indexes_for_perf.rs +++ /dev/null @@ -1,82 +0,0 @@ -use sea_orm_migration::prelude::*; -use sea_orm_migration::{ - sea_orm::{ConnectionTrait, DatabaseBackend, Statement}, -}; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - DROP INDEX IF EXISTS backfill_items_failed_idx; - " - .to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - DROP INDEX IF EXISTS backfill_items_locked_idx; - " - .to_string(), - )) - .await?; - - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - DROP INDEX IF EXISTS cl_items_tree_idx; - " - .to_string(), - )) - .await?; - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - DROP INDEX IF EXISTS backfill_items_slot_idx;; - " - .to_string(), - )) - .await?; - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - DROP INDEX IF EXISTS backfill_items_force_chk_idx;; - " - .to_string(), - )) - .await?; - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - DROP INDEX IF EXISTS backfill_items_backfilled_idx;; - " - .to_string(), - )) - .await?; - - Ok(()) - } - - async fn down(&self, _manager: &SchemaManager) -> Result<(), DbErr> { - Ok(()) - } -} diff --git a/migration/src/m20230510_183736_add_indices_to_assets.rs b/migration/src/m20230510_183736_add_indices_to_assets.rs deleted file mode 100644 index 3a7e58f1d..000000000 --- a/migration/src/m20230510_183736_add_indices_to_assets.rs +++ /dev/null @@ -1,71 +0,0 @@ -use digital_asset_types::dao::{asset_authority, asset_creators}; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .create_index( - Index::create() - .name("idx_asset_creators_asset_id") - .col(asset_creators::Column::AssetId) - .table(asset_creators::Entity) - .to_owned(), - ) - .await?; - - manager - .create_index( - Index::create() - .name("idx_asset_creators_creator") - .col(asset_creators::Column::Creator) - .table(asset_creators::Entity) - .to_owned(), - ) - .await?; - - manager - .create_index( - Index::create() - .name("idx_asset_authority_authority") - .col(asset_authority::Column::Authority) - .table(asset_authority::Entity) - .to_owned(), - ) - .await?; - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .drop_index( - Index::drop() - .name("idx_asset_creators_asset_id") - .table(asset_creators::Entity) - .to_owned(), - ) - .await?; - - manager - .drop_index( - Index::drop() - .name("idx_asset_creators_creator") - .table(asset_creators::Entity) - .to_owned(), - ) - .await?; - - manager - .drop_index( - Index::drop() - .name("idx_asset_authority_authority") - .table(asset_authority::Entity) - .to_owned(), - ) - .await?; - Ok(()) - } -} diff --git a/migration/src/m20230516_185005_add_reindex_to_assets.rs b/migration/src/m20230516_185005_add_reindex_to_assets.rs deleted file mode 100644 index 81d339701..000000000 --- a/migration/src/m20230516_185005_add_reindex_to_assets.rs +++ /dev/null @@ -1,36 +0,0 @@ -use digital_asset_types::dao::asset_data; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - sea_query::Table::alter() - .table(asset_data::Entity) - .add_column( - ColumnDef::new(Alias::new("reindex")) - .boolean() - .default(false), - ) - .to_owned(), - ) - .await?; - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - sea_query::Table::alter() - .table(asset_data::Entity) - .drop_column(Alias::new("reindex")) - .to_owned(), - ) - .await?; - Ok(()) - } -} diff --git a/migration/src/m20230526_120101_add_owner_delegate_sequence_number.rs b/migration/src/m20230526_120101_add_owner_delegate_sequence_number.rs deleted file mode 100644 index 330629abd..000000000 --- a/migration/src/m20230526_120101_add_owner_delegate_sequence_number.rs +++ /dev/null @@ -1,34 +0,0 @@ -use digital_asset_types::dao::asset; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(asset::Entity) - .add_column(ColumnDef::new(Alias::new("owner_delegate_seq")).big_integer()) - .to_owned(), - ) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(asset::Entity) - .drop_column(Alias::new("owner_delegate_seq")) - .to_owned(), - ) - .await?; - - Ok(()) - } -} diff --git a/migration/src/m20230601_120101_add_pnft_enum_val.rs b/migration/src/m20230601_120101_add_pnft_enum_val.rs deleted file mode 100644 index 72c4c0a52..000000000 --- a/migration/src/m20230601_120101_add_pnft_enum_val.rs +++ /dev/null @@ -1,27 +0,0 @@ -use sea_orm_migration::{ - prelude::*, - sea_orm::{ConnectionTrait, DatabaseBackend, Statement}, -}; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - "ALTER TYPE specification_asset_class ADD VALUE IF NOT EXISTS 'PROGRAMMABLE_NFT';" - .to_string(), - )) - .await?; - - Ok(()) - } - - async fn down(&self, _manager: &SchemaManager) -> Result<(), DbErr> { - Ok(()) - } -} diff --git a/migration/src/m20230615_120101_remove_asset_null_constraints.rs b/migration/src/m20230615_120101_remove_asset_null_constraints.rs deleted file mode 100644 index 2fa440cd9..000000000 --- a/migration/src/m20230615_120101_remove_asset_null_constraints.rs +++ /dev/null @@ -1,50 +0,0 @@ -use sea_orm_migration::{ - prelude::*, - sea_orm::{ConnectionTrait, DatabaseBackend, Statement}, -}; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - ALTER TABLE asset - ALTER COLUMN specification_version DROP NOT NULL, - ALTER COLUMN specification_asset_class DROP NOT NULL, - ALTER COLUMN seq DROP NOT NULL, - ALTER COLUMN nonce DROP NOT NULL, - ALTER COLUMN slot_updated DROP NOT NULL; - " - .to_string(), - )) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - ALTER TABLE asset - ALTER COLUMN specification_version SET NOT NULL, - ALTER COLUMN specification_asset_class SET NOT NULL, - ALTER COLUMN seq SET NOT NULL, - ALTER COLUMN nonce SET NOT NULL, - ALTER COLUMN slot_updated SET NOT NULL; - " - .to_string(), - )) - .await?; - - Ok(()) - } -} diff --git a/migration/src/m20230620_120101_add_was_decompressed.rs b/migration/src/m20230620_120101_add_was_decompressed.rs deleted file mode 100644 index f2abae13c..000000000 --- a/migration/src/m20230620_120101_add_was_decompressed.rs +++ /dev/null @@ -1,39 +0,0 @@ -use digital_asset_types::dao::asset; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(asset::Entity) - .add_column( - ColumnDef::new(Alias::new("was_decompressed")) - .boolean() - .not_null() - .default(false), - ) - .to_owned(), - ) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(asset::Entity) - .drop_column(Alias::new("was_decompressed")) - .to_owned(), - ) - .await?; - - Ok(()) - } -} diff --git a/migration/src/m20230623_120101_add_leaf_sequence_number.rs b/migration/src/m20230623_120101_add_leaf_sequence_number.rs deleted file mode 100644 index 6ffee258d..000000000 --- a/migration/src/m20230623_120101_add_leaf_sequence_number.rs +++ /dev/null @@ -1,34 +0,0 @@ -use digital_asset_types::dao::asset; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(asset::Entity) - .add_column(ColumnDef::new(Alias::new("leaf_seq")).big_integer()) - .to_owned(), - ) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(asset::Entity) - .drop_column(Alias::new("leaf_seq")) - .to_owned(), - ) - .await?; - - Ok(()) - } -} diff --git a/migration/src/m20230712_120101_remove_asset_creators_null_constraints.rs b/migration/src/m20230712_120101_remove_asset_creators_null_constraints.rs deleted file mode 100644 index 73251b0a4..000000000 --- a/migration/src/m20230712_120101_remove_asset_creators_null_constraints.rs +++ /dev/null @@ -1,44 +0,0 @@ -use sea_orm_migration::{ - prelude::*, - sea_orm::{ConnectionTrait, DatabaseBackend, Statement}, -}; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - ALTER TABLE asset_creators - ALTER COLUMN seq DROP NOT NULL, - ALTER COLUMN slot_updated DROP NOT NULL; - " - .to_string(), - )) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - ALTER TABLE asset_creators - ALTER COLUMN seq SET NOT NULL, - ALTER COLUMN slot_updated SET NOT NULL; - " - .to_string(), - )) - .await?; - - Ok(()) - } -} diff --git a/migration/src/m20230720_120101_add_asset_grouping_verified.rs b/migration/src/m20230720_120101_add_asset_grouping_verified.rs deleted file mode 100644 index 8f1cfd4cc..000000000 --- a/migration/src/m20230720_120101_add_asset_grouping_verified.rs +++ /dev/null @@ -1,37 +0,0 @@ -use digital_asset_types::dao::asset_grouping; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - manager - .alter_table( - Table::alter() - .table(asset_grouping::Entity) - .add_column( - ColumnDef::new(Alias::new("verified")) - .boolean() - .not_null() - .default(false), - ) - .to_owned(), - ) - .await - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - manager - .alter_table( - Table::alter() - .table(asset_grouping::Entity) - .drop_column(Alias::new("verified")) - .to_owned(), - ) - .await - } -} diff --git a/migration/src/m20230720_130101_remove_asset_grouping_null_constraints.rs b/migration/src/m20230720_130101_remove_asset_grouping_null_constraints.rs deleted file mode 100644 index debefecf2..000000000 --- a/migration/src/m20230720_130101_remove_asset_grouping_null_constraints.rs +++ /dev/null @@ -1,46 +0,0 @@ -use sea_orm_migration::{ - prelude::*, - sea_orm::{ConnectionTrait, DatabaseBackend, Statement}, -}; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - ALTER TABLE asset_grouping - ALTER COLUMN group_value DROP NOT NULL, - ALTER COLUMN seq DROP NOT NULL, - ALTER COLUMN slot_updated DROP NOT NULL; - " - .to_string(), - )) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .get_connection() - .execute(Statement::from_string( - DatabaseBackend::Postgres, - " - ALTER TABLE asset_grouping - ALTER COLUMN group_value SET NOT NULL, - ALTER COLUMN seq SET NOT NULL, - ALTER COLUMN slot_updated SET NOT NULL; - " - .to_string(), - )) - .await?; - - Ok(()) - } -} diff --git a/migration/src/m20230724_120101_add_group_info_seq.rs b/migration/src/m20230724_120101_add_group_info_seq.rs deleted file mode 100644 index 89f2414a5..000000000 --- a/migration/src/m20230724_120101_add_group_info_seq.rs +++ /dev/null @@ -1,36 +0,0 @@ -use digital_asset_types::dao::asset_grouping; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - manager - .alter_table( - Table::alter() - .table(asset_grouping::Entity) - .add_column(ColumnDef::new(Alias::new("group_info_seq")).big_integer()) - .to_owned(), - ) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - // Replace the sample below with your own migration scripts - manager - .alter_table( - Table::alter() - .table(asset_grouping::Entity) - .drop_column(Alias::new("group_info_seq")) - .to_owned(), - ) - .await?; - - Ok(()) - } -} diff --git a/migration/src/m20230726_013107_remove_not_null_constraint_from_group_value.rs b/migration/src/m20230726_013107_remove_not_null_constraint_from_group_value.rs deleted file mode 100644 index 2ed0879ee..000000000 --- a/migration/src/m20230726_013107_remove_not_null_constraint_from_group_value.rs +++ /dev/null @@ -1,35 +0,0 @@ -use digital_asset_types::dao::asset_grouping; -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - sea_query::Table::alter() - .table(asset_grouping::Entity) - .modify_column(ColumnDef::new(asset_grouping::Column::GroupValue).null()) - .to_owned(), - ) - .await?; - Ok(()) - } - - // If the `group_value` table already has some NULL values, this rollback won't work. - // Thus, for rollback, you'll first need to delete all the rows with NULL `group_value`, and then run the rollback. - // Query: `DELETE FROM asset_grouping WHERE group_value IS NULL;` - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - sea_query::Table::alter() - .table(asset_grouping::Entity) - .modify_column(ColumnDef::new(asset_grouping::Column::GroupValue).not_null()) - .to_owned(), - ) - .await?; - Ok(()) - } -} diff --git a/migration/src/main.rs b/migration/src/main.rs deleted file mode 100644 index c6b6e48db..000000000 --- a/migration/src/main.rs +++ /dev/null @@ -1,6 +0,0 @@ -use sea_orm_migration::prelude::*; - -#[async_std::main] -async fn main() { - cli::run_cli(migration::Migrator).await; -} diff --git a/migrator.Dockerfile b/migrator.Dockerfile deleted file mode 100644 index 1e0d0f6d1..000000000 --- a/migrator.Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM rust:1.70-bullseye -COPY init.sql /init.sql -COPY migration /migration -ENV INIT_FILE_PATH=/init.sql -COPY digital_asset_types /digital_asset_types -COPY rocks-db ./rocks-db -WORKDIR /migration -RUN cargo build --release -WORKDIR /migration/target/release -CMD /migration/target/release/migration up diff --git a/nft_ingester/src/bubblegum_updates_processor.rs b/nft_ingester/src/bubblegum_updates_processor.rs index 16b4a270c..7ee9d6887 100644 --- a/nft_ingester/src/bubblegum_updates_processor.rs +++ b/nft_ingester/src/bubblegum_updates_processor.rs @@ -9,16 +9,17 @@ use blockbuster::{ }; use chrono::Utc; use entities::enums::{OwnerType, RoyaltyTargetType, SpecificationAssetClass, TokenStandard}; +use entities::models::Updated; use entities::models::{ChainDataV1, Creator, Uses}; use log::{debug, error, info}; use metrics_utils::IngesterMetricsConfig; use mpl_bubblegum::state::leaf_schema::LeafSchema; use mpl_bubblegum::InstructionName; use plerkle_serialization::{Pubkey as FBPubkey, TransactionInfo}; +use rocks_db::asset::AssetOwner; use rocks_db::asset::{ AssetAuthority, AssetCollection, AssetDynamicDetails, AssetLeaf, AssetStaticDetails, }; -use rocks_db::asset::{AssetOwner, Updated}; use serde_json::json; use solana_sdk::hash::Hash; use solana_sdk::pubkey::Pubkey; @@ -323,10 +324,10 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, - owner: Updated::new(bundle.slot, owner), - delegate: Updated::new(bundle.slot, Some(delegate)), - owner_type: Updated::new(bundle.slot, OwnerType::Single), - owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq)), + owner: Updated::new(bundle.slot, Some(cl.seq), owner), + delegate: Updated::new(bundle.slot, Some(cl.seq), Some(delegate)), + owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), + owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { @@ -361,52 +362,14 @@ impl BubblegumTxProcessor { self.rocks_client.asset_updated(bundle.slot, asset_id)?; - let asset_data = self.rocks_client.asset_dynamic_data.get(asset_id).unwrap(); - if let Some(current_asset_data) = asset_data { - let mut new_asset_data = current_asset_data; - new_asset_data.is_burnt = Updated::new(bundle.slot, true); - new_asset_data.supply = Updated::new(bundle.slot, Some(0)); - new_asset_data.seq = Updated::new(bundle.slot, Some(cl.seq)); - - if let Some(current_seq) = new_asset_data.seq.value { - if current_seq < cl.seq { - if let Err(e) = self - .rocks_client - .asset_dynamic_data - .put(asset_id, &new_asset_data) - { - error!("Error while saving asset data for cNFT: {}", e); - }; - } - } else if let Err(e) = self - .rocks_client - .asset_dynamic_data - .put(asset_id, &new_asset_data) - { - error!("Error while saving asset data for cNFT: {}", e); - }; - } else { - let new_asset_data = AssetDynamicDetails { - pubkey: asset_id, - is_compressible: Updated::new(bundle.slot, false), - is_compressed: Updated::new(bundle.slot, true), - is_frozen: Updated::new(bundle.slot, false), - supply: Updated::new(bundle.slot, Some(0)), - seq: Updated::new(bundle.slot, Some(cl.seq)), - is_burnt: Updated::new(bundle.slot, true), - was_decompressed: Updated::new(bundle.slot, false), - onchain_data: Updated::new(bundle.slot, None), - creators: Updated::new(bundle.slot, vec![]), - royalty_amount: Updated::new(bundle.slot, 0), - }; - if let Err(e) = self - .rocks_client - .asset_dynamic_data - .put(asset_id, &new_asset_data) - { - error!("Error while saving asset data for cNFT: {}", e); - }; - } + self.rocks_client.asset_dynamic_data.merge(asset_id, &AssetDynamicDetails { + pubkey: asset_id, + supply: Updated::new(bundle.slot, Some(cl.seq), Some(0)), + is_burnt: Updated::new(bundle.slot, Some(cl.seq), true), + seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), + is_compressed: Updated::new(bundle.slot, Some(cl.seq), true), + ..Default::default() + })?; } Ok(()) @@ -449,10 +412,10 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, - owner: Updated::new(bundle.slot, owner), - delegate: Updated::new(bundle.slot, Some(delegate)), - owner_type: Updated::new(bundle.slot, OwnerType::Single), - owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq)), + owner: Updated::new(bundle.slot, Some(cl.seq), owner), + delegate: Updated::new(bundle.slot, Some(cl.seq), Some(delegate)), + owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), + owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { @@ -539,16 +502,21 @@ impl BubblegumTxProcessor { let asset_dynamic_details = AssetDynamicDetails { pubkey: id, - is_compressible: Updated::new(bundle.slot, false), - is_compressed: Updated::new(bundle.slot, true), - is_frozen: Updated::new(bundle.slot, false), - supply: Updated::new(bundle.slot, Some(1)), - seq: Updated::new(bundle.slot, Some(cl.seq)), - is_burnt: Updated::new(bundle.slot, false), - was_decompressed: Updated::new(bundle.slot, false), - onchain_data: Updated::new(bundle.slot, Some(chain_data.to_string())), - creators: Updated::new(bundle.slot, creators), - royalty_amount: Updated::new(bundle.slot, args.seller_fee_basis_points), + is_compressed: Updated::new(bundle.slot, Some(cl.seq), true), + supply: Updated::new(bundle.slot, Some(cl.seq), Some(1)), + seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), + onchain_data: Updated::new( + bundle.slot, + Some(cl.seq), + Some(chain_data.to_string()), + ), + creators: Updated::new(bundle.slot, Some(cl.seq), creators), + royalty_amount: Updated::new( + bundle.slot, + Some(cl.seq), + args.seller_fee_basis_points, + ), + ..Default::default() }; if let Err(e) = self @@ -575,10 +543,10 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, - owner: Updated::new(bundle.slot, owner), - delegate: Updated::new(bundle.slot, Some(delegate)), - owner_type: Updated::new(bundle.slot, OwnerType::Single), - owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq)), + owner: Updated::new(bundle.slot, Some(cl.seq), owner), + delegate: Updated::new(bundle.slot, Some(cl.seq), Some(delegate)), + owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), + owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.put(id, &asset_owner) { @@ -702,10 +670,10 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, - owner: Updated::new(bundle.slot, owner), - delegate: Updated::new(bundle.slot, Some(delegate)), - owner_type: Updated::new(bundle.slot, OwnerType::Single), - owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq)), + owner: Updated::new(bundle.slot, Some(cl.seq), owner), + delegate: Updated::new(bundle.slot, Some(cl.seq), Some(delegate)), + owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), + owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { @@ -749,41 +717,14 @@ impl BubblegumTxProcessor { error!("Error while saving leaf for cNFT: {}", e); }; - let asset_data = self.rocks_client.asset_dynamic_data.get(id).unwrap(); - if let Some(current_asset_data) = asset_data { - let mut new_asset_data = current_asset_data; - new_asset_data.seq = Updated::new(bundle.slot, None); - new_asset_data.was_decompressed = Updated::new(bundle.slot, true); - - if let Err(e) = self - .rocks_client - .asset_dynamic_data - .put(id, &new_asset_data) - { - error!("Error while saving asset data for cNFT: {}", e); - }; - } else { - let new_asset_data = AssetDynamicDetails { - pubkey: id, - is_compressible: Updated::new(bundle.slot, true), - is_compressed: Updated::new(bundle.slot, false), - is_frozen: Updated::new(bundle.slot, false), - supply: Updated::new(bundle.slot, Some(1)), - seq: Updated::new(bundle.slot, None), - is_burnt: Updated::new(bundle.slot, false), - was_decompressed: Updated::new(bundle.slot, true), - onchain_data: Updated::new(bundle.slot, None), - creators: Updated::new(bundle.slot, vec![]), - royalty_amount: Updated::new(bundle.slot, 0), - }; - if let Err(e) = self - .rocks_client - .asset_dynamic_data - .put(id, &new_asset_data) - { - error!("Error while saving asset data for cNFT: {}", e); - }; - } + self.rocks_client.asset_dynamic_data.merge(id, &AssetDynamicDetails { + pubkey: id, + was_decompressed: Updated::new(bundle.slot, Some(cl.seq), true), + seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), + is_compressible: Updated::new(bundle.slot, Some(cl.seq), true), // TODO + supply: Updated::new(bundle.slot, Some(cl.seq), Some(1)), + ..Default::default() + })?; } } @@ -842,7 +783,7 @@ impl BubblegumTxProcessor { let asset_data = self.rocks_client.asset_dynamic_data.get(id).unwrap(); if let Some(current_asset_data) = asset_data { let mut new_asset_data = current_asset_data; - new_asset_data.seq = Updated::new(bundle.slot, Some(cl.seq)); + new_asset_data.seq = Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)); for crt in new_asset_data.creators.value.iter_mut() { if crt.creator == *creator { @@ -866,16 +807,16 @@ impl BubblegumTxProcessor { let new_asset_data = AssetDynamicDetails { pubkey: id, - is_compressible: Updated::new(bundle.slot, false), - is_compressed: Updated::new(bundle.slot, true), - is_frozen: Updated::new(bundle.slot, false), - supply: Updated::new(bundle.slot, Some(1)), - seq: Updated::new(bundle.slot, Some(cl.seq)), - is_burnt: Updated::new(bundle.slot, false), - was_decompressed: Updated::new(bundle.slot, false), - onchain_data: Updated::new(bundle.slot, None), - creators: Updated::new(bundle.slot, vec![creator]), - royalty_amount: Updated::new(bundle.slot, 0), + is_compressible: Updated::new(bundle.slot, Some(cl.seq), false), + is_compressed: Updated::new(bundle.slot, Some(cl.seq), true), + is_frozen: Updated::new(bundle.slot, Some(cl.seq), false), + supply: Updated::new(bundle.slot, Some(cl.seq), Some(1)), + seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), + is_burnt: Updated::new(bundle.slot, Some(cl.seq), false), + was_decompressed: Updated::new(bundle.slot, Some(cl.seq), false), + onchain_data: Updated::new(bundle.slot, Some(cl.seq), None), + creators: Updated::new(bundle.slot, Some(cl.seq), vec![creator]), + royalty_amount: Updated::new(bundle.slot, Some(cl.seq), 0), }; if let Err(e) = self .rocks_client diff --git a/nft_ingester/src/gapfiller.rs b/nft_ingester/src/gapfiller.rs index 3357f0c61..d49444236 100644 --- a/nft_ingester/src/gapfiller.rs +++ b/nft_ingester/src/gapfiller.rs @@ -1,6 +1,7 @@ use crate::error::IngesterError; use entities::models::CompleteAssetDetails; -use rocks_db::asset::{AssetCollection, AssetLeaf, Updated}; +use entities::models::Updated; +use rocks_db::asset::{AssetCollection, AssetLeaf}; use rocks_db::{AssetAuthority, AssetDynamicDetails, AssetOwner, AssetStaticDetails, Storage}; use serde_json::json; use std::sync::Arc; @@ -24,16 +25,32 @@ pub fn insert_gaped_data( data.pubkey, &AssetDynamicDetails { pubkey: data.pubkey, - is_compressible: Updated::new(data.is_compressible.1, data.is_compressible.0), - is_compressed: Updated::new(data.is_compressed.1, data.is_compressed.0), - is_frozen: Updated::new(data.is_frozen.1, data.is_frozen.0), - supply: Updated::new(data.supply.1, data.supply.0), - seq: Updated::new(data.seq.1, data.seq.0), - is_burnt: Updated::new(data.is_burnt.1, data.is_burnt.0), - was_decompressed: Updated::new(data.was_decompressed.1, data.was_decompressed.0), - onchain_data: Updated::new(data.onchain_data.1, chain_data), - creators: Updated::new(data.creators.1, data.creators.0), - royalty_amount: Updated::new(data.royalty_amount.1, data.royalty_amount.0), + is_compressible: Updated::new( + data.is_compressible.1, + data.is_compressible.2, + data.is_compressible.0, + ), + is_compressed: Updated::new( + data.is_compressed.1, + data.is_compressed.2, + data.is_compressed.0, + ), + is_frozen: Updated::new(data.is_frozen.1, data.is_frozen.2, data.is_frozen.0), + supply: Updated::new(data.supply.1, data.supply.2, data.supply.0), + seq: Updated::new(data.seq.1, data.seq.2, data.seq.0), + is_burnt: Updated::new(data.is_burnt.1, data.is_burnt.2, data.is_burnt.0), + was_decompressed: Updated::new( + data.was_decompressed.1, + data.was_decompressed.2, + data.was_decompressed.0, + ), + onchain_data: Updated::new(data.onchain_data.1, data.onchain_data.2, chain_data), + creators: Updated::new(data.creators.1, data.creators.2, data.creators.0), + royalty_amount: Updated::new( + data.royalty_amount.1, + data.royalty_amount.2, + data.royalty_amount.0, + ), }, )?; @@ -77,10 +94,14 @@ pub fn insert_gaped_data( data.pubkey, &AssetOwner { pubkey: data.pubkey, - owner: Updated::new(data.owner.1, data.owner.0), - delegate: Updated::new(data.delegate.1, data.delegate.0), - owner_type: Updated::new(data.owner_type.1, data.owner_type.0), - owner_delegate_seq: Updated::new(data.owner_delegate_seq.1, data.owner_delegate_seq.0), + owner: Updated::new(data.owner.1, data.owner.2, data.owner.0), + delegate: Updated::new(data.delegate.1, data.delegate.2, data.delegate.0), + owner_type: Updated::new(data.owner_type.1, data.owner_type.2, data.owner_type.0), + owner_delegate_seq: Updated::new( + data.owner_delegate_seq.1, + data.owner_delegate_seq.2, + data.owner_delegate_seq.0, + ), }, )?; diff --git a/nft_ingester/src/mplx_updates_processor.rs b/nft_ingester/src/mplx_updates_processor.rs index 6b7d251b6..79418911c 100644 --- a/nft_ingester/src/mplx_updates_processor.rs +++ b/nft_ingester/src/mplx_updates_processor.rs @@ -8,11 +8,10 @@ use serde_json::json; use tokio::time::Instant; use entities::enums::{RoyaltyTargetType, SpecificationAssetClass}; +use entities::models::Updated; use entities::models::{ChainDataV1, Creator, Uses}; use metrics_utils::{IngesterMetricsConfig, MetricStatus}; -use rocks_db::asset::{ - AssetAuthority, AssetCollection, AssetDynamicDetails, AssetStaticDetails, Updated, -}; +use rocks_db::asset::{AssetAuthority, AssetCollection, AssetDynamicDetails, AssetStaticDetails}; use rocks_db::columns::Mint; use rocks_db::Storage; @@ -326,16 +325,17 @@ impl MplxAccsProcessor { models.asset_dynamic.push(AssetDynamicDetails { pubkey: mint, - is_compressible: Updated::new(metadata_info.slot, false), - is_compressed: Updated::new(metadata_info.slot, false), - is_frozen: Updated::new(metadata_info.slot, false), - supply: Updated::new(metadata_info.slot, supply), - seq: Updated::new(metadata_info.slot, None), - is_burnt: Updated::new(metadata_info.slot, false), - was_decompressed: Updated::new(metadata_info.slot, false), - onchain_data: Updated::new(metadata_info.slot, Some(chain_data.to_string())), + is_compressible: Updated::new(metadata_info.slot, None, false), + is_compressed: Updated::new(metadata_info.slot, None, false), + is_frozen: Updated::new(metadata_info.slot, None, false), + supply: Updated::new(metadata_info.slot, None, supply), + seq: Updated::new(metadata_info.slot, None, None), + is_burnt: Updated::new(metadata_info.slot, None, false), + was_decompressed: Updated::new(metadata_info.slot, None, false), + onchain_data: Updated::new(metadata_info.slot, None, Some(chain_data.to_string())), creators: Updated::new( metadata_info.slot, + None, data.clone() .creators .unwrap_or_default() @@ -347,7 +347,11 @@ impl MplxAccsProcessor { }) .collect(), ), - royalty_amount: Updated::new(metadata_info.slot, data.seller_fee_basis_points), + royalty_amount: Updated::new( + metadata_info.slot, + None, + data.seller_fee_basis_points, + ), }); models.tasks.push(Task { diff --git a/nft_ingester/src/token_updates_processor.rs b/nft_ingester/src/token_updates_processor.rs index 3628616a8..5d51232b0 100644 --- a/nft_ingester/src/token_updates_processor.rs +++ b/nft_ingester/src/token_updates_processor.rs @@ -1,9 +1,10 @@ use crate::buffer::Buffer; use crate::db_v2::DBClient; use entities::enums::OwnerType; +use entities::models::Updated; use log::error; use metrics_utils::{IngesterMetricsConfig, MetricStatus}; -use rocks_db::asset::{AssetDynamicDetails, AssetOwner, Updated}; +use rocks_db::asset::{AssetDynamicDetails, AssetOwner}; use rocks_db::Storage; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; @@ -84,10 +85,10 @@ impl TokenAccsProcessor { acc.mint, &AssetOwner { pubkey: acc.mint, - owner: Updated::new(acc.slot_updated as u64, acc.owner), - delegate: Updated::new(acc.slot_updated as u64, acc.delegate), - owner_type: Updated::new(acc.slot_updated as u64, OwnerType::Token), - owner_delegate_seq: Updated::new(acc.slot_updated as u64, None), + owner: Updated::new(acc.slot_updated as u64, None, acc.owner), + delegate: Updated::new(acc.slot_updated as u64, None, acc.delegate), + owner_type: Updated::new(acc.slot_updated as u64, None, OwnerType::Token), + owner_delegate_seq: Updated::new(acc.slot_updated as u64, None, None), }, ); @@ -165,8 +166,16 @@ impl TokenAccsProcessor { mint.pubkey, &AssetDynamicDetails { pubkey: mint.pubkey, - supply: Updated::new(mint.slot_updated as u64, Some(mint.supply as u64)), - seq: Updated::new(mint.slot_updated as u64, Some(mint.slot_updated as u64)), + supply: Updated::new( + mint.slot_updated as u64, + None, + Some(mint.supply as u64), + ), + seq: Updated::new( + mint.slot_updated as u64, + None, + Some(mint.slot_updated as u64), + ), ..Default::default() }, ); diff --git a/rocks-db/src/asset.rs b/rocks-db/src/asset.rs index 5a5cb2b62..22a53fd27 100644 --- a/rocks-db/src/asset.rs +++ b/rocks-db/src/asset.rs @@ -1,5 +1,6 @@ use bincode::{deserialize, serialize}; use entities::enums::{OwnerType, RoyaltyTargetType, SpecificationAssetClass}; +use entities::models::Updated; use log::{error, warn}; use rocksdb::MergeOperands; use serde::{Deserialize, Serialize}; @@ -20,21 +21,6 @@ pub struct AssetStaticDetails { pub created_at: i64, } -#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq)] -pub struct Updated { - pub slot_updated: u64, - pub value: T, -} - -impl Updated { - pub fn new(slot_updated: u64, value: T) -> Self { - Self { - slot_updated, - value, - } - } -} - #[derive(Serialize, Deserialize, Debug, Clone, Default)] pub struct AssetDynamicDetails { pub pubkey: Pubkey, @@ -93,6 +79,10 @@ pub struct AssetCollection { fn update_field(current: &mut Updated, new: &Updated) { if new.slot_updated > current.slot_updated { *current = new.clone(); + return; + } + if new.seq.unwrap_or_default() > current.seq.unwrap_or_default() { + *current = new.clone(); } } diff --git a/rocks-db/tests/batch_client_integration_tests.rs b/rocks-db/tests/batch_client_integration_tests.rs index b0a0cedfe..88994edad 100644 --- a/rocks-db/tests/batch_client_integration_tests.rs +++ b/rocks-db/tests/batch_client_integration_tests.rs @@ -1,6 +1,6 @@ use std::collections::HashSet; -use rocks_db::asset::Updated; +use entities::models::Updated; use solana_sdk::pubkey::Pubkey; use tempfile::TempDir; @@ -373,16 +373,16 @@ fn test_process_asset_updates_batch_iteration_results() { fn create_test_dynamic_data(pubkey: Pubkey, slot: u64) -> AssetDynamicDetails { AssetDynamicDetails { pubkey, - is_compressible: Updated::new(slot, false), - is_compressed: Updated::new(slot, false), - is_frozen: Updated::new(slot, false), - supply: Updated::new(slot, None), - seq: Updated::new(slot, None), - is_burnt: Updated::new(slot, false), - was_decompressed: Updated::new(slot, false), - onchain_data: Updated::new(slot, None), - creators: Updated::new(slot, Vec::new()), - royalty_amount: Updated::new(slot, 0), + is_compressible: Updated::new(slot, None,false), + is_compressed: Updated::new(slot, None,false), + is_frozen: Updated::new(slot, None,false), + supply: Updated::new(slot, None,None), + seq: Updated::new(slot, None,None), + is_burnt: Updated::new(slot, None,false), + was_decompressed: Updated::new(slot, None,false), + onchain_data: Updated::new(slot, None,None), + creators: Updated::new(slot, None,Vec::new()), + royalty_amount: Updated::new(slot, None,0), } } @@ -400,8 +400,8 @@ fn test_multiple_slot_updates() { let new_data = AssetDynamicDetails { pubkey: pk, - is_compressible: Updated::new(10, true), - is_compressed: Updated::new(0, true), + is_compressible: Updated::new(10, None,true), + is_compressed: Updated::new(0,None, true), ..Default::default() }; storage @@ -410,14 +410,14 @@ fn test_multiple_slot_updates() { .unwrap(); let selected_data = storage.asset_dynamic_data.get(pk).unwrap().unwrap(); - assert_eq!(selected_data.is_compressible, Updated::new(10, true)); - assert_eq!(selected_data.is_compressed, Updated::new(0, false)); // slot in new_data not greater than slot in start data, so that field must not change + assert_eq!(selected_data.is_compressible, Updated::new(10, None,true)); + assert_eq!(selected_data.is_compressed, Updated::new(0, None,false)); // slot in new_data not greater than slot in start data, so that field must not change let new_data = AssetDynamicDetails { pubkey: pk, - is_compressible: Updated::new(5, false), - is_compressed: Updated::new(0, true), - supply: Updated::new(3, Some(5)), + is_compressible: Updated::new(5, None,false), + is_compressed: Updated::new(0, None,true), + supply: Updated::new(3, None,Some(5)), ..Default::default() }; storage @@ -426,7 +426,21 @@ fn test_multiple_slot_updates() { .unwrap(); let selected_data = storage.asset_dynamic_data.get(pk).unwrap().unwrap(); - assert_eq!(selected_data.is_compressible, Updated::new(10, true)); - assert_eq!(selected_data.is_compressed, Updated::new(0, false)); - assert_eq!(selected_data.supply, Updated::new(3, Some(5))); + assert_eq!(selected_data.is_compressible, Updated::new(10, None,true)); + assert_eq!(selected_data.is_compressed, Updated::new(0, None,false)); + assert_eq!(selected_data.supply, Updated::new(3, None,Some(5))); + + + let new_data = AssetDynamicDetails { + pubkey: pk, + is_compressible: Updated::new(5, Some(1),false), + ..Default::default() + }; + storage + .asset_dynamic_data + .merge(dynamic_data.pubkey, &new_data) + .unwrap(); + + let selected_data = storage.asset_dynamic_data.get(pk).unwrap().unwrap(); + assert_eq!(selected_data.is_compressible, Updated::new(5, Some(1),false)); } From d76f75a3ea1d314be9428ee18cea51cad0650d25 Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 13:42:32 +0200 Subject: [PATCH 10/14] merge --- Cargo.toml | 3 --- metrics_utils/src/lib.rs | 6 ++++++ nft_ingester/src/api/service.rs | 5 ++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 60a6944f8..836f1ddf4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,9 +7,6 @@ members = [ "postgre-client", "entities", ] -exclude = [ - "migration", -] [profile.release] lto = true diff --git a/metrics_utils/src/lib.rs b/metrics_utils/src/lib.rs index 19245e716..fdab5715f 100644 --- a/metrics_utils/src/lib.rs +++ b/metrics_utils/src/lib.rs @@ -80,6 +80,12 @@ pub struct BackfillerMetricsConfig { data_processed: Family, // slots & transactions } +impl Default for BackfillerMetricsConfig { + fn default() -> Self { + Self::new() + } +} + impl BackfillerMetricsConfig { pub fn new() -> Self { Self { diff --git a/nft_ingester/src/api/service.rs b/nft_ingester/src/api/service.rs index fd73cd647..89dabf7a6 100644 --- a/nft_ingester/src/api/service.rs +++ b/nft_ingester/src/api/service.rs @@ -1,9 +1,8 @@ -use log::{error, info}; +use log::info; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; -use metrics_utils::utils::setup_metrics; -use metrics_utils::{ApiMetricsConfig, MetricState, MetricsTrait}; +use metrics_utils::ApiMetricsConfig; use rocks_db::Storage; use {crate::api::DasApi, std::env, std::net::SocketAddr}; use { From 82455f6d411e5918c29c6e70a5ffcfcff5f72a0e Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 15:32:55 +0200 Subject: [PATCH 11/14] Option> --- digital_asset_types/src/dao/scopes/asset.rs | 20 +++-- .../src/bubblegum_updates_processor.rs | 77 ++++++++++--------- nft_ingester/src/gapfiller.rs | 31 +++++--- nft_ingester/src/index_syncronizer.rs | 5 -- nft_ingester/src/mplx_updates_processor.rs | 10 ++- nft_ingester/src/token_updates_processor.rs | 18 +++-- rocks-db/src/asset.rs | 53 +++++++++---- rocks-db/src/batch_client.rs | 8 +- .../tests/batch_client_integration_tests.rs | 50 ++++++------ 9 files changed, 160 insertions(+), 112 deletions(-) diff --git a/digital_asset_types/src/dao/scopes/asset.rs b/digital_asset_types/src/dao/scopes/asset.rs index 733d3a519..c32a3b279 100644 --- a/digital_asset_types/src/dao/scopes/asset.rs +++ b/digital_asset_types/src/dao/scopes/asset.rs @@ -363,8 +363,8 @@ fn convert_rocks_offchain_data( let ch_data: serde_json::Value = serde_json::from_str( dynamic_data .onchain_data - .value .clone() + .map(|onchain_data| onchain_data.value) .unwrap_or_default() .as_ref(), ) @@ -421,17 +421,23 @@ fn convert_rocks_asset_model( specification_asset_class: Some(static_data.specification_asset_class.into()), owner: Some(owner.owner.value.to_bytes().to_vec()), owner_type: owner.owner_type.value.into(), - delegate: owner.delegate.value.map(|pk| pk.to_bytes().to_vec()), + delegate: owner + .delegate + .clone() + .map(|pk| pk.value.to_bytes().to_vec()), frozen: dynamic_data.is_frozen.value, supply: dynamic_data .supply - .value - .map(|supply| supply as i64) + .clone() + .map(|supply| supply.value as i64) .unwrap_or_default(), supply_mint: Some(static_data.pubkey.to_bytes().to_vec()), compressed: dynamic_data.is_compressed.value, compressible: dynamic_data.is_compressible.value, - seq: dynamic_data.seq.value.and_then(|u| u.try_into().ok()), + seq: dynamic_data + .seq + .clone() + .and_then(|u| u.value.try_into().ok()), tree_id, leaf: leaf.leaf.clone(), nonce: leaf.nonce.map(|nonce| nonce as i64), @@ -444,7 +450,7 @@ fn convert_rocks_asset_model( slot_updated: Some(slot_updated as i64), data_hash: leaf.data_hash.map(|h| h.to_string()), creator_hash: leaf.creator_hash.map(|h| h.to_string()), - owner_delegate_seq: owner.owner_delegate_seq.value.map(|seq| seq as i64), + owner_delegate_seq: owner.owner_delegate_seq.clone().map(|seq| seq.value as i64), was_decompressed: dynamic_data.was_decompressed.value, leaf_seq: leaf.leaf_seq.map(|seq| seq as i64), }) @@ -560,7 +566,7 @@ fn convert_rocks_creators_model( creator: creator.creator.to_bytes().to_vec(), share: creator.creator_share as i32, verified: creator.creator_verified, - seq: dynamic_data.seq.value.map(|seq| seq as i64), + seq: dynamic_data.seq.clone().map(|seq| seq.value as i64), slot_updated: Some(dynamic_data.get_slot_updated() as i64), position: position as i16, }) diff --git a/nft_ingester/src/bubblegum_updates_processor.rs b/nft_ingester/src/bubblegum_updates_processor.rs index 7ee9d6887..f1e1843dc 100644 --- a/nft_ingester/src/bubblegum_updates_processor.rs +++ b/nft_ingester/src/bubblegum_updates_processor.rs @@ -325,9 +325,9 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, owner: Updated::new(bundle.slot, Some(cl.seq), owner), - delegate: Updated::new(bundle.slot, Some(cl.seq), Some(delegate)), + delegate: Some(Updated::new(bundle.slot, Some(cl.seq), delegate)), owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), - owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), + owner_delegate_seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { @@ -362,14 +362,17 @@ impl BubblegumTxProcessor { self.rocks_client.asset_updated(bundle.slot, asset_id)?; - self.rocks_client.asset_dynamic_data.merge(asset_id, &AssetDynamicDetails { - pubkey: asset_id, - supply: Updated::new(bundle.slot, Some(cl.seq), Some(0)), - is_burnt: Updated::new(bundle.slot, Some(cl.seq), true), - seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), - is_compressed: Updated::new(bundle.slot, Some(cl.seq), true), - ..Default::default() - })?; + self.rocks_client.asset_dynamic_data.merge( + asset_id, + &AssetDynamicDetails { + pubkey: asset_id, + supply: Some(Updated::new(bundle.slot, Some(cl.seq), 0)), + is_burnt: Updated::new(bundle.slot, Some(cl.seq), true), + seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), + is_compressed: Updated::new(bundle.slot, Some(cl.seq), true), + ..Default::default() + }, + )?; } Ok(()) @@ -413,9 +416,9 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, owner: Updated::new(bundle.slot, Some(cl.seq), owner), - delegate: Updated::new(bundle.slot, Some(cl.seq), Some(delegate)), + delegate: Some(Updated::new(bundle.slot, Some(cl.seq), delegate)), owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), - owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), + owner_delegate_seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { @@ -503,13 +506,13 @@ impl BubblegumTxProcessor { let asset_dynamic_details = AssetDynamicDetails { pubkey: id, is_compressed: Updated::new(bundle.slot, Some(cl.seq), true), - supply: Updated::new(bundle.slot, Some(cl.seq), Some(1)), - seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), - onchain_data: Updated::new( + supply: Some(Updated::new(bundle.slot, Some(cl.seq), 1)), + seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), + onchain_data: Some(Updated::new( bundle.slot, Some(cl.seq), - Some(chain_data.to_string()), - ), + chain_data.to_string(), + )), creators: Updated::new(bundle.slot, Some(cl.seq), creators), royalty_amount: Updated::new( bundle.slot, @@ -544,9 +547,9 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, owner: Updated::new(bundle.slot, Some(cl.seq), owner), - delegate: Updated::new(bundle.slot, Some(cl.seq), Some(delegate)), + delegate: Some(Updated::new(bundle.slot, Some(cl.seq), delegate)), owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), - owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), + owner_delegate_seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.put(id, &asset_owner) { @@ -671,9 +674,9 @@ impl BubblegumTxProcessor { let asset_owner = AssetOwner { pubkey: id, owner: Updated::new(bundle.slot, Some(cl.seq), owner), - delegate: Updated::new(bundle.slot, Some(cl.seq), Some(delegate)), + delegate: Some(Updated::new(bundle.slot, Some(cl.seq), delegate)), owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), - owner_delegate_seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), + owner_delegate_seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), }; if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { @@ -717,14 +720,17 @@ impl BubblegumTxProcessor { error!("Error while saving leaf for cNFT: {}", e); }; - self.rocks_client.asset_dynamic_data.merge(id, &AssetDynamicDetails { - pubkey: id, - was_decompressed: Updated::new(bundle.slot, Some(cl.seq), true), - seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), - is_compressible: Updated::new(bundle.slot, Some(cl.seq), true), // TODO - supply: Updated::new(bundle.slot, Some(cl.seq), Some(1)), - ..Default::default() - })?; + self.rocks_client.asset_dynamic_data.merge( + id, + &AssetDynamicDetails { + pubkey: id, + was_decompressed: Updated::new(bundle.slot, Some(cl.seq), true), + seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), + is_compressible: Updated::new(bundle.slot, Some(cl.seq), true), // TODO + supply: Some(Updated::new(bundle.slot, Some(cl.seq), 1)), + ..Default::default() + }, + )?; } } @@ -783,7 +789,7 @@ impl BubblegumTxProcessor { let asset_data = self.rocks_client.asset_dynamic_data.get(id).unwrap(); if let Some(current_asset_data) = asset_data { let mut new_asset_data = current_asset_data; - new_asset_data.seq = Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)); + new_asset_data.seq = Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)); for crt in new_asset_data.creators.value.iter_mut() { if crt.creator == *creator { @@ -807,16 +813,11 @@ impl BubblegumTxProcessor { let new_asset_data = AssetDynamicDetails { pubkey: id, - is_compressible: Updated::new(bundle.slot, Some(cl.seq), false), is_compressed: Updated::new(bundle.slot, Some(cl.seq), true), - is_frozen: Updated::new(bundle.slot, Some(cl.seq), false), - supply: Updated::new(bundle.slot, Some(cl.seq), Some(1)), - seq: Updated::new(bundle.slot, Some(cl.seq), Some(cl.seq)), - is_burnt: Updated::new(bundle.slot, Some(cl.seq), false), - was_decompressed: Updated::new(bundle.slot, Some(cl.seq), false), - onchain_data: Updated::new(bundle.slot, Some(cl.seq), None), + supply: Some(Updated::new(bundle.slot, Some(cl.seq), 1)), + seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), creators: Updated::new(bundle.slot, Some(cl.seq), vec![creator]), - royalty_amount: Updated::new(bundle.slot, Some(cl.seq), 0), + ..Default::default() }; if let Err(e) = self .rocks_client diff --git a/nft_ingester/src/gapfiller.rs b/nft_ingester/src/gapfiller.rs index d49444236..d423422e9 100644 --- a/nft_ingester/src/gapfiller.rs +++ b/nft_ingester/src/gapfiller.rs @@ -36,15 +36,23 @@ pub fn insert_gaped_data( data.is_compressed.0, ), is_frozen: Updated::new(data.is_frozen.1, data.is_frozen.2, data.is_frozen.0), - supply: Updated::new(data.supply.1, data.supply.2, data.supply.0), - seq: Updated::new(data.seq.1, data.seq.2, data.seq.0), + supply: data + .supply + .0 + .map(|supply| Updated::new(data.supply.1, data.supply.2, supply)), + seq: data + .seq + .0 + .map(|seq| Updated::new(data.seq.1, data.seq.2, seq)), is_burnt: Updated::new(data.is_burnt.1, data.is_burnt.2, data.is_burnt.0), was_decompressed: Updated::new( data.was_decompressed.1, data.was_decompressed.2, data.was_decompressed.0, ), - onchain_data: Updated::new(data.onchain_data.1, data.onchain_data.2, chain_data), + onchain_data: chain_data.map(|chain_data| { + Updated::new(data.onchain_data.1, data.onchain_data.2, chain_data) + }), creators: Updated::new(data.creators.1, data.creators.2, data.creators.0), royalty_amount: Updated::new( data.royalty_amount.1, @@ -95,13 +103,18 @@ pub fn insert_gaped_data( &AssetOwner { pubkey: data.pubkey, owner: Updated::new(data.owner.1, data.owner.2, data.owner.0), - delegate: Updated::new(data.delegate.1, data.delegate.2, data.delegate.0), + delegate: data + .delegate + .0 + .map(|delegate| Updated::new(data.delegate.1, data.delegate.2, delegate)), owner_type: Updated::new(data.owner_type.1, data.owner_type.2, data.owner_type.0), - owner_delegate_seq: Updated::new( - data.owner_delegate_seq.1, - data.owner_delegate_seq.2, - data.owner_delegate_seq.0, - ), + owner_delegate_seq: data.owner_delegate_seq.0.map(|owner_delegate_seq| { + Updated::new( + data.owner_delegate_seq.1, + data.owner_delegate_seq.2, + owner_delegate_seq, + ) + }), }, )?; diff --git a/nft_ingester/src/index_syncronizer.rs b/nft_ingester/src/index_syncronizer.rs index c7b848dd5..91fc8e2d9 100644 --- a/nft_ingester/src/index_syncronizer.rs +++ b/nft_ingester/src/index_syncronizer.rs @@ -155,7 +155,6 @@ mod tests { #[tokio::test] async fn test_synchronizer_over_2_empty_storages() { - let keep_running = Arc::new(AtomicBool::new(true)); let mut primary_storage = MockPrimaryStorage::new(); let mut index_storage = MockIndexStorage::new(); index_storage @@ -178,7 +177,6 @@ mod tests { #[tokio::test] async fn test_synchronizer_with_records_in_primary_storage() { - let keep_running = Arc::new(AtomicBool::new(true)); let mut primary_storage = MockPrimaryStorage::new(); let mut index_storage = MockIndexStorage::new(); @@ -233,7 +231,6 @@ mod tests { #[tokio::test] async fn test_synchronizer_with_small_batch_size() { - let keep_running = Arc::new(AtomicBool::new(true)); let mut primary_storage = MockPrimaryStorage::new(); let mut index_storage = MockIndexStorage::new(); @@ -297,7 +294,6 @@ mod tests { #[tokio::test] async fn test_synchronizer_with_existing_index_data() { - let keep_running = Arc::new(AtomicBool::new(true)); let mut primary_storage = MockPrimaryStorage::new(); let mut index_storage = MockIndexStorage::new(); @@ -400,7 +396,6 @@ mod tests { #[tokio::test] async fn test_synchronizer_with_synced_databases() { - let keep_running = Arc::new(AtomicBool::new(true)); let mut primary_storage = MockPrimaryStorage::new(); let mut index_storage = MockIndexStorage::new(); diff --git a/nft_ingester/src/mplx_updates_processor.rs b/nft_ingester/src/mplx_updates_processor.rs index 79418911c..288beb034 100644 --- a/nft_ingester/src/mplx_updates_processor.rs +++ b/nft_ingester/src/mplx_updates_processor.rs @@ -328,11 +328,15 @@ impl MplxAccsProcessor { is_compressible: Updated::new(metadata_info.slot, None, false), is_compressed: Updated::new(metadata_info.slot, None, false), is_frozen: Updated::new(metadata_info.slot, None, false), - supply: Updated::new(metadata_info.slot, None, supply), - seq: Updated::new(metadata_info.slot, None, None), + supply: supply.map(|supply| Updated::new(metadata_info.slot, None, supply)), + seq: None, is_burnt: Updated::new(metadata_info.slot, None, false), was_decompressed: Updated::new(metadata_info.slot, None, false), - onchain_data: Updated::new(metadata_info.slot, None, Some(chain_data.to_string())), + onchain_data: Some(Updated::new( + metadata_info.slot, + None, + chain_data.to_string(), + )), creators: Updated::new( metadata_info.slot, None, diff --git a/nft_ingester/src/token_updates_processor.rs b/nft_ingester/src/token_updates_processor.rs index 5d51232b0..5dd3903a5 100644 --- a/nft_ingester/src/token_updates_processor.rs +++ b/nft_ingester/src/token_updates_processor.rs @@ -86,9 +86,11 @@ impl TokenAccsProcessor { &AssetOwner { pubkey: acc.mint, owner: Updated::new(acc.slot_updated as u64, None, acc.owner), - delegate: Updated::new(acc.slot_updated as u64, None, acc.delegate), + delegate: acc + .delegate + .map(|delegate| Updated::new(acc.slot_updated as u64, None, delegate)), owner_type: Updated::new(acc.slot_updated as u64, None, OwnerType::Token), - owner_delegate_seq: Updated::new(acc.slot_updated as u64, None, None), + owner_delegate_seq: None, }, ); @@ -166,16 +168,16 @@ impl TokenAccsProcessor { mint.pubkey, &AssetDynamicDetails { pubkey: mint.pubkey, - supply: Updated::new( + supply: Some(Updated::new( mint.slot_updated as u64, None, - Some(mint.supply as u64), - ), - seq: Updated::new( + mint.supply as u64, + )), + seq: Some(Updated::new( mint.slot_updated as u64, None, - Some(mint.slot_updated as u64), - ), + mint.slot_updated as u64, + )), ..Default::default() }, ); diff --git a/rocks-db/src/asset.rs b/rocks-db/src/asset.rs index 22a53fd27..17de926e6 100644 --- a/rocks-db/src/asset.rs +++ b/rocks-db/src/asset.rs @@ -27,11 +27,11 @@ pub struct AssetDynamicDetails { pub is_compressible: Updated, pub is_compressed: Updated, pub is_frozen: Updated, - pub supply: Updated>, - pub seq: Updated>, + pub supply: Option>, + pub seq: Option>, pub is_burnt: Updated, pub was_decompressed: Updated, - pub onchain_data: Updated>, + pub onchain_data: Option>, pub creators: Updated>, pub royalty_amount: Updated, } @@ -47,9 +47,9 @@ pub struct AssetAuthority { pub struct AssetOwner { pub pubkey: Pubkey, pub owner: Updated, - pub delegate: Updated>, + pub delegate: Option>, pub owner_type: Updated, - pub owner_delegate_seq: Updated>, + pub owner_delegate_seq: Option>, } /// Leaf information about compressed asset @@ -86,6 +86,23 @@ fn update_field(current: &mut Updated, new: &Updated) { } } +fn update_optional_field( + current: &mut Option>, + new: &Option>, +) { + if new.clone().unwrap_or_default().slot_updated + > current.clone().unwrap_or_default().slot_updated + { + *current = new.clone(); + return; + } + if new.clone().unwrap_or_default().seq.unwrap_or_default() + > current.clone().unwrap_or_default().seq.unwrap_or_default() + { + *current = new.clone(); + } +} + impl TypedColumn for AssetStaticDetails { type KeyType = Pubkey; type ValueType = Self; @@ -182,13 +199,13 @@ impl AssetDynamicDetails { update_field(&mut current_val.is_compressible, &new_val.is_compressible); update_field(&mut current_val.is_compressed, &new_val.is_compressed); update_field(&mut current_val.is_frozen, &new_val.is_frozen); - update_field(&mut current_val.supply, &new_val.supply); - update_field(&mut current_val.seq, &new_val.seq); + update_optional_field(&mut current_val.supply, &new_val.supply); + update_optional_field(&mut current_val.seq, &new_val.seq); update_field(&mut current_val.is_burnt, &new_val.is_burnt); update_field(&mut current_val.creators, &new_val.creators); update_field(&mut current_val.royalty_amount, &new_val.royalty_amount); update_field(&mut current_val.was_decompressed, &new_val.was_decompressed); - update_field(&mut current_val.onchain_data, &new_val.onchain_data); + update_optional_field(&mut current_val.onchain_data, &new_val.onchain_data); current_val } else { @@ -209,11 +226,13 @@ impl AssetDynamicDetails { self.is_compressible.slot_updated, self.is_compressed.slot_updated, self.is_frozen.slot_updated, - self.supply.slot_updated, - self.seq.slot_updated, + self.supply.clone().map_or(0, |supply| supply.slot_updated), + self.seq.clone().map_or(0, |seq| seq.slot_updated), self.is_burnt.slot_updated, self.was_decompressed.slot_updated, - self.onchain_data.slot_updated, + self.onchain_data + .clone() + .map_or(0, |onchain_data| onchain_data.slot_updated), self.creators.slot_updated, self.royalty_amount.slot_updated, ] @@ -299,11 +318,11 @@ impl AssetOwner { result = Some(if let Some(mut current_val) = result { update_field(&mut current_val.owner_type, &new_val.owner_type); update_field(&mut current_val.owner, &new_val.owner); - update_field( + update_optional_field( &mut current_val.owner_delegate_seq, &new_val.owner_delegate_seq, ); - update_field(&mut current_val.delegate, &new_val.delegate); + update_optional_field(&mut current_val.delegate, &new_val.delegate); current_val } else { @@ -322,9 +341,13 @@ impl AssetOwner { pub fn get_slot_updated(&self) -> u64 { [ self.owner.slot_updated, - self.delegate.slot_updated, + self.delegate + .clone() + .map_or(0, |delegate| delegate.slot_updated), self.owner_type.slot_updated, - self.owner_delegate_seq.slot_updated, + self.owner_delegate_seq + .clone() + .map_or(0, |owner_delegate_seq| owner_delegate_seq.slot_updated), ] .into_iter() .max() diff --git a/rocks-db/src/batch_client.rs b/rocks-db/src/batch_client.rs index 66c2ca2db..9466ed78d 100644 --- a/rocks-db/src/batch_client.rs +++ b/rocks-db/src/batch_client.rs @@ -106,7 +106,7 @@ impl AssetIndexReader for Storage { existed_index.is_compressible = dynamic_info.is_compressible.value; existed_index.is_compressed = dynamic_info.is_compressed.value; existed_index.is_frozen = dynamic_info.is_frozen.value; - existed_index.supply = dynamic_info.supply.value.map_or(0, |s| s as i64); + existed_index.supply = dynamic_info.supply.clone().map_or(0, |s| s.value as i64); existed_index.is_burnt = dynamic_info.is_burnt.value; existed_index.creators = dynamic_info.creators.clone().value; existed_index.royalty_amount = dynamic_info.royalty_amount.value as i64; @@ -117,7 +117,7 @@ impl AssetIndexReader for Storage { is_compressible: dynamic_info.is_compressible.value, is_compressed: dynamic_info.is_compressed.value, is_frozen: dynamic_info.is_frozen.value, - supply: dynamic_info.supply.value.map_or(0, |s| s as i64), + supply: dynamic_info.supply.clone().map_or(0, |s| s.value as i64), is_burnt: dynamic_info.is_burnt.value, creators: dynamic_info.creators.clone().value, royalty_amount: dynamic_info.royalty_amount.value as i64, @@ -150,7 +150,7 @@ impl AssetIndexReader for Storage { for data in asset_owner_details.iter().flatten() { if let Some(existed_index) = asset_indexes.get_mut(&data.pubkey) { existed_index.owner = Some(data.owner.value); - existed_index.delegate = data.delegate.value; + existed_index.delegate = data.delegate.clone().map(|delegate| delegate.value); existed_index.owner_type = Some(data.owner_type.value); if data.get_slot_updated() as i64 > existed_index.slot_updated { existed_index.slot_updated = data.get_slot_updated() as i64; @@ -159,7 +159,7 @@ impl AssetIndexReader for Storage { let asset_index = AssetIndex { pubkey: data.pubkey, owner: Some(data.owner.value), - delegate: data.delegate.value, + delegate: data.delegate.clone().map(|delegate| delegate.value), owner_type: Some(data.owner_type.value), slot_updated: data.get_slot_updated() as i64, ..Default::default() diff --git a/rocks-db/tests/batch_client_integration_tests.rs b/rocks-db/tests/batch_client_integration_tests.rs index 88994edad..edadfcb36 100644 --- a/rocks-db/tests/batch_client_integration_tests.rs +++ b/rocks-db/tests/batch_client_integration_tests.rs @@ -373,16 +373,16 @@ fn test_process_asset_updates_batch_iteration_results() { fn create_test_dynamic_data(pubkey: Pubkey, slot: u64) -> AssetDynamicDetails { AssetDynamicDetails { pubkey, - is_compressible: Updated::new(slot, None,false), - is_compressed: Updated::new(slot, None,false), - is_frozen: Updated::new(slot, None,false), - supply: Updated::new(slot, None,None), - seq: Updated::new(slot, None,None), - is_burnt: Updated::new(slot, None,false), - was_decompressed: Updated::new(slot, None,false), - onchain_data: Updated::new(slot, None,None), - creators: Updated::new(slot, None,Vec::new()), - royalty_amount: Updated::new(slot, None,0), + is_compressible: Updated::new(slot, None, false), + is_compressed: Updated::new(slot, None, false), + is_frozen: Updated::new(slot, None, false), + supply: None, + seq: None, + is_burnt: Updated::new(slot, None, false), + was_decompressed: Updated::new(slot, None, false), + onchain_data: None, + creators: Updated::new(slot, None, Vec::new()), + royalty_amount: Updated::new(slot, None, 0), } } @@ -400,8 +400,9 @@ fn test_multiple_slot_updates() { let new_data = AssetDynamicDetails { pubkey: pk, - is_compressible: Updated::new(10, None,true), - is_compressed: Updated::new(0,None, true), + is_compressible: Updated::new(10, None, true), + is_compressed: Updated::new(0, None, true), + supply: Some(Updated::new(0, None, 5)), ..Default::default() }; storage @@ -410,14 +411,15 @@ fn test_multiple_slot_updates() { .unwrap(); let selected_data = storage.asset_dynamic_data.get(pk).unwrap().unwrap(); - assert_eq!(selected_data.is_compressible, Updated::new(10, None,true)); - assert_eq!(selected_data.is_compressed, Updated::new(0, None,false)); // slot in new_data not greater than slot in start data, so that field must not change + assert_eq!(selected_data.is_compressible, Updated::new(10, None, true)); + assert_eq!(selected_data.is_compressed, Updated::new(0, None, false)); // slot in new_data not greater than slot in start data, so that field must not change + assert_eq!(selected_data.supply, None); // slot in new_data not greater than slot in start data, so that field must not change let new_data = AssetDynamicDetails { pubkey: pk, - is_compressible: Updated::new(5, None,false), - is_compressed: Updated::new(0, None,true), - supply: Updated::new(3, None,Some(5)), + is_compressible: Updated::new(5, None, false), + is_compressed: Updated::new(0, None, true), + supply: Some(Updated::new(3, None, 5)), ..Default::default() }; storage @@ -426,14 +428,13 @@ fn test_multiple_slot_updates() { .unwrap(); let selected_data = storage.asset_dynamic_data.get(pk).unwrap().unwrap(); - assert_eq!(selected_data.is_compressible, Updated::new(10, None,true)); - assert_eq!(selected_data.is_compressed, Updated::new(0, None,false)); - assert_eq!(selected_data.supply, Updated::new(3, None,Some(5))); - + assert_eq!(selected_data.is_compressible, Updated::new(10, None, true)); + assert_eq!(selected_data.is_compressed, Updated::new(0, None, false)); + assert_eq!(selected_data.supply, Some(Updated::new(3, None, 5))); let new_data = AssetDynamicDetails { pubkey: pk, - is_compressible: Updated::new(5, Some(1),false), + is_compressible: Updated::new(5, Some(1), false), ..Default::default() }; storage @@ -442,5 +443,8 @@ fn test_multiple_slot_updates() { .unwrap(); let selected_data = storage.asset_dynamic_data.get(pk).unwrap().unwrap(); - assert_eq!(selected_data.is_compressible, Updated::new(5, Some(1),false)); + assert_eq!( + selected_data.is_compressible, + Updated::new(5, Some(1), false) + ); } From cda342ae41475beb90d615f4f78fb5c296e51c96 Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 16:12:55 +0200 Subject: [PATCH 12/14] rm some code duplicates --- .../src/bubblegum_updates_processor.rs | 282 ++-- nft_ingester/src/db_v2.rs | 1324 +---------------- .../tests/batch_client_integration_tests.rs | 4 +- 3 files changed, 89 insertions(+), 1521 deletions(-) diff --git a/nft_ingester/src/bubblegum_updates_processor.rs b/nft_ingester/src/bubblegum_updates_processor.rs index f1e1843dc..e0b36c703 100644 --- a/nft_ingester/src/bubblegum_updates_processor.rs +++ b/nft_ingester/src/bubblegum_updates_processor.rs @@ -240,24 +240,20 @@ impl BubblegumTxProcessor { let mut processed = true; match ix_type { - InstructionName::Transfer => { - self.transfer(parsing_result, bundle).await?; + InstructionName::Transfer + | InstructionName::CancelRedeem + | InstructionName::Delegate => { + self.update_owner(parsing_result, bundle).await?; } InstructionName::Burn => { self.burn(parsing_result, bundle).await?; } - InstructionName::Delegate => { - self.delegate(parsing_result, bundle).await?; - } InstructionName::MintV1 | InstructionName::MintToCollectionV1 => { self.mint_v1(parsing_result, bundle).await?; } InstructionName::Redeem => { self.redeem(parsing_result, bundle).await?; } - InstructionName::CancelRedeem => { - self.cancel_redeem(parsing_result, bundle).await?; - } InstructionName::DecompressV1 => { self.decompress(parsing_result, bundle).await?; } @@ -287,7 +283,7 @@ impl BubblegumTxProcessor { Ok(()) } - pub async fn transfer<'c>( + pub async fn update_owner<'c>( &self, parsing_result: &BubblegumInstruction, bundle: &InstructionBundle<'c>, @@ -305,32 +301,36 @@ impl BubblegumTxProcessor { } => { self.rocks_client.asset_updated(bundle.slot, id)?; - let tree = cl.id; - - let leaf_info = AssetLeaf { - pubkey: id, - tree_id: tree, - leaf: Some(le.leaf_hash.to_vec()), - nonce: Some(nonce), - data_hash: Some(Hash::from(le.schema.data_hash())), - creator_hash: Some(Hash::from(le.schema.creator_hash())), - leaf_seq: Some(cl.seq), - slot_updated: bundle.slot, - }; - - if let Err(e) = self.rocks_client.asset_leaf_data.merge(id, &leaf_info) { + if let Err(e) = self.rocks_client.asset_leaf_data.merge( + id, + &AssetLeaf { + pubkey: id, + tree_id: cl.id, + leaf: Some(le.leaf_hash.to_vec()), + nonce: Some(nonce), + data_hash: Some(Hash::from(le.schema.data_hash())), + creator_hash: Some(Hash::from(le.schema.creator_hash())), + leaf_seq: Some(cl.seq), + slot_updated: bundle.slot, + }, + ) { error!("Error while saving leaf for cNFT: {}", e); }; - let asset_owner = AssetOwner { - pubkey: id, - owner: Updated::new(bundle.slot, Some(cl.seq), owner), - delegate: Some(Updated::new(bundle.slot, Some(cl.seq), delegate)), - owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), - owner_delegate_seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), - }; - - if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { + if let Err(e) = self.rocks_client.asset_owner_data.merge( + id, + &AssetOwner { + pubkey: id, + owner: Updated::new(bundle.slot, Some(cl.seq), owner), + delegate: Some(Updated::new(bundle.slot, Some(cl.seq), delegate)), + owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), + owner_delegate_seq: Some(Updated::new( + bundle.slot, + Some(cl.seq), + cl.seq, + )), + }, + ) { error!("Error while saving owner for cNFT: {}", e); }; } @@ -378,62 +378,6 @@ impl BubblegumTxProcessor { Ok(()) } - pub async fn delegate<'c>( - &self, - parsing_result: &BubblegumInstruction, - bundle: &InstructionBundle<'c>, - ) -> Result<(), IngesterError> { - if let (Some(le), Some(cl)) = (&parsing_result.leaf_update, &parsing_result.tree_update) { - self.rocks_client.save_changelog(cl, bundle.slot).await; - - match le.schema { - LeafSchema::V1 { - id, - owner, - delegate, - nonce, - .. - } => { - self.rocks_client.asset_updated(bundle.slot, id)?; - - let tree = cl.id; - - let leaf_info = AssetLeaf { - pubkey: id, - tree_id: tree, - leaf: Some(le.leaf_hash.to_vec()), - nonce: Some(nonce), - data_hash: Some(Hash::from(le.schema.data_hash())), - creator_hash: Some(Hash::from(le.schema.creator_hash())), - leaf_seq: Some(cl.seq), - slot_updated: bundle.slot, - }; - - if let Err(e) = self.rocks_client.asset_leaf_data.merge(id, &leaf_info) { - error!("Error while saving leaf for cNFT: {}", e); - }; - - let asset_owner = AssetOwner { - pubkey: id, - owner: Updated::new(bundle.slot, Some(cl.seq), owner), - delegate: Some(Updated::new(bundle.slot, Some(cl.seq), delegate)), - owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), - owner_delegate_seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), - }; - - if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { - error!("Error while saving owner for cNFT: {}", e); - }; - } - } - - return Ok(()); - } - Err(IngesterError::ParsingError( - "Ix not parsed correctly".to_string(), - )) - } - pub async fn mint_v1<'c>( &self, parsing_result: &BubblegumInstruction, @@ -544,30 +488,36 @@ impl BubblegumTxProcessor { error!("Error while saving authority for cNFT: {}", e); }; - let asset_owner = AssetOwner { - pubkey: id, - owner: Updated::new(bundle.slot, Some(cl.seq), owner), - delegate: Some(Updated::new(bundle.slot, Some(cl.seq), delegate)), - owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), - owner_delegate_seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), - }; - - if let Err(e) = self.rocks_client.asset_owner_data.put(id, &asset_owner) { + if let Err(e) = self.rocks_client.asset_owner_data.put( + id, + &AssetOwner { + pubkey: id, + owner: Updated::new(bundle.slot, Some(cl.seq), owner), + delegate: Some(Updated::new(bundle.slot, Some(cl.seq), delegate)), + owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), + owner_delegate_seq: Some(Updated::new( + bundle.slot, + Some(cl.seq), + cl.seq, + )), + }, + ) { error!("Error while saving owner for cNFT: {}", e); }; - let asset_leaf = AssetLeaf { - pubkey: id, - tree_id, - leaf: Some(le.leaf_hash.to_vec()), - nonce: Some(nonce), - data_hash: Some(Hash::from(le.schema.data_hash())), - creator_hash: Some(Hash::from(le.schema.creator_hash())), - leaf_seq: Some(cl.seq), - slot_updated: bundle.slot, - }; - - if let Err(e) = self.rocks_client.asset_leaf_data.put(id, &asset_leaf) { + if let Err(e) = self.rocks_client.asset_leaf_data.put( + id, + &AssetLeaf { + pubkey: id, + tree_id, + leaf: Some(le.leaf_hash.to_vec()), + nonce: Some(nonce), + data_hash: Some(Hash::from(le.schema.data_hash())), + creator_hash: Some(Hash::from(le.schema.creator_hash())), + leaf_seq: Some(cl.seq), + slot_updated: bundle.slot, + }, + ) { error!("Error while saving leaf for cNFT: {}", e); }; @@ -636,62 +586,6 @@ impl BubblegumTxProcessor { )) } - pub async fn cancel_redeem<'c>( - &self, - parsing_result: &BubblegumInstruction, - bundle: &InstructionBundle<'c>, - ) -> Result<(), IngesterError> { - if let (Some(le), Some(cl)) = (&parsing_result.leaf_update, &parsing_result.tree_update) { - self.rocks_client.save_changelog(cl, bundle.slot).await; - - match le.schema { - LeafSchema::V1 { - id, - owner, - delegate, - nonce, - .. - } => { - self.rocks_client.asset_updated(bundle.slot, id)?; - - let tree = cl.id; - - let leaf_info = AssetLeaf { - pubkey: id, - tree_id: tree, - leaf: Some(le.leaf_hash.to_vec()), - nonce: Some(nonce), - data_hash: Some(Hash::from(le.schema.data_hash())), - creator_hash: Some(Hash::from(le.schema.creator_hash())), - leaf_seq: Some(cl.seq), - slot_updated: bundle.slot, - }; - - if let Err(e) = self.rocks_client.asset_leaf_data.merge(id, &leaf_info) { - error!("Error while saving leaf for cNFT: {}", e); - }; - - let asset_owner = AssetOwner { - pubkey: id, - owner: Updated::new(bundle.slot, Some(cl.seq), owner), - delegate: Some(Updated::new(bundle.slot, Some(cl.seq), delegate)), - owner_type: Updated::new(bundle.slot, Some(cl.seq), OwnerType::Single), - owner_delegate_seq: Some(Updated::new(bundle.slot, Some(cl.seq), cl.seq)), - }; - - if let Err(e) = self.rocks_client.asset_owner_data.merge(id, &asset_owner) { - error!("Error while saving owner for cNFT: {}", e); - }; - } - } - - return Ok(()); - } - Err(IngesterError::ParsingError( - "Ix not parsed correctly".to_string(), - )) - } - pub async fn decompress<'c>( &self, parsing_result: &BubblegumInstruction, @@ -769,20 +663,19 @@ impl BubblegumTxProcessor { LeafSchema::V1 { id, nonce, .. } => { self.rocks_client.asset_updated(bundle.slot, id)?; - let tree = cl.id; - - let leaf_info = AssetLeaf { - pubkey: id, - tree_id: tree, - leaf: Some(le.leaf_hash.to_vec()), - nonce: Some(nonce), - data_hash: Some(Hash::from(le.schema.data_hash())), - creator_hash: Some(Hash::from(le.schema.creator_hash())), - leaf_seq: Some(cl.seq), - slot_updated: bundle.slot, - }; - - if let Err(e) = self.rocks_client.asset_leaf_data.merge(id, &leaf_info) { + if let Err(e) = self.rocks_client.asset_leaf_data.merge( + id, + &AssetLeaf { + pubkey: id, + tree_id: cl.id, + leaf: Some(le.leaf_hash.to_vec()), + nonce: Some(nonce), + data_hash: Some(Hash::from(le.schema.data_hash())), + creator_hash: Some(Hash::from(le.schema.creator_hash())), + leaf_seq: Some(cl.seq), + slot_updated: bundle.slot, + }, + ) { error!("Error while saving leaf for cNFT: {}", e); }; @@ -802,7 +695,7 @@ impl BubblegumTxProcessor { .asset_dynamic_data .put(id, &new_asset_data) { - error!("Error while saving asset data for cNFT: {}", e); + error!("Error while saving asset data for cNFT 1: {}", e); }; } else { let creator = Creator { @@ -824,7 +717,7 @@ impl BubblegumTxProcessor { .asset_dynamic_data .put(id, &new_asset_data) { - error!("Error while saving asset data for cNFT: {}", e); + error!("Error while saving asset data for cNFT 2: {}", e); }; } } @@ -864,20 +757,19 @@ impl BubblegumTxProcessor { LeafSchema::V1 { id, nonce, .. } => { self.rocks_client.asset_updated(bundle.slot, id)?; - let tree = cl.id; - - let leaf_info = AssetLeaf { - pubkey: id, - tree_id: tree, - leaf: Some(le.leaf_hash.to_vec()), - nonce: Some(nonce), - data_hash: Some(Hash::from(le.schema.data_hash())), - creator_hash: Some(Hash::from(le.schema.creator_hash())), - leaf_seq: Some(cl.seq), - slot_updated: bundle.slot, - }; - - if let Err(e) = self.rocks_client.asset_leaf_data.merge(id, &leaf_info) { + if let Err(e) = self.rocks_client.asset_leaf_data.merge( + id, + &AssetLeaf { + pubkey: id, + tree_id: cl.id, + leaf: Some(le.leaf_hash.to_vec()), + nonce: Some(nonce), + data_hash: Some(Hash::from(le.schema.data_hash())), + creator_hash: Some(Hash::from(le.schema.creator_hash())), + leaf_seq: Some(cl.seq), + slot_updated: bundle.slot, + }, + ) { error!("Error while saving leaf for cNFT: {}", e); }; diff --git a/nft_ingester/src/db_v2.rs b/nft_ingester/src/db_v2.rs index a67dfd7a4..15187b728 100644 --- a/nft_ingester/src/db_v2.rs +++ b/nft_ingester/src/db_v2.rs @@ -1,20 +1,8 @@ -use std::collections::{HashMap, HashSet}; - -use blockbuster::{ - programs::bubblegum::Payload, - token_metadata::state::{TokenStandard, UseMethod, Uses}, -}; -use mpl_bubblegum::state::leaf_schema::{LeafSchema, LeafSchemaEvent}; -use num_traits::FromPrimitive; -use solana_sdk::pubkey::Pubkey; -use spl_account_compression::events::ChangeLogEventV1; use sqlx::{ postgres::{PgConnectOptions, PgPoolOptions, Postgres}, ConnectOptions, PgPool, QueryBuilder, Row, }; - -use digital_asset_types::json::ChainDataV1; -use rocks_db::columns::Mint; +use std::collections::{HashMap, HashSet}; use crate::config::DatabaseConfig; use crate::error::IngesterError; @@ -135,42 +123,6 @@ pub struct Asset { pub ast_supply_slot_updated: Option, } -pub struct AssetForInsert<'a> { - pub ast_pubkey: Option<&'a i64>, - pub ast_owner: Option<&'a i64>, - pub ast_delegate: Option<&'a i64>, - pub ast_authority: Option<&'a i64>, - pub ast_collection: Option<&'a i64>, - pub ast_is_collection_verified: bool, - pub ast_is_compressed: bool, - pub ast_is_frozen: bool, - pub ast_supply: Option, - pub ast_seq: Option, - pub ast_tree_id: Option<&'a i64>, - pub ast_leaf: Option>, - pub ast_nonce: Option, - pub ast_royalty_target_type: RoyaltyTargetType, - pub ast_royalty_target: Option<&'a i64>, - pub ast_royalty_amount: i64, - pub ast_is_burnt: bool, - pub ast_slot_updated: i64, - pub ast_data_hash: Option, - pub ast_creator_hash: Option, - pub ast_owner_delegate_seq: Option, - pub ast_was_decompressed: bool, - pub ast_leaf_seq: Option, - pub ast_specification_asset_class: SpecificationAssetClass, - pub ast_owner_type: OwnerType, - pub ast_onchain_data: String, - pub ast_supply_slot_updated: Option, -} - -pub struct SupplyToUpdate<'a> { - pub ast_pubkey: &'a i64, - pub ast_supply: i64, - pub ast_supply_slot_updated: i64, -} - #[derive(Debug)] pub struct Task { pub ofd_metadata_url: String, @@ -188,16 +140,6 @@ pub struct TaskForInsert { pub ofd_error: Option, } -pub struct Creator { - pub asc_asset: Vec, - pub asc_creator: Vec, - pub asc_share: i32, - pub asc_verified: bool, - pub asc_seq: i32, - pub asc_slot_updated: i64, - pub asc_position: i32, -} - #[derive(Debug, Clone)] pub struct JsonDownloadTask { pub metadata_url: String, @@ -314,91 +256,6 @@ impl DBClient { Ok(tasks) } - pub async fn insert_pubkeys(&self, keys: &[Vec]) -> Result<(), IngesterError> { - let mut query_builder: QueryBuilder<'_, Postgres> = - QueryBuilder::new("INSERT INTO pubkeys (pbk_key) "); - - let mut ordered_keys = keys.to_owned(); - ordered_keys.sort(); - - query_builder.push_values(ordered_keys, |mut b, key| { - b.push_bind(key); - }); - - query_builder.push("ON CONFLICT (pbk_key) DO NOTHING;"); - - let query = query_builder.build(); - query - .execute(&self.pool) - .await - .map_err(|err| IngesterError::DatabaseError(format!("Insert pubkeys: {}", err)))?; - - Ok(()) - } - - pub async fn update_supply(&self, mints: Vec) -> Result<(), IngesterError> { - let mut keys = HashSet::new(); - for key in mints.iter() { - keys.insert(key.pubkey.to_bytes().to_vec()); - } - - let keys = keys.into_iter().collect::>>(); - let ids_keys = self.get_pubkey_ids(&keys).await?; - let keys_map = ids_keys.into_iter().collect::, i64>>(); - - let mut supply_to_update = Vec::new(); - - for mint in mints.iter() { - supply_to_update.push(SupplyToUpdate { - ast_pubkey: keys_map.get(&mint.pubkey.to_bytes().to_vec()).unwrap(), - ast_supply: mint.supply, - ast_supply_slot_updated: mint.slot_updated, - }); - } - - supply_to_update.sort_by(|a, b| a.ast_pubkey.cmp(b.ast_pubkey)); - - let mut query_builder: QueryBuilder<'_, Postgres> = - QueryBuilder::new("UPDATE assets SET ast_supply = tmp.supply, ast_supply_slot_updated = tmp.supply_slot_updated FROM ("); - - query_builder.push_values(supply_to_update, |mut b, key| { - b.push_bind(key.ast_pubkey); - b.push_bind(key.ast_supply); - b.push_bind(key.ast_supply_slot_updated); - }); - - query_builder.push(") as tmp (id, supply, supply_slot_updated) WHERE ast_pubkey = tmp.id AND ast_supply_slot_updated < tmp.supply_slot_updated;"); - - let query = query_builder.build(); - query - .execute(&self.pool) - .await - .map_err(|err| IngesterError::DatabaseError(format!("Update supplies: {}", err)))?; - - Ok(()) - } - - pub async fn insert_pubkey(&self, key: &Vec) -> Result { - let mut query_builder: QueryBuilder<'_, Postgres> = - QueryBuilder::new("INSERT INTO pubkeys (pbk_key)"); - - query_builder.push_values(vec![key], |mut b, key| { - b.push_bind(key); - }); - - query_builder.push("ON CONFLICT (pbk_key) DO NOTHING RETURNING pbk_id;"); - - let query = query_builder.build(); - let row = query - .fetch_one(&self.pool) - .await - .map_err(|err| IngesterError::DatabaseError(format!("Insert one pubkey: {}", err)))?; - - let id: i64 = row.get("pbk_id"); - - Ok(id) - } - pub async fn insert_metadata( &self, urls: &Vec<&str>, @@ -426,232 +283,6 @@ impl DBClient { Ok(res) } - pub async fn get_pubkey_ids( - &self, - keys: &Vec>, - ) -> Result, i64)>, IngesterError> { - let mut query_builder: QueryBuilder<'_, Postgres> = - QueryBuilder::new("SELECT pbk_id, pbk_key FROM pubkeys WHERE pbk_key IN ("); - - for (i, k) in keys.iter().enumerate() { - query_builder.push_bind(k); - if i < keys.len() - 1 { - query_builder.push(","); - } - } - query_builder.push(")"); - - let query = query_builder.build(); - let rows = query - .fetch_all(&self.pool) - .await - .map_err(|err| IngesterError::DatabaseError(format!("Get pubkey ids: {}", err)))?; - - Ok(rows - .iter() - .map(|r| (r.get("pbk_key"), r.get("pbk_id"))) - .collect()) - } - - pub async fn upsert_assets(&self, data: &Vec) -> Result<(), IngesterError> { - let mut keys = HashSet::new(); - for asset in data { - keys.insert(asset.ast_pubkey.clone()); - - if let Some(owner) = &asset.ast_owner { - keys.insert(owner.clone()); - } - - if let Some(delegate) = &asset.ast_delegate { - keys.insert(delegate.clone()); - } - - if let Some(authority) = &asset.ast_authority { - keys.insert(authority.clone()); - } - - if let Some(collection) = &asset.ast_collection { - keys.insert(collection.clone()); - } - - if let Some(tree_id) = &asset.ast_tree_id { - keys.insert(tree_id.clone()); - } - - if let Some(leaf) = &asset.ast_leaf { - keys.insert(leaf.clone()); - } - - if let Some(royalty_target) = &asset.ast_royalty_target { - keys.insert(royalty_target.clone()); - } - } - - let keys = keys.into_iter().collect::>>(); - let ids_keys = self.get_pubkey_ids(&keys).await?; - let keys_map = ids_keys - .into_iter() - .collect::, i64>>(); - - let mut assets_to_insert = Vec::new(); - - for asset in data.iter() { - assets_to_insert.push(AssetForInsert { - ast_pubkey: keys_map.get(&asset.ast_pubkey), - ast_owner: None, - ast_delegate: asset - .ast_delegate - .as_ref() - .and_then(|d| keys_map.get(d)) - .or(None), - ast_authority: asset - .ast_authority - .as_ref() - .and_then(|a| keys_map.get(a)) - .or(None), - ast_collection: asset - .ast_collection - .as_ref() - .and_then(|c| keys_map.get(c)) - .or(None), - ast_is_collection_verified: asset.ast_is_collection_verified, - ast_is_compressed: asset.ast_is_compressed, - ast_is_frozen: asset.ast_is_frozen, - ast_supply: asset.ast_supply, - ast_seq: asset.ast_seq, - ast_tree_id: asset - .ast_tree_id - .as_ref() - .and_then(|t| keys_map.get(t)) - .or(None), - ast_leaf: asset.ast_leaf.clone(), - ast_nonce: asset.ast_nonce, - ast_royalty_target_type: asset.ast_royalty_target_type, - ast_royalty_target: asset - .ast_royalty_target - .as_ref() - .and_then(|r| keys_map.get(r)) - .or(None), - ast_royalty_amount: asset.ast_royalty_amount, - ast_is_burnt: asset.ast_is_burnt, - ast_slot_updated: asset.ast_slot_updated, - ast_data_hash: asset.ast_data_hash.clone(), - ast_creator_hash: asset.ast_creator_hash.clone(), - ast_owner_delegate_seq: asset.ast_owner_delegate_seq, - ast_was_decompressed: asset.ast_was_decompressed, - ast_leaf_seq: asset.ast_leaf_seq, - ast_specification_asset_class: asset.ast_specification_asset_class, - ast_owner_type: asset.ast_owner_type, - ast_onchain_data: asset.ast_onchain_data.clone(), - ast_supply_slot_updated: asset.ast_supply_slot_updated, - }); - } - - assets_to_insert.sort_by(|a, b| a.ast_pubkey.cmp(&b.ast_pubkey)); - - let mut query_builder: QueryBuilder<'_, Postgres> = QueryBuilder::new( - "INSERT INTO assets ( - ast_pubkey, - ast_owner, - ast_delegate, - ast_authority, - ast_collection, - ast_is_collection_verified, - ast_is_compressed, - ast_is_frozen, - ast_supply, - ast_seq, - ast_tree_id, - ast_leaf, - ast_nonce, - ast_royalty_target_type, - ast_royalty_target, - ast_royalty_amount, - ast_is_burnt, - ast_slot_updated, - ast_data_hash, - ast_creator_hash, - ast_owner_delegate_seq, - ast_was_decompressed, - ast_leaf_seq, - ast_specification_asset_class, - ast_owner_type, - ast_onchain_data, - ast_supply_slot_updated - ) ", - ); - - query_builder.push_values(assets_to_insert, |mut b, asset| { - b.push_bind(asset.ast_pubkey); - b.push_bind(asset.ast_owner); - b.push_bind(asset.ast_delegate); - b.push_bind(asset.ast_authority); - b.push_bind(asset.ast_collection); - b.push_bind(asset.ast_is_collection_verified); - b.push_bind(asset.ast_is_compressed); - b.push_bind(asset.ast_is_frozen); - b.push_bind(asset.ast_supply); - b.push_bind(asset.ast_seq); - b.push_bind(asset.ast_tree_id); - b.push_bind(asset.ast_leaf.clone()); - b.push_bind(asset.ast_nonce); - b.push_bind(asset.ast_royalty_target_type); - b.push_bind(asset.ast_royalty_target); - b.push_bind(asset.ast_royalty_amount); - b.push_bind(asset.ast_is_burnt); - b.push_bind(asset.ast_slot_updated); - b.push_bind(asset.ast_data_hash.clone()); - b.push_bind(asset.ast_creator_hash.clone()); - b.push_bind(asset.ast_owner_delegate_seq); - b.push_bind(asset.ast_was_decompressed); - b.push_bind(asset.ast_leaf_seq); - b.push_bind(asset.ast_specification_asset_class); - b.push_bind(asset.ast_owner_type); - b.push_bind(asset.ast_onchain_data.clone()); - b.push_bind(asset.ast_supply_slot_updated); - }); - - query_builder.push( - " ON CONFLICT (ast_pubkey) - DO UPDATE SET - ast_owner = EXCLUDED.ast_owner, - ast_delegate = EXCLUDED.ast_delegate, - ast_authority = EXCLUDED.ast_authority, - ast_collection = EXCLUDED.ast_collection, - ast_is_collection_verified = EXCLUDED.ast_is_collection_verified, - ast_is_compressed = EXCLUDED.ast_is_compressed, - ast_is_frozen = EXCLUDED.ast_is_frozen, - ast_supply = EXCLUDED.ast_supply, - ast_seq = EXCLUDED.ast_seq, - ast_tree_id = EXCLUDED.ast_tree_id, - ast_leaf = EXCLUDED.ast_leaf, - ast_nonce = EXCLUDED.ast_nonce, - ast_royalty_target_type = EXCLUDED.ast_royalty_target_type, - ast_royalty_target = EXCLUDED.ast_royalty_target, - ast_royalty_amount = EXCLUDED.ast_royalty_amount, - ast_is_burnt = EXCLUDED.ast_is_burnt, - ast_slot_updated = EXCLUDED.ast_slot_updated, - ast_data_hash = EXCLUDED.ast_data_hash, - ast_creator_hash = EXCLUDED.ast_creator_hash, - ast_owner_delegate_seq = EXCLUDED.ast_owner_delegate_seq, - ast_was_decompressed = EXCLUDED.ast_was_decompressed, - ast_leaf_seq = EXCLUDED.ast_leaf_seq, - ast_specification_asset_class = EXCLUDED.ast_specification_asset_class, - ast_owner_type = EXCLUDED.ast_owner_type, - ast_onchain_data = EXCLUDED.ast_onchain_data, - ast_supply_slot_updated = EXCLUDED.ast_supply_slot_updated - WHERE assets.ast_slot_updated < EXCLUDED.ast_slot_updated OR assets.ast_slot_updated IS NULL;", - ); - - let query = query_builder.build(); - query - .execute(&self.pool) - .await - .map_err(|err| IngesterError::DatabaseError(format!("Upsert assets: {}", err)))?; - - Ok(()) - } - pub async fn insert_tasks(&self, data: &Vec) -> Result<(), IngesterError> { let mut keys = HashSet::new(); for off_d in data { @@ -708,957 +339,4 @@ impl DBClient { Ok(()) } - - pub async fn drop_creators_for_assets(&self, assets: &[Vec]) -> Result<(), IngesterError> { - let mut keys = HashSet::new(); - for key in assets.iter() { - keys.insert(key.clone()); - } - - let keys = keys.into_iter().collect::>>(); - let ids_keys = self.get_pubkey_ids(&keys).await?; - let keys: Vec = ids_keys.into_iter().map(|k| k.1).collect(); - - let mut query_builder: QueryBuilder<'_, Postgres> = - QueryBuilder::new("DELETE FROM asset_creators WHERE asc_asset IN ("); - - for (i, k) in keys.iter().enumerate() { - query_builder.push_bind(k); - if i < keys.len() - 1 { - query_builder.push(","); - } - } - query_builder.push(")"); - - let query = query_builder.build(); - query.execute(&self.pool).await.map_err(|err| { - IngesterError::DatabaseError(format!("Drop creators for assets: {}", err)) - })?; - - Ok(()) - } - - pub async fn insert_creators_for_assets( - &self, - creators: &Vec, - ) -> Result<(), IngesterError> { - let mut keys = HashSet::new(); - for creator in creators.iter() { - keys.insert(creator.asc_asset.clone()); - keys.insert(creator.asc_creator.clone()); - } - - let keys = keys.into_iter().collect::>>(); - let ids_keys = self.get_pubkey_ids(&keys).await?; - let keys_map = ids_keys - .into_iter() - .collect::, i64>>(); - - let mut query_builder: QueryBuilder<'_, Postgres> = QueryBuilder::new( - "INSERT INTO asset_creators ( - asc_asset, - asc_creator, - asc_share, - asc_verified, - asc_seq, - asc_slot_updated, - asc_position - ) ", - ); - - query_builder.push_values(creators, |mut b, creator| { - let asset = keys_map.get(&creator.asc_asset); - b.push_bind(asset); - let creator_k = keys_map.get(&creator.asc_creator); - b.push_bind(creator_k); - b.push_bind(creator.asc_share); - b.push_bind(creator.asc_verified); - b.push_bind(creator.asc_seq); - b.push_bind(creator.asc_slot_updated); - b.push_bind(creator.asc_position); - }); - - query_builder.push("ON CONFLICT (asc_asset, asc_creator) DO NOTHING;"); - - let query = query_builder.build(); - query.execute(&self.pool).await.map_err(|err| { - IngesterError::DatabaseError(format!("Insert creators for assets: {}", err)) - })?; - - Ok(()) - } - - async fn get_map_of_keys( - &self, - pubkeys: Vec>, - ) -> Result, i64>, IngesterError> { - self.insert_pubkeys(&pubkeys).await?; - - let ids_keys = self.get_pubkey_ids(&pubkeys).await?; - let keys_map = ids_keys.into_iter().collect::, i64>>(); - - Ok(keys_map) - } - - pub async fn mark_asset_as_burned( - &self, - asset: Vec, - seq: u64, - ) -> Result<(), IngesterError> { - let keys_map = self.get_map_of_keys(vec![asset.clone()]).await?; - - let asset_id = keys_map.get(&asset).unwrap(); - - let mut query_builder: QueryBuilder<'_, Postgres> = - QueryBuilder::new("INSERT INTO assets (ast_pubkey, ast_is_burnt, ast_seq, ast_is_collection_verified, ast_is_compressed) "); - - query_builder.push_values(vec![asset_id], |mut b, asset| { - b.push_bind(asset); - b.push_bind(true); - b.push_bind(seq as i64); - b.push_bind(false); - b.push_bind(true); - }); - - query_builder.push(" ON CONFLICT (ast_pubkey) DO UPDATE SET ast_is_burnt = EXCLUDED.ast_is_burnt, ast_seq = EXCLUDED.ast_seq, - ast_is_compressed = EXCLUDED.ast_is_compressed;"); - - let query = query_builder.build(); - query - .execute(&self.pool) - .await - .map_err(|err| IngesterError::DatabaseError(format!("Mark asset as burnt: {}", err)))?; - - Ok(()) - } - - pub async fn save_changelog( - &self, - change_log_event: &ChangeLogEventV1, - ) -> Result<(), IngesterError> { - let tree = change_log_event.id.as_ref().to_vec(); - - let keys_map = self.get_map_of_keys(vec![tree.clone()]).await?; - - let tree_id = keys_map.get(&tree).unwrap(); - - let mut query_builder: QueryBuilder<'_, Postgres> = - QueryBuilder::new("INSERT INTO cl_items (cli_tree, cli_node_idx, cli_leaf_idx, cli_seq, cli_level, cli_hash) "); - - let mut values = Vec::new(); - - let mut i: i64 = 0; - let depth = change_log_event.path.len() - 1; - for p in change_log_event.path.iter() { - let node_idx = p.index as i64; - - let leaf_idx = if i == 0 { - Some(self.node_idx_to_leaf_idx(node_idx, depth as u32)) - } else { - None - }; - - i += 1; - - values.push(( - tree_id, - node_idx, - leaf_idx, - change_log_event.seq as i64, - i, - p.node.as_ref(), - )); - } - - query_builder.push_values(values, |mut b, value| { - b.push_bind(value.0); - b.push_bind(value.1); - b.push_bind(value.2); - b.push_bind(value.3); - b.push_bind(value.4); - b.push_bind(value.5); - }); - - query_builder.push(" ON CONFLICT (cli_tree, cli_node_idx) DO UPDATE SET cli_hash = EXCLUDED.cli_hash, cli_seq = EXCLUDED.cli_seq, - cli_leaf_idx = EXCLUDED.cli_leaf_idx, cli_level = EXCLUDED.cli_level - WHERE cl_items.cli_seq < EXCLUDED.cli_seq OR cl_items.cli_seq IS NULL;"); - - let query = query_builder.build(); - query - .execute(&self.pool) - .await - .map_err(|err| IngesterError::DatabaseError(format!("Save changelog: {}", err)))?; - - Ok(()) - } - - pub async fn asset_redeem( - &self, - change_log_event: &ChangeLogEventV1, - ) -> Result<(), IngesterError> { - let leaf_index = change_log_event.index; - let (asset, _) = Pubkey::find_program_address( - &[ - "asset".as_bytes(), - change_log_event.id.as_ref(), - self.u32_to_u8_array(leaf_index).as_ref(), - ], - &mpl_bubblegum::ID, - ); - let asset = asset.to_bytes().to_vec(); - let tree = change_log_event.id.to_bytes().to_vec(); - let nonce = change_log_event.index as i64; - - let keys_map = self - .get_map_of_keys(vec![asset.clone(), tree.clone()]) - .await?; - - let asset_id = keys_map.get(&asset).unwrap(); - let tree_id = keys_map.get(&tree).unwrap(); - - self.update_asset_leaf_info( - *asset_id, - nonce, - *tree_id, - vec![0; 32], - change_log_event.seq as i64, - vec![0; 32], - vec![0; 32], - ) - .await?; - - self.upsert_asset_seq(*asset_id, change_log_event.seq as i64) - .await?; - - Ok(()) - } - - #[allow(clippy::too_many_arguments)] - async fn update_asset_leaf_info( - &self, - asset_id: i64, - nonce: i64, - tree_id: i64, - leaf: Vec, - leaf_seq: i64, - data_hash: Vec, - creator_hash: Vec, - ) -> Result<(), IngesterError> { - let mut query_builder: QueryBuilder<'_, Postgres> = - QueryBuilder::new("INSERT INTO assets (ast_pubkey, ast_nonce, ast_tree_id, ast_leaf, ast_leaf_seq, ast_data_hash, - ast_creator_hash, ast_is_collection_verified, ast_is_compressed, ast_is_frozen) "); - - query_builder.push_values(vec![asset_id], |mut b, asset| { - b.push_bind(asset); - b.push_bind(nonce); - b.push_bind(tree_id); - b.push_bind(leaf.clone()); - b.push_bind(leaf_seq); - b.push_bind(data_hash.clone()); - b.push_bind(creator_hash.clone()); - b.push_bind(false); - b.push_bind(true); - b.push_bind(false); - }); - - query_builder.push(" ON CONFLICT (ast_pubkey) DO UPDATE SET ast_nonce = EXCLUDED.ast_nonce, ast_tree_id = EXCLUDED.ast_tree_id, - ast_leaf = EXCLUDED.ast_leaf, ast_leaf_seq = EXCLUDED.ast_leaf_seq, ast_data_hash = EXCLUDED.ast_data_hash, - ast_creator_hash = EXCLUDED.ast_creator_hash - WHERE assets.ast_leaf_seq < EXCLUDED.ast_leaf_seq OR assets.ast_leaf_seq IS NULL;"); - - let query = query_builder.build(); - query.execute(&self.pool).await.map_err(|err| { - IngesterError::DatabaseError(format!("Asset update leaf info: {}", err)) - })?; - - Ok(()) - } - - async fn update_asset_owner_and_delegate_info( - &self, - asset_id: i64, - owner_id: i64, - delegate_id: i64, - owner_seq: i64, - ) -> Result<(), IngesterError> { - let mut query_builder: QueryBuilder<'_, Postgres> = QueryBuilder::new( - "INSERT INTO assets (ast_pubkey, ast_owner, ast_delegate, ast_owner_delegate_seq, ast_is_compressed)"); - - query_builder.push_values(vec![asset_id], |mut b, asset| { - b.push_bind(asset); - b.push_bind(owner_id); - b.push_bind(delegate_id); - b.push_bind(owner_seq); - b.push_bind(true); - }); - - query_builder.push(" ON CONFLICT (ast_pubkey) DO UPDATE SET ast_owner = EXCLUDED.ast_owner, - ast_delegate = EXCLUDED.ast_delegate, ast_owner_delegate_seq = EXCLUDED.ast_owner_delegate_seq - WHERE assets.ast_owner_delegate_seq < EXCLUDED.ast_owner_delegate_seq OR assets.ast_owner_delegate_seq IS NULL;"); - - let query = query_builder.build(); - query.execute(&self.pool).await.map_err(|err| { - IngesterError::DatabaseError(format!("Update asset owner and delegate info: {}", err)) - })?; - - Ok(()) - } - - async fn upsert_asset_seq(&self, asset_id: i64, seq: i64) -> Result<(), IngesterError> { - let mut query_builder: QueryBuilder<'_, Postgres> = - QueryBuilder::new("INSERT INTO assets (ast_pubkey, ast_seq) "); - - query_builder.push_values(vec![asset_id], |mut b, asset| { - b.push_bind(asset); - b.push_bind(seq); - }); - - query_builder.push(" ON CONFLICT (ast_pubkey) DO UPDATE SET ast_seq = EXCLUDED.ast_seq WHERE assets.ast_seq < EXCLUDED.ast_seq OR assets.ast_seq IS NULL;"); - - let query = query_builder.build(); - query - .execute(&self.pool) - .await - .map_err(|err| IngesterError::DatabaseError(format!("Upsert asset seq: {}", err)))?; - - Ok(()) - } - - pub async fn asset_cancel_redeem( - &self, - change_log_event: &ChangeLogEventV1, - leaf_schema: &LeafSchemaEvent, - ) -> Result<(), IngesterError> { - match leaf_schema.schema { - LeafSchema::V1 { - id, - owner, - delegate, - .. - } => { - let asset = id.to_bytes().to_vec(); - let owner = owner.to_bytes().to_vec(); - let tree = change_log_event.id.to_bytes().to_vec(); - let delegate = delegate.to_bytes().to_vec(); - let nonce = change_log_event.index as i64; - - let keys_map = self - .get_map_of_keys(vec![ - asset.clone(), - owner.clone(), - tree.clone(), - delegate.clone(), - ]) - .await?; - - let asset_id = keys_map.get(&asset).unwrap(); - let owner_id = keys_map.get(&owner).unwrap(); - let tree_id = keys_map.get(&tree).unwrap(); - let delegate_id = keys_map.get(&delegate).unwrap(); - - self.update_asset_leaf_info( - *asset_id, - nonce, - *tree_id, - leaf_schema.leaf_hash.to_vec(), - change_log_event.seq as i64, - leaf_schema.schema.data_hash().to_vec(), - leaf_schema.schema.creator_hash().to_vec(), - ) - .await?; - - self.update_asset_owner_and_delegate_info( - *asset_id, - *owner_id, - *delegate_id, - change_log_event.seq as i64, - ) - .await?; - - self.upsert_asset_seq(*asset_id, change_log_event.seq as i64) - .await?; - } - } - - Ok(()) - } - - pub async fn asset_collection_verified( - &self, - change_log_event: &ChangeLogEventV1, - leaf_schema: &LeafSchemaEvent, - payload: &Payload, - ) -> Result<(), IngesterError> { - let (collection, verify) = match payload { - Payload::CollectionVerification { - collection, verify, .. - } => (*collection, *verify), - _ => { - return Err(IngesterError::DatabaseError( - "Ix not parsed correctly".to_string(), - )); - } - }; - - let asset = match leaf_schema.schema { - LeafSchema::V1 { id, .. } => id.to_bytes().to_vec(), - }; - let tree = change_log_event.id.to_bytes().to_vec(); - let collection = collection.to_bytes().to_vec(); - let nonce = change_log_event.index as i64; - - let keys_map = self - .get_map_of_keys(vec![asset.clone(), tree.clone(), collection.clone()]) - .await?; - - let asset_id = keys_map.get(&asset).unwrap(); - let tree_id = keys_map.get(&tree).unwrap(); - let collection_id = keys_map.get(&collection).unwrap(); - - self.update_asset_leaf_info( - *asset_id, - nonce, - *tree_id, - leaf_schema.leaf_hash.to_vec(), - change_log_event.seq as i64, - leaf_schema.schema.data_hash().to_vec(), - leaf_schema.schema.creator_hash().to_vec(), - ) - .await?; - - self.upsert_asset_seq(*asset_id, change_log_event.seq as i64) - .await?; - - self.update_asset_collection_info( - *asset_id, - *collection_id, - verify, - change_log_event.seq as i64, - ) - .await?; - - Ok(()) - } - - async fn update_asset_collection_info( - &self, - asset_id: i64, - collection_id: i64, - verified: bool, - collection_seq: i64, - ) -> Result<(), IngesterError> { - let mut query_builder: QueryBuilder<'_, Postgres> = - QueryBuilder::new("INSERT INTO assets (ast_pubkey, ast_collection, ast_is_collection_verified, ast_collection_seq) "); - - query_builder.push_values(vec![asset_id], |mut b, asset| { - b.push_bind(asset); - b.push_bind(collection_id); - b.push_bind(verified); - b.push_bind(collection_seq); - }); - - query_builder.push(" ON CONFLICT (ast_pubkey) DO UPDATE SET ast_collection = EXCLUDED.ast_collection, - ast_is_collection_verified = EXCLUDED.ast_is_collection_verified, - ast_collection_seq = EXCLUDED.ast_collection_seq - WHERE assets.ast_collection_seq < EXCLUDED.ast_collection_seq OR assets.ast_collection_seq IS NULL;"); - - let query = query_builder.build(); - query.execute(&self.pool).await.map_err(|err| { - IngesterError::DatabaseError(format!("Update asset collection: {}", err)) - })?; - - Ok(()) - } - - async fn update_creator_verified( - &self, - asset_id: i64, - creator_id: i64, - verified: bool, - seq: i64, - ) -> Result<(), IngesterError> { - let mut query_builder: QueryBuilder<'_, Postgres> = QueryBuilder::new( - "INSERT INTO asset_creators (asc_asset, asc_creator, asc_verified, asc_seq) ", - ); - - query_builder.push_values(vec![asset_id], |mut b, asset| { - b.push_bind(asset); - b.push_bind(creator_id); - b.push_bind(verified); - b.push_bind(seq); - }); - - query_builder.push(" ON CONFLICT (asc_asset, asc_creator) DO UPDATE SET asc_creator = EXCLUDED.asc_creator, - asc_verified = EXCLUDED.asc_verified, asc_seq = EXCLUDED.asc_seq - WHERE asset_creators.asc_seq < EXCLUDED.asc_seq OR asset_creators.asc_seq IS NULL;"); - - let query = query_builder.build(); - query.execute(&self.pool).await.map_err(|err| { - IngesterError::DatabaseError(format!("Update asset collection: {}", err)) - })?; - - Ok(()) - } - - pub async fn asset_creator_verified( - &self, - change_log_event: &ChangeLogEventV1, - leaf_schema: &LeafSchemaEvent, - payload: &Payload, - ) -> Result<(), IngesterError> { - let (creator, verify) = match payload { - Payload::CreatorVerification { - creator, verify, .. - } => (creator, verify), - _ => { - return Err(IngesterError::DatabaseError( - "Ix not parsed correctly".to_string(), - )); - } - }; - - match leaf_schema.schema { - LeafSchema::V1 { - id, - owner, - delegate, - .. - } => { - let asset = id.to_bytes().to_vec(); - let owner = owner.to_bytes().to_vec(); - let tree = change_log_event.id.to_bytes().to_vec(); - let creator = creator.to_bytes().to_vec(); - let delegate = delegate.to_bytes().to_vec(); - let nonce = change_log_event.index as i64; - - let keys_map = self - .get_map_of_keys(vec![ - asset.clone(), - owner.clone(), - tree.clone(), - creator.clone(), - delegate.clone(), - ]) - .await?; - - let asset_id = keys_map.get(&asset).unwrap(); - let owner_id = keys_map.get(&owner).unwrap(); - let tree_id = keys_map.get(&tree).unwrap(); - let creator_id = keys_map.get(&creator).unwrap(); - let delegate_id = keys_map.get(&delegate).unwrap(); - - self.update_asset_leaf_info( - *asset_id, - nonce, - *tree_id, - leaf_schema.leaf_hash.to_vec(), - change_log_event.seq as i64, - leaf_schema.schema.data_hash().to_vec(), - leaf_schema.schema.creator_hash().to_vec(), - ) - .await?; - - self.update_asset_owner_and_delegate_info( - *asset_id, - *owner_id, - *delegate_id, - change_log_event.seq as i64, - ) - .await?; - - self.update_creator_verified( - *asset_id, - *creator_id, - *verify, - change_log_event.seq as i64, - ) - .await?; - } - } - - Ok(()) - } - - pub async fn asset_decompress(&self, asset: Vec) -> Result<(), IngesterError> { - let keys_map = self.get_map_of_keys(vec![asset.clone()]).await?; - - let asset_id = keys_map.get(&asset).unwrap(); - - let mut query_builder: QueryBuilder<'_, Postgres> = QueryBuilder::new( - "INSERT INTO assets (ast_pubkey, ast_tree_id, ast_leaf, ast_nonce, - ast_data_hash, ast_creator_hash, ast_is_compressed, - ast_supply, ast_was_decompressed, ast_seq) ", - ); - - query_builder.push_values(vec![asset_id], |mut b, asset| { - b.push_bind(asset); - b.push_bind(None::); - b.push_bind(None::); - b.push_bind(0); - b.push_bind(None::>); - b.push_bind(None::>); - b.push_bind(false); - b.push_bind(1); - b.push_bind(true); - b.push_bind(0); - }); - - query_builder.push(" ON CONFLICT (ast_pubkey) DO UPDATE SET ast_tree_id = EXCLUDED.ast_tree_id, - ast_leaf = EXCLUDED.ast_leaf, ast_nonce = EXCLUDED.ast_nonce, ast_data_hash = EXCLUDED.ast_data_hash, - ast_creator_hash = EXCLUDED.ast_creator_hash, ast_is_compressed = EXCLUDED.ast_is_compressed, - ast_supply = EXCLUDED.ast_supply, ast_was_decompressed = EXCLUDED.ast_was_decompressed, ast_seq = EXCLUDED.ast_seq;"); - - let query = query_builder.build(); - query.execute(&self.pool).await.map_err(|err| { - IngesterError::DatabaseError(format!("Update asset decompress: {}", err)) - })?; - - Ok(()) - } - - pub async fn asset_delegate( - &self, - change_log_event: &ChangeLogEventV1, - leaf_schema: &LeafSchemaEvent, - ) -> Result<(), IngesterError> { - match leaf_schema.schema { - LeafSchema::V1 { - id, - owner, - delegate, - .. - } => { - let asset = id.to_bytes().to_vec(); - let owner = owner.to_bytes().to_vec(); - let tree = change_log_event.id.to_bytes().to_vec(); - let delegate = delegate.to_bytes().to_vec(); - - let keys_map = self - .get_map_of_keys(vec![ - asset.clone(), - owner.clone(), - tree.clone(), - delegate.clone(), - ]) - .await?; - - let asset_id = keys_map.get(&asset).unwrap(); - let owner_id = keys_map.get(&owner).unwrap(); - let tree_id = keys_map.get(&tree).unwrap(); - let delegate_id = keys_map.get(&delegate).unwrap(); - - self.update_asset_leaf_info( - *asset_id, - change_log_event.index as i64, - *tree_id, - leaf_schema.leaf_hash.to_vec(), - change_log_event.seq as i64, - leaf_schema.schema.data_hash().to_vec(), - leaf_schema.schema.creator_hash().to_vec(), - ) - .await?; - - self.update_asset_owner_and_delegate_info( - *asset_id, - *owner_id, - *delegate_id, - change_log_event.seq as i64, - ) - .await?; - - self.upsert_asset_seq(*asset_id, change_log_event.seq as i64) - .await?; - } - } - - Ok(()) - } - - pub async fn asset_mint( - &self, - change_log_event: &ChangeLogEventV1, - leaf_schema: &LeafSchemaEvent, - payload: &Option, - slot_updated: u64, - tree: Vec, - authority: Vec, - ) -> Result<(), IngesterError> { - let metadata = match payload { - Some(Payload::MintV1 { args }) => args, - _ => { - return Err(IngesterError::DatabaseError( - "Ix not parsed correctly".to_string(), - )); - } - }; - - match leaf_schema.schema { - LeafSchema::V1 { - id, - delegate, - owner, - nonce, - .. - } => { - let asset = id.to_bytes().to_vec(); - let uri = metadata.uri.trim().replace('\0', ""); - let mut chain_data = ChainDataV1 { - name: metadata.name.clone(), - symbol: metadata.symbol.clone(), - edition_nonce: metadata.edition_nonce, - primary_sale_happened: metadata.primary_sale_happened, - token_standard: Some(TokenStandard::NonFungible), - uses: metadata.uses.clone().map(|u| Uses { - use_method: UseMethod::from_u8(u.use_method as u8).unwrap(), - remaining: u.remaining, - total: u.total, - }), - }; - chain_data.sanitize(); - let chain_data_json = serde_json::to_string(&chain_data) - .map_err(|e| IngesterError::DatabaseError(e.to_string()))?; - if uri.is_empty() { - return Err(IngesterError::DatabaseError("URI is empty".to_string())); - } - - let delegate = delegate.to_bytes().to_vec(); - let owner = owner.to_bytes().to_vec(); - - let collection = metadata - .collection - .clone() - .map_or(vec![0; 32], |v| v.key.to_bytes().to_vec()); - let collection_verified = metadata.collection.clone().map_or(false, |v| v.verified); - - let mut all_necessary_keys = Vec::new(); - for c in metadata.creators.iter() { - all_necessary_keys.push(c.address.to_bytes().to_vec()); - } - all_necessary_keys.push(asset.clone()); - all_necessary_keys.push(owner.clone()); - all_necessary_keys.push(delegate.clone()); - all_necessary_keys.push(collection.clone()); - all_necessary_keys.push(tree.clone()); - all_necessary_keys.push(authority.clone()); - - let keys_map = self.get_map_of_keys(all_necessary_keys).await?; - - let asset_id = keys_map.get(&asset).unwrap(); - let owner_id = keys_map.get(&owner).unwrap(); - let delegate_id = keys_map.get(&delegate).unwrap(); - let collection_id = keys_map.get(&collection).unwrap(); - let tree_id = keys_map.get(&tree).unwrap(); - let authority_id = keys_map.get(&authority).unwrap(); - - let mut query_builder: QueryBuilder<'_, Postgres> = - QueryBuilder::new("INSERT INTO assets (ast_pubkey, ast_is_compressed, ast_is_frozen, ast_supply, ast_tree_id, - ast_nonce, ast_royalty_target_type, ast_royalty_target, ast_royalty_amount, ast_is_burnt, - ast_slot_updated, ast_was_decompressed, ast_is_collection_verified, ast_specification_asset_class, ast_onchain_data) "); - - query_builder.push_values(vec![*asset_id], |mut b, asset| { - b.push_bind(asset); - b.push_bind(true); - b.push_bind(false); - b.push_bind(1); - b.push_bind(tree_id); - b.push_bind(nonce as i64); - b.push_bind(RoyaltyTargetType::Creators); - b.push_bind(None::); - b.push_bind(metadata.seller_fee_basis_points as i64); - b.push_bind(false); - b.push_bind(slot_updated as i64); - b.push_bind(false); - b.push_bind(false); - b.push_bind(SpecificationAssetClass::Nft); - b.push_bind(chain_data_json.clone()); - }); - - query_builder.push(" ON CONFLICT (ast_pubkey) DO UPDATE SET - ast_is_frozen = EXCLUDED.ast_is_frozen, ast_supply = EXCLUDED.ast_supply, - ast_tree_id = EXCLUDED.ast_tree_id, ast_nonce = EXCLUDED.ast_nonce, - ast_royalty_target_type = EXCLUDED.ast_royalty_target_type, ast_royalty_target = EXCLUDED.ast_royalty_target, - ast_royalty_amount = EXCLUDED.ast_royalty_amount, ast_is_burnt = EXCLUDED.ast_is_burnt, - ast_slot_updated = EXCLUDED.ast_slot_updated, ast_was_decompressed = EXCLUDED.ast_was_decompressed, - ast_onchain_data = EXCLUDED.ast_onchain_data - WHERE assets.ast_slot_updated < EXCLUDED.ast_slot_updated OR assets.ast_slot_updated IS NULL;"); - - let query = query_builder.build(); - query - .execute(&self.pool) - .await - .map_err(|err| IngesterError::DatabaseError(format!("Asset mint: {}", err)))?; - - self.update_asset_leaf_info( - *asset_id, - nonce as i64, - *tree_id, - leaf_schema.leaf_hash.to_vec(), - change_log_event.seq as i64, - leaf_schema.schema.data_hash().to_vec(), - leaf_schema.schema.creator_hash().to_vec(), - ) - .await?; - - self.update_asset_owner_and_delegate_info( - *asset_id, - *owner_id, - *delegate_id, - change_log_event.seq as i64, - ) - .await?; - - self.upsert_asset_seq(*asset_id, change_log_event.seq as i64) - .await?; - - self.update_asset_collection_info( - *asset_id, - *collection_id, - collection_verified, - change_log_event.seq as i64, - ) - .await?; - - self.insert_asset_offchain_data(*asset_id, uri).await?; - - if !metadata.creators.is_empty() { - let mut query_builder: QueryBuilder<'_, Postgres> = QueryBuilder::new( - "INSERT INTO asset_creators (asc_asset, asc_creator, asc_share, asc_verified, asc_seq, asc_slot_updated, asc_position) ", - ); - - let mut i: i64 = 0; - query_builder.push_values(metadata.creators.iter(), |mut b, c| { - b.push_bind(asset_id); - b.push_bind(keys_map.get(&c.address.to_bytes().to_vec()).unwrap()); - b.push_bind(c.share as i32); - b.push_bind(c.verified); - b.push_bind(change_log_event.seq as i64); - b.push_bind(slot_updated as i64); - b.push_bind(i); - i += 1; - }); - - query_builder.push(" ON CONFLICT (asc_asset, asc_creator) DO NOTHING;"); - - let query = query_builder.build(); - query.execute(&self.pool).await.map_err(|err| { - IngesterError::DatabaseError(format!("Insert asset offchain data: {}", err)) - })?; - } - - // TODO: drop and insert with command above once have stable version - self.update_authority(*asset_id, *authority_id).await?; - } - } - Ok(()) - } - - async fn update_authority( - &self, - asset_id: i64, - authority_id: i64, - ) -> Result<(), IngesterError> { - sqlx::query("UPDATE assets SET ast_authority = $1 WHERE ast_pubkey = $2;") - .bind(authority_id) - .bind(asset_id) - .execute(&self.pool) - .await - .map_err(|err| IngesterError::DatabaseError(format!("Update authority: {}", err)))?; - - Ok(()) - } - - pub async fn asset_transfer( - &self, - change_log_event: &ChangeLogEventV1, - leaf_schema: &LeafSchemaEvent, - ) -> Result<(), IngesterError> { - match leaf_schema.schema { - LeafSchema::V1 { - id, - owner, - delegate, - .. - } => { - let asset = id.to_bytes().to_vec(); - let owner = owner.to_bytes().to_vec(); - let tree = change_log_event.id.to_bytes().to_vec(); - let delegate = delegate.to_bytes().to_vec(); - - let keys_map = self - .get_map_of_keys(vec![ - asset.clone(), - owner.clone(), - tree.clone(), - delegate.clone(), - ]) - .await?; - - let asset_id = keys_map.get(&asset).unwrap(); - let owner_id = keys_map.get(&owner).unwrap(); - let tree_id = keys_map.get(&tree).unwrap(); - let delegate_id = keys_map.get(&delegate).unwrap(); - - self.update_asset_leaf_info( - *asset_id, - change_log_event.index as i64, - *tree_id, - leaf_schema.leaf_hash.to_vec(), - change_log_event.seq as i64, - leaf_schema.schema.data_hash().to_vec(), - leaf_schema.schema.creator_hash().to_vec(), - ) - .await?; - - self.update_asset_owner_and_delegate_info( - *asset_id, - *owner_id, - *delegate_id, - change_log_event.seq as i64, - ) - .await?; - - self.upsert_asset_seq(*asset_id, change_log_event.seq as i64) - .await?; - } - } - Ok(()) - } - - // TODO: update in assets table - async fn insert_asset_offchain_data( - &self, - asset_id: i64, - metadata_url: String, - ) -> Result<(), IngesterError> { - let mut query_builder: QueryBuilder<'_, Postgres> = QueryBuilder::new( - "INSERT INTO offchain_data (ofd_pubkey, ofd_metadata_url, ofd_status) ", - ); - - query_builder.push_values(vec![asset_id], |mut b, asset| { - b.push_bind(asset); - b.push_bind(metadata_url.clone()); - b.push_bind(TaskStatus::Pending); - }); - - query_builder.push(" ON CONFLICT (ofd_pubkey) DO NOTHING;"); - - let query = query_builder.build(); - query.execute(&self.pool).await.map_err(|err| { - IngesterError::DatabaseError(format!("Insert asset offchain data: {}", err)) - })?; - - Ok(()) - } - - fn node_idx_to_leaf_idx(&self, index: i64, tree_height: u32) -> i64 { - index - 2i64.pow(tree_height) - } - - // PDA lookup requires an 8-byte array. - fn u32_to_u8_array(&self, 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/rocks-db/tests/batch_client_integration_tests.rs b/rocks-db/tests/batch_client_integration_tests.rs index edadfcb36..b8fd7dddc 100644 --- a/rocks-db/tests/batch_client_integration_tests.rs +++ b/rocks-db/tests/batch_client_integration_tests.rs @@ -376,13 +376,11 @@ fn create_test_dynamic_data(pubkey: Pubkey, slot: u64) -> AssetDynamicDetails { is_compressible: Updated::new(slot, None, false), is_compressed: Updated::new(slot, None, false), is_frozen: Updated::new(slot, None, false), - supply: None, - seq: None, is_burnt: Updated::new(slot, None, false), was_decompressed: Updated::new(slot, None, false), - onchain_data: None, creators: Updated::new(slot, None, Vec::new()), royalty_amount: Updated::new(slot, None, 0), + ..Default::default() } } From fd87a8e5cc0e66a1d9055fe5a128a8f0ebb3973c Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 16:29:56 +0200 Subject: [PATCH 13/14] comments --- docker-compose.yaml | 22 ---------------------- nft_ingester/scripts/run_ingester.bash | 2 +- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index c0b482e8a..1045e01ce 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -23,28 +23,6 @@ services: options: max-size: "2048m" - ingester-second-consumer: - container_name: ingester-second-consumer - restart: always - entrypoint: "./ingester" - env_file: - - .env - environment: - INGESTER_CONSUMER_NUMBER: 1 - depends_on: - - db - network_mode: host - volumes: - - ${INGESTER_ROCKS_DB_PATH}:${INGESTER_ROCKS_DB_PATH_CONTAINER}:rw - - ${INGESTER_ROCKS_BACKUP_DIR}:${INGESTER_ROCKS_BACKUP_DIR}:rw - - ${INGESTER_ROCKS_BACKUP_ARCHIVES_DIR}:${INGESTER_ROCKS_BACKUP_ARCHIVES_DIR}:rw - build: - context: . - dockerfile: ingester.Dockerfile - logging: - options: - max-size: "2048m" - db: container_name: db image: 'postgres:14' diff --git a/nft_ingester/scripts/run_ingester.bash b/nft_ingester/scripts/run_ingester.bash index 4662a6923..41765a0b5 100755 --- a/nft_ingester/scripts/run_ingester.bash +++ b/nft_ingester/scripts/run_ingester.bash @@ -33,7 +33,7 @@ export INGESTER_SLOT_UNTIL=0 export INGESTER_SLOT_START_FROM=236032212 export INGESTER_BIG_TABLE_CONFIG='{creds="./creds.json", timeout=1000}' -export ingester_synchronizer_batch_size=500 +export INGESTER_SYNCHRONIZER_BATCH_SIZE=500 cargo run --package nft_ingester --bin ingester # start with restore rocks DB From 2d0d5d7034f7e070422592dd2b0bf39063ff1dea Mon Sep 17 00:00:00 2001 From: requesco Date: Thu, 21 Dec 2023 18:33:54 +0200 Subject: [PATCH 14/14] merge --- nft_ingester/src/db_v2.rs | 92 ---------------------- nft_ingester/src/mplx_updates_processor.rs | 11 +-- 2 files changed, 1 insertion(+), 102 deletions(-) diff --git a/nft_ingester/src/db_v2.rs b/nft_ingester/src/db_v2.rs index 15187b728..fe99b1458 100644 --- a/nft_ingester/src/db_v2.rs +++ b/nft_ingester/src/db_v2.rs @@ -12,68 +12,6 @@ pub struct DBClient { pub pool: PgPool, } -#[derive( - serde_derive::Deserialize, - serde_derive::Serialize, - PartialEq, - Debug, - Eq, - Hash, - sqlx::Type, - Copy, - Clone, -)] -#[sqlx(type_name = "royalty_target_type", rename_all = "lowercase")] -pub enum RoyaltyTargetType { - Unknown, - Creators, - Fanout, - Single, -} - -#[derive( - serde_derive::Deserialize, - serde_derive::Serialize, - PartialEq, - Debug, - Eq, - Hash, - sqlx::Type, - Copy, - Clone, -)] -#[sqlx(type_name = "specification_asset_class", rename_all = "lowercase")] -#[allow(non_camel_case_types)] -pub enum SpecificationAssetClass { - Unknown, - Fungible_Token, - Fungible_Asset, - Nft, - Printable_Nft, - Print, - Transfer_Restricted_Nft, - Non_Transferable_Nft, - Identity_Nft, -} - -#[derive( - serde_derive::Deserialize, - serde_derive::Serialize, - PartialEq, - Debug, - Eq, - Hash, - sqlx::Type, - Copy, - Clone, -)] -#[sqlx(type_name = "owner_type", rename_all = "lowercase")] -pub enum OwnerType { - Unknown, - Token, - Single, -} - #[derive( serde_derive::Deserialize, serde_derive::Serialize, @@ -93,36 +31,6 @@ pub enum TaskStatus { Failed, } -pub struct Asset { - pub ast_pubkey: Vec, - pub ast_owner: Option>, - pub ast_delegate: Option>, - pub ast_authority: Option>, - pub ast_collection: Option>, - pub ast_is_collection_verified: bool, - pub ast_is_compressed: bool, - pub ast_is_frozen: bool, - pub ast_supply: Option, - pub ast_seq: Option, - pub ast_tree_id: Option>, - pub ast_leaf: Option>, - pub ast_nonce: Option, - pub ast_royalty_target_type: RoyaltyTargetType, - pub ast_royalty_target: Option>, - pub ast_royalty_amount: i64, - pub ast_is_burnt: bool, - pub ast_slot_updated: i64, - pub ast_data_hash: Option, - pub ast_creator_hash: Option, - pub ast_owner_delegate_seq: Option, - pub ast_was_decompressed: bool, - pub ast_leaf_seq: Option, - pub ast_specification_asset_class: SpecificationAssetClass, - pub ast_owner_type: OwnerType, - pub ast_onchain_data: String, - pub ast_supply_slot_updated: Option, -} - #[derive(Debug)] pub struct Task { pub ofd_metadata_url: String, diff --git a/nft_ingester/src/mplx_updates_processor.rs b/nft_ingester/src/mplx_updates_processor.rs index 288beb034..c539831fa 100644 --- a/nft_ingester/src/mplx_updates_processor.rs +++ b/nft_ingester/src/mplx_updates_processor.rs @@ -16,19 +16,10 @@ use rocks_db::columns::Mint; use rocks_db::Storage; use crate::buffer::Buffer; -use crate::db_v2::{Asset, DBClient as DBClientV2, Task}; +use crate::db_v2::{DBClient as DBClientV2, Task}; pub const BUFFER_PROCESSING_COUNTER: i32 = 10; -#[derive(Default)] -pub struct MetadataModels { - pub asset_pubkeys: Vec>, - pub all_pubkeys: Vec>, - pub asset: Vec, - pub asset_creators: Vec, - pub asset_data: Vec, -} - #[derive(Default, Debug)] pub struct RocksMetadataModels { pub asset_static: Vec,