diff --git a/crates/brk_computer/src/storage/vecs/grouped/builder.rs b/crates/brk_computer/src/storage/vecs/grouped/builder.rs index 118e6c7a0..51d5be4c5 100644 --- a/crates/brk_computer/src/storage/vecs/grouped/builder.rs +++ b/crates/brk_computer/src/storage/vecs/grouped/builder.rs @@ -1,6 +1,6 @@ use std::path::Path; -use brk_core::CheckedSub; +use brk_core::{CheckedSub, StoredUsize}; use brk_exit::Exit; use brk_vec::{Compressed, DynamicVec, Result, StoredIndex, StoredType, StoredVec, Version}; use color_eyre::eyre::ContextCompat; @@ -162,7 +162,7 @@ where max_from: I, source: &StoredVec, first_indexes: &StoredVec, - last_indexes: &StoredVec, + count_indexes: &StoredVec, exit: &Exit, ) -> Result<()> where @@ -170,7 +170,7 @@ where { let index = self.starting_index(max_from); - let mut last_indexes_iter = last_indexes.iter(); + let mut count_indexes_iter = count_indexes.iter(); let mut source_iter = source.iter(); let total_vec = self.total.as_mut(); @@ -186,14 +186,17 @@ where .try_for_each(|(i, first_index)| -> Result<()> { let first_index = first_index.into_inner(); - let last_index = last_indexes_iter.get(i).unwrap().1.into_inner(); + let count_index = count_indexes_iter.get(i).unwrap().1.into_inner(); if let Some(first) = self.first.as_mut() { - let v = source_iter.get(first_index).unwrap().1.into_inner(); - first.forced_push_at(index, v, exit)?; + let f = source_iter + .get(first_index) + .map_or(T::from(0_usize), |f| f.1.into_inner()); + first.forced_push_at(index, f, exit)?; } if let Some(last) = self.last.as_mut() { + let last_index = first_index + *count_index; let v = source_iter.get(last_index).unwrap().1.into_inner(); last.forced_push_at(index, v, exit)?; } @@ -212,12 +215,7 @@ where if needs_values { source_iter.set(first_index); let mut values = (&mut source_iter) - .take( - last_index - .checked_sub(first_index) - .unwrap() - .unwrap_to_usize(), - ) + .take(*count_index) .map(|(_, v)| v.into_inner()) .collect::>(); @@ -236,8 +234,8 @@ where max.path(), first_indexes.path(), first_index, - last_indexes.path(), - last_index, + count_indexes.path(), + count_index, source.len(), source.path() ); @@ -310,7 +308,7 @@ where max_from: I, source: &ComputedVecBuilder, first_indexes: &StoredVec, - last_indexes: &StoredVec, + count_indexes: &StoredVec, exit: &Exit, ) -> Result<()> where @@ -327,7 +325,7 @@ where let index = self.starting_index(max_from); - let mut last_indexes_iter = last_indexes.iter(); + let mut count_indexes_iter = count_indexes.iter(); let mut source_first_iter = source.first.as_ref().map(|f| f.iter()); let mut source_last_iter = source.last.as_ref().map(|f| f.iter()); @@ -347,7 +345,7 @@ where .try_for_each(|(i, first_index, ..)| -> Result<()> { let first_index = first_index.into_inner(); - let last_index = last_indexes_iter.get(i).unwrap().1.into_inner(); + let count_index = count_indexes_iter.get(i).unwrap().1.into_inner(); if let Some(first) = self.first.as_mut() { let v = source_first_iter @@ -358,6 +356,7 @@ where } if let Some(last) = self.last.as_mut() { + let last_index = first_index + *count_index; let v = source_last_iter .as_mut() .unwrap() @@ -376,12 +375,7 @@ where let source_max_iter = source_max_iter.as_mut().unwrap(); source_max_iter.set(first_index); let mut values = source_max_iter - .take( - last_index - .checked_sub(first_index) - .unwrap() - .unwrap_to_usize(), - ) + .take(*count_index) .map(|(_, v)| v.into_inner()) .collect::>(); values.sort_unstable(); @@ -392,12 +386,7 @@ where let source_min_iter = source_min_iter.as_mut().unwrap(); source_min_iter.set(first_index); let mut values = source_min_iter - .take( - last_index - .checked_sub(first_index) - .unwrap() - .unwrap_to_usize(), - ) + .take(*count_index) .map(|(_, v)| v.into_inner()) .collect::>(); values.sort_unstable(); @@ -410,12 +399,7 @@ where let source_average_iter = source_average_iter.as_mut().unwrap(); source_average_iter.set(first_index); let values = source_average_iter - .take( - last_index - .checked_sub(first_index) - .unwrap() - .unwrap_to_usize(), - ) + .take(*count_index) .map(|(_, v)| v.into_inner()) .collect::>(); @@ -431,12 +415,7 @@ where let source_sum_iter = source_sum_iter.as_mut().unwrap(); source_sum_iter.set(first_index); let values = source_sum_iter - .take( - last_index - .checked_sub(first_index) - .unwrap() - .unwrap_to_usize(), - ) + .take(*count_index) .map(|(_, v)| v.into_inner()) .collect::>(); diff --git a/crates/brk_computer/src/storage/vecs/grouped/from_dateindex.rs b/crates/brk_computer/src/storage/vecs/grouped/from_dateindex.rs index 991ac041b..08f8ac156 100644 --- a/crates/brk_computer/src/storage/vecs/grouped/from_dateindex.rs +++ b/crates/brk_computer/src/storage/vecs/grouped/from_dateindex.rs @@ -101,7 +101,7 @@ where starting_indexes.weekindex, self.dateindex.vec(), indexes.weekindex_to_first_dateindex.vec(), - indexes.weekindex_to_last_dateindex.vec(), + indexes.weekindex_to_dateindex_count.vec(), exit, )?; @@ -109,7 +109,7 @@ where starting_indexes.monthindex, self.dateindex.vec(), indexes.monthindex_to_first_dateindex.vec(), - indexes.monthindex_to_last_dateindex.vec(), + indexes.monthindex_to_dateindex_count.vec(), exit, )?; @@ -117,7 +117,7 @@ where starting_indexes.quarterindex, &self.monthindex, indexes.quarterindex_to_first_monthindex.vec(), - indexes.quarterindex_to_last_monthindex.vec(), + indexes.quarterindex_to_monthindex_count.vec(), exit, )?; @@ -125,7 +125,7 @@ where starting_indexes.yearindex, &self.monthindex, indexes.yearindex_to_first_monthindex.vec(), - indexes.yearindex_to_last_monthindex.vec(), + indexes.yearindex_to_monthindex_count.vec(), exit, )?; @@ -133,7 +133,7 @@ where starting_indexes.decadeindex, &self.yearindex, indexes.decadeindex_to_first_yearindex.vec(), - indexes.decadeindex_to_last_yearindex.vec(), + indexes.decadeindex_to_yearindex_count.vec(), exit, )?; diff --git a/crates/brk_computer/src/storage/vecs/grouped/from_height.rs b/crates/brk_computer/src/storage/vecs/grouped/from_height.rs index c1f0c5626..7ffd5189d 100644 --- a/crates/brk_computer/src/storage/vecs/grouped/from_height.rs +++ b/crates/brk_computer/src/storage/vecs/grouped/from_height.rs @@ -125,7 +125,7 @@ where starting_indexes.dateindex, height, indexes.dateindex_to_first_height.vec(), - indexes.dateindex_to_last_height.vec(), + indexes.dateindex_to_height_count.vec(), exit, )?; @@ -133,7 +133,7 @@ where starting_indexes.weekindex, &self.dateindex, indexes.weekindex_to_first_dateindex.vec(), - indexes.weekindex_to_last_dateindex.vec(), + indexes.weekindex_to_dateindex_count.vec(), exit, )?; @@ -141,7 +141,7 @@ where starting_indexes.monthindex, &self.dateindex, indexes.monthindex_to_first_dateindex.vec(), - indexes.monthindex_to_last_dateindex.vec(), + indexes.monthindex_to_dateindex_count.vec(), exit, )?; @@ -149,7 +149,7 @@ where starting_indexes.quarterindex, &self.monthindex, indexes.quarterindex_to_first_monthindex.vec(), - indexes.quarterindex_to_last_monthindex.vec(), + indexes.quarterindex_to_monthindex_count.vec(), exit, )?; @@ -157,7 +157,7 @@ where starting_indexes.yearindex, &self.monthindex, indexes.yearindex_to_first_monthindex.vec(), - indexes.yearindex_to_last_monthindex.vec(), + indexes.yearindex_to_monthindex_count.vec(), exit, )?; @@ -165,7 +165,7 @@ where starting_indexes.decadeindex, &self.yearindex, indexes.decadeindex_to_first_yearindex.vec(), - indexes.decadeindex_to_last_yearindex.vec(), + indexes.decadeindex_to_yearindex_count.vec(), exit, )?; @@ -173,7 +173,7 @@ where starting_indexes.difficultyepoch, height, indexes.difficultyepoch_to_first_height.vec(), - indexes.difficultyepoch_to_last_height.vec(), + indexes.difficultyepoch_to_height_count.vec(), exit, )?; diff --git a/crates/brk_computer/src/storage/vecs/grouped/from_height_strict.rs b/crates/brk_computer/src/storage/vecs/grouped/from_height_strict.rs index adc9602d4..98127b792 100644 --- a/crates/brk_computer/src/storage/vecs/grouped/from_height_strict.rs +++ b/crates/brk_computer/src/storage/vecs/grouped/from_height_strict.rs @@ -79,7 +79,7 @@ where starting_indexes.difficultyepoch, self.height.vec(), indexes.difficultyepoch_to_first_height.vec(), - indexes.difficultyepoch_to_last_height.vec(), + indexes.difficultyepoch_to_height_count.vec(), exit, )?; diff --git a/crates/brk_computer/src/storage/vecs/grouped/from_txindex.rs b/crates/brk_computer/src/storage/vecs/grouped/from_txindex.rs index 5d501e4c6..e9a290416 100644 --- a/crates/brk_computer/src/storage/vecs/grouped/from_txindex.rs +++ b/crates/brk_computer/src/storage/vecs/grouped/from_txindex.rs @@ -125,7 +125,7 @@ where starting_indexes.height, txindex, indexer.vecs().height_to_first_txindex.vec(), - indexes.height_to_last_txindex.vec(), + indexes.height_to_txindex_count.vec(), exit, )?; @@ -133,7 +133,7 @@ where starting_indexes.dateindex, &self.height, indexes.dateindex_to_first_height.vec(), - indexes.dateindex_to_last_height.vec(), + indexes.dateindex_to_height_count.vec(), exit, )?; @@ -141,7 +141,7 @@ where starting_indexes.weekindex, &self.dateindex, indexes.weekindex_to_first_dateindex.vec(), - indexes.weekindex_to_last_dateindex.vec(), + indexes.weekindex_to_dateindex_count.vec(), exit, )?; @@ -149,7 +149,7 @@ where starting_indexes.monthindex, &self.dateindex, indexes.monthindex_to_first_dateindex.vec(), - indexes.monthindex_to_last_dateindex.vec(), + indexes.monthindex_to_dateindex_count.vec(), exit, )?; @@ -157,7 +157,7 @@ where starting_indexes.quarterindex, &self.monthindex, indexes.quarterindex_to_first_monthindex.vec(), - indexes.quarterindex_to_last_monthindex.vec(), + indexes.quarterindex_to_monthindex_count.vec(), exit, )?; @@ -165,7 +165,7 @@ where starting_indexes.yearindex, &self.monthindex, indexes.yearindex_to_first_monthindex.vec(), - indexes.yearindex_to_last_monthindex.vec(), + indexes.yearindex_to_monthindex_count.vec(), exit, )?; @@ -173,7 +173,7 @@ where starting_indexes.decadeindex, &self.yearindex, indexes.decadeindex_to_first_yearindex.vec(), - indexes.decadeindex_to_last_yearindex.vec(), + indexes.decadeindex_to_yearindex_count.vec(), exit, )?; @@ -181,7 +181,7 @@ where starting_indexes.difficultyepoch, &self.height, indexes.difficultyepoch_to_first_height.vec(), - indexes.difficultyepoch_to_last_height.vec(), + indexes.difficultyepoch_to_height_count.vec(), exit, )?; diff --git a/crates/brk_computer/src/storage/vecs/indexes.rs b/crates/brk_computer/src/storage/vecs/indexes.rs index b16fc79a0..8a6ef0556 100644 --- a/crates/brk_computer/src/storage/vecs/indexes.rs +++ b/crates/brk_computer/src/storage/vecs/indexes.rs @@ -4,7 +4,7 @@ use brk_core::{ Date, DateIndex, DecadeIndex, DifficultyEpoch, EmptyOutputIndex, HalvingEpoch, Height, InputIndex, MonthIndex, OpReturnIndex, OutputIndex, P2AIndex, P2MSIndex, P2PK33Index, P2PK65Index, P2PKHIndex, P2SHIndex, P2TRIndex, P2WPKHIndex, P2WSHIndex, QuarterIndex, - Timestamp, TxIndex, UnknownOutputIndex, WeekIndex, YearIndex, + StoredUsize, Timestamp, TxIndex, UnknownOutputIndex, WeekIndex, YearIndex, }; use brk_exit::Exit; use brk_indexer::Indexer; @@ -17,14 +17,17 @@ pub struct Vecs { pub dateindex_to_date: EagerVec, pub dateindex_to_dateindex: EagerVec, pub dateindex_to_first_height: EagerVec, + pub dateindex_to_height_count: EagerVec, pub dateindex_to_last_height: EagerVec, pub dateindex_to_monthindex: EagerVec, pub dateindex_to_weekindex: EagerVec, pub decadeindex_to_decadeindex: EagerVec, pub decadeindex_to_first_yearindex: EagerVec, pub decadeindex_to_last_yearindex: EagerVec, + pub decadeindex_to_yearindex_count: EagerVec, pub difficultyepoch_to_difficultyepoch: EagerVec, pub difficultyepoch_to_first_height: EagerVec, + pub difficultyepoch_to_height_count: EagerVec, pub difficultyepoch_to_last_height: EagerVec, pub emptyoutputindex_to_emptyoutputindex: EagerVec, pub halvingepoch_to_first_height: EagerVec, @@ -36,21 +39,11 @@ pub struct Vecs { pub height_to_difficultyepoch: EagerVec, pub height_to_halvingepoch: EagerVec, pub height_to_height: EagerVec, - // pub height_to_last_emptyoutputindex: EagerVec, - // pub height_to_last_opreturnindex: EagerVec, - // pub height_to_last_p2aindex: EagerVec, - // pub height_to_last_p2msindex: EagerVec, - // pub height_to_last_p2pk33index: EagerVec, - // pub height_to_last_p2pk65index: EagerVec, - // pub height_to_last_p2pkhindex: EagerVec, - // pub height_to_last_p2shindex: EagerVec, - // pub height_to_last_p2trindex: EagerVec, - // pub height_to_last_p2wpkhindex: EagerVec, - // pub height_to_last_p2wshindex: EagerVec, pub height_to_last_txindex: EagerVec, - // pub height_to_last_unknownoutputindex: EagerVec, pub height_to_timestamp_fixed: EagerVec, + pub height_to_txindex_count: EagerVec, pub inputindex_to_inputindex: EagerVec, + pub monthindex_to_dateindex_count: EagerVec, pub monthindex_to_first_dateindex: EagerVec, pub monthindex_to_last_dateindex: EagerVec, pub monthindex_to_monthindex: EagerVec, @@ -69,18 +62,21 @@ pub struct Vecs { pub p2wshindex_to_p2wshindex: EagerVec, pub quarterindex_to_first_monthindex: EagerVec, pub quarterindex_to_last_monthindex: EagerVec, + pub quarterindex_to_monthindex_count: EagerVec, pub quarterindex_to_quarterindex: EagerVec, pub txindex_to_height: EagerVec, pub txindex_to_last_inputindex: EagerVec, pub txindex_to_last_outputindex: EagerVec, pub txindex_to_txindex: EagerVec, pub unknownoutputindex_to_unknownoutputindex: EagerVec, + pub weekindex_to_dateindex_count: EagerVec, pub weekindex_to_first_dateindex: EagerVec, pub weekindex_to_last_dateindex: EagerVec, pub weekindex_to_weekindex: EagerVec, pub yearindex_to_decadeindex: EagerVec, pub yearindex_to_first_monthindex: EagerVec, pub yearindex_to_last_monthindex: EagerVec, + pub yearindex_to_monthindex_count: EagerVec, pub yearindex_to_yearindex: EagerVec, } @@ -369,6 +365,46 @@ impl Vecs { Version::ZERO, compressed, )?, + height_to_txindex_count: EagerVec::forced_import( + &path.join("height_to_txindex_count"), + Version::ZERO, + compressed, + )?, + dateindex_to_height_count: EagerVec::forced_import( + &path.join("dateindex_to_height_count"), + Version::ZERO, + compressed, + )?, + weekindex_to_dateindex_count: EagerVec::forced_import( + &path.join("weekindex_to_dateindex_count"), + Version::ZERO, + compressed, + )?, + difficultyepoch_to_height_count: EagerVec::forced_import( + &path.join("difficultyepoch_to_height_count"), + Version::ZERO, + compressed, + )?, + monthindex_to_dateindex_count: EagerVec::forced_import( + &path.join("monthindex_to_dateindex_count"), + Version::ZERO, + compressed, + )?, + quarterindex_to_monthindex_count: EagerVec::forced_import( + &path.join("quarterindex_to_monthindex_count"), + Version::ZERO, + compressed, + )?, + yearindex_to_monthindex_count: EagerVec::forced_import( + &path.join("yearindex_to_monthindex_count"), + Version::ZERO, + compressed, + )?, + decadeindex_to_yearindex_count: EagerVec::forced_import( + &path.join("decadeindex_to_yearindex_count"), + Version::ZERO, + compressed, + )?, // height_to_last_p2aindex: EagerVec::forced_import( // &path.join("height_to_last_p2aindex"), // Version::ZERO, @@ -681,10 +717,17 @@ impl Vecs { exit, )?; + self.height_to_txindex_count.compute_count_from_indexes( + starting_indexes.height, + indexer_vecs.height_to_first_txindex.vec(), + indexer_vecs.txindex_to_txid.vec(), + exit, + )?; + self.txindex_to_height.compute_inverse_less_to_more( starting_indexes.height, indexer_vecs.height_to_first_txindex.vec(), - self.height_to_last_txindex.vec(), + self.height_to_txindex_count.vec(), exit, )?; @@ -787,6 +830,13 @@ impl Vecs { exit, )?; + self.dateindex_to_height_count.compute_count_from_indexes( + starting_dateindex, + self.dateindex_to_first_height.vec(), + indexer_vecs.height_to_weight.vec(), + exit, + )?; + // --- // WeekIndex // --- @@ -826,6 +876,14 @@ impl Vecs { exit, )?; + self.weekindex_to_dateindex_count + .compute_count_from_indexes( + starting_weekindex, + self.weekindex_to_first_dateindex.vec(), + self.dateindex_to_date.vec(), + exit, + )?; + // --- // DifficultyEpoch // --- @@ -865,6 +923,14 @@ impl Vecs { exit, )?; + self.difficultyepoch_to_height_count + .compute_count_from_indexes( + starting_difficultyepoch, + self.difficultyepoch_to_first_height.vec(), + self.height_to_date.vec(), + exit, + )?; + // --- // MonthIndex // --- @@ -906,6 +972,14 @@ impl Vecs { exit, )?; + self.monthindex_to_dateindex_count + .compute_count_from_indexes( + starting_monthindex, + self.monthindex_to_first_dateindex.vec(), + self.dateindex_to_date.vec(), + exit, + )?; + // --- // QuarterIndex // --- @@ -947,6 +1021,14 @@ impl Vecs { exit, )?; + self.quarterindex_to_monthindex_count + .compute_count_from_indexes( + starting_quarterindex, + self.quarterindex_to_first_monthindex.vec(), + self.monthindex_to_monthindex.vec(), + exit, + )?; + // --- // YearIndex // --- @@ -988,6 +1070,13 @@ impl Vecs { exit, )?; + self.yearindex_to_monthindex_count + .compute_count_from_indexes( + starting_yearindex, + self.yearindex_to_first_monthindex.vec(), + self.monthindex_to_monthindex.vec(), + exit, + )?; // --- // HalvingEpoch // --- @@ -1066,6 +1155,14 @@ impl Vecs { exit, )?; + self.decadeindex_to_yearindex_count + .compute_count_from_indexes( + starting_decadeindex, + self.decadeindex_to_first_yearindex.vec(), + self.yearindex_to_yearindex.vec(), + exit, + )?; + Ok(Indexes { indexes: starting_indexes, dateindex: starting_dateindex, @@ -1136,6 +1233,14 @@ impl Vecs { self.p2aindex_to_p2aindex.any_vec(), self.unknownoutputindex_to_unknownoutputindex.any_vec(), self.outputindex_to_outputindex.any_vec(), + self.height_to_txindex_count.any_vec(), + self.dateindex_to_height_count.any_vec(), + self.weekindex_to_dateindex_count.any_vec(), + self.difficultyepoch_to_height_count.any_vec(), + self.monthindex_to_dateindex_count.any_vec(), + self.quarterindex_to_monthindex_count.any_vec(), + self.yearindex_to_monthindex_count.any_vec(), + self.decadeindex_to_yearindex_count.any_vec(), // self.height_to_last_p2aindex.any_vec(), // self.height_to_last_p2msindex.any_vec(), // self.height_to_last_p2pk33index.any_vec(), diff --git a/crates/brk_computer/src/storage/vecs/mining.rs b/crates/brk_computer/src/storage/vecs/mining.rs index 4b984cd7f..9bdb83e9c 100644 --- a/crates/brk_computer/src/storage/vecs/mining.rs +++ b/crates/brk_computer/src/storage/vecs/mining.rs @@ -64,7 +64,7 @@ impl Vecs { |vec, _, indexes, starting_indexes, exit| { vec.compute_transform( starting_indexes.dateindex, - indexes.dateindex_to_last_height.vec(), + indexes.dateindex_to_first_height.vec(), |(di, height, ..)| { ( di, @@ -89,7 +89,7 @@ impl Vecs { |vec, _, indexes, starting_indexes, exit| { vec.compute_transform( starting_indexes.dateindex, - indexes.dateindex_to_last_height.vec(), + indexes.dateindex_to_first_height.vec(), |(di, height, ..)| (di, height_to_halvingepoch_iter.unwrap_get_inner(height)), exit, ) diff --git a/crates/brk_computer/src/storage/vecs/mod.rs b/crates/brk_computer/src/storage/vecs/mod.rs index 575ce2504..ce669772a 100644 --- a/crates/brk_computer/src/storage/vecs/mod.rs +++ b/crates/brk_computer/src/storage/vecs/mod.rs @@ -18,11 +18,11 @@ pub use vec::*; #[derive(Clone)] pub struct Vecs { - pub blocks: blocks::Vecs, pub indexes: indexes::Vecs, - pub mining: mining::Vecs, - pub transactions: transactions::Vecs, - pub marketprice: Option, + // pub blocks: blocks::Vecs, + // pub mining: mining::Vecs, + // pub transactions: transactions::Vecs, + // pub marketprice: Option, } impl Vecs { @@ -30,11 +30,11 @@ impl Vecs { fs::create_dir_all(path)?; Ok(Self { - blocks: blocks::Vecs::forced_import(path, compressed)?, + // blocks: blocks::Vecs::forced_import(path, compressed)?, indexes: indexes::Vecs::forced_import(path, compressed)?, - mining: mining::Vecs::forced_import(path, compressed)?, - transactions: transactions::Vecs::forced_import(path, compressed, fetch)?, - marketprice: fetch.then(|| marketprice::Vecs::forced_import(path, compressed).unwrap()), + // mining: mining::Vecs::forced_import(path, compressed)?, + // transactions: transactions::Vecs::forced_import(path, compressed, fetch)?, + // marketprice: fetch.then(|| marketprice::Vecs::forced_import(path, compressed).unwrap()), }) } @@ -47,29 +47,29 @@ impl Vecs { ) -> color_eyre::Result<()> { let starting_indexes = self.indexes.compute(indexer, starting_indexes, exit)?; - self.blocks - .compute(indexer, &self.indexes, &starting_indexes, exit)?; + // self.blocks + // .compute(indexer, &self.indexes, &starting_indexes, exit)?; - self.mining - .compute(indexer, &self.indexes, &starting_indexes, exit)?; + // self.mining + // .compute(indexer, &self.indexes, &starting_indexes, exit)?; - if let Some(marketprice) = self.marketprice.as_mut() { - marketprice.compute( - indexer, - &self.indexes, - &starting_indexes, - fetcher.unwrap(), - exit, - )?; - } + // if let Some(marketprice) = self.marketprice.as_mut() { + // marketprice.compute( + // indexer, + // &self.indexes, + // &starting_indexes, + // fetcher.unwrap(), + // exit, + // )?; + // } - self.transactions.compute( - indexer, - &self.indexes, - &starting_indexes, - self.marketprice.as_ref(), - exit, - )?; + // self.transactions.compute( + // indexer, + // &self.indexes, + // &starting_indexes, + // self.marketprice.as_ref(), + // exit, + // )?; Ok(()) } @@ -77,12 +77,12 @@ impl Vecs { pub fn as_any_vecs(&self) -> Vec<&dyn AnyStoredVec> { [ self.indexes.as_any_vecs(), - self.blocks.as_any_vecs(), - self.mining.as_any_vecs(), - self.transactions.as_any_vecs(), - self.marketprice - .as_ref() - .map_or(vec![], |v| v.as_any_vecs()), + // self.blocks.as_any_vecs(), + // self.mining.as_any_vecs(), + // self.transactions.as_any_vecs(), + // self.marketprice + // .as_ref() + // .map_or(vec![], |v| v.as_any_vecs()), ] .concat() } diff --git a/crates/brk_computer/src/storage/vecs/transactions.rs b/crates/brk_computer/src/storage/vecs/transactions.rs index 193a15012..130d5552d 100644 --- a/crates/brk_computer/src/storage/vecs/transactions.rs +++ b/crates/brk_computer/src/storage/vecs/transactions.rs @@ -1,8 +1,7 @@ use std::{fs, path::Path}; use brk_core::{ - CheckedSub, Feerate, InputIndex, OutputIndex, Sats, StoredU32, StoredU64, StoredUsize, TxIndex, - TxVersion, Weight, + CheckedSub, Feerate, InputIndex, OutputIndex, Sats, StoredUsize, TxIndex, TxVersion, Weight, }; use brk_exit::Exit; use brk_indexer::Indexer; @@ -24,34 +23,34 @@ pub struct Vecs { // pub txindex_to_is_v2: LazyVec, // pub txindex_to_is_v3: LazyVec, pub indexes_to_coinbase: ComputedValueVecsFromHeight, - pub indexes_to_emptyoutput_count: ComputedVecsFromHeight, + pub indexes_to_emptyoutput_count: ComputedVecsFromHeight, pub indexes_to_fee: ComputedValueVecsFromTxindex, pub indexes_to_feerate: ComputedVecsFromTxindex, /// Value == 0 when Coinbase pub indexes_to_input_value: ComputedVecsFromTxindex, - pub indexes_to_opreturn_count: ComputedVecsFromHeight, + pub indexes_to_opreturn_count: ComputedVecsFromHeight, pub indexes_to_output_value: ComputedVecsFromTxindex, - pub indexes_to_p2a_count: ComputedVecsFromHeight, - pub indexes_to_p2ms_count: ComputedVecsFromHeight, - pub indexes_to_p2pk33_count: ComputedVecsFromHeight, - pub indexes_to_p2pk65_count: ComputedVecsFromHeight, - pub indexes_to_p2pkh_count: ComputedVecsFromHeight, - pub indexes_to_p2sh_count: ComputedVecsFromHeight, - pub indexes_to_p2tr_count: ComputedVecsFromHeight, - pub indexes_to_p2wpkh_count: ComputedVecsFromHeight, - pub indexes_to_p2wsh_count: ComputedVecsFromHeight, + pub indexes_to_p2a_count: ComputedVecsFromHeight, + pub indexes_to_p2ms_count: ComputedVecsFromHeight, + pub indexes_to_p2pk33_count: ComputedVecsFromHeight, + pub indexes_to_p2pk65_count: ComputedVecsFromHeight, + pub indexes_to_p2pkh_count: ComputedVecsFromHeight, + pub indexes_to_p2sh_count: ComputedVecsFromHeight, + pub indexes_to_p2tr_count: ComputedVecsFromHeight, + pub indexes_to_p2wpkh_count: ComputedVecsFromHeight, + pub indexes_to_p2wsh_count: ComputedVecsFromHeight, pub indexes_to_subsidy: ComputedValueVecsFromHeight, - pub indexes_to_tx_count: ComputedVecsFromHeight, - pub indexes_to_tx_v1: ComputedVecsFromHeight, - pub indexes_to_tx_v2: ComputedVecsFromHeight, - pub indexes_to_tx_v3: ComputedVecsFromHeight, + pub indexes_to_tx_count: ComputedVecsFromHeight, + pub indexes_to_tx_v1: ComputedVecsFromHeight, + pub indexes_to_tx_v2: ComputedVecsFromHeight, + pub indexes_to_tx_v3: ComputedVecsFromHeight, pub indexes_to_tx_vsize: ComputedVecsFromTxindex, pub indexes_to_tx_weight: ComputedVecsFromTxindex, - pub indexes_to_unknownoutput_count: ComputedVecsFromHeight, + pub indexes_to_unknownoutput_count: ComputedVecsFromHeight, pub inputindex_to_value: EagerVec, - pub txindex_to_input_count: ComputedVecsFromTxindex, + pub indexes_to_input_count: ComputedVecsFromTxindex, pub txindex_to_is_coinbase: EagerVec, - pub txindex_to_output_count: ComputedVecsFromTxindex, + pub indexes_to_output_count: ComputedVecsFromTxindex, pub txindex_to_vsize: EagerVec, pub txindex_to_weight: EagerVec, } @@ -84,7 +83,7 @@ impl Vecs { Version::ZERO, compressed, )?, - txindex_to_input_count: ComputedVecsFromTxindex::forced_import( + indexes_to_input_count: ComputedVecsFromTxindex::forced_import( path, "input_count", true, @@ -97,7 +96,7 @@ impl Vecs { .add_sum() .add_total(), )?, - txindex_to_output_count: ComputedVecsFromTxindex::forced_import( + indexes_to_output_count: ComputedVecsFromTxindex::forced_import( path, "output_count", true, @@ -428,7 +427,7 @@ impl Vecs { }, )?; - self.txindex_to_input_count.compute_all( + self.indexes_to_input_count.compute_all( indexer, indexes, starting_indexes, @@ -443,7 +442,7 @@ impl Vecs { }, )?; - self.txindex_to_output_count.compute_all( + self.indexes_to_output_count.compute_all( indexer, indexes, starting_indexes, @@ -459,7 +458,7 @@ impl Vecs { )?; let compute_indexes_to_tx_vany = - |indexes_to_tx_vany: &mut ComputedVecsFromHeight, txversion| { + |indexes_to_tx_vany: &mut ComputedVecsFromHeight, txversion| { let mut txindex_to_txversion_iter = indexer.vecs().txindex_to_txversion.iter(); indexes_to_tx_vany.compute_all( indexer, @@ -550,11 +549,11 @@ impl Vecs { indexes, starting_indexes, exit, - |vec, indexer, indexes, starting_indexes, exit| { + |vec, indexer, _, starting_indexes, exit| { vec.compute_sum_from_indexes( starting_indexes.txindex, indexer.vecs().txindex_to_first_outputindex.vec(), - indexes.txindex_to_last_outputindex.vec(), + self.indexes_to_output_count.txindex.as_ref().unwrap().vec(), indexer.vecs().outputindex_to_value.vec(), exit, ) @@ -566,11 +565,11 @@ impl Vecs { indexes, starting_indexes, exit, - |vec, indexer, indexes, starting_indexes, exit| { + |vec, indexer, _, starting_indexes, exit| { vec.compute_sum_from_indexes( starting_indexes.txindex, indexer.vecs().txindex_to_first_inputindex.vec(), - indexes.txindex_to_last_inputindex.vec(), + self.indexes_to_input_count.txindex.as_ref().unwrap().vec(), self.inputindex_to_value.vec(), exit, ) @@ -648,11 +647,15 @@ impl Vecs { marketprices, starting_indexes, exit, - |vec, indexer, indexes, starting_indexes, exit| { + |vec, indexer, _, starting_indexes, exit| { let mut txindex_to_first_outputindex_iter = indexer.vecs().txindex_to_first_outputindex.iter(); - let mut txindex_to_last_outputindex_iter = - indexes.txindex_to_last_outputindex.iter(); + let mut txindex_to_output_count_iter = self + .indexes_to_output_count + .txindex + .as_ref() + .unwrap() + .iter(); let mut outputindex_to_value_iter = indexer.vecs().outputindex_to_value.iter(); vec.compute_transform( starting_indexes.height, @@ -661,14 +664,14 @@ impl Vecs { let first_outputindex = txindex_to_first_outputindex_iter .unwrap_get_inner(txindex) .unwrap_to_usize(); - let last_outputindex = txindex_to_last_outputindex_iter - .unwrap_get_inner(txindex) - .unwrap_to_usize(); + let output_count = txindex_to_output_count_iter.unwrap_get_inner(txindex); let mut sats = Sats::ZERO; - (first_outputindex..=last_outputindex).for_each(|outputindex| { - sats += outputindex_to_value_iter - .unwrap_get_inner(OutputIndex::from(outputindex)); - }); + (first_outputindex..first_outputindex + *output_count).for_each( + |outputindex| { + sats += outputindex_to_value_iter + .unwrap_get_inner(OutputIndex::from(outputindex)); + }, + ); (height, sats) }, exit, @@ -889,8 +892,8 @@ impl Vecs { self.indexes_to_tx_v3.any_vecs(), self.indexes_to_tx_vsize.any_vecs(), self.indexes_to_tx_weight.any_vecs(), - self.txindex_to_input_count.any_vecs(), - self.txindex_to_output_count.any_vecs(), + self.indexes_to_input_count.any_vecs(), + self.indexes_to_output_count.any_vecs(), self.indexes_to_p2a_count.any_vecs(), self.indexes_to_p2ms_count.any_vecs(), self.indexes_to_p2pk33_count.any_vecs(), diff --git a/crates/brk_computer/src/storage/vecs/vec/eager.rs b/crates/brk_computer/src/storage/vecs/vec/eager.rs index cf7fa08a9..f212161b6 100644 --- a/crates/brk_computer/src/storage/vecs/vec/eager.rs +++ b/crates/brk_computer/src/storage/vecs/vec/eager.rs @@ -6,12 +6,13 @@ use std::{ path::{Path, PathBuf}, }; -use brk_core::{Bitcoin, CheckedSub, Close, Dollars, Height, Sats, TxIndex}; +use brk_core::{Bitcoin, CheckedSub, Close, Dollars, Height, Sats, StoredUsize, TxIndex}; use brk_exit::Exit; use brk_vec::{ Compressed, DynamicVec, Error, GenericVec, Result, StoredIndex, StoredType, StoredVec, StoredVecIterator, Value, Version, }; +use color_eyre::eyre::ContextCompat; use log::info; const ONE_KIB: usize = 1024; @@ -228,7 +229,7 @@ where &mut self, max_from: T, first_indexes: &StoredVec, - last_indexes: &StoredVec, + indexes_count: &StoredVec, exit: &Exit, ) -> Result<()> where @@ -236,18 +237,18 @@ where T: StoredIndex, { self.validate_computed_version_or_reset_file( - Version::ZERO + self.version() + first_indexes.version() + last_indexes.version(), + Version::ZERO + self.version() + first_indexes.version() + indexes_count.version(), )?; - let mut last_indexes_iter = last_indexes.iter(); + let mut indexes_count_iter = indexes_count.iter(); let index = max_from.min(T::from(self.len())); first_indexes .iter_at(index) .try_for_each(|(value, first_index)| { let first_index = (first_index).to_usize()?; - let last_index = last_indexes_iter.unwrap_get_inner(value).unwrap_to_usize(); - (first_index..=last_index) + let count = *indexes_count_iter.unwrap_get_inner(value); + (first_index..first_index + count) .try_for_each(|index| self.forced_push_at(I::from(index), value, exit)) })?; @@ -275,7 +276,13 @@ where .iter_at(index) .try_for_each(|(index, v)| -> Result<()> { if let Some(prev_index) = prev_index.take() { - let value = v.checked_sub(one).unwrap(); + let value = v + .checked_sub(one) + .context("Should work") + .inspect_err(|_| { + dbg!(index, prev_index, v); + }) + .unwrap(); self.forced_push_at(prev_index, value, exit)?; } prev_index.replace(index); @@ -431,7 +438,7 @@ where &mut self, max_from: I, first_indexes: &StoredVec, - last_indexes: &StoredVec, + indexes_count: &StoredVec, source: &StoredVec, exit: &Exit, ) -> Result<()> @@ -440,17 +447,18 @@ where T2: StoredIndex + StoredType, { self.validate_computed_version_or_reset_file( - Version::ZERO + self.version() + first_indexes.version() + last_indexes.version(), + Version::ZERO + self.version() + first_indexes.version() + indexes_count.version(), )?; - let mut last_indexes_iter = last_indexes.iter(); + let mut indexes_count_iter = indexes_count.iter(); let mut source_iter = source.iter(); let index = max_from.min(I::from(self.len())); first_indexes .iter_at(index) .try_for_each(|(i, first_index)| { - let last_index = last_indexes_iter.get(i).unwrap().1.into_inner(); - let range = first_index.unwrap_to_usize()..=last_index.unwrap_to_usize(); + let count = *indexes_count_iter.get(i).unwrap().1.into_inner(); + let first_index = first_index.unwrap_to_usize(); + let range = first_index..first_index + count; let mut sum = T::from(0_usize); range.into_iter().for_each(|i| { sum = sum.clone() + source_iter.get(T2::from(i)).unwrap().1.into_inner(); diff --git a/crates/brk_core/src/structs/stored_usize.rs b/crates/brk_core/src/structs/stored_usize.rs index 4a7cd7d96..db68c8fe8 100644 --- a/crates/brk_core/src/structs/stored_usize.rs +++ b/crates/brk_core/src/structs/stored_usize.rs @@ -6,6 +6,12 @@ use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout}; use crate::CheckedSub; +use super::{ + DateIndex, EmptyOutputIndex, Height, InputIndex, MonthIndex, OpReturnIndex, OutputIndex, + P2AIndex, P2MSIndex, P2PK33Index, P2PK65Index, P2PKHIndex, P2SHIndex, P2TRIndex, P2WPKHIndex, + P2WSHIndex, TxIndex, UnknownOutputIndex, YearIndex, +}; + #[derive( Debug, Deref, @@ -71,3 +77,117 @@ impl From for f64 { value.0 as f64 } } + +impl From for StoredUsize { + fn from(value: Height) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: DateIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: MonthIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: YearIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: OutputIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: InputIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: TxIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: P2PK65Index) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: P2PK33Index) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: P2PKHIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: OpReturnIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: P2MSIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: P2SHIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: P2WSHIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: P2WPKHIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: P2TRIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: P2AIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: UnknownOutputIndex) -> Self { + Self::from(usize::from(value)) + } +} + +impl From for StoredUsize { + fn from(value: EmptyOutputIndex) -> Self { + Self::from(usize::from(value)) + } +} diff --git a/websites/kibo.money/scripts/vecid-to-indexes.js b/websites/kibo.money/scripts/vecid-to-indexes.js index c1361c705..6188b7e18 100644 --- a/websites/kibo.money/scripts/vecid-to-indexes.js +++ b/websites/kibo.money/scripts/vecid-to-indexes.js @@ -57,109 +57,15 @@ export function createVecIdToIndexes() { return /** @type {const} */ ({ "base-size": [TxIndex], - "block-count": [Height], - "block-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-interval-10p": [DateIndex], - "block-interval-25p": [DateIndex], - "block-interval-75p": [DateIndex], - "block-interval-90p": [DateIndex], - "block-interval-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-interval-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-interval-median": [DateIndex], - "block-interval-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-size-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-vbytes-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-weight-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], blockhash: [Height], - close: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "close-in-cents": [DateIndex, Height], - "close-in-sats": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - coinbase: [Height], - "coinbase-10p": [DateIndex], - "coinbase-25p": [DateIndex], - "coinbase-75p": [DateIndex], - "coinbase-90p": [DateIndex], - "coinbase-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-btc": [Height], - "coinbase-in-btc-10p": [DateIndex], - "coinbase-in-btc-25p": [DateIndex], - "coinbase-in-btc-75p": [DateIndex], - "coinbase-in-btc-90p": [DateIndex], - "coinbase-in-btc-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-btc-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-btc-median": [DateIndex], - "coinbase-in-btc-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-btc-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-usd": [Height], - "coinbase-in-usd-10p": [DateIndex], - "coinbase-in-usd-25p": [DateIndex], - "coinbase-in-usd-75p": [DateIndex], - "coinbase-in-usd-90p": [DateIndex], - "coinbase-in-usd-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-usd-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-usd-median": [DateIndex], - "coinbase-in-usd-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-usd-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-median": [DateIndex], - "coinbase-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], date: [DateIndex, Height], "date-fixed": [Height], dateindex: [DateIndex, Height], + "dateindex-count": [MonthIndex, WeekIndex], decadeindex: [DecadeIndex, YearIndex], - difficulty: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - difficultyepoch: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "emptyoutput-count": [Height], - "emptyoutput-count-10p": [DateIndex], - "emptyoutput-count-25p": [DateIndex], - "emptyoutput-count-75p": [DateIndex], - "emptyoutput-count-90p": [DateIndex], - "emptyoutput-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "emptyoutput-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "emptyoutput-count-median": [DateIndex], - "emptyoutput-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "emptyoutput-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], + difficulty: [Height], + difficultyepoch: [DifficultyEpoch, Height], emptyoutputindex: [EmptyOutputIndex], - fee: [TxIndex], - "fee-10p": [Height], - "fee-25p": [Height], - "fee-75p": [Height], - "fee-90p": [Height], - "fee-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-btc": [TxIndex], - "fee-in-btc-10p": [Height], - "fee-in-btc-25p": [Height], - "fee-in-btc-75p": [Height], - "fee-in-btc-90p": [Height], - "fee-in-btc-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-btc-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-btc-median": [Height], - "fee-in-btc-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-btc-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-usd": [TxIndex], - "fee-in-usd-10p": [Height], - "fee-in-usd-25p": [Height], - "fee-in-usd-75p": [Height], - "fee-in-usd-90p": [Height], - "fee-in-usd-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-usd-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-usd-median": [Height], - "fee-in-usd-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-usd-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-median": [Height], - "fee-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - feerate: [TxIndex], - "feerate-10p": [Height], - "feerate-25p": [Height], - "feerate-75p": [Height], - "feerate-90p": [Height], - "feerate-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "feerate-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "feerate-median": [Height], - "feerate-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], "first-dateindex": [MonthIndex, WeekIndex], "first-emptyoutputindex": [Height], "first-height": [DateIndex, DifficultyEpoch, HalvingEpoch], @@ -179,27 +85,10 @@ export function createVecIdToIndexes() { "first-txindex": [Height], "first-unknownoutputindex": [Height], "first-yearindex": [DecadeIndex], - halvingepoch: [DateIndex, DecadeIndex, HalvingEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], + halvingepoch: [HalvingEpoch, Height], height: [Height], - high: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "high-in-cents": [DateIndex, Height], - "high-in-sats": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-count": [TxIndex], - "input-count-10p": [Height], - "input-count-25p": [Height], - "input-count-75p": [Height], - "input-count-90p": [Height], - "input-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-count-median": [Height], - "input-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-value": [TxIndex], - "input-value-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-value-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], + "height-count": [DateIndex, DifficultyEpoch], inputindex: [InputIndex], - interval: [Height], - "is-coinbase": [TxIndex], "is-explicitly-rbf": [TxIndex], "last-dateindex": [MonthIndex, WeekIndex], "last-height": [DateIndex, DifficultyEpoch, HalvingEpoch], @@ -208,270 +97,44 @@ export function createVecIdToIndexes() { "last-outputindex": [TxIndex], "last-txindex": [Height], "last-yearindex": [DecadeIndex], - low: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "low-in-cents": [DateIndex, Height], - "low-in-sats": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], monthindex: [DateIndex, MonthIndex], - ohlc: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "ohlc-in-cents": [DateIndex, Height], - "ohlc-in-sats": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - open: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "open-in-cents": [DateIndex, Height], - "open-in-sats": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "opreturn-count": [Height], - "opreturn-count-10p": [DateIndex], - "opreturn-count-25p": [DateIndex], - "opreturn-count-75p": [DateIndex], - "opreturn-count-90p": [DateIndex], - "opreturn-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "opreturn-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "opreturn-count-median": [DateIndex], - "opreturn-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "opreturn-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], + "monthindex-count": [QuarterIndex, YearIndex], opreturnindex: [OpReturnIndex], - "output-count": [TxIndex], - "output-count-10p": [Height], - "output-count-25p": [Height], - "output-count-75p": [Height], - "output-count-90p": [Height], - "output-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "output-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "output-count-median": [Height], - "output-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "output-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "output-value": [TxIndex], - "output-value-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "output-value-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], outputindex: [InputIndex, OutputIndex], outputtype: [OutputIndex], outputtypeindex: [OutputIndex], - "p2a-count": [Height], - "p2a-count-10p": [DateIndex], - "p2a-count-25p": [DateIndex], - "p2a-count-75p": [DateIndex], - "p2a-count-90p": [DateIndex], - "p2a-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2a-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2a-count-median": [DateIndex], - "p2a-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2a-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2abytes: [P2AIndex], p2aindex: [P2AIndex], - "p2ms-count": [Height], - "p2ms-count-10p": [DateIndex], - "p2ms-count-25p": [DateIndex], - "p2ms-count-75p": [DateIndex], - "p2ms-count-90p": [DateIndex], - "p2ms-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2ms-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2ms-count-median": [DateIndex], - "p2ms-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2ms-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2msindex: [P2MSIndex], - "p2pk33-count": [Height], - "p2pk33-count-10p": [DateIndex], - "p2pk33-count-25p": [DateIndex], - "p2pk33-count-75p": [DateIndex], - "p2pk33-count-90p": [DateIndex], - "p2pk33-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk33-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk33-count-median": [DateIndex], - "p2pk33-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk33-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2pk33bytes: [P2PK33Index], p2pk33index: [P2PK33Index], - "p2pk65-count": [Height], - "p2pk65-count-10p": [DateIndex], - "p2pk65-count-25p": [DateIndex], - "p2pk65-count-75p": [DateIndex], - "p2pk65-count-90p": [DateIndex], - "p2pk65-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk65-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk65-count-median": [DateIndex], - "p2pk65-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk65-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2pk65bytes: [P2PK65Index], p2pk65index: [P2PK65Index], - "p2pkh-count": [Height], - "p2pkh-count-10p": [DateIndex], - "p2pkh-count-25p": [DateIndex], - "p2pkh-count-75p": [DateIndex], - "p2pkh-count-90p": [DateIndex], - "p2pkh-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pkh-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pkh-count-median": [DateIndex], - "p2pkh-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pkh-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2pkhbytes: [P2PKHIndex], p2pkhindex: [P2PKHIndex], - "p2sh-count": [Height], - "p2sh-count-10p": [DateIndex], - "p2sh-count-25p": [DateIndex], - "p2sh-count-75p": [DateIndex], - "p2sh-count-90p": [DateIndex], - "p2sh-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2sh-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2sh-count-median": [DateIndex], - "p2sh-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2sh-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2shbytes: [P2SHIndex], p2shindex: [P2SHIndex], - "p2tr-count": [Height], - "p2tr-count-10p": [DateIndex], - "p2tr-count-25p": [DateIndex], - "p2tr-count-75p": [DateIndex], - "p2tr-count-90p": [DateIndex], - "p2tr-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2tr-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2tr-count-median": [DateIndex], - "p2tr-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2tr-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2trbytes: [P2TRIndex], p2trindex: [P2TRIndex], - "p2wpkh-count": [Height], - "p2wpkh-count-10p": [DateIndex], - "p2wpkh-count-25p": [DateIndex], - "p2wpkh-count-75p": [DateIndex], - "p2wpkh-count-90p": [DateIndex], - "p2wpkh-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wpkh-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wpkh-count-median": [DateIndex], - "p2wpkh-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wpkh-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2wpkhbytes: [P2WPKHIndex], p2wpkhindex: [P2WPKHIndex], - "p2wsh-count": [Height], - "p2wsh-count-10p": [DateIndex], - "p2wsh-count-25p": [DateIndex], - "p2wsh-count-75p": [DateIndex], - "p2wsh-count-90p": [DateIndex], - "p2wsh-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wsh-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wsh-count-median": [DateIndex], - "p2wsh-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wsh-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2wshbytes: [P2WSHIndex], p2wshindex: [P2WSHIndex], quarterindex: [MonthIndex, QuarterIndex], rawlocktime: [TxIndex], - subsidy: [Height], - "subsidy-10p": [DateIndex], - "subsidy-25p": [DateIndex], - "subsidy-75p": [DateIndex], - "subsidy-90p": [DateIndex], - "subsidy-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-btc": [Height], - "subsidy-in-btc-10p": [DateIndex], - "subsidy-in-btc-25p": [DateIndex], - "subsidy-in-btc-75p": [DateIndex], - "subsidy-in-btc-90p": [DateIndex], - "subsidy-in-btc-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-btc-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-btc-median": [DateIndex], - "subsidy-in-btc-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-btc-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-usd": [Height], - "subsidy-in-usd-10p": [DateIndex], - "subsidy-in-usd-25p": [DateIndex], - "subsidy-in-usd-75p": [DateIndex], - "subsidy-in-usd-90p": [DateIndex], - "subsidy-in-usd-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-usd-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-usd-median": [DateIndex], - "subsidy-in-usd-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-usd-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-median": [DateIndex], - "subsidy-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - timestamp: [DateIndex, DecadeIndex, DifficultyEpoch, HalvingEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], + timestamp: [Height], "timestamp-fixed": [Height], - "total-block-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-block-size": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-block-vbytes": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-block-weight": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-coinbase": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-coinbase-in-btc": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-coinbase-in-usd": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-emptyoutput-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-fee": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-fee-in-btc": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-fee-in-usd": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-input-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-input-value": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-opreturn-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-output-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-output-value": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2a-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2ms-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2pk33-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2pk65-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2pkh-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2sh-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2tr-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2wpkh-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2wsh-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], "total-size": [Height, TxIndex], - "total-subsidy": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-subsidy-in-btc": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-subsidy-in-usd": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-tx-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-tx-v1": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-tx-v2": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-tx-v3": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-unknownoutput-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-count": [Height], - "tx-count-10p": [DateIndex], - "tx-count-25p": [DateIndex], - "tx-count-75p": [DateIndex], - "tx-count-90p": [DateIndex], - "tx-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-count-median": [DateIndex], - "tx-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-v1": [Height], - "tx-v1-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-v2": [Height], - "tx-v2-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-v3": [Height], - "tx-v3-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-vsize-10p": [Height], - "tx-vsize-25p": [Height], - "tx-vsize-75p": [Height], - "tx-vsize-90p": [Height], - "tx-vsize-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-vsize-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-vsize-median": [Height], - "tx-vsize-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-weight-10p": [Height], - "tx-weight-25p": [Height], - "tx-weight-75p": [Height], - "tx-weight-90p": [Height], - "tx-weight-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-weight-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-weight-median": [Height], - "tx-weight-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], txid: [TxIndex], txindex: [EmptyOutputIndex, OpReturnIndex, P2MSIndex, TxIndex, UnknownOutputIndex], + "txindex-count": [Height], txversion: [TxIndex], - "unknownoutput-count": [Height], - "unknownoutput-count-10p": [DateIndex], - "unknownoutput-count-25p": [DateIndex], - "unknownoutput-count-75p": [DateIndex], - "unknownoutput-count-90p": [DateIndex], - "unknownoutput-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "unknownoutput-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "unknownoutput-count-median": [DateIndex], - "unknownoutput-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "unknownoutput-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], unknownoutputindex: [UnknownOutputIndex], - value: [InputIndex, OutputIndex], - vbytes: [Height], - vsize: [TxIndex], + value: [OutputIndex], weekindex: [DateIndex, WeekIndex], - weight: [Height, TxIndex], + weight: [Height], yearindex: [MonthIndex, YearIndex], + "yearindex-count": [DecadeIndex], }); } /** @typedef {ReturnType} VecIdToIndexes */