diff --git a/crates/brk_cli/src/query.rs b/crates/brk_cli/src/query.rs index 86786e550..41763e90b 100644 --- a/crates/brk_cli/src/query.rs +++ b/crates/brk_cli/src/query.rs @@ -8,12 +8,12 @@ use crate::run::RunConfig; pub fn query(params: QueryParams) -> color_eyre::Result<()> { let config = RunConfig::import(None)?; - let compressed = config.compressed(); + let format = config.format(); - let mut indexer = Indexer::new(&config.outputsdir(), compressed, config.check_collisions())?; + let mut indexer = Indexer::new(&config.outputsdir(), format, config.check_collisions())?; indexer.import_vecs()?; - let mut computer = Computer::new(&config.outputsdir(), config.fetcher(), compressed); + let mut computer = Computer::new(&config.outputsdir(), config.fetcher(), format); computer.import_vecs(&indexer, config.computation())?; let query = Query::build(&indexer, &computer); diff --git a/crates/brk_cli/src/run.rs b/crates/brk_cli/src/run.rs index 8044a8a93..7048fbb3e 100644 --- a/crates/brk_cli/src/run.rs +++ b/crates/brk_cli/src/run.rs @@ -12,7 +12,7 @@ use brk_exit::Exit; use brk_fetcher::Fetcher; use brk_indexer::Indexer; use brk_server::{Server, Website}; -use brk_vec::Computation; +use brk_vec::{Computation, Format}; use clap_derive::{Parser, ValueEnum}; use color_eyre::eyre::eyre; use log::info; @@ -27,9 +27,9 @@ pub fn run(config: RunConfig) -> color_eyre::Result<()> { let parser = brk_parser::Parser::new(config.blocksdir(), rpc); - let compressed = config.compressed(); + let format = config.format(); - let mut indexer = Indexer::new(&config.outputsdir(), compressed, config.check_collisions())?; + let mut indexer = Indexer::new(&config.outputsdir(), format, config.check_collisions())?; indexer.import_stores()?; indexer.import_vecs()?; @@ -50,7 +50,7 @@ pub fn run(config: RunConfig) -> color_eyre::Result<()> { }; let f = move || -> color_eyre::Result<()> { - let mut computer = Computer::new(&config.outputsdir(), config.fetcher(), compressed); + let mut computer = Computer::new(&config.outputsdir(), config.fetcher(), format); computer.import_stores(&indexer)?; computer.import_vecs(&indexer, config.computation())?; @@ -133,15 +133,15 @@ pub struct RunConfig { mode: Option, /// Computation mode for compatible datasets, `lazy` computes data whenever requested without saving it, `eager` computes the data once and saves it to disk, default: Lazy, saved - #[arg(short = 'C', long)] + #[arg(short, long)] computation: Option, /// Activate compression of datasets, set to true to save disk space or false if prioritize speed, default: true, saved - #[arg(short, long, value_name = "BOOL")] - compressed: Option, + #[arg(short, long, value_name = "FORMAT")] + format: Option, /// Activate fetching prices from exchanges APIs and the computation of all related datasets, default: true, saved - #[arg(short, long, value_name = "BOOL")] + #[arg(short = 'F', long, value_name = "BOOL")] fetch: Option, /// Website served by the server (if active), default: kibo.money, saved @@ -204,12 +204,16 @@ impl RunConfig { config_saved.mode = Some(mode); } + if let Some(computation) = config_args.computation.take() { + config_saved.computation = Some(computation); + } + if let Some(fetch) = config_args.fetch.take() { config_saved.fetch = Some(fetch); } - if let Some(compressed) = config_args.compressed.take() { - config_saved.compressed = Some(compressed); + if let Some(format) = config_args.format.take() { + config_saved.format = Some(format); } if let Some(website) = config_args.website.take() { @@ -430,8 +434,8 @@ impl RunConfig { self.computation.unwrap_or_default() } - pub fn compressed(&self) -> bool { - self.compressed.is_none_or(|b| b) + pub fn format(&self) -> Format { + self.format.unwrap_or_default() } pub fn check_collisions(&self) -> bool { diff --git a/crates/brk_computer/examples/main.rs b/crates/brk_computer/examples/main.rs index 9370290e4..559483d55 100644 --- a/crates/brk_computer/examples/main.rs +++ b/crates/brk_computer/examples/main.rs @@ -6,7 +6,7 @@ use brk_exit::Exit; use brk_fetcher::Fetcher; use brk_indexer::Indexer; use brk_parser::Parser; -use brk_vec::Computation; +use brk_vec::{Computation, Format}; pub fn main() -> color_eyre::Result<()> { color_eyre::install()?; @@ -31,15 +31,15 @@ pub fn main() -> color_eyre::Result<()> { let outputs_dir = _outputs_dir.as_path(); // let outputs_dir = Path::new("../../_outputs"); - let compressed = false; + let format = Format::Raw; - let mut indexer = Indexer::new(outputs_dir, compressed, true)?; + let mut indexer = Indexer::new(outputs_dir, format, true)?; indexer.import_stores()?; indexer.import_vecs()?; let fetcher = Fetcher::import(None)?; - let mut computer = Computer::new(outputs_dir, Some(fetcher), compressed); + let mut computer = Computer::new(outputs_dir, Some(fetcher), format); computer.import_stores(&indexer)?; computer.import_vecs(&indexer, Computation::Lazy)?; diff --git a/crates/brk_computer/src/lib.rs b/crates/brk_computer/src/lib.rs index 6e7d4d1c1..5ed1ad7f6 100644 --- a/crates/brk_computer/src/lib.rs +++ b/crates/brk_computer/src/lib.rs @@ -9,7 +9,7 @@ use brk_core::Version; use brk_exit::Exit; use brk_fetcher::Fetcher; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, Compressed, Computation}; +use brk_vec::{AnyCollectableVec, Computation, Format}; mod stores; mod utils; @@ -25,19 +25,19 @@ pub struct Computer { fetcher: Option, vecs: Option, stores: Option, - compressed: Compressed, + format: Format, } const VERSION: Version = Version::ONE; impl Computer { - pub fn new(outputs_dir: &Path, fetcher: Option, compressed: bool) -> Self { + pub fn new(outputs_dir: &Path, fetcher: Option, format: Format) -> Self { Self { path: outputs_dir.to_owned(), fetcher, vecs: None, stores: None, - compressed: Compressed::from(compressed), + format, } } @@ -53,7 +53,7 @@ impl Computer { indexer, self.fetcher.is_some(), computation, - self.compressed, + self.format, indexer.keyspace(), )?); Ok(()) @@ -80,15 +80,10 @@ impl Computer { exit: &Exit, ) -> color_eyre::Result<()> { info!("Computing..."); - - self.vecs.as_mut().unwrap().compute( - indexer, - starting_indexes, - self.fetcher.as_mut(), - exit, - )?; - - Ok(()) + self.vecs + .as_mut() + .unwrap() + .compute(indexer, starting_indexes, self.fetcher.as_mut(), exit) } pub fn vecs(&self) -> Vec<&dyn AnyCollectableVec> { diff --git a/crates/brk_computer/src/vecs/blocks.rs b/crates/brk_computer/src/vecs/blocks.rs index 879c365d4..21fa5bbe9 100644 --- a/crates/brk_computer/src/vecs/blocks.rs +++ b/crates/brk_computer/src/vecs/blocks.rs @@ -6,7 +6,7 @@ use brk_core::{ }; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, Computation, EagerVec}; +use brk_vec::{AnyCollectableVec, AnyIterableVec, Computation, EagerVec, Format}; use super::{ Indexes, @@ -35,7 +35,7 @@ impl Vecs { path: &Path, version: Version, _computation: Computation, - compressed: Compressed, + format: Format, ) -> color_eyre::Result { fs::create_dir_all(path)?; @@ -44,14 +44,14 @@ impl Vecs { path, "interval", version + VERSION + Version::ZERO, - compressed, + format, )?, timeindexes_to_timestamp: ComputedVecsFromDateIndex::forced_import( path, "timestamp", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_first(), )?, indexes_to_block_interval: ComputedVecsFromHeight::forced_import( @@ -59,7 +59,7 @@ impl Vecs { "block_interval", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_percentiles() .add_minmax() @@ -70,7 +70,7 @@ impl Vecs { "block_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_sum() .add_cumulative(), @@ -80,7 +80,7 @@ impl Vecs { "block_weight", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_sum() .add_cumulative(), @@ -90,7 +90,7 @@ impl Vecs { "block_size", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_sum() .add_cumulative(), @@ -99,14 +99,14 @@ impl Vecs { path, "vbytes", version + VERSION + Version::ZERO, - compressed, + format, )?, indexes_to_block_vbytes: ComputedVecsFromHeight::forced_import( path, "block_vbytes", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_sum() .add_cumulative(), @@ -115,13 +115,13 @@ impl Vecs { path, "timestamp", version + VERSION + Version::ZERO, - compressed, + format, )?, halvingepoch_to_timestamp: EagerVec::forced_import( path, "timestamp", version + VERSION + Version::ZERO, - compressed, + format, )?, }) } diff --git a/crates/brk_computer/src/vecs/constants.rs b/crates/brk_computer/src/vecs/constants.rs index 96a0250a4..34a105924 100644 --- a/crates/brk_computer/src/vecs/constants.rs +++ b/crates/brk_computer/src/vecs/constants.rs @@ -3,7 +3,7 @@ use std::{fs, path::Path}; use brk_core::{StoredU8, Version}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, AnyVec, Compressed, Computation}; +use brk_vec::{AnyCollectableVec, AnyVec, Computation, Format}; use super::{ Indexes, @@ -26,7 +26,7 @@ impl Vecs { path: &Path, version: Version, _computation: Computation, - compressed: Compressed, + format: Format, ) -> color_eyre::Result { fs::create_dir_all(path)?; @@ -36,7 +36,7 @@ impl Vecs { "0", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1: ComputedVecsFromHeight::forced_import( @@ -44,7 +44,7 @@ impl Vecs { "1", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _50: ComputedVecsFromHeight::forced_import( @@ -52,7 +52,7 @@ impl Vecs { "50", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _100: ComputedVecsFromHeight::forced_import( @@ -60,7 +60,7 @@ impl Vecs { "100", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, }) diff --git a/crates/brk_computer/src/vecs/fetched.rs b/crates/brk_computer/src/vecs/fetched.rs index 23bdadb88..76fabd33f 100644 --- a/crates/brk_computer/src/vecs/fetched.rs +++ b/crates/brk_computer/src/vecs/fetched.rs @@ -7,7 +7,7 @@ use brk_core::{ use brk_exit::Exit; use brk_fetcher::Fetcher; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, Computation, EagerVec}; +use brk_vec::{AnyCollectableVec, AnyIterableVec, Computation, EagerVec, Format}; use super::{ Indexes, @@ -73,7 +73,7 @@ impl Vecs { path: &Path, version: Version, _computation: Computation, - compressed: Compressed, + format: Format, ) -> color_eyre::Result { fs::create_dir_all(path)?; @@ -86,92 +86,92 @@ impl Vecs { &fetched_path, "ohlc_in_cents", version + VERSION + Version::ZERO, - compressed, + format, )?, dateindex_to_ohlc: EagerVec::forced_import( path, "ohlc", version + VERSION + Version::ZERO, - compressed, + format, )?, dateindex_to_ohlc_in_sats: EagerVec::forced_import( path, "ohlc_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, )?, dateindex_to_close_in_cents: EagerVec::forced_import( path, "close_in_cents", version + VERSION + Version::ZERO, - compressed, + format, )?, dateindex_to_high_in_cents: EagerVec::forced_import( path, "high_in_cents", version + VERSION + Version::ZERO, - compressed, + format, )?, dateindex_to_low_in_cents: EagerVec::forced_import( path, "low_in_cents", version + VERSION + Version::ZERO, - compressed, + format, )?, dateindex_to_open_in_cents: EagerVec::forced_import( path, "open_in_cents", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_ohlc_in_cents: EagerVec::forced_import( &fetched_path, "ohlc_in_cents", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_ohlc: EagerVec::forced_import( path, "ohlc", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_ohlc_in_sats: EagerVec::forced_import( path, "ohlc_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, )?, height_to_close_in_cents: EagerVec::forced_import( path, "close_in_cents", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_high_in_cents: EagerVec::forced_import( path, "high_in_cents", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_low_in_cents: EagerVec::forced_import( path, "low_in_cents", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_open_in_cents: EagerVec::forced_import( path, "open_in_cents", version + VERSION + Version::ZERO, - compressed, + format, )?, timeindexes_to_open: ComputedVecsFromDateIndex::forced_import( path, "open", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_first(), )?, timeindexes_to_high: ComputedVecsFromDateIndex::forced_import( @@ -179,7 +179,7 @@ impl Vecs { "high", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_max(), )?, timeindexes_to_low: ComputedVecsFromDateIndex::forced_import( @@ -187,7 +187,7 @@ impl Vecs { "low", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_min(), )?, timeindexes_to_close: ComputedVecsFromDateIndex::forced_import( @@ -195,7 +195,7 @@ impl Vecs { "close", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, timeindexes_to_open_in_sats: ComputedVecsFromDateIndex::forced_import( @@ -203,7 +203,7 @@ impl Vecs { "open_in_sats", true, version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_first(), )?, timeindexes_to_high_in_sats: ComputedVecsFromDateIndex::forced_import( @@ -211,7 +211,7 @@ impl Vecs { "high_in_sats", true, version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_max(), )?, timeindexes_to_low_in_sats: ComputedVecsFromDateIndex::forced_import( @@ -219,7 +219,7 @@ impl Vecs { "low_in_sats", true, version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_min(), )?, timeindexes_to_close_in_sats: ComputedVecsFromDateIndex::forced_import( @@ -227,138 +227,138 @@ impl Vecs { "close_in_sats", true, version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, chainindexes_to_open: ComputedVecsFromHeightStrict::forced_import( path, "open", version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_first(), )?, chainindexes_to_high: ComputedVecsFromHeightStrict::forced_import( path, "high", version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_max(), )?, chainindexes_to_low: ComputedVecsFromHeightStrict::forced_import( path, "low", version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_min(), )?, chainindexes_to_close: ComputedVecsFromHeightStrict::forced_import( path, "close", version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, chainindexes_to_open_in_sats: ComputedVecsFromHeightStrict::forced_import( path, "open_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_first(), )?, chainindexes_to_high_in_sats: ComputedVecsFromHeightStrict::forced_import( path, "high_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_max(), )?, chainindexes_to_low_in_sats: ComputedVecsFromHeightStrict::forced_import( path, "low_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_min(), )?, chainindexes_to_close_in_sats: ComputedVecsFromHeightStrict::forced_import( path, "close_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, weekindex_to_ohlc: EagerVec::forced_import( path, "ohlc", version + VERSION + Version::ZERO, - compressed, + format, )?, weekindex_to_ohlc_in_sats: EagerVec::forced_import( path, "ohlc_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, )?, difficultyepoch_to_ohlc: EagerVec::forced_import( path, "ohlc", version + VERSION + Version::ZERO, - compressed, + format, )?, difficultyepoch_to_ohlc_in_sats: EagerVec::forced_import( path, "ohlc_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, )?, monthindex_to_ohlc: EagerVec::forced_import( path, "ohlc", version + VERSION + Version::ZERO, - compressed, + format, )?, monthindex_to_ohlc_in_sats: EagerVec::forced_import( path, "ohlc_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, )?, quarterindex_to_ohlc: EagerVec::forced_import( path, "ohlc", version + VERSION + Version::ZERO, - compressed, + format, )?, quarterindex_to_ohlc_in_sats: EagerVec::forced_import( path, "ohlc_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, )?, yearindex_to_ohlc: EagerVec::forced_import( path, "ohlc", version + VERSION + Version::ZERO, - compressed, + format, )?, yearindex_to_ohlc_in_sats: EagerVec::forced_import( path, "ohlc_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, )?, // halvingepoch_to_ohlc: StorableVec::forced_import(path, - // "halvingepoch_to_ohlc"), version + VERSION + Version::ZERO, compressed)?, + // "halvingepoch_to_ohlc"), version + VERSION + Version::ZERO, format)?, decadeindex_to_ohlc: EagerVec::forced_import( path, "ohlc", version + VERSION + Version::ZERO, - compressed, + format, )?, decadeindex_to_ohlc_in_sats: EagerVec::forced_import( path, "ohlc_in_sats", version + VERSION + VERSION_IN_SATS + Version::ZERO, - compressed, + format, )?, }) } diff --git a/crates/brk_computer/src/vecs/grouped/builder.rs b/crates/brk_computer/src/vecs/grouped/builder.rs index 2d6e78c91..8864631e9 100644 --- a/crates/brk_computer/src/vecs/grouped/builder.rs +++ b/crates/brk_computer/src/vecs/grouped/builder.rs @@ -2,7 +2,7 @@ use std::path::Path; use brk_core::{CheckedSub, Result, StoredUsize, Version}; use brk_exit::Exit; -use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, EagerVec, StoredIndex, StoredType}; +use brk_vec::{AnyCollectableVec, AnyIterableVec, EagerVec, Format, StoredIndex, StoredType}; use color_eyre::eyre::ContextCompat; use crate::utils::get_percentile; @@ -40,7 +40,7 @@ where path: &Path, name: &str, version: Version, - compressed: Compressed, + format: Format, options: StorableVecGeneatorOptions, ) -> color_eyre::Result { let only_one_active = options.is_only_one_active(); @@ -72,15 +72,14 @@ where path, &maybe_prefix("first"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap(), ) }), last: options.last.then(|| { Box::new( - EagerVec::forced_import(path, name, version + Version::ZERO, compressed) - .unwrap(), + EagerVec::forced_import(path, name, version + Version::ZERO, format).unwrap(), ) }), min: options.min.then(|| { @@ -89,7 +88,7 @@ where path, &maybe_suffix("min"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap(), ) @@ -100,7 +99,7 @@ where path, &maybe_suffix("max"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap(), ) @@ -111,7 +110,7 @@ where path, &maybe_suffix("median"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap(), ) @@ -122,7 +121,7 @@ where path, &maybe_suffix("average"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap(), ) @@ -133,7 +132,7 @@ where path, &maybe_suffix("sum"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap(), ) @@ -144,7 +143,7 @@ where path, &prefix("cumulative"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap(), ) @@ -155,7 +154,7 @@ where path, &maybe_suffix("90p"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap(), ) @@ -166,7 +165,7 @@ where path, &maybe_suffix("75p"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap(), ) @@ -177,7 +176,7 @@ where path, &maybe_suffix("25p"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap(), ) @@ -188,7 +187,7 @@ where path, &maybe_suffix("10p"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap(), ) diff --git a/crates/brk_computer/src/vecs/grouped/from_dateindex.rs b/crates/brk_computer/src/vecs/grouped/from_dateindex.rs index 8fc97e163..a99a1e066 100644 --- a/crates/brk_computer/src/vecs/grouped/from_dateindex.rs +++ b/crates/brk_computer/src/vecs/grouped/from_dateindex.rs @@ -5,7 +5,7 @@ use brk_core::{ }; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, EagerVec}; +use brk_vec::{AnyCollectableVec, AnyIterableVec, EagerVec, Format}; use crate::vecs::{Indexes, indexes}; @@ -36,19 +36,18 @@ where name: &str, compute_source: bool, version: Version, - compressed: Compressed, + format: Format, options: StorableVecGeneatorOptions, ) -> color_eyre::Result { let dateindex = compute_source.then(|| { - EagerVec::forced_import(path, name, version + VERSION + Version::ZERO, compressed) - .unwrap() + EagerVec::forced_import(path, name, version + VERSION + Version::ZERO, format).unwrap() }); let dateindex_extra = ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options.copy_self_extra(), )?; @@ -61,35 +60,35 @@ where path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, monthindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, quarterindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, yearindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, decadeindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, }) diff --git a/crates/brk_computer/src/vecs/grouped/from_height.rs b/crates/brk_computer/src/vecs/grouped/from_height.rs index 06a71ff84..a8ed7e0d7 100644 --- a/crates/brk_computer/src/vecs/grouped/from_height.rs +++ b/crates/brk_computer/src/vecs/grouped/from_height.rs @@ -6,7 +6,7 @@ use brk_core::{ }; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, EagerVec}; +use brk_vec::{AnyCollectableVec, AnyIterableVec, EagerVec, Format}; use crate::vecs::{Indexes, indexes}; @@ -41,19 +41,18 @@ where name: &str, compute_source: bool, version: Version, - compressed: Compressed, + format: Format, options: StorableVecGeneatorOptions, ) -> color_eyre::Result { let height = compute_source.then(|| { - EagerVec::forced_import(path, name, version + VERSION + Version::ZERO, compressed) - .unwrap() + EagerVec::forced_import(path, name, version + VERSION + Version::ZERO, format).unwrap() }); let height_extra = ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options.copy_self_extra(), )?; @@ -61,7 +60,7 @@ where path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?; @@ -75,43 +74,43 @@ where path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, difficultyepoch: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, monthindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, quarterindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, yearindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, - // halvingepoch: StorableVecGeneator::forced_import(path, name, version + VERSION + Version::ZERO, compressed, options)?, + // halvingepoch: StorableVecGeneator::forced_import(path, name, version + VERSION + Version::ZERO, format, options)?, decadeindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, }) diff --git a/crates/brk_computer/src/vecs/grouped/from_height_strict.rs b/crates/brk_computer/src/vecs/grouped/from_height_strict.rs index 8110cc010..845a2d08e 100644 --- a/crates/brk_computer/src/vecs/grouped/from_height_strict.rs +++ b/crates/brk_computer/src/vecs/grouped/from_height_strict.rs @@ -3,7 +3,7 @@ use std::path::Path; use brk_core::{DifficultyEpoch, Height, Result, Version}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, Compressed, EagerVec}; +use brk_vec::{AnyCollectableVec, EagerVec, Format}; use crate::vecs::{Indexes, indexes}; @@ -31,17 +31,17 @@ where path: &Path, name: &str, version: Version, - compressed: Compressed, + format: Format, options: StorableVecGeneatorOptions, ) -> color_eyre::Result { let height = - EagerVec::forced_import(path, name, version + VERSION + Version::ZERO, compressed)?; + EagerVec::forced_import(path, name, version + VERSION + Version::ZERO, format)?; let height_extra = ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options.copy_self_extra(), )?; @@ -54,10 +54,10 @@ where path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, - // halvingepoch: StorableVecGeneator::forced_import(path, name, version + VERSION + Version::ZERO, compressed, options)?, + // halvingepoch: StorableVecGeneator::forced_import(path, name, version + VERSION + Version::ZERO, format, options)?, }) } diff --git a/crates/brk_computer/src/vecs/grouped/from_txindex.rs b/crates/brk_computer/src/vecs/grouped/from_txindex.rs index ed4c25e74..9e731d6fc 100644 --- a/crates/brk_computer/src/vecs/grouped/from_txindex.rs +++ b/crates/brk_computer/src/vecs/grouped/from_txindex.rs @@ -7,7 +7,7 @@ use brk_core::{ use brk_exit::Exit; use brk_indexer::Indexer; use brk_vec::{ - AnyCollectableVec, AnyVec, CollectableVec, Compressed, EagerVec, StoredIndex, VecIterator, + AnyCollectableVec, AnyVec, CollectableVec, EagerVec, Format, StoredIndex, VecIterator, }; use crate::vecs::{Indexes, fetched, indexes}; @@ -43,12 +43,12 @@ where name: &str, compute_source: bool, version: Version, - compressed: Compressed, + format: Format, options: StorableVecGeneatorOptions, ) -> color_eyre::Result { let txindex = compute_source.then(|| { Box::new( - EagerVec::forced_import(path, name, version + VERSION + Version::ZERO, compressed) + EagerVec::forced_import(path, name, version + VERSION + Version::ZERO, format) .unwrap(), ) }); @@ -57,7 +57,7 @@ where path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?; @@ -70,50 +70,50 @@ where path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, weekindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, difficultyepoch: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, monthindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, quarterindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, yearindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, - // halvingepoch: StorableVecGeneator::forced_import(path, name, version + VERSION + Version::ZERO, compressed, options)?, + // halvingepoch: StorableVecGeneator::forced_import(path, name, version + VERSION + Version::ZERO, format, options)?, decadeindex: ComputedVecBuilder::forced_import( path, name, version + VERSION + Version::ZERO, - compressed, + format, options, )?, }) diff --git a/crates/brk_computer/src/vecs/grouped/ratio_from_dateindex.rs b/crates/brk_computer/src/vecs/grouped/ratio_from_dateindex.rs index c919a51a7..d322aaf85 100644 --- a/crates/brk_computer/src/vecs/grouped/ratio_from_dateindex.rs +++ b/crates/brk_computer/src/vecs/grouped/ratio_from_dateindex.rs @@ -4,7 +4,7 @@ use brk_core::{Date, DateIndex, Dollars, Result, StoredF32, Version}; use brk_exit::Exit; use brk_indexer::Indexer; use brk_vec::{ - AnyCollectableVec, AnyIterableVec, AnyVec, CollectableVec, Compressed, EagerVec, StoredIndex, + AnyCollectableVec, AnyIterableVec, AnyVec, CollectableVec, EagerVec, Format, StoredIndex, VecIterator, }; @@ -61,7 +61,7 @@ impl ComputedRatioVecsFromDateIndex { name: &str, compute_source: bool, version: Version, - compressed: Compressed, + format: Format, options: StorableVecGeneatorOptions, ) -> color_eyre::Result { Ok(Self { @@ -71,7 +71,7 @@ impl ComputedRatioVecsFromDateIndex { name, true, version + VERSION, - compressed, + format, options, ) .unwrap() @@ -81,7 +81,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_sma: ComputedVecsFromDateIndex::forced_import( @@ -89,7 +89,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_sma"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_1w_sma: ComputedVecsFromDateIndex::forced_import( @@ -97,7 +97,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_1w_sma"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_1m_sma: ComputedVecsFromDateIndex::forced_import( @@ -105,7 +105,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_1m_sma"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_1y_sma: ComputedVecsFromDateIndex::forced_import( @@ -113,7 +113,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_1y_sma"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_1y_sma_momentum_oscillator: ComputedVecsFromDateIndex::forced_import( @@ -121,7 +121,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_1y_sma_momentum_oscillator"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_standard_deviation: ComputedVecsFromDateIndex::forced_import( @@ -129,7 +129,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_standard_deviation"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p99_9: ComputedVecsFromDateIndex::forced_import( @@ -137,7 +137,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p99_9"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p99_5: ComputedVecsFromDateIndex::forced_import( @@ -145,7 +145,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p99_5"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p99: ComputedVecsFromDateIndex::forced_import( @@ -153,7 +153,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p99"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p1: ComputedVecsFromDateIndex::forced_import( @@ -161,7 +161,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p1"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p0_5: ComputedVecsFromDateIndex::forced_import( @@ -169,7 +169,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p0_5"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p0_1: ComputedVecsFromDateIndex::forced_import( @@ -177,7 +177,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p0_1"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p1sd: ComputedVecsFromDateIndex::forced_import( @@ -185,7 +185,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p1sd"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p2sd: ComputedVecsFromDateIndex::forced_import( @@ -193,7 +193,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p2sd"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p3sd: ComputedVecsFromDateIndex::forced_import( @@ -201,7 +201,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p3sd"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_m1sd: ComputedVecsFromDateIndex::forced_import( @@ -209,7 +209,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_m1sd"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_m2sd: ComputedVecsFromDateIndex::forced_import( @@ -217,7 +217,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_m2sd"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_m3sd: ComputedVecsFromDateIndex::forced_import( @@ -225,7 +225,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_m3sd"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p99_9_as_price: ComputedVecsFromDateIndex::forced_import( @@ -233,7 +233,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p99_9_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p99_5_as_price: ComputedVecsFromDateIndex::forced_import( @@ -241,7 +241,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p99_5_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p99_as_price: ComputedVecsFromDateIndex::forced_import( @@ -249,7 +249,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p99_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p1_as_price: ComputedVecsFromDateIndex::forced_import( @@ -257,7 +257,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p1_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p0_5_as_price: ComputedVecsFromDateIndex::forced_import( @@ -265,7 +265,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p0_5_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p0_1_as_price: ComputedVecsFromDateIndex::forced_import( @@ -273,7 +273,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p0_1_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p1sd_as_price: ComputedVecsFromDateIndex::forced_import( @@ -281,7 +281,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p1sd_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p2sd_as_price: ComputedVecsFromDateIndex::forced_import( @@ -289,7 +289,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p2sd_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_p3sd_as_price: ComputedVecsFromDateIndex::forced_import( @@ -297,7 +297,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_p3sd_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_m1sd_as_price: ComputedVecsFromDateIndex::forced_import( @@ -305,7 +305,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_m1sd_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_m2sd_as_price: ComputedVecsFromDateIndex::forced_import( @@ -313,7 +313,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_m2sd_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_m3sd_as_price: ComputedVecsFromDateIndex::forced_import( @@ -321,7 +321,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_m3sd_as_price"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, ratio_zscore: ComputedVecsFromDateIndex::forced_import( @@ -329,7 +329,7 @@ impl ComputedRatioVecsFromDateIndex { &format!("{name}_ratio_zscore"), true, version + VERSION + Version::ZERO, - compressed, + format, options, )?, }) diff --git a/crates/brk_computer/src/vecs/grouped/value_from_height.rs b/crates/brk_computer/src/vecs/grouped/value_from_height.rs index cd228821d..277dafaeb 100644 --- a/crates/brk_computer/src/vecs/grouped/value_from_height.rs +++ b/crates/brk_computer/src/vecs/grouped/value_from_height.rs @@ -3,7 +3,7 @@ use std::path::Path; use brk_core::{Bitcoin, Dollars, Height, Result, Sats, Version}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, CollectableVec, Compressed, EagerVec, StoredVec}; +use brk_vec::{AnyCollectableVec, CollectableVec, EagerVec, Format, StoredVec}; use crate::vecs::{Indexes, fetched, indexes}; @@ -24,7 +24,7 @@ impl ComputedValueVecsFromHeight { name: &str, compute_source: bool, version: Version, - compressed: Compressed, + format: Format, options: StorableVecGeneatorOptions, compute_dollars: bool, ) -> color_eyre::Result { @@ -34,7 +34,7 @@ impl ComputedValueVecsFromHeight { name, compute_source, version + VERSION, - compressed, + format, options, )?, bitcoin: ComputedVecsFromHeight::forced_import( @@ -42,7 +42,7 @@ impl ComputedValueVecsFromHeight { &format!("{name}_in_btc"), true, version + VERSION, - compressed, + format, options, )?, dollars: compute_dollars.then(|| { @@ -51,7 +51,7 @@ impl ComputedValueVecsFromHeight { &format!("{name}_in_usd"), true, version + VERSION, - compressed, + format, options, ) .unwrap() diff --git a/crates/brk_computer/src/vecs/grouped/value_from_txindex.rs b/crates/brk_computer/src/vecs/grouped/value_from_txindex.rs index f7a96c523..4e3dfd1ea 100644 --- a/crates/brk_computer/src/vecs/grouped/value_from_txindex.rs +++ b/crates/brk_computer/src/vecs/grouped/value_from_txindex.rs @@ -4,8 +4,8 @@ use brk_core::{Bitcoin, Close, Dollars, Height, Sats, TxIndex, Version}; use brk_exit::Exit; use brk_indexer::Indexer; use brk_vec::{ - AnyCollectableVec, BoxedAnyIterableVec, CloneableAnyIterableVec, CollectableVec, Compressed, - Computation, ComputedVecFrom3, LazyVecFrom1, StoredIndex, StoredVec, + AnyCollectableVec, BoxedAnyIterableVec, CloneableAnyIterableVec, CollectableVec, Computation, + ComputedVecFrom3, Format, LazyVecFrom1, StoredIndex, StoredVec, }; use crate::vecs::{Indexes, fetched, indexes}; @@ -44,7 +44,7 @@ impl ComputedValueVecsFromTxindex { source: Option>, version: Version, computation: Computation, - compressed: Compressed, + format: Format, fetched: Option<&fetched::Vecs>, options: StorableVecGeneatorOptions, ) -> color_eyre::Result { @@ -59,7 +59,7 @@ impl ComputedValueVecsFromTxindex { name, compute_source, version + VERSION, - compressed, + format, options, )?; @@ -80,7 +80,7 @@ impl ComputedValueVecsFromTxindex { &name_in_btc, false, version + VERSION, - compressed, + format, options, )?; @@ -90,7 +90,7 @@ impl ComputedValueVecsFromTxindex { path, &name_in_usd, version + VERSION, - compressed, + format, bitcoin_txindex.boxed_clone(), indexes.txindex_to_height.boxed_clone(), fetched.chainindexes_to_close.height.boxed_clone(), @@ -126,7 +126,7 @@ impl ComputedValueVecsFromTxindex { &name_in_usd, false, version + VERSION, - compressed, + format, options, ) .unwrap() diff --git a/crates/brk_computer/src/vecs/indexes.rs b/crates/brk_computer/src/vecs/indexes.rs index 78ead6aaa..c602ed5de 100644 --- a/crates/brk_computer/src/vecs/indexes.rs +++ b/crates/brk_computer/src/vecs/indexes.rs @@ -10,10 +10,12 @@ use brk_core::{ use brk_exit::Exit; use brk_indexer::Indexer; use brk_vec::{ - AnyCollectableVec, CloneableAnyIterableVec, Compressed, Computation, ComputedVec, - ComputedVecFrom1, ComputedVecFrom2, EagerVec, StoredIndex, VecIterator, + AnyCollectableVec, CloneableAnyIterableVec, Computation, ComputedVec, ComputedVecFrom1, + ComputedVecFrom2, EagerVec, Format, StoredIndex, VecIterator, }; +use crate::vecs::indexes; + const VERSION: Version = Version::ZERO; #[derive(Clone)] @@ -95,7 +97,7 @@ impl Vecs { version: Version, indexer: &Indexer, computation: Computation, - compressed: Compressed, + format: Format, ) -> color_eyre::Result { fs::create_dir_all(path)?; @@ -104,7 +106,7 @@ impl Vecs { path, "outputindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().outputindex_to_value.boxed_clone(), |index, _| Some(index), )?; @@ -114,7 +116,7 @@ impl Vecs { path, "inputindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().inputindex_to_outputindex.boxed_clone(), |index, _| Some(index), )?; @@ -124,7 +126,7 @@ impl Vecs { path, "txindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().txindex_to_txid.boxed_clone(), |index, _| Some(index), )?; @@ -134,7 +136,7 @@ impl Vecs { path, "input_count", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().txindex_to_first_inputindex.boxed_clone(), indexer.vecs().inputindex_to_outputindex.boxed_clone(), |index: TxIndex, txindex_to_first_inputindex_iter, inputindex_to_outputindex_iter| { @@ -157,7 +159,7 @@ impl Vecs { path, "output_count", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().txindex_to_first_outputindex.boxed_clone(), indexer.vecs().outputindex_to_value.boxed_clone(), |index: TxIndex, txindex_to_first_outputindex_iter, outputindex_to_value_iter| { @@ -180,7 +182,7 @@ impl Vecs { path, "p2pk33index", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().p2pk33index_to_p2pk33bytes.boxed_clone(), |index, _| Some(index), )?; @@ -189,7 +191,7 @@ impl Vecs { path, "p2pk65index", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().p2pk65index_to_p2pk65bytes.boxed_clone(), |index, _| Some(index), )?; @@ -198,7 +200,7 @@ impl Vecs { path, "p2pkhindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().p2pkhindex_to_p2pkhbytes.boxed_clone(), |index, _| Some(index), )?; @@ -207,7 +209,7 @@ impl Vecs { path, "p2shindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().p2shindex_to_p2shbytes.boxed_clone(), |index, _| Some(index), )?; @@ -216,7 +218,7 @@ impl Vecs { path, "p2trindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().p2trindex_to_p2trbytes.boxed_clone(), |index, _| Some(index), )?; @@ -225,7 +227,7 @@ impl Vecs { path, "p2wpkhindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().p2wpkhindex_to_p2wpkhbytes.boxed_clone(), |index, _| Some(index), )?; @@ -234,7 +236,7 @@ impl Vecs { path, "p2wshindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().p2wshindex_to_p2wshbytes.boxed_clone(), |index, _| Some(index), )?; @@ -243,7 +245,7 @@ impl Vecs { path, "p2aindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().p2aindex_to_p2abytes.boxed_clone(), |index, _| Some(index), )?; @@ -252,7 +254,7 @@ impl Vecs { path, "p2msindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().p2msindex_to_txindex.boxed_clone(), |index, _| Some(index), )?; @@ -261,7 +263,7 @@ impl Vecs { path, "emptyoutputindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().emptyoutputindex_to_txindex.boxed_clone(), |index, _| Some(index), )?; @@ -270,7 +272,7 @@ impl Vecs { path, "unknownoutputindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().unknownoutputindex_to_txindex.boxed_clone(), |index, _| Some(index), )?; @@ -279,7 +281,7 @@ impl Vecs { path, "opreturnindex", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().opreturnindex_to_txindex.boxed_clone(), |index, _| Some(index), )?; @@ -288,7 +290,7 @@ impl Vecs { path, "first_height", version + VERSION + Version::ZERO, - compressed, + format, )?; let dateindex_to_dateindex = ComputedVec::forced_import_or_init_from_1( @@ -296,7 +298,7 @@ impl Vecs { path, "dateindex", version + VERSION + Version::ZERO, - compressed, + format, dateindex_to_first_height.boxed_clone(), |index, _| Some(index), )?; @@ -306,20 +308,20 @@ impl Vecs { path, "date", version + VERSION + Version::ZERO, - compressed, + format, dateindex_to_dateindex.boxed_clone(), |index, _| Some(Date::from(index)), )?; let height_to_date = - EagerVec::forced_import(path, "date", version + VERSION + Version::ZERO, compressed)?; + EagerVec::forced_import(path, "date", version + VERSION + Version::ZERO, format)?; let height_to_height = ComputedVec::forced_import_or_init_from_1( computation, path, "height", version + VERSION + Version::ZERO, - compressed, + format, height_to_date.boxed_clone(), |index, _| Some(index), )?; @@ -329,7 +331,7 @@ impl Vecs { path, "difficultyepoch", version + VERSION + Version::ZERO, - compressed, + format, height_to_height.boxed_clone(), |index, _| Some(DifficultyEpoch::from(index)), )?; @@ -338,7 +340,7 @@ impl Vecs { path, "first_height", version + VERSION + Version::ZERO, - compressed, + format, )?; let difficultyepoch_to_difficultyepoch = ComputedVec::forced_import_or_init_from_1( @@ -346,7 +348,7 @@ impl Vecs { path, "difficultyepoch", version + VERSION + Version::ZERO, - compressed, + format, difficultyepoch_to_first_height.boxed_clone(), |index, _| Some(index), )?; @@ -356,7 +358,7 @@ impl Vecs { path, "halvingepoch", version + VERSION + Version::ZERO, - compressed, + format, height_to_height.boxed_clone(), |index, _| Some(HalvingEpoch::from(index)), )?; @@ -365,7 +367,7 @@ impl Vecs { path, "first_height", version + VERSION + Version::ZERO, - compressed, + format, )?; let halvingepoch_to_halvingepoch = ComputedVec::forced_import_or_init_from_1( @@ -373,23 +375,19 @@ impl Vecs { path, "halvingepoch", version + VERSION + Version::ZERO, - compressed, + format, halvingepoch_to_first_height.boxed_clone(), |index, _| Some(index), )?; - let dateindex_to_weekindex = EagerVec::forced_import( - path, - "weekindex", - version + VERSION + Version::ZERO, - compressed, - )?; + let dateindex_to_weekindex = + EagerVec::forced_import(path, "weekindex", version + VERSION + Version::ZERO, format)?; let weekindex_to_first_dateindex = EagerVec::forced_import( path, "first_dateindex", version + VERSION + Version::ZERO, - compressed, + format, )?; let weekindex_to_weekindex = ComputedVec::forced_import_or_init_from_1( @@ -397,7 +395,7 @@ impl Vecs { path, "weekindex", version + VERSION + Version::ZERO, - compressed, + format, weekindex_to_first_dateindex.boxed_clone(), |index, _| Some(index), )?; @@ -406,14 +404,14 @@ impl Vecs { path, "monthindex", version + VERSION + Version::ZERO, - compressed, + format, )?; let monthindex_to_first_dateindex = EagerVec::forced_import( path, "first_dateindex", version + VERSION + Version::ZERO, - compressed, + format, )?; let monthindex_to_monthindex = ComputedVec::forced_import_or_init_from_1( @@ -421,7 +419,7 @@ impl Vecs { path, "monthindex", version + VERSION + Version::ZERO, - compressed, + format, monthindex_to_first_dateindex.boxed_clone(), |index, _| Some(index), )?; @@ -431,7 +429,7 @@ impl Vecs { path, "quarterindex", version + VERSION + Version::ZERO, - compressed, + format, monthindex_to_monthindex.boxed_clone(), |index, _| Some(QuarterIndex::from(index)), )?; @@ -440,7 +438,7 @@ impl Vecs { path, "first_monthindex", version + VERSION + Version::ZERO, - compressed, + format, )?; let quarterindex_to_quarterindex = ComputedVec::forced_import_or_init_from_1( @@ -448,7 +446,7 @@ impl Vecs { path, "quarterindex", version + VERSION + Version::ZERO, - compressed, + format, quarterindex_to_first_monthindex.boxed_clone(), |index, _| Some(index), )?; @@ -458,7 +456,7 @@ impl Vecs { path, "yearindex", version + VERSION + Version::ZERO, - compressed, + format, monthindex_to_monthindex.boxed_clone(), |index, _| Some(YearIndex::from(index)), )?; @@ -467,7 +465,7 @@ impl Vecs { path, "first_monthindex", version + VERSION + Version::ZERO, - compressed, + format, )?; let yearindex_to_yearindex = ComputedVec::forced_import_or_init_from_1( @@ -475,7 +473,7 @@ impl Vecs { path, "yearindex", version + VERSION + Version::ZERO, - compressed, + format, yearindex_to_first_monthindex.boxed_clone(), |index, _| Some(index), )?; @@ -485,7 +483,7 @@ impl Vecs { path, "decadeindex", version + VERSION + Version::ZERO, - compressed, + format, yearindex_to_yearindex.boxed_clone(), |index, _| Some(DecadeIndex::from(index)), )?; @@ -494,7 +492,7 @@ impl Vecs { path, "first_yearindex", version + VERSION + Version::ZERO, - compressed, + format, )?; let decadeindex_to_decadeindex = ComputedVec::forced_import_or_init_from_1( @@ -502,7 +500,7 @@ impl Vecs { path, "decadeindex", version + VERSION + Version::ZERO, - compressed, + format, decadeindex_to_first_yearindex.boxed_clone(), |index, _| Some(index), )?; @@ -555,79 +553,79 @@ impl Vecs { path, "date_fixed", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_dateindex: EagerVec::forced_import( path, "dateindex", version + VERSION + Version::ZERO, - compressed, + format, )?, txindex_to_height: EagerVec::forced_import( path, "height", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_timestamp_fixed: EagerVec::forced_import( path, "timestamp_fixed", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_txindex_count: EagerVec::forced_import( path, "txindex_count", version + VERSION + Version::ZERO, - compressed, + format, )?, dateindex_to_height_count: EagerVec::forced_import( path, "height_count", version + VERSION + Version::ZERO, - compressed, + format, )?, weekindex_to_dateindex_count: EagerVec::forced_import( path, "dateindex_count", version + VERSION + Version::ZERO, - compressed, + format, )?, difficultyepoch_to_height_count: EagerVec::forced_import( path, "height_count", version + VERSION + Version::ZERO, - compressed, + format, )?, monthindex_to_dateindex_count: EagerVec::forced_import( path, "dateindex_count", version + VERSION + Version::ZERO, - compressed, + format, )?, quarterindex_to_monthindex_count: EagerVec::forced_import( path, "monthindex_count", version + VERSION + Version::ZERO, - compressed, + format, )?, yearindex_to_monthindex_count: EagerVec::forced_import( path, "monthindex_count", version + VERSION + Version::ZERO, - compressed, + format, )?, decadeindex_to_yearindex_count: EagerVec::forced_import( path, "yearindex_count", version + VERSION + Version::ZERO, - compressed, + format, )?, outputindex_to_txindex: EagerVec::forced_import( path, "txindex", version + VERSION + Version::ZERO, - compressed, + format, )?, }) } @@ -1111,6 +1109,26 @@ pub struct Indexes { pub halvingepoch: HalvingEpoch, } +impl Indexes { + pub fn update_from_height(&mut self, height: Height, indexes: &indexes::Vecs) { + self.indexes.height = height; + self.dateindex = DateIndex::try_from( + indexes + .height_to_date_fixed + .into_iter() + .unwrap_get_inner(height), + ) + .unwrap(); + self.weekindex = WeekIndex::from(self.dateindex); + self.monthindex = MonthIndex::from(self.dateindex); + self.quarterindex = QuarterIndex::from(self.monthindex); + self.yearindex = YearIndex::from(self.monthindex); + self.decadeindex = DecadeIndex::from(self.dateindex); + self.difficultyepoch = DifficultyEpoch::from(self.height); + self.halvingepoch = HalvingEpoch::from(self.height); + } +} + impl Deref for Indexes { type Target = brk_indexer::Indexes; fn deref(&self) -> &Self::Target { diff --git a/crates/brk_computer/src/vecs/market.rs b/crates/brk_computer/src/vecs/market.rs index 9c3e3bbe2..91b236da0 100644 --- a/crates/brk_computer/src/vecs/market.rs +++ b/crates/brk_computer/src/vecs/market.rs @@ -1,9 +1,9 @@ use std::{fs, path::Path, thread}; -use brk_core::{Date, DateIndex, Dollars, Sats, StoredF32, StoredUsize, Version}; +use brk_core::{Date, DateIndex, Dollars, Height, Sats, StoredF32, StoredUsize, Version}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, Compressed, Computation, StoredIndex, VecIterator}; +use brk_vec::{AnyCollectableVec, Computation, EagerVec, Format, StoredIndex, VecIterator}; use super::{ Indexes, fetched, @@ -17,12 +17,15 @@ const VERSION: Version = Version::ZERO; #[derive(Clone)] pub struct Vecs { + pub height_to_marketcap: EagerVec, + pub height_to_ath: EagerVec, + pub height_to_drawdown: EagerVec, pub indexes_to_marketcap: ComputedVecsFromDateIndex, pub indexes_to_ath: ComputedVecsFromDateIndex, pub indexes_to_drawdown: ComputedVecsFromDateIndex, pub indexes_to_days_since_ath: ComputedVecsFromDateIndex, - pub indexes_to_max_days_between_ath: ComputedVecsFromDateIndex, - pub indexes_to_max_years_between_ath: ComputedVecsFromDateIndex, + pub indexes_to_max_days_between_aths: ComputedVecsFromDateIndex, + pub indexes_to_max_years_between_aths: ComputedVecsFromDateIndex, pub indexes_to_1w_sma: ComputedRatioVecsFromDateIndex, pub indexes_to_8d_sma: ComputedRatioVecsFromDateIndex, @@ -159,17 +162,35 @@ impl Vecs { path: &Path, version: Version, _computation: Computation, - compressed: Compressed, + format: Format, ) -> color_eyre::Result { fs::create_dir_all(path)?; Ok(Self { + height_to_marketcap: EagerVec::forced_import( + path, + "marketcap", + version + VERSION + Version::ZERO, + format, + )?, + height_to_ath: EagerVec::forced_import( + path, + "ath", + version + VERSION + Version::ZERO, + format, + )?, + height_to_drawdown: EagerVec::forced_import( + path, + "drawdown", + version + VERSION + Version::ZERO, + format, + )?, indexes_to_marketcap: ComputedVecsFromDateIndex::forced_import( path, "marketcap", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_ath: ComputedVecsFromDateIndex::forced_import( @@ -177,7 +198,7 @@ impl Vecs { "ath", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_drawdown: ComputedVecsFromDateIndex::forced_import( @@ -185,7 +206,7 @@ impl Vecs { "drawdown", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_days_since_ath: ComputedVecsFromDateIndex::forced_import( @@ -193,23 +214,23 @@ impl Vecs { "days_since_ath", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, - indexes_to_max_days_between_ath: ComputedVecsFromDateIndex::forced_import( + indexes_to_max_days_between_aths: ComputedVecsFromDateIndex::forced_import( path, - "max_days_between_ath", + "max_days_between_aths", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, - indexes_to_max_years_between_ath: ComputedVecsFromDateIndex::forced_import( + indexes_to_max_years_between_aths: ComputedVecsFromDateIndex::forced_import( path, - "max_years_between_ath", + "max_years_between_aths", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, @@ -218,7 +239,7 @@ impl Vecs { "1w_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_8d_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -226,7 +247,7 @@ impl Vecs { "8d_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_13d_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -234,7 +255,7 @@ impl Vecs { "13d_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_21d_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -242,7 +263,7 @@ impl Vecs { "21d_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_1m_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -250,7 +271,7 @@ impl Vecs { "1m_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_34d_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -258,7 +279,7 @@ impl Vecs { "34d_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_55d_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -266,7 +287,7 @@ impl Vecs { "55d_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_89d_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -274,7 +295,7 @@ impl Vecs { "89d_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_144d_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -282,7 +303,7 @@ impl Vecs { "144d_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_1y_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -290,7 +311,7 @@ impl Vecs { "1y_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_2y_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -298,7 +319,7 @@ impl Vecs { "2y_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_200w_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -306,7 +327,7 @@ impl Vecs { "200w_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_4y_sma: ComputedRatioVecsFromDateIndex::forced_import( @@ -314,7 +335,7 @@ impl Vecs { "4y_sma", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, @@ -323,7 +344,7 @@ impl Vecs { "1d_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1w_returns: ComputedVecsFromDateIndex::forced_import( @@ -331,7 +352,7 @@ impl Vecs { "1w_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1m_returns: ComputedVecsFromDateIndex::forced_import( @@ -339,7 +360,7 @@ impl Vecs { "1m_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _3m_returns: ComputedVecsFromDateIndex::forced_import( @@ -347,7 +368,7 @@ impl Vecs { "3m_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _6m_returns: ComputedVecsFromDateIndex::forced_import( @@ -355,7 +376,7 @@ impl Vecs { "6m_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1y_returns: ComputedVecsFromDateIndex::forced_import( @@ -363,7 +384,7 @@ impl Vecs { "1y_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _2y_returns: ComputedVecsFromDateIndex::forced_import( @@ -371,7 +392,7 @@ impl Vecs { "2y_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _3y_returns: ComputedVecsFromDateIndex::forced_import( @@ -379,7 +400,7 @@ impl Vecs { "3y_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _4y_returns: ComputedVecsFromDateIndex::forced_import( @@ -387,7 +408,7 @@ impl Vecs { "4y_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _5y_returns: ComputedVecsFromDateIndex::forced_import( @@ -395,7 +416,7 @@ impl Vecs { "5y_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _6y_returns: ComputedVecsFromDateIndex::forced_import( @@ -403,7 +424,7 @@ impl Vecs { "6y_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _8y_returns: ComputedVecsFromDateIndex::forced_import( @@ -411,7 +432,7 @@ impl Vecs { "8y_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _10y_returns: ComputedVecsFromDateIndex::forced_import( @@ -419,7 +440,7 @@ impl Vecs { "10y_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _2y_cagr: ComputedVecsFromDateIndex::forced_import( @@ -427,7 +448,7 @@ impl Vecs { "2y_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _3y_cagr: ComputedVecsFromDateIndex::forced_import( @@ -435,7 +456,7 @@ impl Vecs { "3y_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _4y_cagr: ComputedVecsFromDateIndex::forced_import( @@ -443,7 +464,7 @@ impl Vecs { "4y_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _5y_cagr: ComputedVecsFromDateIndex::forced_import( @@ -451,7 +472,7 @@ impl Vecs { "5y_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _6y_cagr: ComputedVecsFromDateIndex::forced_import( @@ -459,7 +480,7 @@ impl Vecs { "6y_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _8y_cagr: ComputedVecsFromDateIndex::forced_import( @@ -467,7 +488,7 @@ impl Vecs { "8y_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _10y_cagr: ComputedVecsFromDateIndex::forced_import( @@ -475,7 +496,7 @@ impl Vecs { "10y_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, @@ -484,7 +505,7 @@ impl Vecs { "1w_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1m_dca_returns: ComputedVecsFromDateIndex::forced_import( @@ -492,7 +513,7 @@ impl Vecs { "1m_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _3m_dca_returns: ComputedVecsFromDateIndex::forced_import( @@ -500,7 +521,7 @@ impl Vecs { "3m_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _6m_dca_returns: ComputedVecsFromDateIndex::forced_import( @@ -508,7 +529,7 @@ impl Vecs { "6m_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1y_dca_returns: ComputedVecsFromDateIndex::forced_import( @@ -516,7 +537,7 @@ impl Vecs { "1y_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _2y_dca_returns: ComputedVecsFromDateIndex::forced_import( @@ -524,7 +545,7 @@ impl Vecs { "2y_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _3y_dca_returns: ComputedVecsFromDateIndex::forced_import( @@ -532,7 +553,7 @@ impl Vecs { "3y_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _4y_dca_returns: ComputedVecsFromDateIndex::forced_import( @@ -540,7 +561,7 @@ impl Vecs { "4y_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _5y_dca_returns: ComputedVecsFromDateIndex::forced_import( @@ -548,7 +569,7 @@ impl Vecs { "5y_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _6y_dca_returns: ComputedVecsFromDateIndex::forced_import( @@ -556,7 +577,7 @@ impl Vecs { "6y_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _8y_dca_returns: ComputedVecsFromDateIndex::forced_import( @@ -564,7 +585,7 @@ impl Vecs { "8y_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _10y_dca_returns: ComputedVecsFromDateIndex::forced_import( @@ -572,7 +593,7 @@ impl Vecs { "10y_dca_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _2y_dca_cagr: ComputedVecsFromDateIndex::forced_import( @@ -580,7 +601,7 @@ impl Vecs { "2y_dca_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _3y_dca_cagr: ComputedVecsFromDateIndex::forced_import( @@ -588,7 +609,7 @@ impl Vecs { "3y_dca_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _4y_dca_cagr: ComputedVecsFromDateIndex::forced_import( @@ -596,7 +617,7 @@ impl Vecs { "4y_dca_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _5y_dca_cagr: ComputedVecsFromDateIndex::forced_import( @@ -604,7 +625,7 @@ impl Vecs { "5y_dca_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _6y_dca_cagr: ComputedVecsFromDateIndex::forced_import( @@ -612,7 +633,7 @@ impl Vecs { "6y_dca_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _8y_dca_cagr: ComputedVecsFromDateIndex::forced_import( @@ -620,7 +641,7 @@ impl Vecs { "8y_dca_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _10y_dca_cagr: ComputedVecsFromDateIndex::forced_import( @@ -628,7 +649,7 @@ impl Vecs { "10y_dca_cagr", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1w_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -636,7 +657,7 @@ impl Vecs { "1w_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1m_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -644,7 +665,7 @@ impl Vecs { "1m_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _3m_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -652,7 +673,7 @@ impl Vecs { "3m_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _6m_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -660,7 +681,7 @@ impl Vecs { "6m_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1y_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -668,7 +689,7 @@ impl Vecs { "1y_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _2y_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -676,7 +697,7 @@ impl Vecs { "2y_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _3y_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -684,7 +705,7 @@ impl Vecs { "3y_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _4y_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -692,7 +713,7 @@ impl Vecs { "4y_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _5y_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -700,7 +721,7 @@ impl Vecs { "5y_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _6y_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -708,7 +729,7 @@ impl Vecs { "6y_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _8y_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -716,7 +737,7 @@ impl Vecs { "8y_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _10y_dca_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -724,7 +745,7 @@ impl Vecs { "10y_dca_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_1d_ago: ComputedVecsFromDateIndex::forced_import( @@ -732,7 +753,7 @@ impl Vecs { "price_1d_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_1w_ago: ComputedVecsFromDateIndex::forced_import( @@ -740,7 +761,7 @@ impl Vecs { "price_1w_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_1m_ago: ComputedVecsFromDateIndex::forced_import( @@ -748,7 +769,7 @@ impl Vecs { "price_1m_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_3m_ago: ComputedVecsFromDateIndex::forced_import( @@ -756,7 +777,7 @@ impl Vecs { "price_3m_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_6m_ago: ComputedVecsFromDateIndex::forced_import( @@ -764,7 +785,7 @@ impl Vecs { "price_6m_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_1y_ago: ComputedVecsFromDateIndex::forced_import( @@ -772,7 +793,7 @@ impl Vecs { "price_1y_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_2y_ago: ComputedVecsFromDateIndex::forced_import( @@ -780,7 +801,7 @@ impl Vecs { "price_2y_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_3y_ago: ComputedVecsFromDateIndex::forced_import( @@ -788,7 +809,7 @@ impl Vecs { "price_3y_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_4y_ago: ComputedVecsFromDateIndex::forced_import( @@ -796,7 +817,7 @@ impl Vecs { "price_4y_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_5y_ago: ComputedVecsFromDateIndex::forced_import( @@ -804,7 +825,7 @@ impl Vecs { "price_5y_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_6y_ago: ComputedVecsFromDateIndex::forced_import( @@ -812,7 +833,7 @@ impl Vecs { "price_6y_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_8y_ago: ComputedVecsFromDateIndex::forced_import( @@ -820,7 +841,7 @@ impl Vecs { "price_8y_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, price_10y_ago: ComputedVecsFromDateIndex::forced_import( @@ -828,7 +849,7 @@ impl Vecs { "price_10y_ago", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1w_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -836,7 +857,7 @@ impl Vecs { "1w_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1m_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -844,7 +865,7 @@ impl Vecs { "1m_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _3m_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -852,7 +873,7 @@ impl Vecs { "3m_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _6m_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -860,7 +881,7 @@ impl Vecs { "6m_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _1y_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -868,7 +889,7 @@ impl Vecs { "1y_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _2y_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -876,7 +897,7 @@ impl Vecs { "2y_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _3y_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -884,7 +905,7 @@ impl Vecs { "3y_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _4y_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -892,7 +913,7 @@ impl Vecs { "4y_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _5y_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -900,7 +921,7 @@ impl Vecs { "5y_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _6y_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -908,7 +929,7 @@ impl Vecs { "6y_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _8y_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -916,7 +937,7 @@ impl Vecs { "8y_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, _10y_dca_stack: ComputedVecsFromDateIndex::forced_import( @@ -924,7 +945,7 @@ impl Vecs { "10y_dca_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, @@ -933,7 +954,7 @@ impl Vecs { "dca_class_2025_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2024_stack: ComputedVecsFromDateIndex::forced_import( @@ -941,7 +962,7 @@ impl Vecs { "dca_class_2024_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2023_stack: ComputedVecsFromDateIndex::forced_import( @@ -949,7 +970,7 @@ impl Vecs { "dca_class_2023_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2022_stack: ComputedVecsFromDateIndex::forced_import( @@ -957,7 +978,7 @@ impl Vecs { "dca_class_2022_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2021_stack: ComputedVecsFromDateIndex::forced_import( @@ -965,7 +986,7 @@ impl Vecs { "dca_class_2021_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2020_stack: ComputedVecsFromDateIndex::forced_import( @@ -973,7 +994,7 @@ impl Vecs { "dca_class_2020_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2019_stack: ComputedVecsFromDateIndex::forced_import( @@ -981,7 +1002,7 @@ impl Vecs { "dca_class_2019_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2018_stack: ComputedVecsFromDateIndex::forced_import( @@ -989,7 +1010,7 @@ impl Vecs { "dca_class_2018_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2017_stack: ComputedVecsFromDateIndex::forced_import( @@ -997,7 +1018,7 @@ impl Vecs { "dca_class_2017_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2016_stack: ComputedVecsFromDateIndex::forced_import( @@ -1005,7 +1026,7 @@ impl Vecs { "dca_class_2016_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2015_stack: ComputedVecsFromDateIndex::forced_import( @@ -1013,7 +1034,7 @@ impl Vecs { "dca_class_2015_stack", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, @@ -1022,7 +1043,7 @@ impl Vecs { "dca_class_2025_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2024_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -1030,7 +1051,7 @@ impl Vecs { "dca_class_2024_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2023_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -1038,7 +1059,7 @@ impl Vecs { "dca_class_2023_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2022_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -1046,7 +1067,7 @@ impl Vecs { "dca_class_2022_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2021_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -1054,7 +1075,7 @@ impl Vecs { "dca_class_2021_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2020_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -1062,7 +1083,7 @@ impl Vecs { "dca_class_2020_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2019_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -1070,7 +1091,7 @@ impl Vecs { "dca_class_2019_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2018_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -1078,7 +1099,7 @@ impl Vecs { "dca_class_2018_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2017_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -1086,7 +1107,7 @@ impl Vecs { "dca_class_2017_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2016_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -1094,7 +1115,7 @@ impl Vecs { "dca_class_2016_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2015_avg_price: ComputedVecsFromDateIndex::forced_import( @@ -1102,7 +1123,7 @@ impl Vecs { "dca_class_2015_avg_price", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, @@ -1111,7 +1132,7 @@ impl Vecs { "dca_class_2025_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2024_returns: ComputedVecsFromDateIndex::forced_import( @@ -1119,7 +1140,7 @@ impl Vecs { "dca_class_2024_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2023_returns: ComputedVecsFromDateIndex::forced_import( @@ -1127,7 +1148,7 @@ impl Vecs { "dca_class_2023_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2022_returns: ComputedVecsFromDateIndex::forced_import( @@ -1135,7 +1156,7 @@ impl Vecs { "dca_class_2022_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2021_returns: ComputedVecsFromDateIndex::forced_import( @@ -1143,7 +1164,7 @@ impl Vecs { "dca_class_2021_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2020_returns: ComputedVecsFromDateIndex::forced_import( @@ -1151,7 +1172,7 @@ impl Vecs { "dca_class_2020_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2019_returns: ComputedVecsFromDateIndex::forced_import( @@ -1159,7 +1180,7 @@ impl Vecs { "dca_class_2019_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2018_returns: ComputedVecsFromDateIndex::forced_import( @@ -1167,7 +1188,7 @@ impl Vecs { "dca_class_2018_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2017_returns: ComputedVecsFromDateIndex::forced_import( @@ -1175,7 +1196,7 @@ impl Vecs { "dca_class_2017_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2016_returns: ComputedVecsFromDateIndex::forced_import( @@ -1183,7 +1204,7 @@ impl Vecs { "dca_class_2016_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, dca_class_2015_returns: ComputedVecsFromDateIndex::forced_import( @@ -1191,7 +1212,7 @@ impl Vecs { "dca_class_2015_returns", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, }) @@ -1206,25 +1227,42 @@ impl Vecs { starting_indexes: &Indexes, exit: &Exit, ) -> color_eyre::Result<()> { + self.height_to_marketcap.compute_multiply( + starting_indexes.height, + &fetched.chainindexes_to_close.height, + transactions + .indexes_to_subsidy + .bitcoin + .height_extra + .unwrap_cumulative(), + exit, + )?; + self.height_to_ath.compute_max( + starting_indexes.height, + &fetched.chainindexes_to_high.height, + exit, + )?; + self.height_to_drawdown.compute_drawdown( + starting_indexes.height, + &fetched.chainindexes_to_close.height, + &self.height_to_ath, + exit, + )?; + self.indexes_to_marketcap.compute_all( indexer, indexes, starting_indexes, exit, |v, _, _, starting_indexes, exit| { - let mut cumulative_subsidy_in_btc = transactions - .indexes_to_subsidy - .bitcoin - .dateindex - .unwrap_cumulative() - .into_iter(); - v.compute_transform( + v.compute_multiply( starting_indexes.dateindex, fetched.timeindexes_to_close.dateindex.as_ref().unwrap(), - |(i, close, ..)| { - let supply = cumulative_subsidy_in_btc.unwrap_get_inner(i); - (i, *close * supply) - }, + transactions + .indexes_to_subsidy + .bitcoin + .dateindex + .unwrap_cumulative(), exit, ) }, @@ -1236,23 +1274,9 @@ impl Vecs { starting_indexes, exit, |v, _, _, starting_indexes, exit| { - let mut prev = None; - v.compute_transform( + v.compute_max( starting_indexes.dateindex, fetched.timeindexes_to_high.dateindex.as_ref().unwrap(), - |(i, high, slf)| { - if prev.is_none() { - let i = i.unwrap_to_usize(); - prev.replace(if i > 0 { - slf.into_iter().unwrap_get_inner_(i - 1) - } else { - Dollars::ZERO - }); - } - let ath = prev.unwrap().max(*high); - prev.replace(ath); - (i, ath) - }, exit, ) }, @@ -1264,24 +1288,10 @@ impl Vecs { starting_indexes, exit, |v, _, _, starting_indexes, exit| { - let mut close_iter = fetched - .timeindexes_to_close - .dateindex - .as_ref() - .unwrap() - .into_iter(); - - v.compute_transform( + v.compute_drawdown( starting_indexes.dateindex, + fetched.timeindexes_to_close.dateindex.as_ref().unwrap(), self.indexes_to_ath.dateindex.as_ref().unwrap(), - |(i, ath, ..)| { - if ath == Dollars::ZERO { - return (i, StoredF32::default()); - } - let close = *close_iter.unwrap_get_inner(i); - let drawdown = StoredF32::from((*ath - *close) / *ath * -100.0); - (i, drawdown) - }, exit, ) }, @@ -1325,7 +1335,7 @@ impl Vecs { }, )?; - self.indexes_to_max_days_between_ath.compute_all( + self.indexes_to_max_days_between_aths.compute_all( indexer, indexes, starting_indexes, @@ -1353,7 +1363,7 @@ impl Vecs { }, )?; - self.indexes_to_max_years_between_ath.compute_all( + self.indexes_to_max_years_between_aths.compute_all( indexer, indexes, starting_indexes, @@ -1361,7 +1371,7 @@ impl Vecs { |v, _, _, starting_indexes, exit| { v.compute_transform( starting_indexes.dateindex, - self.indexes_to_max_days_between_ath + self.indexes_to_max_days_between_aths .dateindex .as_ref() .unwrap(), @@ -1796,8 +1806,8 @@ impl Vecs { self.indexes_to_ath.vecs(), self.indexes_to_drawdown.vecs(), self.indexes_to_days_since_ath.vecs(), - self.indexes_to_max_days_between_ath.vecs(), - self.indexes_to_max_years_between_ath.vecs(), + self.indexes_to_max_days_between_aths.vecs(), + self.indexes_to_max_years_between_aths.vecs(), self.indexes_to_1w_sma.vecs(), self.indexes_to_8d_sma.vecs(), self.indexes_to_13d_sma.vecs(), @@ -1920,6 +1930,11 @@ impl Vecs { self.dca_class_2017_returns.vecs(), self.dca_class_2016_returns.vecs(), self.dca_class_2015_returns.vecs(), + vec![ + &self.height_to_marketcap, + &self.height_to_ath, + &self.height_to_drawdown, + ], ] .into_iter() .flatten() diff --git a/crates/brk_computer/src/vecs/mining.rs b/crates/brk_computer/src/vecs/mining.rs index cd116946f..8c12a6c4d 100644 --- a/crates/brk_computer/src/vecs/mining.rs +++ b/crates/brk_computer/src/vecs/mining.rs @@ -3,7 +3,7 @@ use std::{fs, path::Path}; use brk_core::{DifficultyEpoch, HalvingEpoch, StoredF64, Version}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, Compressed, Computation, VecIterator}; +use brk_vec::{AnyCollectableVec, Computation, Format, VecIterator}; use super::{ Indexes, @@ -25,7 +25,7 @@ impl Vecs { path: &Path, version: Version, _computation: Computation, - compressed: Compressed, + format: Format, ) -> color_eyre::Result { fs::create_dir_all(path)?; @@ -35,7 +35,7 @@ impl Vecs { "difficulty", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_difficultyepoch: ComputedVecsFromDateIndex::forced_import( @@ -43,7 +43,7 @@ impl Vecs { "difficultyepoch", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_halvingepoch: ComputedVecsFromDateIndex::forced_import( @@ -51,7 +51,7 @@ impl Vecs { "halvingepoch", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, }) diff --git a/crates/brk_computer/src/vecs/mod.rs b/crates/brk_computer/src/vecs/mod.rs index 2ceb72c11..14960e391 100644 --- a/crates/brk_computer/src/vecs/mod.rs +++ b/crates/brk_computer/src/vecs/mod.rs @@ -4,7 +4,7 @@ use brk_core::Version; use brk_exit::Exit; use brk_fetcher::Fetcher; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, Compressed, Computation}; +use brk_vec::{AnyCollectableVec, Computation, Format}; use fjall::TransactionalKeyspace; pub mod blocks; @@ -40,7 +40,7 @@ impl Vecs { indexer: &Indexer, fetch: bool, computation: Computation, - compressed: Compressed, + format: Format, keyspace: &TransactionalKeyspace, ) -> color_eyre::Result { fs::create_dir_all(path)?; @@ -50,7 +50,7 @@ impl Vecs { version + VERSION + Version::ZERO, indexer, computation, - compressed, + format, )?; let fetched = fetch.then(|| { @@ -58,7 +58,7 @@ impl Vecs { path, version + VERSION + Version::ZERO, computation, - compressed, + format, ) .unwrap() }); @@ -68,31 +68,31 @@ impl Vecs { path, version + VERSION + Version::ZERO, computation, - compressed, + format, )?, mining: mining::Vecs::forced_import( path, version + VERSION + Version::ZERO, computation, - compressed, + format, )?, constants: constants::Vecs::forced_import( path, version + VERSION + Version::ZERO, computation, - compressed, + format, )?, market: market::Vecs::forced_import( path, version + VERSION + Version::ZERO, computation, - compressed, + format, )?, stateful: stateful::Vecs::forced_import( path, version + VERSION + Version::ZERO, computation, - compressed, + format, fetched.as_ref(), keyspace, )?, @@ -102,7 +102,7 @@ impl Vecs { indexer, &indexes, computation, - compressed, + format, fetched.as_ref(), )?, indexes, @@ -162,7 +162,8 @@ impl Vecs { &self.indexes, &self.transactions, self.fetched.as_ref(), - &starting_indexes, + &self.market, + starting_indexes, exit, )?; diff --git a/crates/brk_computer/src/vecs/stateful/cohort.rs b/crates/brk_computer/src/vecs/stateful/cohort.rs index 32a88299a..fa093d29a 100644 --- a/crates/brk_computer/src/vecs/stateful/cohort.rs +++ b/crates/brk_computer/src/vecs/stateful/cohort.rs @@ -4,9 +4,7 @@ use brk_core::{DateIndex, Dollars, Height, Result, Sats, StoredF32, StoredUsize, use brk_exit::Exit; use brk_indexer::Indexer; use brk_state::CohortState; -use brk_vec::{ - AnyCollectableVec, AnyVec, Compressed, Computation, EagerVec, StoredIndex, VecIterator, -}; +use brk_vec::{AnyCollectableVec, AnyVec, Computation, EagerVec, Format, StoredIndex, VecIterator}; use fjall::TransactionalKeyspace; use crate::vecs::{ @@ -15,7 +13,7 @@ use crate::vecs::{ ComputedRatioVecsFromDateIndex, ComputedValueVecsFromHeight, ComputedVecsFromDateIndex, ComputedVecsFromHeight, StorableVecGeneatorOptions, }, - indexes, + indexes, market, }; const VERSION: Version = Version::ZERO; @@ -30,22 +28,24 @@ pub struct Vecs { pub height_to_supply: EagerVec, pub height_to_utxo_count: EagerVec, // Single - pub height_to_realized_profit: Option>, - pub height_to_realized_loss: Option>, - pub height_to_value_created: Option>, - pub height_to_adjusted_value_created: Option>, - pub height_to_value_destroyed: Option>, - pub height_to_adjusted_value_destroyed: Option>, - pub height_to_supply_in_profit: Option>, - pub height_to_supply_in_loss: Option>, - pub height_to_supply_even: Option>, - pub height_to_unrealized_profit: Option>, - pub height_to_unrealized_loss: Option>, - pub dateindex_to_supply_in_profit: Option>, - pub dateindex_to_supply_in_loss: Option>, pub dateindex_to_supply_even: Option>, - pub dateindex_to_unrealized_profit: Option>, + pub dateindex_to_supply_in_loss: Option>, + pub dateindex_to_supply_in_profit: Option>, pub dateindex_to_unrealized_loss: Option>, + pub dateindex_to_unrealized_profit: Option>, + pub height_to_adjusted_value_created: Option>, + pub height_to_adjusted_value_destroyed: Option>, + pub height_to_max_price_paid: Option>, + pub height_to_min_price_paid: Option>, + pub height_to_realized_loss: Option>, + pub height_to_realized_profit: Option>, + pub height_to_supply_even: Option>, + pub height_to_supply_in_loss: Option>, + pub height_to_supply_in_profit: Option>, + pub height_to_unrealized_loss: Option>, + pub height_to_unrealized_profit: Option>, + pub height_to_value_created: Option>, + pub height_to_value_destroyed: Option>, pub dateindex_to_adjusted_spent_output_profit_ratio: Option>, pub dateindex_to_realized_cap_30d_change: Option>, @@ -70,6 +70,17 @@ pub struct Vecs { pub indexes_to_supply_even: Option>, pub indexes_to_unrealized_profit: Option>, pub indexes_to_unrealized_loss: Option>, + pub indexes_to_min_price_paid: Option>, + pub indexes_to_max_price_paid: Option>, + pub indexes_to_halved_supply: ComputedValueVecsFromHeight, + pub height_to_negative_unrealized_loss: Option>, + pub indexes_to_negative_unrealized_loss: Option>, + pub height_to_net_unrealized_profit_and_loss: Option>, + pub indexes_to_net_unrealized_profit_and_loss: Option>, + pub height_to_net_unrealized_profit_and_loss_relative_to_market_cap: + Option>, + pub indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap: + Option>, } impl Vecs { @@ -78,7 +89,7 @@ impl Vecs { path: &Path, cohort_name: Option<&str>, _computation: Computation, - compressed: Compressed, + format: Format, version: Version, fetched: Option<&fetched::Vecs>, keyspace: &TransactionalKeyspace, @@ -109,7 +120,7 @@ impl Vecs { path, &suffix("supply_in_profit"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -118,7 +129,7 @@ impl Vecs { path, &suffix("supply_in_profit"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -128,7 +139,7 @@ impl Vecs { &suffix("supply_in_profit"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), ) .unwrap() @@ -138,7 +149,7 @@ impl Vecs { path, &suffix("supply_even"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -147,7 +158,7 @@ impl Vecs { path, &suffix("supply_even"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -157,7 +168,7 @@ impl Vecs { &suffix("supply_even"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), ) .unwrap() @@ -167,7 +178,7 @@ impl Vecs { path, &suffix("supply_in_loss"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -176,7 +187,7 @@ impl Vecs { path, &suffix("supply_in_loss"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -186,7 +197,7 @@ impl Vecs { &suffix("supply_in_loss"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), ) .unwrap() @@ -196,7 +207,7 @@ impl Vecs { path, &suffix("unrealized_profit"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -205,7 +216,7 @@ impl Vecs { path, &suffix("unrealized_profit"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -215,7 +226,7 @@ impl Vecs { &suffix("unrealized_profit"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), ) .unwrap() @@ -225,7 +236,25 @@ impl Vecs { path, &suffix("unrealized_loss"), version + VERSION + Version::ZERO, - compressed, + format, + ) + .unwrap() + }), + height_to_min_price_paid: compute_dollars.then(|| { + EagerVec::forced_import( + path, + &suffix("min_price_paid"), + version + VERSION + Version::ZERO, + format, + ) + .unwrap() + }), + height_to_max_price_paid: compute_dollars.then(|| { + EagerVec::forced_import( + path, + &suffix("max_price_paid"), + version + VERSION + Version::ZERO, + format, ) .unwrap() }), @@ -234,7 +263,7 @@ impl Vecs { path, &suffix("unrealized_loss"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -244,7 +273,7 @@ impl Vecs { &suffix("unrealized_loss"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), ) .unwrap() @@ -254,7 +283,7 @@ impl Vecs { path, &suffix("realized_cap"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -264,7 +293,29 @@ impl Vecs { &suffix("realized_cap"), false, version + VERSION + Version::ZERO, - compressed, + format, + StorableVecGeneatorOptions::default().add_last(), + ) + .unwrap() + }), + indexes_to_min_price_paid: compute_dollars.then(|| { + ComputedVecsFromHeight::forced_import( + path, + &suffix("min_price_paid"), + false, + version + VERSION + Version::ZERO, + format, + StorableVecGeneatorOptions::default().add_last(), + ) + .unwrap() + }), + indexes_to_max_price_paid: compute_dollars.then(|| { + ComputedVecsFromHeight::forced_import( + path, + &suffix("max_price_paid"), + false, + version + VERSION + Version::ZERO, + format, StorableVecGeneatorOptions::default().add_last(), ) .unwrap() @@ -273,14 +324,14 @@ impl Vecs { path, &suffix("supply"), version + VERSION + Version::ZERO, - compressed, + format, )?, indexes_to_supply: ComputedValueVecsFromHeight::forced_import( path, &suffix("supply"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), compute_dollars, )?, @@ -288,14 +339,14 @@ impl Vecs { path, &suffix("utxo_count"), version + VERSION + Version::ZERO, - compressed, + format, )?, indexes_to_utxo_count: ComputedVecsFromHeight::forced_import( path, &suffix("utxo_count"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, indexes_to_realized_price: compute_dollars.then(|| { @@ -304,7 +355,7 @@ impl Vecs { &suffix("realized_price"), true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), ) .unwrap() @@ -315,7 +366,7 @@ impl Vecs { &suffix("realized_price"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), ) .unwrap() @@ -325,7 +376,7 @@ impl Vecs { path, &suffix("realized_profit"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -335,7 +386,7 @@ impl Vecs { &suffix("realized_profit"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_sum(), ) .unwrap() @@ -345,7 +396,7 @@ impl Vecs { path, &suffix("realized_loss"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -355,7 +406,7 @@ impl Vecs { &suffix("realized_loss"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_sum(), ) .unwrap() @@ -366,7 +417,7 @@ impl Vecs { &suffix("negative_realized_loss"), true, version + VERSION + Version::ONE, - compressed, + format, StorableVecGeneatorOptions::default().add_sum(), ) .unwrap() @@ -376,7 +427,7 @@ impl Vecs { path, &suffix("value_created"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -386,7 +437,7 @@ impl Vecs { &suffix("value_created"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_sum(), ) .unwrap() @@ -397,7 +448,7 @@ impl Vecs { &suffix("realized_value"), true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_sum(), ) .unwrap() @@ -407,7 +458,7 @@ impl Vecs { path, &suffix("adjusted_value_created"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -417,7 +468,7 @@ impl Vecs { &suffix("adjusted_value_created"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_sum(), ) .unwrap() @@ -427,7 +478,7 @@ impl Vecs { path, &suffix("value_destroyed"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -437,7 +488,7 @@ impl Vecs { &suffix("value_destroyed"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_sum(), ) .unwrap() @@ -447,7 +498,7 @@ impl Vecs { path, &suffix("adjusted_value_destroyed"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -457,7 +508,7 @@ impl Vecs { &suffix("adjusted_value_destroyed"), false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_sum(), ) .unwrap() @@ -467,7 +518,7 @@ impl Vecs { path, &suffix("realized_cap_30d_change"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -477,7 +528,7 @@ impl Vecs { &suffix("net_realized_profit_and_loss"), true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_sum(), ) .unwrap() @@ -487,7 +538,7 @@ impl Vecs { path, &suffix("sell_side_risk_ratio"), version + VERSION + Version::ONE, - compressed, + format, ) .unwrap() }), @@ -496,7 +547,7 @@ impl Vecs { path, &suffix("spent_output_profit_ratio"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), @@ -505,10 +556,84 @@ impl Vecs { path, &suffix("adjusted_spent_output_profit_ratio"), version + VERSION + Version::ZERO, - compressed, + format, ) .unwrap() }), + indexes_to_halved_supply: ComputedValueVecsFromHeight::forced_import( + path, + &suffix("halved_supply"), + true, + version + VERSION + Version::ZERO, + format, + StorableVecGeneatorOptions::default().add_last(), + compute_dollars, + )?, + + height_to_negative_unrealized_loss: compute_dollars.then(|| { + EagerVec::forced_import( + path, + &suffix("negative_unrealized_loss"), + version + VERSION + Version::ZERO, + format, + ) + .unwrap() + }), + indexes_to_negative_unrealized_loss: compute_dollars.then(|| { + ComputedVecsFromDateIndex::forced_import( + path, + &suffix("negative_unrealized_loss"), + false, + version + VERSION + Version::ZERO, + format, + StorableVecGeneatorOptions::default().add_last(), + ) + .unwrap() + }), + height_to_net_unrealized_profit_and_loss: compute_dollars.then(|| { + EagerVec::forced_import( + path, + &suffix("net_unrealized_profit_and_loss"), + version + VERSION + Version::ZERO, + format, + ) + .unwrap() + }), + indexes_to_net_unrealized_profit_and_loss: compute_dollars.then(|| { + ComputedVecsFromDateIndex::forced_import( + path, + &suffix("net_unrealized_profit_and_loss"), + false, + version + VERSION + Version::ZERO, + format, + StorableVecGeneatorOptions::default().add_last(), + ) + .unwrap() + }), + height_to_net_unrealized_profit_and_loss_relative_to_market_cap: compute_dollars.then( + || { + EagerVec::forced_import( + path, + &suffix("net_unrealized_profit_and_loss_relative_to_market_cap"), + version + VERSION + Version::ZERO, + format, + ) + .unwrap() + }, + ), + indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap: compute_dollars.then( + || { + ComputedVecsFromDateIndex::forced_import( + path, + &suffix("net_unrealized_profit_and_loss_relative_to_market_cap"), + false, + version + VERSION + Version::ZERO, + format, + StorableVecGeneatorOptions::default().add_last(), + ) + .unwrap() + }, + ), }) } @@ -556,6 +681,12 @@ impl Vecs { self.height_to_unrealized_loss .as_ref() .map_or(usize::MAX, |v| v.len()), + self.height_to_min_price_paid + .as_ref() + .map_or(usize::MAX, |v| v.len()), + self.height_to_max_price_paid + .as_ref() + .map_or(usize::MAX, |v| v.len()), ] .into_iter() .map(Height::from) @@ -779,6 +910,28 @@ impl Vecs { .validate_computed_version_or_reset_file( base_version + dateindex_to_unrealized_loss_inner_version, )?; + let height_to_min_price_paid_inner_version = self + .height_to_min_price_paid + .as_ref() + .unwrap() + .inner_version(); + self.height_to_min_price_paid + .as_mut() + .unwrap() + .validate_computed_version_or_reset_file( + base_version + height_to_min_price_paid_inner_version, + )?; + let height_to_max_price_paid_inner_version = self + .height_to_max_price_paid + .as_ref() + .unwrap() + .inner_version(); + self.height_to_max_price_paid + .as_mut() + .unwrap() + .validate_computed_version_or_reset_file( + base_version + height_to_max_price_paid_inner_version, + )?; } Ok(()) @@ -843,6 +996,31 @@ impl Vecs { exit: &Exit, ) -> Result<()> { if let Some(height_price) = height_price { + self.height_to_min_price_paid + .as_mut() + .unwrap() + .forced_push_at( + height, + self.state + .price_to_amount + .puts_first_key_value() + .map(|(&dollars, _)| dollars) + .unwrap_or(Dollars::NAN), + exit, + )?; + self.height_to_max_price_paid + .as_mut() + .unwrap() + .forced_push_at( + height, + self.state + .price_to_amount + .puts_last_key_value() + .map(|(&dollars, _)| dollars) + .unwrap_or(Dollars::NAN), + exit, + )?; + let (height_unrealized_state, date_unrealized_state) = self .state .compute_unrealized_states(height_price, date_price.unwrap()); @@ -968,6 +1146,14 @@ impl Vecs { .as_mut() .unwrap() .safe_flush(exit)?; + self.height_to_min_price_paid + .as_mut() + .unwrap() + .safe_flush(exit)?; + self.height_to_max_price_paid + .as_mut() + .unwrap() + .safe_flush(exit)?; } self.state.commit(height)?; @@ -975,12 +1161,294 @@ impl Vecs { Ok(()) } + pub fn compute_from_stateful( + &mut self, + starting_indexes: &Indexes, + others: &[&Self], + exit: &Exit, + ) -> Result<()> { + self.height_to_supply.compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| &v.height_to_supply) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_utxo_count.compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| &v.height_to_utxo_count) + .collect::>() + .as_slice(), + exit, + )?; + + if let Some(height_to_realized_cap) = &mut self.height_to_realized_cap { + height_to_realized_cap.compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_realized_cap.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + + self.height_to_min_price_paid + .as_mut() + .unwrap() + .compute_min_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_min_price_paid.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_max_price_paid + .as_mut() + .unwrap() + .compute_max_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_max_price_paid.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_realized_profit + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_realized_profit.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_realized_loss + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_realized_loss.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_value_created + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_value_created.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_adjusted_value_created + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_adjusted_value_created.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_value_destroyed + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_value_destroyed.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_adjusted_value_destroyed + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_adjusted_value_destroyed.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_supply_in_profit + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_supply_in_profit.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_supply_in_loss + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_supply_in_loss.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_supply_even + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_supply_even.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_unrealized_profit + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_unrealized_profit.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_unrealized_loss + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_unrealized_loss.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.dateindex_to_supply_in_profit + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.dateindex, + others + .iter() + .map(|v| v.dateindex_to_supply_in_profit.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.dateindex_to_supply_in_loss + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.dateindex, + others + .iter() + .map(|v| v.dateindex_to_supply_in_loss.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.dateindex_to_supply_even + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.dateindex, + others + .iter() + .map(|v| v.dateindex_to_supply_even.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.dateindex_to_unrealized_profit + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.dateindex, + others + .iter() + .map(|v| v.dateindex_to_unrealized_profit.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.dateindex_to_unrealized_loss + .as_mut() + .unwrap() + .compute_sum_of_others( + starting_indexes.dateindex, + others + .iter() + .map(|v| v.dateindex_to_unrealized_loss.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_min_price_paid + .as_mut() + .unwrap() + .compute_min_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_min_price_paid.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + self.height_to_max_price_paid + .as_mut() + .unwrap() + .compute_max_of_others( + starting_indexes.height, + others + .iter() + .map(|v| v.height_to_max_price_paid.as_ref().unwrap()) + .collect::>() + .as_slice(), + exit, + )?; + } + + Ok(()) + } + pub fn compute_rest( &mut self, indexer: &Indexer, indexes: &indexes::Vecs, fetched: Option<&fetched::Vecs>, starting_indexes: &Indexes, + market: &market::Vecs, exit: &Exit, ) -> color_eyre::Result<()> { self.indexes_to_supply.compute_rest( @@ -999,6 +1467,22 @@ impl Vecs { Some(&self.height_to_utxo_count), )?; + self.indexes_to_halved_supply.compute_all( + indexer, + indexes, + fetched, + starting_indexes, + exit, + |v, _, _, starting_indexes, exit| { + v.compute_transform( + starting_indexes.height, + &self.height_to_supply, + |(h, sats, ..)| (h, sats / 2), + exit, + ) + }, + )?; + if let Some(indexes_to_realized_cap) = self.indexes_to_realized_cap.as_mut() { indexes_to_realized_cap.compute_rest( indexes, @@ -1267,6 +1751,112 @@ impl Vecs { exit, Some(self.dateindex_to_unrealized_loss.as_ref().unwrap()), )?; + + self.indexes_to_min_price_paid + .as_mut() + .unwrap() + .compute_rest( + indexes, + starting_indexes, + exit, + Some(self.height_to_min_price_paid.as_ref().unwrap()), + )?; + self.indexes_to_max_price_paid + .as_mut() + .unwrap() + .compute_rest( + indexes, + starting_indexes, + exit, + Some(self.height_to_max_price_paid.as_ref().unwrap()), + )?; + + self.height_to_negative_unrealized_loss + .as_mut() + .unwrap() + .compute_transform( + starting_indexes.height, + self.height_to_unrealized_loss.as_ref().unwrap(), + |(h, v, ..)| (h, v * -1_i64), + exit, + )?; + self.indexes_to_negative_unrealized_loss + .as_mut() + .unwrap() + .compute_all( + indexer, + indexes, + starting_indexes, + exit, + |v, _, _, starting_indexes, exit| { + v.compute_transform( + starting_indexes.dateindex, + self.dateindex_to_unrealized_loss.as_ref().unwrap(), + |(h, v, ..)| (h, v * -1_i64), + exit, + ) + }, + )?; + self.height_to_net_unrealized_profit_and_loss + .as_mut() + .unwrap() + .compute_subtract( + starting_indexes.height, + self.height_to_unrealized_profit.as_ref().unwrap(), + self.height_to_unrealized_loss.as_ref().unwrap(), + exit, + )?; + + self.indexes_to_net_unrealized_profit_and_loss + .as_mut() + .unwrap() + .compute_all( + indexer, + indexes, + starting_indexes, + exit, + |vec, _, _, starting_indexes, exit| { + vec.compute_subtract( + starting_indexes.dateindex, + self.dateindex_to_unrealized_profit.as_ref().unwrap(), + self.dateindex_to_unrealized_loss.as_ref().unwrap(), + exit, + ) + }, + )?; + self.height_to_net_unrealized_profit_and_loss_relative_to_market_cap + .as_mut() + .unwrap() + .compute_percentage( + starting_indexes.height, + self.height_to_net_unrealized_profit_and_loss + .as_ref() + .unwrap(), + &market.height_to_marketcap, + exit, + )?; + self.indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap + .as_mut() + .unwrap() + .compute_all( + indexer, + indexes, + starting_indexes, + exit, + |vec, _, _, starting_indexes, exit| { + vec.compute_percentage( + starting_indexes.dateindex, + self.indexes_to_net_unrealized_profit_and_loss + .as_ref() + .unwrap() + .dateindex + .as_ref() + .unwrap(), + market.indexes_to_marketcap.dateindex.as_ref().unwrap(), + exit, + ) + }, + )?; } Ok(()) @@ -1379,6 +1969,12 @@ impl Vecs { self.dateindex_to_unrealized_loss .as_ref() .map_or(vec![], |v| vec![v]), + self.height_to_min_price_paid + .as_ref() + .map_or(vec![], |v| vec![v]), + self.height_to_max_price_paid + .as_ref() + .map_or(vec![], |v| vec![v]), self.indexes_to_supply_in_profit .as_ref() .map_or(vec![], |v| v.vecs()), @@ -1394,6 +1990,31 @@ impl Vecs { self.indexes_to_unrealized_loss .as_ref() .map_or(vec![], |v| v.vecs()), + self.indexes_to_min_price_paid + .as_ref() + .map_or(vec![], |v| v.vecs()), + self.indexes_to_max_price_paid + .as_ref() + .map_or(vec![], |v| v.vecs()), + self.indexes_to_halved_supply.vecs(), + self.height_to_negative_unrealized_loss + .as_ref() + .map_or(vec![], |v| vec![v]), + self.indexes_to_negative_unrealized_loss + .as_ref() + .map_or(vec![], |v| v.vecs()), + self.height_to_net_unrealized_profit_and_loss + .as_ref() + .map_or(vec![], |v| vec![v]), + self.indexes_to_net_unrealized_profit_and_loss + .as_ref() + .map_or(vec![], |v| v.vecs()), + self.height_to_net_unrealized_profit_and_loss_relative_to_market_cap + .as_ref() + .map_or(vec![], |v| vec![v]), + self.indexes_to_net_unrealized_profit_and_loss_relative_to_market_cap + .as_ref() + .map_or(vec![], |v| v.vecs()), ] .into_iter() .flatten() diff --git a/crates/brk_computer/src/vecs/stateful/mod.rs b/crates/brk_computer/src/vecs/stateful/mod.rs index 335c0b0d8..3d86e9652 100644 --- a/crates/brk_computer/src/vecs/stateful/mod.rs +++ b/crates/brk_computer/src/vecs/stateful/mod.rs @@ -1,10 +1,10 @@ -use std::{cmp::Ordering, collections::BTreeMap, mem, path::Path, thread}; +use std::{cmp::Ordering, collections::BTreeMap, path::Path, thread}; use brk_core::{DateIndex, Height, InputIndex, OutputIndex, OutputType, Result, Sats, Version}; use brk_exit::Exit; use brk_indexer::Indexer; use brk_vec::{ - AnyCollectableVec, AnyVec, BaseVecIterator, CollectableVec, Compressed, Computation, EagerVec, + AnyCollectableVec, AnyVec, BaseVecIterator, CollectableVec, Computation, EagerVec, Format, GenericStoredVec, StoredIndex, StoredVec, UnsafeSlice, VecIterator, }; use fjall::TransactionalKeyspace; @@ -13,10 +13,13 @@ use outputs::OutputCohorts; use rayon::prelude::*; use brk_state::{ - BlockState, OutputFilter, Outputs, OutputsByEpoch, OutputsByFrom, OutputsByRange, - OutputsBySize, OutputsBySpendableType, OutputsByTerm, OutputsByUpTo, SupplyState, Transacted, + BlockState, OutputFilter, Outputs, OutputsByDateRange, OutputsByEpoch, OutputsByFromDate, + OutputsByFromSize, OutputsBySizeRange, OutputsBySpendableType, OutputsByTerm, + OutputsByUpToDate, OutputsByUpToSize, SupplyState, Transacted, }; +use crate::vecs::market; + use super::{ Indexes, fetched, grouped::{ComputedValueVecsFromHeight, StorableVecGeneatorOptions}, @@ -26,8 +29,7 @@ use super::{ pub mod cohort; mod outputs; -const VERSION: Version = Version::ZERO; -const BYSIZE_VERSION: Version = Version::ONE; +const VERSION: Version = Version::new(21); #[derive(Clone)] pub struct Vecs { @@ -46,7 +48,7 @@ impl Vecs { path: &Path, version: Version, _computation: Computation, - compressed: Compressed, + format: Format, fetched: Option<&fetched::Vecs>, keyspace: &TransactionalKeyspace, ) -> color_eyre::Result { @@ -63,21 +65,21 @@ impl Vecs { &states_path, "chain", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, height_to_unspendable_supply: EagerVec::forced_import( path, "unspendable_supply", version + VERSION + Version::ZERO, - compressed, + format, )?, indexes_to_unspendable_supply: ComputedValueVecsFromHeight::forced_import( path, "unspendable_supply", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), compute_dollars, )?, @@ -85,14 +87,14 @@ impl Vecs { path, "opreturn_supply", version + VERSION + Version::ZERO, - compressed, + format, )?, indexes_to_opreturn_supply: ComputedValueVecsFromHeight::forced_import( path, "opreturn_supply", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), compute_dollars, )?, @@ -102,7 +104,7 @@ impl Vecs { path, None, _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -113,7 +115,7 @@ impl Vecs { path, Some("sth"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -123,19 +125,19 @@ impl Vecs { path, Some("lth"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, &stores_path, )?, }, - by_up_to: OutputsByUpTo { + by_up_to_date: OutputsByUpToDate { _1d: cohort::Vecs::forced_import( path, Some("up_to_1d"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -145,7 +147,7 @@ impl Vecs { path, Some("up_to_1w"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -155,7 +157,7 @@ impl Vecs { path, Some("up_to_1m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -165,7 +167,7 @@ impl Vecs { path, Some("up_to_2m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -175,7 +177,7 @@ impl Vecs { path, Some("up_to_3m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -185,7 +187,7 @@ impl Vecs { path, Some("up_to_4m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -195,7 +197,7 @@ impl Vecs { path, Some("up_to_5m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -205,7 +207,7 @@ impl Vecs { path, Some("up_to_6m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -215,7 +217,7 @@ impl Vecs { path, Some("up_to_1y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -225,7 +227,7 @@ impl Vecs { path, Some("up_to_2y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -235,7 +237,7 @@ impl Vecs { path, Some("up_to_3y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -245,7 +247,7 @@ impl Vecs { path, Some("up_to_4y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -255,7 +257,7 @@ impl Vecs { path, Some("up_to_5y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -265,7 +267,7 @@ impl Vecs { path, Some("up_to_6y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -275,7 +277,7 @@ impl Vecs { path, Some("up_to_7y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -285,7 +287,7 @@ impl Vecs { path, Some("up_to_8y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -295,7 +297,7 @@ impl Vecs { path, Some("up_to_10y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -305,19 +307,19 @@ impl Vecs { path, Some("up_to_15y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, &stores_path, )?, }, - by_from: OutputsByFrom { + by_from_date: OutputsByFromDate { _1d: cohort::Vecs::forced_import( path, Some("from_1d"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -327,7 +329,7 @@ impl Vecs { path, Some("from_1w"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -337,7 +339,7 @@ impl Vecs { path, Some("from_1m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -347,7 +349,7 @@ impl Vecs { path, Some("from_2m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -357,7 +359,7 @@ impl Vecs { path, Some("from_3m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -367,7 +369,7 @@ impl Vecs { path, Some("from_4m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -377,7 +379,7 @@ impl Vecs { path, Some("from_5m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -387,7 +389,7 @@ impl Vecs { path, Some("from_6m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -397,7 +399,7 @@ impl Vecs { path, Some("from_1y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -407,7 +409,7 @@ impl Vecs { path, Some("from_2y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -417,7 +419,7 @@ impl Vecs { path, Some("from_3y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -427,7 +429,7 @@ impl Vecs { path, Some("from_4y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -437,7 +439,7 @@ impl Vecs { path, Some("from_5y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -447,7 +449,7 @@ impl Vecs { path, Some("from_6y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -457,7 +459,7 @@ impl Vecs { path, Some("from_7y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -467,7 +469,7 @@ impl Vecs { path, Some("from_8y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -477,7 +479,7 @@ impl Vecs { path, Some("from_10y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -487,19 +489,29 @@ impl Vecs { path, Some("from_15y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, &stores_path, )?, }, - by_range: OutputsByRange { + by_date_range: OutputsByDateRange { + start_to_1d: cohort::Vecs::forced_import( + path, + Some("start_to_1d"), + _computation, + format, + version + VERSION + Version::ZERO, + fetched, + keyspace, + &stores_path, + )?, _1d_to_1w: cohort::Vecs::forced_import( path, Some("from_1d_to_1w"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -509,7 +521,7 @@ impl Vecs { path, Some("from_1w_to_1m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -519,7 +531,7 @@ impl Vecs { path, Some("from_1m_to_3m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -529,7 +541,7 @@ impl Vecs { path, Some("from_3m_to_6m"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -539,7 +551,7 @@ impl Vecs { path, Some("from_6m_to_1y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -549,7 +561,7 @@ impl Vecs { path, Some("from_1y_to_2y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -559,7 +571,7 @@ impl Vecs { path, Some("from_2y_to_3y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -569,7 +581,7 @@ impl Vecs { path, Some("from_3y_to_4y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -579,7 +591,7 @@ impl Vecs { path, Some("from_4y_to_5y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -589,7 +601,7 @@ impl Vecs { path, Some("from_5y_to_7y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -599,7 +611,7 @@ impl Vecs { path, Some("from_7y_to_10y"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -609,7 +621,17 @@ impl Vecs { path, Some("from_10y_to_15y"), _computation, - compressed, + format, + version + VERSION + Version::ZERO, + fetched, + keyspace, + &stores_path, + )?, + _15y_to_end: cohort::Vecs::forced_import( + path, + Some("from_15y_to_end"), + _computation, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -621,7 +643,7 @@ impl Vecs { path, Some("epoch_0"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -631,7 +653,7 @@ impl Vecs { path, Some("epoch_1"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -641,7 +663,7 @@ impl Vecs { path, Some("epoch_2"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -651,7 +673,7 @@ impl Vecs { path, Some("epoch_3"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -661,20 +683,20 @@ impl Vecs { path, Some("epoch_4"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, &stores_path, )?, }, - by_size: OutputsBySize { - _0sat: cohort::Vecs::forced_import( + by_size_range: OutputsBySizeRange { + _0sats: cohort::Vecs::forced_import( path, - Some("0sat"), + Some("0sats"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -683,8 +705,8 @@ impl Vecs { path, Some("from_1sat_to_10sats"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -693,8 +715,8 @@ impl Vecs { path, Some("from_10sats_to_100sats"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -703,8 +725,8 @@ impl Vecs { path, Some("from_100sats_to_1_000sats"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -713,8 +735,8 @@ impl Vecs { path, Some("from_1_000sats_to_10_000sats"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -723,8 +745,8 @@ impl Vecs { path, Some("from_10_000sats_to_100_000sats"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -733,8 +755,8 @@ impl Vecs { path, Some("from_100_000sats_to_1_000_000sats"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -743,8 +765,8 @@ impl Vecs { path, Some("from_1_000_000sats_to_10_000_000sats"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -753,8 +775,8 @@ impl Vecs { path, Some("from_10_000_000sats_to_1btc"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -763,8 +785,8 @@ impl Vecs { path, Some("from_1btc_to_10btc"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -773,8 +795,8 @@ impl Vecs { path, Some("from_10btc_to_100btc"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -783,8 +805,8 @@ impl Vecs { path, Some("from_100btc_to_1_000btc"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -793,8 +815,8 @@ impl Vecs { path, Some("from_1_000btc_to_10_000btc"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -803,8 +825,8 @@ impl Vecs { path, Some("from_10_000btc_to_100_000btc"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -813,8 +835,102 @@ impl Vecs { path, Some("from_100_000btc"), _computation, - compressed, - version + BYSIZE_VERSION + Version::ZERO, + format, + version + Version::ZERO, + fetched, + keyspace, + &stores_path, + )?, + }, + by_up_to_size: OutputsByUpToSize { + _1_000sats: cohort::Vecs::forced_import( + path, + Some("up_to_1_000sats"), + _computation, + format, + version + Version::ZERO, + fetched, + keyspace, + &stores_path, + )?, + _10_000sats: cohort::Vecs::forced_import( + path, + Some("up_to_10_000sats"), + _computation, + format, + version + Version::ZERO, + fetched, + keyspace, + &stores_path, + )?, + _1btc: cohort::Vecs::forced_import( + path, + Some("up_to_1btc"), + _computation, + format, + version + Version::ZERO, + fetched, + keyspace, + &stores_path, + )?, + _10btc: cohort::Vecs::forced_import( + path, + Some("up_to_10btc"), + _computation, + format, + version + Version::ZERO, + fetched, + keyspace, + &stores_path, + )?, + _100btc: cohort::Vecs::forced_import( + path, + Some("up_to_100btc"), + _computation, + format, + version + Version::ZERO, + fetched, + keyspace, + &stores_path, + )?, + }, + by_from_size: OutputsByFromSize { + _1_000sats: cohort::Vecs::forced_import( + path, + Some("from_1_000sats"), + _computation, + format, + version + Version::ZERO, + fetched, + keyspace, + &stores_path, + )?, + _1btc: cohort::Vecs::forced_import( + path, + Some("from_1btc"), + _computation, + format, + version + Version::ZERO, + fetched, + keyspace, + &stores_path, + )?, + _10btc: cohort::Vecs::forced_import( + path, + Some("from_10btc"), + _computation, + format, + version + Version::ZERO, + fetched, + keyspace, + &stores_path, + )?, + _100btc: cohort::Vecs::forced_import( + path, + Some("from_100btc"), + _computation, + format, + version + Version::ZERO, fetched, keyspace, &stores_path, @@ -825,91 +941,91 @@ impl Vecs { // path, // Some("up_to_1cent"), // _computation, - // compressed, + // format, // fetched, // )?, // from_1c_to_10c: cohort::Vecs::forced_import( // path, // Some("from_1c_to_10c"), // _computation, - // compressed, + // format, // fetched, // )?, // from_10c_to_1d: cohort::Vecs::forced_import( // path, // Some("from_10c_to_1d"), // _computation, - // compressed, + // format, // fetched, // )?, // from_1d_to_10d: cohort::Vecs::forced_import( // path, // Some("from_1d_to_10d"), // _computation, - // compressed, + // format, // fetched, // )?, // from_10usd_to_100usd: cohort::Vecs::forced_import( // path, // Some("from_10usd_to_100usd"), // _computation, - // compressed, + // format, // fetched, // )?, // from_100usd_to_1_000usd: cohort::Vecs::forced_import( // path, // Some("from_100usd_to_1_000usd"), // _computation, - // compressed, + // format, // fetched, // )?, // from_1_000usd_to_10_000usd: cohort::Vecs::forced_import( // path, // Some("from_1_000usd_to_10_000usd"), // _computation, - // compressed, + // format, // fetched, // )?, // from_10_000usd_to_100_000usd: cohort::Vecs::forced_import( // path, // Some("from_10_000usd_to_100_000usd"), // _computation, - // compressed, + // format, // fetched, // )?, // from_100_000usd_to_1_000_000usd: cohort::Vecs::forced_import( // path, // Some("from_100_000usd_to_1_000_000usd"), // _computation, - // compressed, + // format, // fetched, // )?, // from_1_000_000usd_to_10_000_000usd: cohort::Vecs::forced_import( // path, // Some("from_1_000_000usd_to_10_000_000usd"), // _computation, - // compressed, + // format, // fetched, // )?, // from_10_000_000usd_to_100_000_000usd: cohort::Vecs::forced_import( // path, // Some("from_10_000_000usd_to_100_000_000usd"), // _computation, - // compressed, + // format, // fetched, // )?, // from_100_000_000usd_to_1_000_000_000usd: cohort::Vecs::forced_import( // path, // Some("from_100_000_000usd_to_1_000_000_000usd"), // _computation, - // compressed, + // format, // fetched, // )?, // from_1_000_000_000usd: cohort::Vecs::forced_import( // path, // Some("from_1_000_000_000usd"), // _computation, - // compressed, + // format, // fetched, // )?, // }, @@ -918,7 +1034,7 @@ impl Vecs { path, Some("p2pk65"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -928,7 +1044,7 @@ impl Vecs { path, Some("p2pk33"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -938,7 +1054,7 @@ impl Vecs { path, Some("p2pkh"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -948,7 +1064,7 @@ impl Vecs { path, Some("p2ms"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -958,7 +1074,7 @@ impl Vecs { path, Some("p2sh"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -968,7 +1084,7 @@ impl Vecs { // path, // Some("opreturn"), // _computation, - // compressed, + // format, // VERSION + Version::ZERO, // fetched, // keyspace @@ -977,7 +1093,7 @@ impl Vecs { path, Some("p2wpkh"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -987,7 +1103,7 @@ impl Vecs { path, Some("p2wsh"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -997,7 +1113,7 @@ impl Vecs { path, Some("p2tr"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -1007,7 +1123,7 @@ impl Vecs { path, Some("p2a"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -1017,7 +1133,7 @@ impl Vecs { path, Some("empty"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -1027,7 +1143,7 @@ impl Vecs { path, Some("unknown"), _computation, - compressed, + format, version + VERSION + Version::ZERO, fetched, keyspace, @@ -1039,13 +1155,16 @@ impl Vecs { }) } + #[allow(clippy::too_many_arguments)] pub fn compute( &mut self, indexer: &Indexer, indexes: &indexes::Vecs, transactions: &transactions::Vecs, fetched: Option<&fetched::Vecs>, - starting_indexes: &Indexes, + market: &market::Vecs, + // Must take ownership as its indexes will be updated for this specific function + mut starting_indexes: Indexes, exit: &Exit, ) -> color_eyre::Result<()> { let indexer_vecs = indexer.vecs(); @@ -1096,7 +1215,7 @@ impl Vecs { let mut dateindex_to_first_height_iter = dateindex_to_first_height.into_iter(); let mut dateindex_to_height_count_iter = dateindex_to_height_count.into_iter(); - let mut flat_vecs_ = self.utxos_vecs.as_mut_vec(); + let mut separate_utxo_vecs = self.utxos_vecs.as_mut_separate_vecs(); let base_version = Version::ZERO + height_to_first_outputindex.version() @@ -1120,7 +1239,7 @@ impl Vecs { + dateindex_to_first_height.version() + dateindex_to_height_count.version(); - flat_vecs_ + separate_utxo_vecs .iter_mut() .try_for_each(|(_, v)| v.validate_computed_versions(base_version))?; self.height_to_unspendable_supply @@ -1135,7 +1254,7 @@ impl Vecs { let mut chain_state: Vec; let mut chain_state_starting_height = Height::from(self.chain_state.len()); - let stateful_starting_height = match flat_vecs_ + let stateful_starting_height = match separate_utxo_vecs .iter_mut() .map(|(_, v)| v.starting_height()) .min() @@ -1174,7 +1293,7 @@ impl Vecs { }; if stateful_starting_height.is_zero() { info!("Starting processing utxos from the start"); - flat_vecs_ + separate_utxo_vecs .iter_mut() .try_for_each(|(_, v)| v.state.price_to_amount.reset_partition())?; } @@ -1188,7 +1307,7 @@ impl Vecs { // INIT // --- - flat_vecs_ + separate_utxo_vecs .iter_mut() .for_each(|(_, v)| v.init(starting_height)); @@ -1208,14 +1327,16 @@ impl Vecs { Sats::ZERO }; - let mut height = Height::ZERO; - (starting_height.unwrap_to_usize()..height_to_first_outputindex_iter.len()) + let mut height = starting_height; + starting_indexes.update_from_height(height, indexes); + + (height.unwrap_to_usize()..height_to_first_outputindex_iter.len()) .map(Height::from) .try_for_each(|_height| -> color_eyre::Result<()> { height = _height; self.utxos_vecs - .as_mut_vec() + .as_mut_separate_vecs() .iter_mut() .for_each(|(_, v)| v.state.reset_single_iteration_values()); @@ -1383,9 +1504,9 @@ impl Vecs { panic!("temp, just making sure") } - let mut utxos_vecs = self.utxos_vecs.as_mut_vec(); + let mut separate_utxo_vecs = self.utxos_vecs.as_mut_separate_vecs(); - utxos_vecs + separate_utxo_vecs .iter_mut() .try_for_each(|(_, v)| v.forced_pushed_at(height, exit))?; @@ -1409,7 +1530,7 @@ impl Vecs { .as_mut() .map(|v| is_date_last_height.then(|| *v.unwrap_get_inner(dateindex))); - utxos_vecs.par_iter_mut().try_for_each(|(_, v)| { + separate_utxo_vecs.par_iter_mut().try_for_each(|(_, v)| { v.compute_then_force_push_unrealized_states( height, price, @@ -1419,10 +1540,10 @@ impl Vecs { ) })?; - if height != Height::ZERO && height.unwrap_to_usize() % 50_000 == 0 { + if height != Height::ZERO && height.unwrap_to_usize() % 20_000 == 0 { info!("Flushing..."); exit.block(); - self.flush_vecs(height, exit)?; + self.flush_states(height, &chain_state, exit)?; exit.release(); } @@ -1433,31 +1554,25 @@ impl Vecs { info!("Flushing..."); - self.flush_vecs(height, exit)?; + self.flush_states(height, &chain_state, exit)?; - // Save chain state - self.chain_state.truncate_if_needed(Height::ZERO)?; - mem::take(&mut chain_state) - .into_iter() - .for_each(|block_state| { - self.chain_state.push(block_state.supply); - }); - self.chain_state.flush()?; + self.utxos_vecs + .compute_overlaping_vecs(&starting_indexes, exit)?; info!("Computing rest..."); // Compute other vecs from height vecs self.utxos_vecs - .as_mut_vec() + .as_mut_vecs() .par_iter_mut() .try_for_each(|(_, v)| { - v.compute_rest(indexer, indexes, fetched, starting_indexes, exit) + v.compute_rest(indexer, indexes, fetched, &starting_indexes, market, exit) })?; self.indexes_to_unspendable_supply.compute_rest( indexer, indexes, fetched, - starting_indexes, + &starting_indexes, exit, Some(&self.height_to_unspendable_supply), )?; @@ -1465,7 +1580,7 @@ impl Vecs { indexer, indexes, fetched, - starting_indexes, + &starting_indexes, exit, Some(&self.height_to_opreturn_supply), )?; @@ -1475,14 +1590,25 @@ impl Vecs { Ok(()) } - fn flush_vecs(&mut self, height: Height, exit: &Exit) -> Result<()> { - // Flush rest of values + fn flush_states( + &mut self, + height: Height, + chain_state: &[BlockState], + exit: &Exit, + ) -> Result<()> { self.utxos_vecs - .as_mut_vec() + .as_mut_separate_vecs() .par_iter_mut() .try_for_each(|(_, v)| v.safe_flush_stateful_vecs(height, exit))?; self.height_to_unspendable_supply.safe_flush(exit)?; self.height_to_opreturn_supply.safe_flush(exit)?; + + self.chain_state.truncate_if_needed(Height::ZERO)?; + chain_state.iter().for_each(|block_state| { + self.chain_state.push(block_state.supply.clone()); + }); + self.chain_state.flush()?; + Ok(()) } diff --git a/crates/brk_computer/src/vecs/stateful/outputs.rs b/crates/brk_computer/src/vecs/stateful/outputs.rs index 54662da46..47fa7fcab 100644 --- a/crates/brk_computer/src/vecs/stateful/outputs.rs +++ b/crates/brk_computer/src/vecs/stateful/outputs.rs @@ -1,16 +1,20 @@ use std::{collections::BTreeMap, ops::ControlFlow}; -use brk_core::{CheckedSub, Dollars, HalvingEpoch, Height, Timestamp}; +use brk_core::{CheckedSub, Dollars, HalvingEpoch, Height, Result, Timestamp}; +use brk_exit::Exit; use brk_state::{BlockState, OutputFilter, Outputs, Transacted}; use brk_vec::StoredIndex; use rayon::prelude::*; +use crate::vecs::Indexes; + use super::cohort; pub trait OutputCohorts { fn tick_tock_next_block(&mut self, chain_state: &[BlockState], timestamp: Timestamp); fn send(&mut self, height_to_sent: BTreeMap, chain_state: &[BlockState]); fn receive(&mut self, received: Transacted, height: Height, price: Option); + fn compute_overlaping_vecs(&mut self, starting_indexes: &Indexes, exit: &Exit) -> Result<()>; } impl OutputCohorts for Outputs<(OutputFilter, cohort::Vecs)> { @@ -21,27 +25,12 @@ impl OutputCohorts for Outputs<(OutputFilter, cohort::Vecs)> { let prev_timestamp = chain_state.last().unwrap().timestamp; - self.by_term + self.by_date_range .as_mut_vec() .into_par_iter() - .chain(self.by_up_to.as_mut_vec()) - .chain(self.by_from.as_mut_vec()) - .chain(self.by_range.as_mut_vec()) .for_each(|(filter, v)| { let state = &mut v.state; - let mut check_days_old = |days_old: usize| -> bool { - match filter { - OutputFilter::From(from) => *from <= days_old, - OutputFilter::To(to) => *to > days_old, - OutputFilter::Range(range) => range.contains(&days_old), - OutputFilter::All - | OutputFilter::Epoch(_) - | OutputFilter::Size - | OutputFilter::Type(_) => unreachable!(), - } - }; - let _ = chain_state .iter() .try_for_each(|block_state| -> ControlFlow<()> { @@ -54,8 +43,8 @@ impl OutputCohorts for Outputs<(OutputFilter, cohort::Vecs)> { return ControlFlow::Continue(()); } - let is = check_days_old(days_old); - let was = check_days_old(prev_days_old); + let is = filter.contains(days_old); + let was = filter.contains(prev_days_old); if is && !was { state.increment(&block_state.supply, block_state.price); @@ -70,12 +59,9 @@ impl OutputCohorts for Outputs<(OutputFilter, cohort::Vecs)> { fn send(&mut self, height_to_sent: BTreeMap, chain_state: &[BlockState]) { let mut time_based_vecs = self - .by_term + .by_date_range .as_mut_vec() .into_iter() - .chain(self.by_up_to.as_mut_vec()) - .chain(self.by_from.as_mut_vec()) - .chain(self.by_range.as_mut_vec()) .chain(self.by_epoch.as_mut_vec()) .collect::>(); @@ -95,13 +81,6 @@ impl OutputCohorts for Outputs<(OutputFilter, cohort::Vecs)> { .as_second() >= 60 * 60; - self.all.1.state.send( - &sent.spendable_supply, - current_price, - prev_price, - older_than_hour, - ); - time_based_vecs .iter_mut() .filter(|(filter, _)| match filter { @@ -131,14 +110,16 @@ impl OutputCohorts for Outputs<(OutputFilter, cohort::Vecs)> { }, ); - sent.by_size.into_iter().for_each(|(group, supply_state)| { - self.by_size.get_mut(group).1.state.send( - &supply_state, - current_price, - prev_price, - older_than_hour, - ); - }); + sent.by_size_group + .into_iter() + .for_each(|(group, supply_state)| { + self.by_size_range.get_mut(group).1.state.send( + &supply_state, + current_price, + prev_price, + older_than_hour, + ); + }); }); } @@ -146,13 +127,10 @@ impl OutputCohorts for Outputs<(OutputFilter, cohort::Vecs)> { let supply_state = received.spendable_supply; [ - &mut self.all.1, - &mut self.by_term.short.1, + &mut self.by_date_range.start_to_1d.1, &mut self.by_epoch.mut_vec_from_height(height).1, - // Skip from and range as can't receive in the past ] .into_iter() - .chain(self.by_up_to.as_mut_vec().map(|(_, v)| v)) .for_each(|v| { v.state.receive(&supply_state, price); }); @@ -169,14 +147,105 @@ impl OutputCohorts for Outputs<(OutputFilter, cohort::Vecs)> { }); received - .by_size + .by_size_group .into_iter() .for_each(|(group, supply_state)| { - self.by_size + self.by_size_range .get_mut(group) .1 .state .receive(&supply_state, price); }); } + + fn compute_overlaping_vecs(&mut self, starting_indexes: &Indexes, exit: &Exit) -> Result<()> { + self.all + .1 + .compute_from_stateful(starting_indexes, &self.by_epoch.vecs(), exit)?; + + self.by_from_date + .as_mut_vec() + .into_iter() + .try_for_each(|(filter, vecs)| { + vecs.compute_from_stateful( + starting_indexes, + self.by_date_range + .as_vec() + .into_iter() + .filter(|(other, _)| filter.includes(other)) + .map(|(_, v)| v) + .collect::>() + .as_slice(), + exit, + ) + })?; + + self.by_up_to_date + .as_mut_vec() + .into_iter() + .try_for_each(|(filter, vecs)| { + vecs.compute_from_stateful( + starting_indexes, + self.by_date_range + .as_vec() + .into_iter() + .filter(|(other, _)| filter.includes(other)) + .map(|(_, v)| v) + .collect::>() + .as_slice(), + exit, + ) + })?; + + self.by_term + .as_mut_vec() + .into_iter() + .try_for_each(|(filter, vecs)| { + vecs.compute_from_stateful( + starting_indexes, + self.by_date_range + .as_vec() + .into_iter() + .filter(|(other, _)| filter.includes(other)) + .map(|(_, v)| v) + .collect::>() + .as_slice(), + exit, + ) + })?; + + self.by_up_to_size + .as_mut_vec() + .into_iter() + .try_for_each(|(filter, vecs)| { + vecs.compute_from_stateful( + starting_indexes, + self.by_date_range + .as_vec() + .into_iter() + .filter(|(other, _)| filter.includes(other)) + .map(|(_, v)| v) + .collect::>() + .as_slice(), + exit, + ) + })?; + + self.by_from_size + .as_mut_vec() + .into_iter() + .try_for_each(|(filter, vecs)| { + vecs.compute_from_stateful( + starting_indexes, + self.by_size_range + .as_vec() + .into_iter() + .filter(|(other, _)| filter.includes(other)) + .map(|(_, v)| v) + .collect::>() + .as_slice(), + exit, + ) + }) + } } diff --git a/crates/brk_computer/src/vecs/transactions.rs b/crates/brk_computer/src/vecs/transactions.rs index 423cc044e..f753246ab 100644 --- a/crates/brk_computer/src/vecs/transactions.rs +++ b/crates/brk_computer/src/vecs/transactions.rs @@ -7,8 +7,8 @@ use brk_core::{ use brk_exit::Exit; use brk_indexer::Indexer; use brk_vec::{ - AnyCollectableVec, AnyIterableVec, CloneableAnyIterableVec, Compressed, Computation, - ComputedVec, ComputedVecFrom1, ComputedVecFrom2, ComputedVecFrom3, StoredIndex, VecIterator, + AnyCollectableVec, AnyIterableVec, CloneableAnyIterableVec, Computation, ComputedVec, + ComputedVecFrom1, ComputedVecFrom2, ComputedVecFrom3, Format, StoredIndex, VecIterator, }; use super::{ @@ -93,7 +93,7 @@ impl Vecs { indexer: &Indexer, indexes: &indexes::Vecs, computation: Computation, - compressed: Compressed, + format: Format, fetched: Option<&fetched::Vecs>, ) -> color_eyre::Result { let compute_dollars = fetched.is_some(); @@ -105,7 +105,7 @@ impl Vecs { path, "value", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().inputindex_to_outputindex.boxed_clone(), indexer.vecs().outputindex_to_value.boxed_clone(), |index: InputIndex, inputindex_to_outputindex_iter, outputindex_to_value_iter| { @@ -132,7 +132,7 @@ impl Vecs { path, "weight", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().txindex_to_base_size.boxed_clone(), indexer.vecs().txindex_to_total_size.boxed_clone(), |index: TxIndex, txindex_to_base_size_iter, txindex_to_total_size_iter| { @@ -160,7 +160,7 @@ impl Vecs { path, "vsize", version + VERSION + Version::ZERO, - compressed, + format, txindex_to_weight.boxed_clone(), |index: TxIndex, iter| { let index = index.unwrap_to_usize(); @@ -177,7 +177,7 @@ impl Vecs { path, "is_coinbase", version + VERSION + Version::ZERO, - compressed, + format, indexes.txindex_to_height.boxed_clone(), indexer.vecs().height_to_first_txindex.boxed_clone(), |index: TxIndex, txindex_to_height_iter, height_to_first_txindex_iter| { @@ -201,7 +201,7 @@ impl Vecs { path, "input_value", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().txindex_to_first_inputindex.boxed_clone(), indexes.txindex_to_input_count.boxed_clone(), inputindex_to_value.boxed_clone(), @@ -238,7 +238,7 @@ impl Vecs { // "input_value", // true, // version + VERSION + Version::ZERO, - // compressed, + // format, // StorableVecGeneatorOptions::default() // .add_average() // .add_sum() @@ -250,7 +250,7 @@ impl Vecs { path, "output_value", version + VERSION + Version::ZERO, - compressed, + format, indexer.vecs().txindex_to_first_outputindex.boxed_clone(), indexes.txindex_to_output_count.boxed_clone(), indexer.vecs().outputindex_to_value.boxed_clone(), @@ -287,7 +287,7 @@ impl Vecs { // "output_value", // true, // version + VERSION + Version::ZERO, - // compressed, + // format, // StorableVecGeneatorOptions::default() // .add_average() // .add_sum() @@ -299,7 +299,7 @@ impl Vecs { path, "fee", version + VERSION + Version::ZERO, - compressed, + format, txindex_to_input_value.boxed_clone(), txindex_to_output_value.boxed_clone(), |txindex: TxIndex, input_iter, output_iter| { @@ -322,7 +322,7 @@ impl Vecs { path, "feerate", version + VERSION + Version::ZERO, - compressed, + format, txindex_to_fee.boxed_clone(), txindex_to_vsize.boxed_clone(), |txindex: TxIndex, fee_iter, vsize_iter| { @@ -343,7 +343,7 @@ impl Vecs { "tx_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -356,7 +356,7 @@ impl Vecs { "input_count", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -369,7 +369,7 @@ impl Vecs { "output_count", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -382,7 +382,7 @@ impl Vecs { "tx_v1", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_sum() .add_cumulative(), @@ -392,7 +392,7 @@ impl Vecs { "tx_v2", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_sum() .add_cumulative(), @@ -402,7 +402,7 @@ impl Vecs { "tx_v3", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_sum() .add_cumulative(), @@ -414,7 +414,7 @@ impl Vecs { Some(txindex_to_fee.boxed_clone()), version + VERSION + Version::ZERO, computation, - compressed, + format, fetched, StorableVecGeneatorOptions::default() .add_sum() @@ -428,7 +428,7 @@ impl Vecs { "feerate", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_percentiles() .add_minmax() @@ -439,7 +439,7 @@ impl Vecs { "tx_vsize", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_percentiles() .add_minmax() @@ -450,7 +450,7 @@ impl Vecs { "tx_weight", false, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_percentiles() .add_minmax() @@ -461,7 +461,7 @@ impl Vecs { "subsidy", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_percentiles() .add_sum() @@ -475,7 +475,7 @@ impl Vecs { "coinbase", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_sum() .add_cumulative() @@ -489,7 +489,7 @@ impl Vecs { "unclaimed_rewards", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_sum() .add_cumulative(), @@ -500,7 +500,7 @@ impl Vecs { "p2a_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -513,7 +513,7 @@ impl Vecs { "p2ms_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -526,7 +526,7 @@ impl Vecs { "p2pk33_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -539,7 +539,7 @@ impl Vecs { "p2pk65_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -552,7 +552,7 @@ impl Vecs { "p2pkh_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -565,7 +565,7 @@ impl Vecs { "p2sh_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -578,7 +578,7 @@ impl Vecs { "p2tr_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -591,7 +591,7 @@ impl Vecs { "p2wpkh_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -604,7 +604,7 @@ impl Vecs { "p2wsh_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -617,7 +617,7 @@ impl Vecs { "opreturn_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -630,7 +630,7 @@ impl Vecs { "unknownoutput_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -643,7 +643,7 @@ impl Vecs { "emptyoutput_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default() .add_average() .add_minmax() @@ -656,7 +656,7 @@ impl Vecs { "exact_utxo_count", true, version + VERSION + Version::ZERO, - compressed, + format, StorableVecGeneatorOptions::default().add_last(), )?, txindex_to_is_coinbase, diff --git a/crates/brk_core/src/structs/cents.rs b/crates/brk_core/src/structs/cents.rs index f526035a3..fa9d0245a 100644 --- a/crates/brk_core/src/structs/cents.rs +++ b/crates/brk_core/src/structs/cents.rs @@ -104,7 +104,7 @@ impl From for u128 { impl Mul for Cents { type Output = Cents; fn mul(self, rhs: Cents) -> Self::Output { - Self(self.0 * rhs.0) + Self(self.0.checked_mul(rhs.0).unwrap()) } } diff --git a/crates/brk_core/src/structs/dollars.rs b/crates/brk_core/src/structs/dollars.rs index 15c88d696..8afbb1263 100644 --- a/crates/brk_core/src/structs/dollars.rs +++ b/crates/brk_core/src/structs/dollars.rs @@ -11,7 +11,7 @@ use zerocopy_derive::{FromBytes, Immutable, IntoBytes, KnownLayout}; use crate::{CheckedSub, copy_first_8bytes}; -use super::{Bitcoin, Cents, Close, Sats, StoredF32, StoredF64}; +use super::{Bitcoin, Cents, Close, High, Sats, StoredF32, StoredF64}; #[derive( Debug, Default, Clone, Copy, Deref, FromBytes, Immutable, IntoBytes, KnownLayout, Serialize, @@ -63,6 +63,12 @@ impl From> for Dollars { } } +impl From> for Dollars { + fn from(value: High) -> Self { + Self(value.0) + } +} + impl From for Dollars { fn from(value: usize) -> Self { Self(value as f64) @@ -131,6 +137,27 @@ impl Div for Dollars { } } +impl Mul for Dollars { + type Output = Self; + fn mul(self, rhs: Dollars) -> Self::Output { + Self::from(Cents::from(self) * Cents::from(rhs)) + } +} + +impl Mul> for Dollars { + type Output = Self; + fn mul(self, rhs: Close) -> Self::Output { + Self::from(Cents::from(self) * Cents::from(*rhs)) + } +} + +impl Mul for Close { + type Output = Dollars; + fn mul(self, rhs: Dollars) -> Self::Output { + Dollars::from(Cents::from(*self) * Cents::from(rhs)) + } +} + impl Mul for Dollars { type Output = Self; fn mul(self, rhs: Bitcoin) -> Self::Output { @@ -138,6 +165,13 @@ impl Mul for Dollars { } } +impl Mul for Close { + type Output = Dollars; + fn mul(self, rhs: Bitcoin) -> Self::Output { + *self * Sats::from(rhs) + } +} + impl Mul for Dollars { type Output = Self; fn mul(self, rhs: Sats) -> Self::Output { @@ -186,6 +220,12 @@ impl From for Dollars { } } +impl From for Dollars { + fn from(value: StoredF64) -> Self { + Self(*value) + } +} + impl From> for u128 { fn from(value: Close) -> Self { u128::from(*value) diff --git a/crates/brk_core/src/structs/sats.rs b/crates/brk_core/src/structs/sats.rs index 555880824..ef2026d00 100644 --- a/crates/brk_core/src/structs/sats.rs +++ b/crates/brk_core/src/structs/sats.rs @@ -207,3 +207,10 @@ impl From for ByteView { Self::from(&value) } } + +impl Mul for usize { + type Output = Sats; + fn mul(self, rhs: Sats) -> Self::Output { + Self::Output::from(rhs.0 * self as u64) + } +} diff --git a/crates/brk_core/src/structs/version.rs b/crates/brk_core/src/structs/version.rs index e0907cc99..fa2451d8f 100644 --- a/crates/brk_core/src/structs/version.rs +++ b/crates/brk_core/src/structs/version.rs @@ -1,6 +1,7 @@ use std::{ fs, io::{self, Read}, + iter::Sum, ops::Add, path::Path, }; @@ -70,3 +71,9 @@ impl Add for Version { Self(self.0 + rhs.0) } } + +impl Sum for Version { + fn sum>(iter: I) -> Self { + iter.fold(Self::ZERO, Add::add) + } +} diff --git a/crates/brk_indexer/examples/main.rs b/crates/brk_indexer/examples/main.rs index 5b4ee1c3e..05cacfde1 100644 --- a/crates/brk_indexer/examples/main.rs +++ b/crates/brk_indexer/examples/main.rs @@ -4,6 +4,7 @@ use brk_core::default_bitcoin_path; use brk_exit::Exit; use brk_indexer::Indexer; use brk_parser::Parser; +use brk_vec::Format; fn main() -> color_eyre::Result<()> { color_eyre::install()?; @@ -24,7 +25,7 @@ fn main() -> color_eyre::Result<()> { let outputs = Path::new("../../_outputs"); - let mut indexer = Indexer::new(outputs, false, false)?; + let mut indexer = Indexer::new(outputs, Format::Raw, false)?; indexer.import_stores()?; indexer.import_vecs()?; diff --git a/crates/brk_indexer/src/lib.rs b/crates/brk_indexer/src/lib.rs index 6f0734af0..e403ece87 100644 --- a/crates/brk_indexer/src/lib.rs +++ b/crates/brk_indexer/src/lib.rs @@ -19,7 +19,7 @@ use brk_core::{ use bitcoin::{Transaction, TxIn, TxOut}; use brk_exit::Exit; use brk_parser::Parser; -use brk_vec::{AnyVec, Compressed, VecIterator}; +use brk_vec::{AnyVec, Format, VecIterator}; use color_eyre::eyre::{ContextCompat, eyre}; use fjall::TransactionalKeyspace; use log::{error, info}; @@ -42,13 +42,13 @@ pub struct Indexer { vecs: Option, stores: Option, check_collisions: bool, - compressed: Compressed, + format: Format, } impl Indexer { pub fn new( outputs_dir: &Path, - compressed: bool, + format: Format, check_collisions: bool, ) -> color_eyre::Result { setrlimit()?; @@ -56,7 +56,7 @@ impl Indexer { path: outputs_dir.to_owned(), vecs: None, stores: None, - compressed: Compressed::from(compressed), + format, check_collisions, }) } @@ -65,7 +65,7 @@ impl Indexer { self.vecs = Some(Vecs::forced_import( &self.path.join("vecs/indexed"), VERSION + Version::ZERO, - self.compressed, + self.format, )?); Ok(()) } @@ -120,6 +120,7 @@ impl Indexer { if starting_indexes.height > Height::try_from(rpc)? || end.is_some_and(|end| starting_indexes.height > end) { + info!("Up to date, nothing to index."); return Ok(starting_indexes); } diff --git a/crates/brk_indexer/src/vecs.rs b/crates/brk_indexer/src/vecs.rs index 28e60fc2d..8b4ab1071 100644 --- a/crates/brk_indexer/src/vecs.rs +++ b/crates/brk_indexer/src/vecs.rs @@ -8,7 +8,7 @@ use brk_core::{ StoredU32, StoredUsize, Timestamp, TxIndex, TxVersion, Txid, UnknownOutputIndex, Version, Weight, }; -use brk_vec::{AnyCollectableVec, AnyIndexedVec, Compressed, IndexedVec}; +use brk_vec::{AnyCollectableVec, AnyIndexedVec, Format, IndexedVec}; use rayon::prelude::*; use crate::Indexes; @@ -69,7 +69,7 @@ impl Vecs { pub fn forced_import( path: &Path, version: Version, - compressed: Compressed, + format: Format, ) -> color_eyre::Result { fs::create_dir_all(path)?; @@ -78,265 +78,265 @@ impl Vecs { path, "txindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_blockhash: IndexedVec::forced_import( path, "blockhash", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, height_to_difficulty: IndexedVec::forced_import( path, "difficulty", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_emptyoutputindex: IndexedVec::forced_import( path, "first_emptyoutputindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_inputindex: IndexedVec::forced_import( path, "first_inputindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_opreturnindex: IndexedVec::forced_import( path, "first_opreturnindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_outputindex: IndexedVec::forced_import( path, "first_outputindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_p2aindex: IndexedVec::forced_import( path, "first_p2aindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_p2msindex: IndexedVec::forced_import( path, "first_p2msindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_p2pk33index: IndexedVec::forced_import( path, "first_p2pk33index", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_p2pk65index: IndexedVec::forced_import( path, "first_p2pk65index", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_p2pkhindex: IndexedVec::forced_import( path, "first_p2pkhindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_p2shindex: IndexedVec::forced_import( path, "first_p2shindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_p2trindex: IndexedVec::forced_import( path, "first_p2trindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_p2wpkhindex: IndexedVec::forced_import( path, "first_p2wpkhindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_p2wshindex: IndexedVec::forced_import( path, "first_p2wshindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_txindex: IndexedVec::forced_import( path, "first_txindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_first_unknownoutputindex: IndexedVec::forced_import( path, "first_unknownoutputindex", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_timestamp: IndexedVec::forced_import( path, "timestamp", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_total_size: IndexedVec::forced_import( path, "total_size", version + VERSION + Version::ZERO, - compressed, + format, )?, height_to_weight: IndexedVec::forced_import( path, "weight", version + VERSION + Version::ZERO, - compressed, + format, )?, inputindex_to_outputindex: IndexedVec::forced_import( path, "outputindex", version + VERSION + Version::ZERO, - compressed, + format, )?, opreturnindex_to_txindex: IndexedVec::forced_import( path, "txindex", version + VERSION + Version::ZERO, - compressed, + format, )?, outputindex_to_outputtype: IndexedVec::forced_import( path, "outputtype", version + VERSION + Version::ZERO, - compressed, + format, )?, outputindex_to_outputtypeindex: IndexedVec::forced_import( path, "outputtypeindex", version + VERSION + Version::ZERO, - compressed, + format, )?, outputindex_to_value: IndexedVec::forced_import( path, "value", version + VERSION + Version::ZERO, - compressed, + format, )?, p2aindex_to_p2abytes: IndexedVec::forced_import( path, "p2abytes", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, p2msindex_to_txindex: IndexedVec::forced_import( path, "txindex", version + VERSION + Version::ZERO, - compressed, + format, )?, p2pk33index_to_p2pk33bytes: IndexedVec::forced_import( path, "p2pk33bytes", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, p2pk65index_to_p2pk65bytes: IndexedVec::forced_import( path, "p2pk65bytes", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, p2pkhindex_to_p2pkhbytes: IndexedVec::forced_import( path, "p2pkhbytes", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, p2shindex_to_p2shbytes: IndexedVec::forced_import( path, "p2shbytes", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, p2trindex_to_p2trbytes: IndexedVec::forced_import( path, "p2trbytes", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, p2wpkhindex_to_p2wpkhbytes: IndexedVec::forced_import( path, "p2wpkhbytes", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, p2wshindex_to_p2wshbytes: IndexedVec::forced_import( path, "p2wshbytes", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, txindex_to_base_size: IndexedVec::forced_import( path, "base_size", version + VERSION + Version::ZERO, - compressed, + format, )?, txindex_to_first_inputindex: IndexedVec::forced_import( path, "first_inputindex", version + VERSION + Version::ZERO, - compressed, + format, )?, txindex_to_first_outputindex: IndexedVec::forced_import( path, "first_outputindex", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, txindex_to_is_explicitly_rbf: IndexedVec::forced_import( path, "is_explicitly_rbf", version + VERSION + Version::ZERO, - compressed, + format, )?, txindex_to_rawlocktime: IndexedVec::forced_import( path, "rawlocktime", version + VERSION + Version::ZERO, - compressed, + format, )?, txindex_to_total_size: IndexedVec::forced_import( path, "total_size", version + VERSION + Version::ZERO, - compressed, + format, )?, txindex_to_txid: IndexedVec::forced_import( path, "txid", version + VERSION + Version::ZERO, - Compressed::NO, + Format::Raw, )?, txindex_to_txversion: IndexedVec::forced_import( path, "txversion", version + VERSION + Version::ZERO, - compressed, + format, )?, unknownoutputindex_to_txindex: IndexedVec::forced_import( path, "txindex", version + VERSION + Version::ZERO, - compressed, + format, )?, }) } diff --git a/crates/brk_query/examples/main.rs b/crates/brk_query/examples/main.rs index 4504fa243..cbf633828 100644 --- a/crates/brk_query/examples/main.rs +++ b/crates/brk_query/examples/main.rs @@ -3,19 +3,19 @@ use std::path::Path; use brk_computer::Computer; use brk_indexer::Indexer; use brk_query::{Index, Query}; -use brk_vec::Computation; +use brk_vec::{Computation, Format}; pub fn main() -> color_eyre::Result<()> { color_eyre::install()?; let outputs_dir = Path::new("../../_outputs"); - let compressed = true; + let format = Format::Compressed; - let mut indexer = Indexer::new(outputs_dir, compressed, true)?; + let mut indexer = Indexer::new(outputs_dir, format, true)?; indexer.import_vecs()?; - let mut computer = Computer::new(outputs_dir, None, compressed); + let mut computer = Computer::new(outputs_dir, None, format); computer.import_vecs(&indexer, Computation::Lazy)?; let query = Query::build(&indexer, &computer); diff --git a/crates/brk_query/src/vec_trees.rs b/crates/brk_query/src/vec_trees.rs index 01911e57e..38c2ce1eb 100644 --- a/crates/brk_query/src/vec_trees.rs +++ b/crates/brk_query/src/vec_trees.rs @@ -20,10 +20,17 @@ impl<'a> VecTrees<'a> { && !(split.len() == 3 && split.get(1).is_some_and(|s| { s == &"up" + || s == &"start" + || s.ends_with("relative") || s.starts_with("from") || s == &"cumulative_up" || s.starts_with("cumulative_from") })) + && !(split.len() == 4 + && split + .get(1) + .is_some_and(|s| s == &"up" || s == &"start" || s.starts_with("from")) + && split.get(2).is_some_and(|s| s.ends_with("relative"))) { dbg!(&name, &split); panic!(); diff --git a/crates/brk_server/examples/main.rs b/crates/brk_server/examples/main.rs index 20bab17ce..68a1c93b4 100644 --- a/crates/brk_server/examples/main.rs +++ b/crates/brk_server/examples/main.rs @@ -8,7 +8,7 @@ use brk_fetcher::Fetcher; use brk_indexer::Indexer; use brk_parser::Parser; use brk_server::{Server, Website}; -use brk_vec::Computation; +use brk_vec::{Computation, Format}; pub fn main() -> color_eyre::Result<()> { color_eyre::install()?; @@ -29,15 +29,15 @@ pub fn main() -> color_eyre::Result<()> { let outputs_dir = Path::new("../../_outputs"); - let compressed = true; + let format = Format::Compressed; - let mut indexer = Indexer::new(outputs_dir, compressed, true)?; + let mut indexer = Indexer::new(outputs_dir, format, true)?; indexer.import_stores()?; indexer.import_vecs()?; let fetcher = Some(Fetcher::import(None)?); - let mut computer = Computer::new(outputs_dir, fetcher, compressed); + let mut computer = Computer::new(outputs_dir, fetcher, format); computer.import_stores(&indexer)?; computer.import_vecs(&indexer, Computation::Lazy)?; diff --git a/crates/brk_state/src/outputs/by_range.rs b/crates/brk_state/src/outputs/by_date_range.rs similarity index 65% rename from crates/brk_state/src/outputs/by_range.rs rename to crates/brk_state/src/outputs/by_date_range.rs index a616b24af..fb75164d1 100644 --- a/crates/brk_state/src/outputs/by_range.rs +++ b/crates/brk_state/src/outputs/by_date_range.rs @@ -1,7 +1,8 @@ use super::OutputFilter; #[derive(Default, Clone)] -pub struct OutputsByRange { +pub struct OutputsByDateRange { + pub start_to_1d: T, pub _1d_to_1w: T, pub _1w_to_1m: T, pub _1m_to_3m: T, @@ -14,11 +15,13 @@ pub struct OutputsByRange { pub _5y_to_7y: T, pub _7y_to_10y: T, pub _10y_to_15y: T, + pub _15y_to_end: T, } -impl From> for OutputsByRange<(OutputFilter, T)> { - fn from(value: OutputsByRange) -> Self { +impl From> for OutputsByDateRange<(OutputFilter, T)> { + fn from(value: OutputsByDateRange) -> Self { Self { + start_to_1d: (OutputFilter::To(1), value.start_to_1d), _1d_to_1w: (OutputFilter::Range(1..7), value._1d_to_1w), _1w_to_1m: (OutputFilter::Range(7..30), value._1w_to_1m), _1m_to_3m: (OutputFilter::Range(30..3 * 30), value._1m_to_3m), @@ -31,13 +34,34 @@ impl From> for OutputsByRange<(OutputFilter, T)> { _5y_to_7y: (OutputFilter::Range(5 * 365..7 * 365), value._5y_to_7y), _7y_to_10y: (OutputFilter::Range(7 * 365..10 * 365), value._7y_to_10y), _10y_to_15y: (OutputFilter::Range(10 * 365..15 * 365), value._10y_to_15y), + _15y_to_end: (OutputFilter::From(15 * 365), value._15y_to_end), } } } -impl OutputsByRange { - pub fn as_mut_vec(&mut self) -> [&mut T; 12] { +impl OutputsByDateRange { + pub fn as_vec(&mut self) -> [&T; 14] { [ + &self.start_to_1d, + &self._1d_to_1w, + &self._1w_to_1m, + &self._1m_to_3m, + &self._3m_to_6m, + &self._6m_to_1y, + &self._1y_to_2y, + &self._2y_to_3y, + &self._3y_to_4y, + &self._4y_to_5y, + &self._5y_to_7y, + &self._7y_to_10y, + &self._10y_to_15y, + &self._15y_to_end, + ] + } + + pub fn as_mut_vec(&mut self) -> [&mut T; 14] { + [ + &mut self.start_to_1d, &mut self._1d_to_1w, &mut self._1w_to_1m, &mut self._1m_to_3m, @@ -50,13 +74,15 @@ impl OutputsByRange { &mut self._5y_to_7y, &mut self._7y_to_10y, &mut self._10y_to_15y, + &mut self._15y_to_end, ] } } -impl OutputsByRange<(OutputFilter, T)> { - pub fn vecs(&self) -> [&T; 12] { +impl OutputsByDateRange<(OutputFilter, T)> { + pub fn vecs(&self) -> [&T; 14] { [ + &self.start_to_1d.1, &self._1d_to_1w.1, &self._1w_to_1m.1, &self._1m_to_3m.1, @@ -69,6 +95,7 @@ impl OutputsByRange<(OutputFilter, T)> { &self._5y_to_7y.1, &self._7y_to_10y.1, &self._10y_to_15y.1, + &self._15y_to_end.1, ] } } diff --git a/crates/brk_state/src/outputs/by_from.rs b/crates/brk_state/src/outputs/by_from_date.rs similarity index 91% rename from crates/brk_state/src/outputs/by_from.rs rename to crates/brk_state/src/outputs/by_from_date.rs index 929eb43ca..e590c4ead 100644 --- a/crates/brk_state/src/outputs/by_from.rs +++ b/crates/brk_state/src/outputs/by_from_date.rs @@ -1,7 +1,7 @@ use super::OutputFilter; #[derive(Default, Clone)] -pub struct OutputsByFrom { +pub struct OutputsByFromDate { pub _1d: T, pub _1w: T, pub _1m: T, @@ -22,7 +22,7 @@ pub struct OutputsByFrom { pub _15y: T, } -impl OutputsByFrom { +impl OutputsByFromDate { pub fn as_mut_vec(&mut self) -> [&mut T; 18] { [ &mut self._1d, @@ -47,7 +47,7 @@ impl OutputsByFrom { } } -impl OutputsByFrom<(OutputFilter, T)> { +impl OutputsByFromDate<(OutputFilter, T)> { pub fn vecs(&self) -> [&T; 18] { [ &self._1d.1, @@ -72,8 +72,8 @@ impl OutputsByFrom<(OutputFilter, T)> { } } -impl From> for OutputsByFrom<(OutputFilter, T)> { - fn from(value: OutputsByFrom) -> Self { +impl From> for OutputsByFromDate<(OutputFilter, T)> { + fn from(value: OutputsByFromDate) -> Self { Self { _1d: (OutputFilter::From(1), value._1d), _1w: (OutputFilter::From(7), value._1w), diff --git a/crates/brk_state/src/outputs/by_from_size.rs b/crates/brk_state/src/outputs/by_from_size.rs new file mode 100644 index 000000000..27d980d85 --- /dev/null +++ b/crates/brk_state/src/outputs/by_from_size.rs @@ -0,0 +1,50 @@ +use brk_core::Sats; + +use super::OutputFilter; + +#[derive(Default, Clone)] +pub struct OutputsByFromSize { + pub _1_000sats: T, + pub _1btc: T, + pub _10btc: T, + pub _100btc: T, +} + +impl OutputsByFromSize { + pub fn as_mut_vec(&mut self) -> [&mut T; 4] { + [ + &mut self._1_000sats, + &mut self._1btc, + &mut self._10btc, + &mut self._100btc, + ] + } +} + +impl OutputsByFromSize<(OutputFilter, T)> { + pub fn vecs(&self) -> [&T; 4] { + [ + &self._1_000sats.1, + &self._1btc.1, + &self._10btc.1, + &self._100btc.1, + ] + } +} + +impl From> for OutputsByFromSize<(OutputFilter, T)> { + fn from(value: OutputsByFromSize) -> Self { + Self { + _1_000sats: (OutputFilter::From(1_000), value._1_000sats), + _1btc: (OutputFilter::From(usize::from(Sats::ONE_BTC)), value._1btc), + _10btc: ( + OutputFilter::From(usize::from(10 * Sats::ONE_BTC)), + value._10btc, + ), + _100btc: ( + OutputFilter::From(usize::from(100 * Sats::ONE_BTC)), + value._100btc, + ), + } + } +} diff --git a/crates/brk_state/src/outputs/by_size.rs b/crates/brk_state/src/outputs/by_size_range.rs similarity index 67% rename from crates/brk_state/src/outputs/by_size.rs rename to crates/brk_state/src/outputs/by_size_range.rs index 085d1a211..0d376acf9 100644 --- a/crates/brk_state/src/outputs/by_size.rs +++ b/crates/brk_state/src/outputs/by_size_range.rs @@ -1,8 +1,8 @@ use super::OutputFilter; #[derive(Default, Clone)] -pub struct OutputsBySize { - pub _0sat: T, +pub struct OutputsBySizeRange { + pub _0sats: T, pub from_1sat_to_10sats: T, pub from_10sats_to_100sats: T, pub from_100sats_to_1_000sats: T, @@ -19,94 +19,70 @@ pub struct OutputsBySize { pub from_100_000btc: T, } -impl From> for OutputsBySize<(OutputFilter, T)> { - fn from(value: OutputsBySize) -> Self { +impl From> for OutputsBySizeRange<(OutputFilter, T)> { + fn from(value: OutputsBySizeRange) -> Self { #[allow(clippy::inconsistent_digit_grouping)] Self { - _0sat: ( - // OutputFilter::Zero, - OutputFilter::Size, - value._0sat, - ), - from_1sat_to_10sats: ( - // OutputFilter::Size(Sats::new(1)..Sats::new(10)), - OutputFilter::Size, - value.from_1sat_to_10sats, - ), - from_10sats_to_100sats: ( - // OutputFilter::Size(Sats::new(10)..Sats::new(100)), - OutputFilter::Size, - value.from_10sats_to_100sats, - ), + _0sats: (OutputFilter::To(1), value._0sats), + from_1sat_to_10sats: (OutputFilter::Range(1..10), value.from_1sat_to_10sats), + from_10sats_to_100sats: (OutputFilter::Range(10..100), value.from_10sats_to_100sats), from_100sats_to_1_000sats: ( - // OutputFilter::Size(Sats::new(100)..Sats::new(1_000)), - OutputFilter::Size, + OutputFilter::Range(100..1_000), value.from_100sats_to_1_000sats, ), from_1_000sats_to_10_000sats: ( - // OutputFilter::Size(Sats::new(1_000)..Sats::new(10_000)), - OutputFilter::Size, + OutputFilter::Range(1_000..10_000), value.from_1_000sats_to_10_000sats, ), from_10_000sats_to_100_000sats: ( - // OutputFilter::Size(Sats::new(10_000)..Sats::new(100_000)), - OutputFilter::Size, + OutputFilter::Range(10_000..100_000), value.from_10_000sats_to_100_000sats, ), from_100_000sats_to_1_000_000sats: ( - // OutputFilter::Size(Sats::new(100_000)..Sats::new(1_000_000)), - OutputFilter::Size, + OutputFilter::Range(100_000..1_000_000), value.from_100_000sats_to_1_000_000sats, ), from_1_000_000sats_to_10_000_000sats: ( - // OutputFilter::Size(Sats::new(1_000_000)..Sats::new(10_000_000)), - OutputFilter::Size, + OutputFilter::Range(1_000_000..10_000_000), value.from_1_000_000sats_to_10_000_000sats, ), from_10_000_000sats_to_1btc: ( - // OutputFilter::Size(Sats::new(10_000_000)..Sats::new(1_00_000_000)), - OutputFilter::Size, + OutputFilter::Range(10_000_000..1_00_000_000), value.from_10_000_000sats_to_1btc, ), from_1btc_to_10btc: ( - // OutputFilter::Size(Sats::new(1_00_000_000)..Sats::new(10_00_000_000)), - OutputFilter::Size, + OutputFilter::Range(1_00_000_000..10_00_000_000), value.from_1btc_to_10btc, ), from_10btc_to_100btc: ( - // OutputFilter::Size(Sats::new(10_00_000_000)..Sats::new(100_00_000_000)), - OutputFilter::Size, + OutputFilter::Range(10_00_000_000..100_00_000_000), value.from_10btc_to_100btc, ), from_100btc_to_1_000btc: ( - // OutputFilter::Size(Sats::new(100_00_000_000)..Sats::new(1_000_00_000_000)), - OutputFilter::Size, + OutputFilter::Range(100_00_000_000..1_000_00_000_000), value.from_100btc_to_1_000btc, ), from_1_000btc_to_10_000btc: ( - // OutputFilter::Size(Sats::new(1_000_00_000_000)..Sats::new(10_000_00_000_000)), - OutputFilter::Size, + OutputFilter::Range(1_000_00_000_000..10_000_00_000_000), value.from_1_000btc_to_10_000btc, ), from_10_000btc_to_100_000btc: ( - // OutputFilter::Size(Sats::new(10_000_00_000_000)..Sats::new(100_000_00_000_000)), - OutputFilter::Size, + OutputFilter::Range(10_000_00_000_000..100_000_00_000_000), value.from_10_000btc_to_100_000btc, ), from_100_000btc: ( - // OutputFilter::Size(Sats::new(100_000_00_000_000)..Sats::MAX), - OutputFilter::Size, + OutputFilter::From(100_000_00_000_000), value.from_100_000btc, ), } } } -impl OutputsBySize { +impl OutputsBySizeRange { #[allow(clippy::inconsistent_digit_grouping)] pub fn get_mut(&mut self, group: usize) -> &mut T { if group == 0 { - &mut self._0sat + &mut self._0sats } else if group == 1 { &mut self.from_1sat_to_10sats } else if group == 10 { @@ -138,9 +114,29 @@ impl OutputsBySize { } } + pub fn as_vec(&self) -> [&T; 15] { + [ + &self._0sats, + &self.from_1sat_to_10sats, + &self.from_10sats_to_100sats, + &self.from_100sats_to_1_000sats, + &self.from_1_000sats_to_10_000sats, + &self.from_10_000sats_to_100_000sats, + &self.from_100_000sats_to_1_000_000sats, + &self.from_1_000_000sats_to_10_000_000sats, + &self.from_10_000_000sats_to_1btc, + &self.from_1btc_to_10btc, + &self.from_10btc_to_100btc, + &self.from_100btc_to_1_000btc, + &self.from_1_000btc_to_10_000btc, + &self.from_10_000btc_to_100_000btc, + &self.from_100_000btc, + ] + } + pub fn as_mut_vec(&mut self) -> [&mut T; 15] { [ - &mut self._0sat, + &mut self._0sats, &mut self.from_1sat_to_10sats, &mut self.from_10sats_to_100sats, &mut self.from_100sats_to_1_000sats, @@ -159,10 +155,10 @@ impl OutputsBySize { } } -impl OutputsBySize<(OutputFilter, T)> { +impl OutputsBySizeRange<(OutputFilter, T)> { pub fn vecs(&self) -> [&T; 15] { [ - &self._0sat.1, + &self._0sats.1, &self.from_1sat_to_10sats.1, &self.from_10sats_to_100sats.1, &self.from_100sats_to_1_000sats.1, diff --git a/crates/brk_state/src/outputs/by_term.rs b/crates/brk_state/src/outputs/by_term.rs index 72dbdd2ad..b10c2359b 100644 --- a/crates/brk_state/src/outputs/by_term.rs +++ b/crates/brk_state/src/outputs/by_term.rs @@ -21,8 +21,8 @@ impl OutputsByTerm<(OutputFilter, T)> { impl From> for OutputsByTerm<(OutputFilter, T)> { fn from(value: OutputsByTerm) -> Self { Self { - long: (OutputFilter::From(155), value.long), - short: (OutputFilter::To(155), value.short), + long: (OutputFilter::From(150), value.long), + short: (OutputFilter::To(150), value.short), } } } diff --git a/crates/brk_state/src/outputs/by_up_to.rs b/crates/brk_state/src/outputs/by_up_to_date.rs similarity index 91% rename from crates/brk_state/src/outputs/by_up_to.rs rename to crates/brk_state/src/outputs/by_up_to_date.rs index 9deefdc6c..e28ecd0bb 100644 --- a/crates/brk_state/src/outputs/by_up_to.rs +++ b/crates/brk_state/src/outputs/by_up_to_date.rs @@ -1,7 +1,7 @@ use super::OutputFilter; #[derive(Default, Clone)] -pub struct OutputsByUpTo { +pub struct OutputsByUpToDate { pub _1d: T, pub _1w: T, pub _1m: T, @@ -22,7 +22,7 @@ pub struct OutputsByUpTo { pub _15y: T, } -impl OutputsByUpTo { +impl OutputsByUpToDate { pub fn as_mut_vec(&mut self) -> [&mut T; 18] { [ &mut self._1d, @@ -47,7 +47,7 @@ impl OutputsByUpTo { } } -impl OutputsByUpTo<(OutputFilter, T)> { +impl OutputsByUpToDate<(OutputFilter, T)> { pub fn vecs(&self) -> [&T; 18] { [ &self._1d.1, @@ -72,8 +72,8 @@ impl OutputsByUpTo<(OutputFilter, T)> { } } -impl From> for OutputsByUpTo<(OutputFilter, T)> { - fn from(value: OutputsByUpTo) -> Self { +impl From> for OutputsByUpToDate<(OutputFilter, T)> { + fn from(value: OutputsByUpToDate) -> Self { Self { _1d: (OutputFilter::To(1), value._1d), _1w: (OutputFilter::To(7), value._1w), diff --git a/crates/brk_state/src/outputs/by_up_to_size.rs b/crates/brk_state/src/outputs/by_up_to_size.rs new file mode 100644 index 000000000..5987ee28f --- /dev/null +++ b/crates/brk_state/src/outputs/by_up_to_size.rs @@ -0,0 +1,54 @@ +use brk_core::Sats; + +use super::OutputFilter; + +#[derive(Default, Clone)] +pub struct OutputsByUpToSize { + pub _1_000sats: T, + pub _10_000sats: T, + pub _1btc: T, + pub _10btc: T, + pub _100btc: T, +} + +impl OutputsByUpToSize { + pub fn as_mut_vec(&mut self) -> [&mut T; 5] { + [ + &mut self._1_000sats, + &mut self._10_000sats, + &mut self._1btc, + &mut self._10btc, + &mut self._100btc, + ] + } +} + +impl OutputsByUpToSize<(OutputFilter, T)> { + pub fn vecs(&self) -> [&T; 5] { + [ + &self._1_000sats.1, + &self._10_000sats.1, + &self._1btc.1, + &self._10btc.1, + &self._100btc.1, + ] + } +} + +impl From> for OutputsByUpToSize<(OutputFilter, T)> { + fn from(value: OutputsByUpToSize) -> Self { + Self { + _1_000sats: (OutputFilter::To(1_000), value._1_000sats), + _10_000sats: (OutputFilter::To(10_000), value._10_000sats), + _1btc: (OutputFilter::To(usize::from(Sats::ONE_BTC)), value._1btc), + _10btc: ( + OutputFilter::To(usize::from(10 * Sats::ONE_BTC)), + value._10btc, + ), + _100btc: ( + OutputFilter::To(usize::from(100 * Sats::ONE_BTC)), + value._100btc, + ), + } + } +} diff --git a/crates/brk_state/src/outputs/filter.rs b/crates/brk_state/src/outputs/filter.rs index a2ff8811a..3812c3955 100644 --- a/crates/brk_state/src/outputs/filter.rs +++ b/crates/brk_state/src/outputs/filter.rs @@ -8,7 +8,44 @@ pub enum OutputFilter { To(usize), Range(Range), From(usize), - Size, Epoch(HalvingEpoch), Type(OutputType), } + +impl OutputFilter { + pub fn contains(&self, value: usize) -> bool { + match self { + OutputFilter::All => true, + OutputFilter::To(to) => *to > value, + OutputFilter::From(from) => *from <= value, + OutputFilter::Range(r) => r.contains(&value), + OutputFilter::Epoch(_) => false, + OutputFilter::Type(_) => false, + } + } + + pub fn includes(&self, other: &OutputFilter) -> bool { + match self { + OutputFilter::All => true, + OutputFilter::To(to) => match other { + OutputFilter::All => false, + OutputFilter::To(to2) => to >= to2, + OutputFilter::Range(range) => range.end <= *to, + OutputFilter::From(_) => true, + OutputFilter::Epoch(_) => false, + OutputFilter::Type(_) => false, + }, + OutputFilter::From(from) => match other { + OutputFilter::All => false, + OutputFilter::To(_) => false, + OutputFilter::Range(range) => range.start >= *from, + OutputFilter::From(from2) => from <= from2, + OutputFilter::Epoch(_) => false, + OutputFilter::Type(_) => false, + }, + OutputFilter::Range(_) => false, + OutputFilter::Epoch(_) => false, + OutputFilter::Type(_) => false, + } + } +} diff --git a/crates/brk_state/src/outputs/mod.rs b/crates/brk_state/src/outputs/mod.rs index 8484b7018..fa0514a95 100644 --- a/crates/brk_state/src/outputs/mod.rs +++ b/crates/brk_state/src/outputs/mod.rs @@ -1,53 +1,83 @@ +mod by_date_range; mod by_epoch; -mod by_from; -mod by_range; -mod by_size; +mod by_from_date; +mod by_from_size; +mod by_size_range; mod by_spendable_type; mod by_term; mod by_type; mod by_unspendable_type; -mod by_up_to; +mod by_up_to_date; +mod by_up_to_size; // mod by_value; mod filter; +pub use by_date_range::*; pub use by_epoch::*; -pub use by_from::*; -pub use by_range::*; -pub use by_size::*; +pub use by_from_date::*; +pub use by_from_size::*; +pub use by_size_range::*; pub use by_spendable_type::*; pub use by_term::*; pub use by_type::*; pub use by_unspendable_type::*; -pub use by_up_to::*; +pub use by_up_to_date::*; +pub use by_up_to_size::*; // pub use by_value::*; pub use filter::*; #[derive(Default, Clone)] pub struct Outputs { pub all: T, - pub by_term: OutputsByTerm, - pub by_up_to: OutputsByUpTo, - pub by_from: OutputsByFrom, - pub by_range: OutputsByRange, + pub by_date_range: OutputsByDateRange, pub by_epoch: OutputsByEpoch, + pub by_from_date: OutputsByFromDate, + pub by_from_size: OutputsByFromSize, + pub by_size_range: OutputsBySizeRange, + pub by_term: OutputsByTerm, pub by_type: OutputsBySpendableType, - pub by_size: OutputsBySize, - // // Needs whole UTXO set, TODO later - // // pub by_value: OutputsByValue, + pub by_up_to_date: OutputsByUpToDate, + pub by_up_to_size: OutputsByUpToSize, + // Needs whole UTXO set, TODO later + // pub by_value: OutputsByValue, } impl Outputs { - pub fn as_mut_vec(&mut self) -> Vec<&mut T> { + pub fn as_mut_vecs(&mut self) -> Vec<&mut T> { [&mut self.all] .into_iter() .chain(self.by_term.as_mut_vec()) - .chain(self.by_up_to.as_mut_vec()) - .chain(self.by_from.as_mut_vec()) - .chain(self.by_range.as_mut_vec()) + .chain(self.by_up_to_date.as_mut_vec()) + .chain(self.by_from_date.as_mut_vec()) + .chain(self.by_from_size.as_mut_vec()) + .chain(self.by_date_range.as_mut_vec()) .chain(self.by_epoch.as_mut_vec()) - .chain(self.by_size.as_mut_vec()) + .chain(self.by_size_range.as_mut_vec()) + .chain(self.by_up_to_size.as_mut_vec()) .chain(self.by_type.as_mut_vec()) - // // .chain(self.by_value.as_mut_vec()) + // .chain(self.by_value.as_mut_vec()) + .collect::>() + } + + pub fn as_mut_separate_vecs(&mut self) -> Vec<&mut T> { + self.by_date_range + .as_mut_vec() + .into_iter() + .chain(self.by_epoch.as_mut_vec()) + .chain(self.by_size_range.as_mut_vec()) + .chain(self.by_type.as_mut_vec()) + // .chain(self.by_value.as_mut_vec()) + .collect::>() + } + + pub fn as_mut_overlaping_vecs(&mut self) -> Vec<&mut T> { + [&mut self.all] + .into_iter() + .chain(self.by_term.as_mut_vec()) + .chain(self.by_up_to_date.as_mut_vec()) + .chain(self.by_from_date.as_mut_vec()) + .chain(self.by_up_to_size.as_mut_vec()) + .chain(self.by_from_size.as_mut_vec()) .collect::>() } } @@ -57,13 +87,15 @@ impl Outputs<(OutputFilter, T)> { [&self.all.1] .into_iter() .chain(self.by_term.vecs()) - .chain(self.by_up_to.vecs()) - .chain(self.by_from.vecs()) - .chain(self.by_range.vecs()) + .chain(self.by_up_to_date.vecs()) + .chain(self.by_from_date.vecs()) + .chain(self.by_date_range.vecs()) .chain(self.by_epoch.vecs()) - .chain(self.by_size.vecs()) - // // .chain(self.by_value.vecs()) + .chain(self.by_size_range.vecs()) .chain(self.by_type.vecs()) + .chain(self.by_up_to_size.vecs()) + .chain(self.by_from_size.vecs()) + // .chain(self.by_value.vecs()) .collect::>() } } @@ -73,13 +105,15 @@ impl From> for Outputs<(OutputFilter, T)> { Self { all: (OutputFilter::All, value.all), by_term: OutputsByTerm::from(value.by_term), - by_up_to: OutputsByUpTo::from(value.by_up_to), - by_from: OutputsByFrom::from(value.by_from), - by_range: OutputsByRange::from(value.by_range), + by_up_to_date: OutputsByUpToDate::from(value.by_up_to_date), + by_from_date: OutputsByFromDate::from(value.by_from_date), + by_date_range: OutputsByDateRange::from(value.by_date_range), by_epoch: OutputsByEpoch::from(value.by_epoch), - by_size: OutputsBySize::from(value.by_size), - // // Needs whole UTXO set, TODO later - // // by_value: OutputsByValue, + by_size_range: OutputsBySizeRange::from(value.by_size_range), + by_up_to_size: OutputsByUpToSize::from(value.by_up_to_size), + by_from_size: OutputsByFromSize::from(value.by_from_size), + // Needs whole UTXO set, TODO later + // by_value: OutputsByValue, by_type: OutputsBySpendableType::from(value.by_type), } } diff --git a/crates/brk_state/src/transacted.rs b/crates/brk_state/src/transacted.rs index ec8915234..620f91f69 100644 --- a/crates/brk_state/src/transacted.rs +++ b/crates/brk_state/src/transacted.rs @@ -12,7 +12,7 @@ use super::{OutputsByType, SupplyState}; pub struct Transacted { pub spendable_supply: SupplyState, pub by_type: OutputsByType, - pub by_size: BTreeMap, + pub by_size_group: BTreeMap, } impl Transacted { @@ -32,35 +32,35 @@ impl Transacted { // Need to be in sync with by_size !! but plenty fast (I think) if _value == 0 { - *self.by_size.entry(0).or_default() += &supply; + *self.by_size_group.entry(0).or_default() += &supply; } else if _value < 10 { - *self.by_size.entry(1).or_default() += &supply; + *self.by_size_group.entry(1).or_default() += &supply; } else if _value < 100 { - *self.by_size.entry(10).or_default() += &supply; + *self.by_size_group.entry(10).or_default() += &supply; } else if _value < 1_000 { - *self.by_size.entry(100).or_default() += &supply; + *self.by_size_group.entry(100).or_default() += &supply; } else if _value < 10_000 { - *self.by_size.entry(1_000).or_default() += &supply; + *self.by_size_group.entry(1_000).or_default() += &supply; } else if _value < 100_000 { - *self.by_size.entry(10_000).or_default() += &supply; + *self.by_size_group.entry(10_000).or_default() += &supply; } else if _value < 1_000_000 { - *self.by_size.entry(100_000).or_default() += &supply; + *self.by_size_group.entry(100_000).or_default() += &supply; } else if _value < 10_000_000 { - *self.by_size.entry(1_000_000).or_default() += &supply; + *self.by_size_group.entry(1_000_000).or_default() += &supply; } else if _value < 1_00_000_000 { - *self.by_size.entry(10_000_000).or_default() += &supply; + *self.by_size_group.entry(10_000_000).or_default() += &supply; } else if _value < 10_00_000_000 { - *self.by_size.entry(1_00_000_000).or_default() += &supply; + *self.by_size_group.entry(1_00_000_000).or_default() += &supply; } else if _value < 100_00_000_000 { - *self.by_size.entry(10_00_000_000).or_default() += &supply; + *self.by_size_group.entry(10_00_000_000).or_default() += &supply; } else if _value < 1_000_00_000_000 { - *self.by_size.entry(100_00_000_000).or_default() += &supply; + *self.by_size_group.entry(100_00_000_000).or_default() += &supply; } else if _value < 10_000_00_000_000 { - *self.by_size.entry(1_000_00_000_000).or_default() += &supply; + *self.by_size_group.entry(1_000_00_000_000).or_default() += &supply; } else if _value < 100_000_00_000_000 { - *self.by_size.entry(10_000_00_000_000).or_default() += &supply; + *self.by_size_group.entry(10_000_00_000_000).or_default() += &supply; } else { - *self.by_size.entry(100_000_00_000_000).or_default() += &supply; + *self.by_size_group.entry(100_000_00_000_000).or_default() += &supply; } } @@ -86,14 +86,15 @@ impl Add for Transacted { Self { spendable_supply: self.spendable_supply + rhs.spendable_supply, by_type: self.by_type + rhs.by_type, - by_size: Self::merge_by_size(self.by_size, rhs.by_size), + by_size_group: Self::merge_by_size(self.by_size_group, rhs.by_size_group), } } } impl AddAssign for Transacted { fn add_assign(&mut self, rhs: Self) { - self.by_size = Self::merge_by_size(mem::take(&mut self.by_size), rhs.by_size); + self.by_size_group = + Self::merge_by_size(mem::take(&mut self.by_size_group), rhs.by_size_group); self.spendable_supply += &rhs.spendable_supply; self.by_type += rhs.by_type; } diff --git a/crates/brk_store/src/lib.rs b/crates/brk_store/src/lib.rs index 175ae226f..006d8d9b5 100644 --- a/crates/brk_store/src/lib.rs +++ b/crates/brk_store/src/lib.rs @@ -93,14 +93,22 @@ where } } - pub fn first_key_value(&self) -> Result> { + pub fn puts_first_key_value(&self) -> Option<(&K, &V)> { + self.puts.first_key_value() + } + + pub fn puts_last_key_value(&self) -> Option<(&K, &V)> { + self.puts.last_key_value() + } + + pub fn rtx_first_key_value(&self) -> Result> { Ok(self .rtx .first_key_value(&self.partition.load())? .map(|(k, v)| (K::from(ByteView::from(k)), V::from(ByteView::from(v))))) } - pub fn last_key_value(&self) -> Result> { + pub fn rtx_last_key_value(&self) -> Result> { Ok(self .rtx .last_key_value(&self.partition.load())? diff --git a/crates/brk_vec/examples/main.rs b/crates/brk_vec/examples/main.rs index 5bbc94092..daeb66a31 100644 --- a/crates/brk_vec/examples/main.rs +++ b/crates/brk_vec/examples/main.rs @@ -1,17 +1,17 @@ use std::{fs, path::Path}; use brk_core::Version; -use brk_vec::{AnyVec, CollectableVec, Compressed, GenericStoredVec, StoredVec, VecIterator}; +use brk_vec::{AnyVec, CollectableVec, Format, GenericStoredVec, StoredVec, VecIterator}; fn main() -> Result<(), Box> { let _ = fs::remove_dir_all("./vec"); let version = Version::ZERO; - let compressed = Compressed::YES; + let format = Format::Compressed; { let mut vec: StoredVec = - StoredVec::forced_import(Path::new("."), "vec", version, compressed)?; + StoredVec::forced_import(Path::new("."), "vec", version, format)?; (0..21_u32).for_each(|v| { vec.push(v); @@ -27,7 +27,7 @@ fn main() -> Result<(), Box> { { let mut vec: StoredVec = - StoredVec::forced_import(Path::new("."), "vec", version, compressed)?; + StoredVec::forced_import(Path::new("."), "vec", version, format)?; let mut iter = vec.into_iter(); dbg!(iter.get(0)); @@ -53,7 +53,7 @@ fn main() -> Result<(), Box> { { let mut vec: StoredVec = - StoredVec::forced_import(Path::new("."), "vec", version, compressed)?; + StoredVec::forced_import(Path::new("."), "vec", version, format)?; let mut iter = vec.into_iter(); dbg!(iter.get(0)); diff --git a/crates/brk_vec/src/structs/compressed.rs b/crates/brk_vec/src/structs/format.rs similarity index 54% rename from crates/brk_vec/src/structs/compressed.rs rename to crates/brk_vec/src/structs/format.rs index 1e51acfb3..1ed90739a 100644 --- a/crates/brk_vec/src/structs/compressed.rs +++ b/crates/brk_vec/src/structs/format.rs @@ -1,20 +1,33 @@ -use std::{fs, io, ops::Deref, path::Path}; +use std::{fs, io, path::Path}; use brk_core::{Error, Result}; +use clap_derive::ValueEnum; +use serde::{Deserialize, Serialize}; -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] -pub struct Compressed(bool); - -impl Compressed { - pub const YES: Self = Self(true); - pub const NO: Self = Self(false); +#[derive( + Default, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, ValueEnum, +)] +pub enum Format { + #[default] + Compressed, + Raw, +} +impl Format { pub fn write(&self, path: &Path) -> Result<(), io::Error> { fs::write(path, self.as_bytes()) } + pub fn is_compressed(&self) -> bool { + *self == Self::Compressed + } + fn as_bytes(&self) -> Vec { - if self.0 { vec![1] } else { vec![0] } + if self.is_compressed() { + vec![1] + } else { + vec![0] + } } fn from_bytes(bytes: &[u8]) -> Self { @@ -22,16 +35,16 @@ impl Compressed { panic!(); } if bytes[0] == 1 { - Self(true) + Self::Compressed } else if bytes[0] == 0 { - Self(false) + Self::Raw } else { panic!() } } pub fn validate(&self, path: &Path) -> Result<()> { - if let Ok(prev_compressed) = Compressed::try_from(path) { + if let Ok(prev_compressed) = Format::try_from(path) { if prev_compressed != *self { return Err(Error::DifferentCompressionMode); } @@ -41,22 +54,9 @@ impl Compressed { } } -impl TryFrom<&Path> for Compressed { +impl TryFrom<&Path> for Format { type Error = Error; fn try_from(value: &Path) -> Result { Ok(Self::from_bytes(&fs::read(value)?)) } } - -impl From for Compressed { - fn from(value: bool) -> Self { - Self(value) - } -} - -impl Deref for Compressed { - type Target = bool; - fn deref(&self) -> &Self::Target { - &self.0 - } -} diff --git a/crates/brk_vec/src/structs/mod.rs b/crates/brk_vec/src/structs/mod.rs index bac79b2fa..44c669288 100644 --- a/crates/brk_vec/src/structs/mod.rs +++ b/crates/brk_vec/src/structs/mod.rs @@ -1,11 +1,11 @@ -mod compressed; mod compressed_page_meta; mod compressed_pages_meta; +mod format; mod length; mod unsafe_slice; -pub use compressed::*; pub use compressed_page_meta::*; pub use compressed_pages_meta::*; +pub use format::*; pub use length::*; pub use unsafe_slice::*; diff --git a/crates/brk_vec/src/variants/computed.rs b/crates/brk_vec/src/variants/computed.rs index ad5a7d120..0859a33c4 100644 --- a/crates/brk_vec/src/variants/computed.rs +++ b/crates/brk_vec/src/variants/computed.rs @@ -8,7 +8,7 @@ use brk_core::{Result, StoredPhantom, Value, Version}; use crate::{ AnyCollectableVec, AnyIterableVec, AnyVec, BaseVecIterator, BoxedAnyIterableVec, - BoxedVecIterator, CollectableVec, Compressed, StoredIndex, StoredType, + BoxedVecIterator, CollectableVec, Format, StoredIndex, StoredType, }; use super::{ @@ -86,13 +86,13 @@ where path: &Path, value_name: &str, version: Version, - compressed: Compressed, + format: Format, source: BoxedAnyIterableVec, compute: ComputeFrom1, ) -> Result { Ok(match mode { Computation::Eager => Self::Eager { - vec: EagerVec::forced_import(path, value_name, version, compressed)?, + vec: EagerVec::forced_import(path, value_name, version, format)?, deps: Dependencies::From1(source, compute), }, Computation::Lazy => { @@ -108,14 +108,14 @@ where path: &Path, value_name: &str, version: Version, - compressed: Compressed, + format: Format, source1: BoxedAnyIterableVec, source2: BoxedAnyIterableVec, compute: ComputeFrom2, ) -> Result { Ok(match mode { Computation::Eager => Self::Eager { - vec: EagerVec::forced_import(path, value_name, version, compressed)?, + vec: EagerVec::forced_import(path, value_name, version, format)?, deps: Dependencies::From2((source1, source2), compute), }, Computation::Lazy => { @@ -133,7 +133,7 @@ where path: &Path, value_name: &str, version: Version, - compressed: Compressed, + format: Format, source1: BoxedAnyIterableVec, source2: BoxedAnyIterableVec, source3: BoxedAnyIterableVec, @@ -141,7 +141,7 @@ where ) -> Result { Ok(match mode { Computation::Eager => Self::Eager { - vec: EagerVec::forced_import(path, value_name, version, compressed)?, + vec: EagerVec::forced_import(path, value_name, version, format)?, deps: Dependencies::From3((source1, source2, source3), compute), }, Computation::Lazy => { diff --git a/crates/brk_vec/src/variants/eager.rs b/crates/brk_vec/src/variants/eager.rs index 3d4aaaaaa..b4292334f 100644 --- a/crates/brk_vec/src/variants/eager.rs +++ b/crates/brk_vec/src/variants/eager.rs @@ -10,15 +10,15 @@ use std::{ use arc_swap::ArcSwap; use brk_core::{ - Bitcoin, CheckedSub, Close, Date, DateIndex, Dollars, Error, Height, Result, Sats, StoredUsize, - TxIndex, Value, Version, + Bitcoin, CheckedSub, Close, Date, DateIndex, Dollars, Error, Height, Result, Sats, StoredF32, + StoredUsize, TxIndex, Value, Version, }; use brk_exit::Exit; use log::info; use memmap2::Mmap; use crate::{ - AnyCollectableVec, AnyIterableVec, AnyVec, BoxedVecIterator, CollectableVec, Compressed, + AnyCollectableVec, AnyIterableVec, AnyVec, BoxedVecIterator, CollectableVec, Format, GenericStoredVec, StoredIndex, StoredType, StoredVec, StoredVecIterator, VecIterator, }; @@ -44,9 +44,9 @@ where path: &Path, value_name: &str, version: Version, - compressed: Compressed, + format: Format, ) -> Result { - let inner = StoredVec::forced_import(path, value_name, version, compressed)?; + let inner = StoredVec::forced_import(path, value_name, version, format)?; Ok(Self { computed_version: None, @@ -219,10 +219,10 @@ where )?; let index = max_from.min(I::from(self.len())); - let mut added_iter = adder.iter(); + let mut adder_iter = adder.iter(); added.iter_at(index).try_for_each(|(i, v)| { - let v = v.into_inner() + added_iter.unwrap_get_inner(i); + let v = v.into_inner() + adder_iter.unwrap_get_inner(i); self.forced_push_at(i, v, exit) })?; @@ -245,12 +245,12 @@ where )?; let index = max_from.min(I::from(self.len())); - let mut subtracted_iter = subtracter.iter(); + let mut subtracter_iter = subtracter.iter(); subtracted.iter_at(index).try_for_each(|(i, v)| { let v = v .into_inner() - .checked_sub(subtracted_iter.unwrap_get_inner(i)) + .checked_sub(subtracter_iter.unwrap_get_inner(i)) .unwrap(); self.forced_push_at(i, v, exit) @@ -259,6 +259,71 @@ where self.safe_flush(exit) } + pub fn compute_max( + &mut self, + max_from: I, + source: &impl AnyIterableVec, + exit: &Exit, + ) -> Result<()> + where + T: From + Ord, + T2: StoredType, + { + self.validate_computed_version_or_reset_file( + Version::ZERO + self.inner.version() + source.version(), + )?; + + let index = max_from.min(I::from(self.len())); + + let mut prev = None; + + source.iter_at(index).try_for_each(|(i, v)| { + if prev.is_none() { + let i = i.unwrap_to_usize(); + prev.replace(if i > 0 { + self.into_iter().unwrap_get_inner_(i - 1) + } else { + T::from(source.iter().unwrap_get_inner_(0)) + }); + } + let max = prev.clone().unwrap().max(T::from(v.into_inner())); + prev.replace(max.clone()); + + self.forced_push_at(i, max, exit) + })?; + + self.safe_flush(exit) + } + + pub fn compute_multiply( + &mut self, + max_from: I, + multiplied: &impl AnyIterableVec, + multiplier: &impl AnyIterableVec, + exit: &Exit, + ) -> Result<()> + where + T2: StoredType + Mul, + T3: StoredType, + T4: StoredType, + T: From, + { + self.validate_computed_version_or_reset_file( + Version::ZERO + self.inner.version() + multiplied.version() + multiplier.version(), + )?; + + let index = max_from.min(I::from(self.len())); + let mut multiplier_iter = multiplier.iter(); + + multiplied.iter_at(index).try_for_each(|(i, v)| { + let v = v.into_inner() * multiplier_iter.unwrap_get_inner(i); + + self.forced_push_at(i, v.into(), exit) + })?; + + self.safe_flush(exit) + } + pub fn compute_divide( &mut self, max_from: I, @@ -343,6 +408,36 @@ where self.safe_flush(exit) } + pub fn compute_drawdown( + &mut self, + max_from: I, + close: &impl AnyIterableVec>, + ath: &impl AnyIterableVec, + exit: &Exit, + ) -> Result<()> + where + T: From, + { + self.validate_computed_version_or_reset_file( + Version::ZERO + self.inner.version() + ath.version() + close.version(), + )?; + + let index = max_from.min(I::from(self.len())); + let mut close_iter = close.iter(); + ath.iter_at(index).try_for_each(|(i, ath)| { + let ath = ath.into_inner(); + if ath == Dollars::ZERO { + self.forced_push_at(i, T::from(StoredF32::default()), exit) + } else { + let close = *close_iter.unwrap_get_inner(i); + let drawdown = StoredF32::from((*ath - *close) / *ath * -100.0); + self.forced_push_at(i, T::from(drawdown), exit) + } + })?; + + self.safe_flush(exit) + } + pub fn compute_inverse_more_to_less( &mut self, max_from: T, @@ -579,6 +674,115 @@ where self.safe_flush(exit) } + pub fn compute_sum_of_others( + &mut self, + max_from: I, + others: &[&impl AnyIterableVec], + exit: &Exit, + ) -> Result<()> + where + T: From + Add, + { + self.validate_computed_version_or_reset_file( + Version::ZERO + self.inner.version() + others.iter().map(|v| v.version()).sum(), + )?; + + if others.is_empty() { + unreachable!("others should've length of 1 at least"); + } + + let mut others_iter = others[1..].iter().map(|v| v.iter()).collect::>(); + + let index = max_from.min(I::from(self.len())); + others + .first() + .unwrap() + .iter_at(index) + .try_for_each(|(i, v)| { + let mut sum = v.into_inner(); + others_iter.iter_mut().for_each(|iter| { + sum = sum.clone() + iter.unwrap_get_inner(i); + }); + self.forced_push_at(i, sum, exit) + })?; + + self.safe_flush(exit) + } + + pub fn compute_min_of_others( + &mut self, + max_from: I, + others: &[&impl AnyIterableVec], + exit: &Exit, + ) -> Result<()> + where + T: From + Add + Ord, + { + self.validate_computed_version_or_reset_file( + Version::ZERO + self.inner.version() + others.iter().map(|v| v.version()).sum(), + )?; + + if others.is_empty() { + unreachable!("others should've length of 1 at least"); + } + + let mut others_iter = others[1..].iter().map(|v| v.iter()).collect::>(); + + let index = max_from.min(I::from(self.len())); + others + .first() + .unwrap() + .iter_at(index) + .try_for_each(|(i, v)| { + let min = v.into_inner(); + let min = others_iter + .iter_mut() + .map(|iter| iter.unwrap_get_inner(i)) + .min() + .map_or(min.clone(), |min2| min.min(min2)); + self.forced_push_at(i, min, exit) + })?; + + self.safe_flush(exit) + } + + pub fn compute_max_of_others( + &mut self, + max_from: I, + others: &[&impl AnyIterableVec], + exit: &Exit, + ) -> Result<()> + where + T: From + Add + Ord, + { + self.validate_computed_version_or_reset_file( + Version::ZERO + self.inner.version() + others.iter().map(|v| v.version()).sum(), + )?; + + if others.is_empty() { + unreachable!("others should've length of 1 at least"); + } + + let mut others_iter = others[1..].iter().map(|v| v.iter()).collect::>(); + + let index = max_from.min(I::from(self.len())); + others + .first() + .unwrap() + .iter_at(index) + .try_for_each(|(i, v)| { + let max = v.into_inner(); + let max = others_iter + .iter_mut() + .map(|iter| iter.unwrap_get_inner(i)) + .max() + .map_or(max.clone(), |max2| max.max(max2)); + self.forced_push_at(i, max, exit) + })?; + + self.safe_flush(exit) + } + pub fn compute_sma( &mut self, max_from: I, diff --git a/crates/brk_vec/src/variants/indexed.rs b/crates/brk_vec/src/variants/indexed.rs index 3943b06dc..63b8c69b1 100644 --- a/crates/brk_vec/src/variants/indexed.rs +++ b/crates/brk_vec/src/variants/indexed.rs @@ -9,7 +9,7 @@ use arc_swap::ArcSwap; use brk_core::{Error, Height, Result, Value, Version}; use crate::{ - AnyCollectableVec, AnyIterableVec, AnyVec, BoxedVecIterator, CollectableVec, Compressed, + AnyCollectableVec, AnyIterableVec, AnyVec, BoxedVecIterator, CollectableVec, Format, GenericStoredVec, Mmap, StoredIndex, StoredType, StoredVec, }; @@ -30,9 +30,9 @@ where path: &Path, value_name: &str, version: Version, - compressed: Compressed, + format: Format, ) -> Result { - let inner = StoredVec::forced_import(path, value_name, version, compressed)?; + let inner = StoredVec::forced_import(path, value_name, version, format)?; Ok(Self { height: Height::try_from(Self::path_height_(inner.path()).as_path()).ok(), diff --git a/crates/brk_vec/src/variants/stored.rs b/crates/brk_vec/src/variants/stored.rs index cf3387d91..72fc8270e 100644 --- a/crates/brk_vec/src/variants/stored.rs +++ b/crates/brk_vec/src/variants/stored.rs @@ -6,7 +6,7 @@ use memmap2::Mmap; use crate::{ AnyCollectableVec, AnyIterableVec, AnyVec, BaseVecIterator, BoxedVecIterator, CollectableVec, - Compressed, GenericStoredVec, StoredIndex, StoredType, + Format, GenericStoredVec, StoredIndex, StoredType, }; use super::{CompressedVec, CompressedVecIterator, RawVec, RawVecIterator}; @@ -26,7 +26,7 @@ where path: &Path, value_name: &str, version: Version, - compressed: Compressed, + format: Format, ) -> Result { let path = I::path(path, value_name); @@ -35,7 +35,7 @@ where panic!("Version must be at least 1, can't verify endianess otherwise"); } - if *compressed { + if format.is_compressed() { Ok(Self::Compressed(CompressedVec::forced_import( &path, version, )?)) diff --git a/websites/kibo.money/scripts/main.js b/websites/kibo.money/scripts/main.js index a556a79e3..9bfd67712 100644 --- a/websites/kibo.money/scripts/main.js +++ b/websites/kibo.money/scripts/main.js @@ -734,6 +734,7 @@ function createUtils() { id === "marketcap" || id.includes("in-usd") || id.startsWith("price") || + id.endsWith("price-paid") || id.endsWith("price") || id.endsWith("value-created") || id.endsWith("value-destroyed") || diff --git a/websites/kibo.money/scripts/options.js b/websites/kibo.money/scripts/options.js index 65ecc4dd1..e451d42df 100644 --- a/websites/kibo.money/scripts/options.js +++ b/websites/kibo.money/scripts/options.js @@ -565,11 +565,71 @@ function createPartialOptions(colors) { }, ]); - const size = /** @type {const } */ ([ + const fromSize = /** @type {const} */ ([ { - key: "0sat", - name: "0sat", - title: "0 sat", + key: "from-1-000sats", + name: "1_000sats", + title: "From 1,000 sats", + color: colors.cyan, + }, + { + key: "from-1btc", + name: "1btc", + title: "From 1 BTC", + color: colors.violet, + }, + { + key: "from-10btc", + name: "10btc", + title: "From 10 BTC", + color: colors.purple, + }, + { + key: "from-100btc", + name: "100btc", + title: "From 100 BTC", + color: colors.pink, + }, + ]); + + const upToSize = /** @type {const} */ ([ + { + key: "up-to-1-000sats", + name: "1_000sats", + title: "Up to 1,000 sats", + color: colors.yellow, + }, + { + key: "up-to-10-000sats", + name: "10_000sats", + title: "Up to 10,000 sats", + color: colors.green, + }, + { + key: "up-to-1btc", + name: "1btc", + title: "Up to 1 btc", + color: colors.cyan, + }, + { + key: "up-to-10btc", + name: "10btc", + title: "Up to 10 btc", + color: colors.blue, + }, + { + key: "up-to-100btc", + name: "100btc", + title: "Up to 100 btc", + color: colors.violet, + }, + ]); + + const sizeRanges = /** @type {const} */ ([ + { + key: "0sats", + name: "0sats", + title: "0 sats", color: colors.red, }, { @@ -1398,6 +1458,81 @@ function createPartialOptions(colors) { }, ], }, + ...("list" in args + ? [ + { + name: "Price paid", + tree: [ + { + name: "Average", + title: `${args.title} Average Price Paid`, + bottom: list.flatMap(({ color, name, key: _key }) => { + const key = fixKey(_key); + return /** @type {const} */ ([ + createBaseSeries({ + key: `${key}realized-price`, + name, + color: color, + }), + ]); + }), + }, + { + name: "Min", + title: `${args.title} Min Price Paid`, + bottom: list.flatMap(({ color, name, key: _key }) => { + const key = fixKey(_key); + return /** @type {const} */ ([ + createBaseSeries({ + key: `${key}min-price-paid`, + name, + color: color, + }), + ]); + }), + }, + { + name: "Max", + title: `${args.title} Max Price Paid`, + bottom: list.flatMap(({ color, name, key: _key }) => { + const key = fixKey(_key); + return /** @type {const} */ ([ + createBaseSeries({ + key: `${key}max-price-paid`, + name, + color: color, + }), + ]); + }), + }, + ], + }, + ] + : [ + { + name: "Price paid", + title: `${args.title} Prices Paid`, + top: [ + createBaseSeries({ + key: `${fixKey(args.key)}realized-price`, + name: "Average", + color: args.color, + }), + createBaseSeries({ + key: `${fixKey(args.key)}min-price-paid`, + name: "Min", + color: colors.green, + // defaultActive: false, + }), + createBaseSeries({ + key: `${fixKey(args.key)}max-price-paid`, + name: "Max", + color: colors.red, + // defaultActive: false, + }), + ], + }, + ]), ], }); } @@ -1446,12 +1581,12 @@ function createPartialOptions(colors) { name: "Days since", }), createBaseSeries({ - key: "max-days-between-ath", + key: "max-days-between-aths", name: "Max", color: colors.red, }), createBaseSeries({ - key: "max-years-between-ath", + key: "max-years-between-aths", name: "Max", color: colors.red, }), @@ -2224,7 +2359,7 @@ function createPartialOptions(colors) { ], }, { - name: "Up to", + name: "Up to date", tree: [ createUTXOGroupFolder({ name: "Compare", @@ -2235,7 +2370,7 @@ function createPartialOptions(colors) { ], }, { - name: "From", + name: "From Date", tree: [ createUTXOGroupFolder({ name: "Compare", @@ -2246,7 +2381,7 @@ function createPartialOptions(colors) { ], }, { - name: "Range", + name: "Date Range", tree: [ createUTXOGroupFolder({ name: "Compare", @@ -2268,14 +2403,36 @@ function createPartialOptions(colors) { ], }, { - name: "size", + name: "Up to size", tree: [ createUTXOGroupFolder({ name: "Compare", - title: "Compare By Size", - list: size, + title: "Compare By Up To Size", + list: upToSize, }), - ...size.map(createUTXOGroupFolder), + ...upToSize.map(createUTXOGroupFolder), + ], + }, + { + name: "From size", + tree: [ + createUTXOGroupFolder({ + name: "Compare", + title: "Compare By From Size", + list: fromSize, + }), + ...fromSize.map(createUTXOGroupFolder), + ], + }, + { + name: "Size range", + tree: [ + createUTXOGroupFolder({ + name: "Compare", + title: "Compare By Size Range", + list: sizeRanges, + }), + ...sizeRanges.map(createUTXOGroupFolder), ], }, { diff --git a/websites/kibo.money/scripts/vecid-to-indexes.js b/websites/kibo.money/scripts/vecid-to-indexes.js index d6b92950b..2339e9a37 100644 --- a/websites/kibo.money/scripts/vecid-to-indexes.js +++ b/websites/kibo.money/scripts/vecid-to-indexes.js @@ -34,62 +34,70 @@ export function createVecIdToIndexes() { return /** @type {const} */ ({ "0": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-adjusted-spent-output-profit-ratio": [0], - "0sat-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-realized-cap-30d-change": [0], - "0sat-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-realized-price-ratio": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], - "0sat-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], - "0sat-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-sell-side-risk-ratio": [0], - "0sat-spent-output-profit-ratio": [0], - "0sat-supply": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-supply-even": [0, 1, 5, 7, 19, 22, 23], - "0sat-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], - "0sat-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], - "0sat-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], - "0sat-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], - "0sat-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-value-created": [0, 1, 2, 5, 7, 19, 22, 23], - "0sat-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-adjusted-spent-output-profit-ratio": [0], + "0sats-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "0sats-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "0sats-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "0sats-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-realized-cap-30d-change": [0], + "0sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "0sats-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "0sats-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-sell-side-risk-ratio": [0], + "0sats-spent-output-profit-ratio": [0], + "0sats-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-supply-even": [0, 1, 5, 7, 19, 22, 23], + "0sats-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "0sats-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "0sats-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "0sats-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "0sats-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "0sats-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "1": [0, 1, 2, 5, 7, 19, 22, 23], "100": [0, 1, 2, 5, 7, 19, 22, 23], "10y-cagr": [0, 1, 7, 19, 22, 23], @@ -588,7 +596,7 @@ export function createVecIdToIndexes() { "adjusted-spent-output-profit-ratio": [0], "adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], - "ath": [0, 1, 7, 19, 22, 23], + "ath": [0, 1, 5, 7, 19, 22, 23], "base-size": [20], "block-count": [5], "block-count-sum": [0, 1, 2, 7, 19, 22, 23], @@ -712,12 +720,20 @@ export function createVecIdToIndexes() { "decadeindex": [1, 23], "difficulty": [0, 1, 2, 5, 7, 19, 22, 23], "difficultyepoch": [0, 1, 2, 5, 7, 19, 22, 23], - "drawdown": [0, 1, 7, 19, 22, 23], + "drawdown": [0, 1, 5, 7, 19, 22, 23], "empty-adjusted-spent-output-profit-ratio": [0], "empty-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "empty-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "empty-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "empty-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "empty-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "empty-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "empty-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "empty-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "empty-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "empty-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "empty-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "empty-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "empty-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "empty-realized-cap-30d-change": [0], "empty-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -783,8 +799,16 @@ export function createVecIdToIndexes() { "epoch-0-adjusted-spent-output-profit-ratio": [0], "epoch-0-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-0-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-0-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-0-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-0-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-0-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-0-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-0-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-0-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "epoch-0-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-0-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "epoch-0-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "epoch-0-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-0-realized-cap-30d-change": [0], "epoch-0-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -839,8 +863,16 @@ export function createVecIdToIndexes() { "epoch-1-adjusted-spent-output-profit-ratio": [0], "epoch-1-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-1-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-1-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-1-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-1-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-1-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-1-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-1-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-1-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "epoch-1-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-1-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "epoch-1-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "epoch-1-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-1-realized-cap-30d-change": [0], "epoch-1-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -895,8 +927,16 @@ export function createVecIdToIndexes() { "epoch-2-adjusted-spent-output-profit-ratio": [0], "epoch-2-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-2-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-2-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-2-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-2-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-2-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-2-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-2-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-2-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "epoch-2-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-2-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "epoch-2-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "epoch-2-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-2-realized-cap-30d-change": [0], "epoch-2-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -951,8 +991,16 @@ export function createVecIdToIndexes() { "epoch-3-adjusted-spent-output-profit-ratio": [0], "epoch-3-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-3-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-3-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-3-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-3-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-3-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-3-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-3-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-3-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "epoch-3-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-3-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "epoch-3-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "epoch-3-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-3-realized-cap-30d-change": [0], "epoch-3-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1007,8 +1055,16 @@ export function createVecIdToIndexes() { "epoch-4-adjusted-spent-output-profit-ratio": [0], "epoch-4-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-4-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-4-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-4-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-4-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-4-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-4-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-4-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-4-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "epoch-4-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-4-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "epoch-4-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "epoch-4-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-4-realized-cap-30d-change": [0], "epoch-4-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1120,8 +1176,16 @@ export function createVecIdToIndexes() { "from-1-000-000sats-to-10-000-000sats-adjusted-spent-output-profit-ratio": [0], "from-1-000-000sats-to-10-000-000sats-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-realized-cap-30d-change": [0], "from-1-000-000sats-to-10-000-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1176,8 +1240,16 @@ export function createVecIdToIndexes() { "from-1-000btc-to-10-000btc-adjusted-spent-output-profit-ratio": [0], "from-1-000btc-to-10-000btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000btc-to-10-000btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000btc-to-10-000btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000btc-to-10-000btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000btc-to-10-000btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000btc-to-10-000btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000btc-to-10-000btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000btc-to-10-000btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1-000btc-to-10-000btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-realized-cap-30d-change": [0], "from-1-000btc-to-10-000btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1229,11 +1301,78 @@ export function createVecIdToIndexes() { "from-1-000btc-to-10-000btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-adjusted-spent-output-profit-ratio": [0], + "from-1-000sats-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "from-1-000sats-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1-000sats-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "from-1-000sats-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-realized-cap-30d-change": [0], + "from-1-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1-000sats-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-sell-side-risk-ratio": [0], + "from-1-000sats-spent-output-profit-ratio": [0], + "from-1-000sats-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-supply-even": [0, 1, 5, 7, 19, 22, 23], + "from-1-000sats-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "from-1-000sats-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "from-1-000sats-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-adjusted-spent-output-profit-ratio": [0], "from-1-000sats-to-10-000sats-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-to-10-000sats-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-to-10-000sats-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-to-10-000sats-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-to-10-000sats-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-to-10-000sats-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-to-10-000sats-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-to-10-000sats-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1-000sats-to-10-000sats-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-realized-cap-30d-change": [0], "from-1-000sats-to-10-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1285,11 +1424,24 @@ export function createVecIdToIndexes() { "from-1-000sats-to-10-000sats-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "from-1-000sats-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "from-1-000sats-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-adjusted-spent-output-profit-ratio": [0], "from-10-000-000sats-to-1btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-realized-cap-30d-change": [0], "from-10-000-000sats-to-1btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1344,8 +1496,16 @@ export function createVecIdToIndexes() { "from-10-000btc-to-100-000btc-adjusted-spent-output-profit-ratio": [0], "from-10-000btc-to-100-000btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-realized-cap-30d-change": [0], "from-10-000btc-to-100-000btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1400,8 +1560,16 @@ export function createVecIdToIndexes() { "from-10-000sats-to-100-000sats-adjusted-spent-output-profit-ratio": [0], "from-10-000sats-to-100-000sats-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-realized-cap-30d-change": [0], "from-10-000sats-to-100-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1456,8 +1624,16 @@ export function createVecIdToIndexes() { "from-100-000btc-adjusted-spent-output-profit-ratio": [0], "from-100-000btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-100-000btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-100-000btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-100-000btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000btc-realized-cap-30d-change": [0], "from-100-000btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1512,8 +1688,16 @@ export function createVecIdToIndexes() { "from-100-000sats-to-1-000-000sats-adjusted-spent-output-profit-ratio": [0], "from-100-000sats-to-1-000-000sats-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000sats-to-1-000-000sats-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000sats-to-1-000-000sats-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000sats-to-1-000-000sats-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000sats-to-1-000-000sats-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000sats-to-1-000-000sats-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000sats-to-1-000-000sats-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000sats-to-1-000-000sats-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-100-000sats-to-1-000-000sats-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-realized-cap-30d-change": [0], "from-100-000sats-to-1-000-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1565,11 +1749,78 @@ export function createVecIdToIndexes() { "from-100-000sats-to-1-000-000sats-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-adjusted-spent-output-profit-ratio": [0], + "from-100btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "from-100btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-100btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "from-100btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-realized-cap-30d-change": [0], + "from-100btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-100btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-sell-side-risk-ratio": [0], + "from-100btc-spent-output-profit-ratio": [0], + "from-100btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-supply-even": [0, 1, 5, 7, 19, 22, 23], + "from-100btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "from-100btc-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "from-100btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-100btc-to-1-000btc-adjusted-spent-output-profit-ratio": [0], "from-100btc-to-1-000btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-100btc-to-1-000btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-to-1-000btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-to-1-000btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-to-1-000btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-to-1-000btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-to-1-000btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-100btc-to-1-000btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-to-1-000btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-100btc-to-1-000btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-to-1-000btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-100btc-to-1-000btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-100btc-to-1-000btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-100btc-to-1-000btc-realized-cap-30d-change": [0], "from-100btc-to-1-000btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1621,11 +1872,24 @@ export function createVecIdToIndexes() { "from-100btc-to-1-000btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "from-100btc-to-1-000btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-100btc-to-1-000btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "from-100btc-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "from-100btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-100sats-to-1-000sats-adjusted-spent-output-profit-ratio": [0], "from-100sats-to-1-000sats-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-100sats-to-1-000sats-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100sats-to-1-000sats-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100sats-to-1-000sats-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100sats-to-1-000sats-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100sats-to-1-000sats-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100sats-to-1-000sats-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-100sats-to-1-000sats-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100sats-to-1-000sats-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-100sats-to-1-000sats-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100sats-to-1-000sats-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-100sats-to-1-000sats-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-100sats-to-1-000sats-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-100sats-to-1-000sats-realized-cap-30d-change": [0], "from-100sats-to-1-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1677,11 +1941,78 @@ export function createVecIdToIndexes() { "from-100sats-to-1-000sats-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "from-100sats-to-1-000sats-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-100sats-to-1-000sats-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-adjusted-spent-output-profit-ratio": [0], + "from-10btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "from-10btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-10btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "from-10btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-realized-cap-30d-change": [0], + "from-10btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-10btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-sell-side-risk-ratio": [0], + "from-10btc-spent-output-profit-ratio": [0], + "from-10btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-supply-even": [0, 1, 5, 7, 19, 22, 23], + "from-10btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "from-10btc-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "from-10btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-10btc-to-100btc-adjusted-spent-output-profit-ratio": [0], "from-10btc-to-100btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-10btc-to-100btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-to-100btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-to-100btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-to-100btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-to-100btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-to-100btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-10btc-to-100btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-to-100btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-10btc-to-100btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-to-100btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-10btc-to-100btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-10btc-to-100btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-10btc-to-100btc-realized-cap-30d-change": [0], "from-10btc-to-100btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1733,11 +2064,24 @@ export function createVecIdToIndexes() { "from-10btc-to-100btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "from-10btc-to-100btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-10btc-to-100btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "from-10btc-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "from-10btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-10sats-to-100sats-adjusted-spent-output-profit-ratio": [0], "from-10sats-to-100sats-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-10sats-to-100sats-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10sats-to-100sats-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10sats-to-100sats-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10sats-to-100sats-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10sats-to-100sats-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10sats-to-100sats-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-10sats-to-100sats-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10sats-to-100sats-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-10sats-to-100sats-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10sats-to-100sats-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-10sats-to-100sats-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-10sats-to-100sats-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-10sats-to-100sats-realized-cap-30d-change": [0], "from-10sats-to-100sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1792,8 +2136,16 @@ export function createVecIdToIndexes() { "from-10y-adjusted-spent-output-profit-ratio": [0], "from-10y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-10y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-10y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-10y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-realized-cap-30d-change": [0], "from-10y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1843,8 +2195,16 @@ export function createVecIdToIndexes() { "from-10y-to-15y-adjusted-spent-output-profit-ratio": [0], "from-10y-to-15y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-to-15y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-to-15y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-to-15y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-to-15y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-to-15y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-to-15y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-to-15y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-to-15y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-10y-to-15y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-to-15y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-10y-to-15y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-10y-to-15y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-to-15y-realized-cap-30d-change": [0], "from-10y-to-15y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1904,8 +2264,16 @@ export function createVecIdToIndexes() { "from-15y-adjusted-spent-output-profit-ratio": [0], "from-15y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-15y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-15y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-15y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-15y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-15y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-15y-realized-cap-30d-change": [0], "from-15y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -1952,16 +2320,147 @@ export function createVecIdToIndexes() { "from-15y-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], "from-15y-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], "from-15y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-adjusted-spent-output-profit-ratio": [0], + "from-15y-to-end-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "from-15y-to-end-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-15y-to-end-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "from-15y-to-end-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-realized-cap-30d-change": [0], + "from-15y-to-end-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-15y-to-end-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-sell-side-risk-ratio": [0], + "from-15y-to-end-spent-output-profit-ratio": [0], + "from-15y-to-end-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-supply-even": [0, 1, 5, 7, 19, 22, 23], + "from-15y-to-end-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "from-15y-to-end-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "from-15y-to-end-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "from-15y-to-end-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "from-15y-to-end-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-to-end-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-15y-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], "from-15y-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], "from-15y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "from-15y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-15y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-adjusted-spent-output-profit-ratio": [0], + "from-1btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "from-1btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "from-1btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-realized-cap-30d-change": [0], + "from-1btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-sell-side-risk-ratio": [0], + "from-1btc-spent-output-profit-ratio": [0], + "from-1btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-supply-even": [0, 1, 5, 7, 19, 22, 23], + "from-1btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "from-1btc-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "from-1btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-1btc-to-10btc-adjusted-spent-output-profit-ratio": [0], "from-1btc-to-10btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1btc-to-10btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-to-10btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-to-10btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-to-10btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-to-10btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-to-10btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1btc-to-10btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-to-10btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1btc-to-10btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-to-10btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1btc-to-10btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1btc-to-10btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1btc-to-10btc-realized-cap-30d-change": [0], "from-1btc-to-10btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2013,11 +2512,24 @@ export function createVecIdToIndexes() { "from-1btc-to-10btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "from-1btc-to-10btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1btc-to-10btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "from-1btc-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "from-1btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-adjusted-spent-output-profit-ratio": [0], "from-1d-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1d-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1d-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1d-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-realized-cap-30d-change": [0], "from-1d-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2067,8 +2579,16 @@ export function createVecIdToIndexes() { "from-1d-to-1w-adjusted-spent-output-profit-ratio": [0], "from-1d-to-1w-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-to-1w-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-to-1w-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-to-1w-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-to-1w-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-to-1w-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-to-1w-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-to-1w-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-to-1w-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1d-to-1w-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-to-1w-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1d-to-1w-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1d-to-1w-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-to-1w-realized-cap-30d-change": [0], "from-1d-to-1w-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2128,8 +2648,16 @@ export function createVecIdToIndexes() { "from-1m-adjusted-spent-output-profit-ratio": [0], "from-1m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-realized-cap-30d-change": [0], "from-1m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2179,8 +2707,16 @@ export function createVecIdToIndexes() { "from-1m-to-3m-adjusted-spent-output-profit-ratio": [0], "from-1m-to-3m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-to-3m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-to-3m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-to-3m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-to-3m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-to-3m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-to-3m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-to-3m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-to-3m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1m-to-3m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-to-3m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1m-to-3m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1m-to-3m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-to-3m-realized-cap-30d-change": [0], "from-1m-to-3m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2240,8 +2776,16 @@ export function createVecIdToIndexes() { "from-1sat-to-10sats-adjusted-spent-output-profit-ratio": [0], "from-1sat-to-10sats-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1sat-to-10sats-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1sat-to-10sats-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1sat-to-10sats-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1sat-to-10sats-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1sat-to-10sats-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1sat-to-10sats-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1sat-to-10sats-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1sat-to-10sats-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1sat-to-10sats-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1sat-to-10sats-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1sat-to-10sats-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1sat-to-10sats-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1sat-to-10sats-realized-cap-30d-change": [0], "from-1sat-to-10sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2296,8 +2840,16 @@ export function createVecIdToIndexes() { "from-1w-adjusted-spent-output-profit-ratio": [0], "from-1w-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1w-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1w-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1w-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-realized-cap-30d-change": [0], "from-1w-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2347,8 +2899,16 @@ export function createVecIdToIndexes() { "from-1w-to-1m-adjusted-spent-output-profit-ratio": [0], "from-1w-to-1m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-to-1m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-to-1m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-to-1m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-to-1m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-to-1m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-to-1m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-to-1m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-to-1m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1w-to-1m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-to-1m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1w-to-1m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1w-to-1m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-to-1m-realized-cap-30d-change": [0], "from-1w-to-1m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2408,8 +2968,16 @@ export function createVecIdToIndexes() { "from-1y-adjusted-spent-output-profit-ratio": [0], "from-1y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-realized-cap-30d-change": [0], "from-1y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2459,8 +3027,16 @@ export function createVecIdToIndexes() { "from-1y-to-2y-adjusted-spent-output-profit-ratio": [0], "from-1y-to-2y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-to-2y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-to-2y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-to-2y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-to-2y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-to-2y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-to-2y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-to-2y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-to-2y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-1y-to-2y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-to-2y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-1y-to-2y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-1y-to-2y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-to-2y-realized-cap-30d-change": [0], "from-1y-to-2y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2520,8 +3096,16 @@ export function createVecIdToIndexes() { "from-2m-adjusted-spent-output-profit-ratio": [0], "from-2m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-2m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-2m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-2m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-2m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-2m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-2m-realized-cap-30d-change": [0], "from-2m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2576,8 +3160,16 @@ export function createVecIdToIndexes() { "from-2y-adjusted-spent-output-profit-ratio": [0], "from-2y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-2y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-2y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-2y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-realized-cap-30d-change": [0], "from-2y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2627,8 +3219,16 @@ export function createVecIdToIndexes() { "from-2y-to-3y-adjusted-spent-output-profit-ratio": [0], "from-2y-to-3y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-to-3y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-to-3y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-to-3y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-to-3y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-to-3y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-to-3y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-to-3y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-to-3y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-2y-to-3y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-to-3y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-2y-to-3y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-2y-to-3y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-to-3y-realized-cap-30d-change": [0], "from-2y-to-3y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2688,8 +3288,16 @@ export function createVecIdToIndexes() { "from-3m-adjusted-spent-output-profit-ratio": [0], "from-3m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-3m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-3m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-3m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-realized-cap-30d-change": [0], "from-3m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2739,8 +3347,16 @@ export function createVecIdToIndexes() { "from-3m-to-6m-adjusted-spent-output-profit-ratio": [0], "from-3m-to-6m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-to-6m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-to-6m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-to-6m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-to-6m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-to-6m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-to-6m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-to-6m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-to-6m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-3m-to-6m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-to-6m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-3m-to-6m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-3m-to-6m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-to-6m-realized-cap-30d-change": [0], "from-3m-to-6m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2800,8 +3416,16 @@ export function createVecIdToIndexes() { "from-3y-adjusted-spent-output-profit-ratio": [0], "from-3y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-3y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-3y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-3y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-realized-cap-30d-change": [0], "from-3y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2851,8 +3475,16 @@ export function createVecIdToIndexes() { "from-3y-to-4y-adjusted-spent-output-profit-ratio": [0], "from-3y-to-4y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-to-4y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-to-4y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-to-4y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-to-4y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-to-4y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-to-4y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-to-4y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-to-4y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-3y-to-4y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-to-4y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-3y-to-4y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-3y-to-4y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-to-4y-realized-cap-30d-change": [0], "from-3y-to-4y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2912,8 +3544,16 @@ export function createVecIdToIndexes() { "from-4m-adjusted-spent-output-profit-ratio": [0], "from-4m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-4m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-4m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-4m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-4m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-4m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-4m-realized-cap-30d-change": [0], "from-4m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -2968,8 +3608,16 @@ export function createVecIdToIndexes() { "from-4y-adjusted-spent-output-profit-ratio": [0], "from-4y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-4y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-4y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-4y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-realized-cap-30d-change": [0], "from-4y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3019,8 +3667,16 @@ export function createVecIdToIndexes() { "from-4y-to-5y-adjusted-spent-output-profit-ratio": [0], "from-4y-to-5y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-to-5y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-to-5y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-to-5y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-to-5y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-to-5y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-to-5y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-to-5y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-to-5y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-4y-to-5y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-to-5y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-4y-to-5y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-4y-to-5y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-to-5y-realized-cap-30d-change": [0], "from-4y-to-5y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3080,8 +3736,16 @@ export function createVecIdToIndexes() { "from-5m-adjusted-spent-output-profit-ratio": [0], "from-5m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-5m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-5m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-5m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-5m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-5m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-5m-realized-cap-30d-change": [0], "from-5m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3136,8 +3800,16 @@ export function createVecIdToIndexes() { "from-5y-adjusted-spent-output-profit-ratio": [0], "from-5y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-5y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-5y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-5y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-realized-cap-30d-change": [0], "from-5y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3187,8 +3859,16 @@ export function createVecIdToIndexes() { "from-5y-to-7y-adjusted-spent-output-profit-ratio": [0], "from-5y-to-7y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-to-7y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-to-7y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-to-7y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-to-7y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-to-7y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-to-7y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-to-7y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-to-7y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-5y-to-7y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-to-7y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-5y-to-7y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-5y-to-7y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-to-7y-realized-cap-30d-change": [0], "from-5y-to-7y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3248,8 +3928,16 @@ export function createVecIdToIndexes() { "from-6m-adjusted-spent-output-profit-ratio": [0], "from-6m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-6m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-6m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-6m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-realized-cap-30d-change": [0], "from-6m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3299,8 +3987,16 @@ export function createVecIdToIndexes() { "from-6m-to-1y-adjusted-spent-output-profit-ratio": [0], "from-6m-to-1y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-to-1y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-to-1y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-to-1y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-to-1y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-to-1y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-to-1y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-to-1y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-to-1y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-6m-to-1y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-to-1y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-6m-to-1y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-6m-to-1y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-to-1y-realized-cap-30d-change": [0], "from-6m-to-1y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3360,8 +4056,16 @@ export function createVecIdToIndexes() { "from-6y-adjusted-spent-output-profit-ratio": [0], "from-6y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-6y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-6y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-6y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-6y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-6y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-6y-realized-cap-30d-change": [0], "from-6y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3416,8 +4120,16 @@ export function createVecIdToIndexes() { "from-7y-adjusted-spent-output-profit-ratio": [0], "from-7y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-7y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-7y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-7y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-realized-cap-30d-change": [0], "from-7y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3467,8 +4179,16 @@ export function createVecIdToIndexes() { "from-7y-to-10y-adjusted-spent-output-profit-ratio": [0], "from-7y-to-10y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-to-10y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-to-10y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-to-10y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-to-10y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-to-10y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-to-10y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-to-10y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-to-10y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-7y-to-10y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-to-10y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-7y-to-10y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-7y-to-10y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-to-10y-realized-cap-30d-change": [0], "from-7y-to-10y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3528,8 +4248,16 @@ export function createVecIdToIndexes() { "from-8y-adjusted-spent-output-profit-ratio": [0], "from-8y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-8y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "from-8y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "from-8y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "from-8y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "from-8y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "from-8y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "from-8y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-8y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "from-8y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "from-8y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "from-8y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "from-8y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "from-8y-realized-cap-30d-change": [0], "from-8y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3581,6 +4309,9 @@ export function createVecIdToIndexes() { "from-8y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "from-8y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "from-8y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "halvingepoch": [0, 1, 4, 5, 7, 19, 22, 23], "height": [5, 20], "height-count": [0, 2], @@ -3608,8 +4339,16 @@ export function createVecIdToIndexes() { "lth-adjusted-spent-output-profit-ratio": [0], "lth-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "lth-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "lth-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "lth-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "lth-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "lth-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "lth-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "lth-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "lth-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "lth-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "lth-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "lth-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "lth-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "lth-realized-cap-30d-change": [0], "lth-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3661,13 +4400,18 @@ export function createVecIdToIndexes() { "lth-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "lth-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "lth-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], - "marketcap": [0, 1, 7, 19, 22, 23], - "max-days-between-ath": [0, 1, 7, 19, 22, 23], - "max-years-between-ath": [0, 1, 7, 19, 22, 23], + "marketcap": [0, 1, 5, 7, 19, 22, 23], + "max-days-between-aths": [0, 1, 7, 19, 22, 23], + "max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "max-years-between-aths": [0, 1, 7, 19, 22, 23], + "min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "monthindex": [0, 7], "monthindex-count": [19, 23], "negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "ohlc": [0, 1, 2, 5, 7, 19, 22, 23], "ohlc-in-cents": [0, 5], "ohlc-in-sats": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3715,8 +4459,16 @@ export function createVecIdToIndexes() { "p2a-count-median": [0], "p2a-count-min": [0, 1, 2, 7, 19, 22, 23], "p2a-count-sum": [0, 1, 2, 7, 19, 22, 23], + "p2a-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "p2a-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "p2a-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "p2a-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "p2a-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "p2a-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2a-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "p2a-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2a-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "p2a-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "p2a-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "p2a-realized-cap-30d-change": [0], "p2a-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3783,8 +4535,16 @@ export function createVecIdToIndexes() { "p2ms-count-median": [0], "p2ms-count-min": [0, 1, 2, 7, 19, 22, 23], "p2ms-count-sum": [0, 1, 2, 7, 19, 22, 23], + "p2ms-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "p2ms-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "p2ms-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "p2ms-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "p2ms-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "p2ms-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2ms-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "p2ms-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2ms-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "p2ms-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "p2ms-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "p2ms-realized-cap-30d-change": [0], "p2ms-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3850,8 +4610,16 @@ export function createVecIdToIndexes() { "p2pk33-count-median": [0], "p2pk33-count-min": [0, 1, 2, 7, 19, 22, 23], "p2pk33-count-sum": [0, 1, 2, 7, 19, 22, 23], + "p2pk33-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk33-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk33-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk33-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk33-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk33-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk33-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "p2pk33-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk33-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "p2pk33-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "p2pk33-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk33-realized-cap-30d-change": [0], "p2pk33-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3918,8 +4686,16 @@ export function createVecIdToIndexes() { "p2pk65-count-median": [0], "p2pk65-count-min": [0, 1, 2, 7, 19, 22, 23], "p2pk65-count-sum": [0, 1, 2, 7, 19, 22, 23], + "p2pk65-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk65-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk65-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk65-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk65-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk65-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk65-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "p2pk65-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk65-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "p2pk65-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "p2pk65-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk65-realized-cap-30d-change": [0], "p2pk65-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -3986,8 +4762,16 @@ export function createVecIdToIndexes() { "p2pkh-count-median": [0], "p2pkh-count-min": [0, 1, 2, 7, 19, 22, 23], "p2pkh-count-sum": [0, 1, 2, 7, 19, 22, 23], + "p2pkh-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pkh-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pkh-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pkh-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pkh-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "p2pkh-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pkh-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "p2pkh-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pkh-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "p2pkh-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "p2pkh-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "p2pkh-realized-cap-30d-change": [0], "p2pkh-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4054,8 +4838,16 @@ export function createVecIdToIndexes() { "p2sh-count-median": [0], "p2sh-count-min": [0, 1, 2, 7, 19, 22, 23], "p2sh-count-sum": [0, 1, 2, 7, 19, 22, 23], + "p2sh-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "p2sh-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "p2sh-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "p2sh-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "p2sh-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "p2sh-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2sh-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "p2sh-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2sh-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "p2sh-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "p2sh-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "p2sh-realized-cap-30d-change": [0], "p2sh-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4122,8 +4914,16 @@ export function createVecIdToIndexes() { "p2tr-count-median": [0], "p2tr-count-min": [0, 1, 2, 7, 19, 22, 23], "p2tr-count-sum": [0, 1, 2, 7, 19, 22, 23], + "p2tr-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "p2tr-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "p2tr-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "p2tr-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "p2tr-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "p2tr-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2tr-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "p2tr-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2tr-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "p2tr-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "p2tr-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "p2tr-realized-cap-30d-change": [0], "p2tr-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4190,8 +4990,16 @@ export function createVecIdToIndexes() { "p2wpkh-count-median": [0], "p2wpkh-count-min": [0, 1, 2, 7, 19, 22, 23], "p2wpkh-count-sum": [0, 1, 2, 7, 19, 22, 23], + "p2wpkh-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wpkh-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wpkh-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wpkh-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wpkh-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "p2wpkh-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wpkh-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "p2wpkh-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wpkh-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "p2wpkh-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "p2wpkh-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "p2wpkh-realized-cap-30d-change": [0], "p2wpkh-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4258,8 +5066,16 @@ export function createVecIdToIndexes() { "p2wsh-count-median": [0], "p2wsh-count-min": [0, 1, 2, 7, 19, 22, 23], "p2wsh-count-sum": [0, 1, 2, 7, 19, 22, 23], + "p2wsh-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wsh-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wsh-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wsh-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wsh-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "p2wsh-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wsh-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "p2wsh-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wsh-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "p2wsh-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "p2wsh-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "p2wsh-realized-cap-30d-change": [0], "p2wsh-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4368,11 +5184,83 @@ export function createVecIdToIndexes() { "realized-value": [0, 1, 2, 5, 7, 19, 22, 23], "sell-side-risk-ratio": [0], "spent-output-profit-ratio": [0], + "start-to-1d-adjusted-spent-output-profit-ratio": [0], + "start-to-1d-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "start-to-1d-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "start-to-1d-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "start-to-1d-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-realized-cap-30d-change": [0], + "start-to-1d-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "start-to-1d-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-sell-side-risk-ratio": [0], + "start-to-1d-spent-output-profit-ratio": [0], + "start-to-1d-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-supply-even": [0, 1, 5, 7, 19, 22, 23], + "start-to-1d-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "start-to-1d-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "start-to-1d-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "start-to-1d-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "start-to-1d-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "start-to-1d-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "sth-adjusted-spent-output-profit-ratio": [0], "sth-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "sth-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "sth-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "sth-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "sth-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "sth-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "sth-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "sth-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "sth-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "sth-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "sth-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "sth-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "sth-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "sth-realized-cap-30d-change": [0], "sth-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4508,8 +5396,16 @@ export function createVecIdToIndexes() { "unknown-adjusted-spent-output-profit-ratio": [0], "unknown-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "unknown-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "unknown-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "unknown-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "unknown-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "unknown-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "unknown-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "unknown-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "unknown-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "unknown-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "unknown-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "unknown-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "unknown-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "unknown-realized-cap-30d-change": [0], "unknown-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4577,11 +5473,275 @@ export function createVecIdToIndexes() { "unspendable-supply": [0, 1, 2, 5, 7, 19, 22, 23], "unspendable-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "unspendable-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-adjusted-spent-output-profit-ratio": [0], + "up-to-1-000sats-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "up-to-1-000sats-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-1-000sats-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "up-to-1-000sats-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-realized-cap-30d-change": [0], + "up-to-1-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-1-000sats-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-sell-side-risk-ratio": [0], + "up-to-1-000sats-spent-output-profit-ratio": [0], + "up-to-1-000sats-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-supply-even": [0, 1, 5, 7, 19, 22, 23], + "up-to-1-000sats-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "up-to-1-000sats-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "up-to-1-000sats-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "up-to-1-000sats-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "up-to-1-000sats-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1-000sats-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-adjusted-spent-output-profit-ratio": [0], + "up-to-10-000sats-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "up-to-10-000sats-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-10-000sats-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "up-to-10-000sats-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-realized-cap-30d-change": [0], + "up-to-10-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-10-000sats-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-sell-side-risk-ratio": [0], + "up-to-10-000sats-spent-output-profit-ratio": [0], + "up-to-10-000sats-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-supply-even": [0, 1, 5, 7, 19, 22, 23], + "up-to-10-000sats-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "up-to-10-000sats-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "up-to-10-000sats-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "up-to-10-000sats-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "up-to-10-000sats-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10-000sats-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-adjusted-spent-output-profit-ratio": [0], + "up-to-100btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "up-to-100btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-100btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "up-to-100btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-realized-cap-30d-change": [0], + "up-to-100btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-100btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-sell-side-risk-ratio": [0], + "up-to-100btc-spent-output-profit-ratio": [0], + "up-to-100btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-supply-even": [0, 1, 5, 7, 19, 22, 23], + "up-to-100btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "up-to-100btc-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "up-to-100btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "up-to-100btc-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "up-to-100btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-100btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-adjusted-spent-output-profit-ratio": [0], + "up-to-10btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "up-to-10btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-10btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "up-to-10btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-realized-cap-30d-change": [0], + "up-to-10btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-10btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-sell-side-risk-ratio": [0], + "up-to-10btc-spent-output-profit-ratio": [0], + "up-to-10btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-supply-even": [0, 1, 5, 7, 19, 22, 23], + "up-to-10btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "up-to-10btc-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "up-to-10btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "up-to-10btc-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "up-to-10btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-10y-adjusted-spent-output-profit-ratio": [0], "up-to-10y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-10y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-10y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-10y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-10y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-10y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-10y-realized-cap-30d-change": [0], "up-to-10y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4636,8 +5796,16 @@ export function createVecIdToIndexes() { "up-to-15y-adjusted-spent-output-profit-ratio": [0], "up-to-15y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-15y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-15y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-15y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-15y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-15y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-15y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-15y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-15y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-15y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-15y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-15y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-15y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-15y-realized-cap-30d-change": [0], "up-to-15y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4689,11 +5857,83 @@ export function createVecIdToIndexes() { "up-to-15y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-15y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-15y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-adjusted-spent-output-profit-ratio": [0], + "up-to-1btc-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], + "up-to-1btc-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-1btc-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], + "up-to-1btc-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-realized-cap-30d-change": [0], + "up-to-1btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-1w-sma": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-1y-sma": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-1y-sma-momentum-oscillator": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-m1sd": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-m1sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-m2sd": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-m2sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-m3sd": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-m3sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p0-1": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p0-1-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p0-5": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p0-5-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p1": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p1-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p1sd": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p1sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p2sd": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p2sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p3sd": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p3sd-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p99": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p99-5": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p99-5-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p99-9": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p99-9-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-p99-as-price": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-1btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-realized-value": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-sell-side-risk-ratio": [0], + "up-to-1btc-spent-output-profit-ratio": [0], + "up-to-1btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-supply-even": [0, 1, 5, 7, 19, 22, 23], + "up-to-1btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-supply-in-loss": [0, 1, 5, 7, 19, 22, 23], + "up-to-1btc-supply-in-profit": [0, 1, 5, 7, 19, 22, 23], + "up-to-1btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-unrealized-loss": [0, 1, 5, 7, 19, 22, 23], + "up-to-1btc-unrealized-profit": [0, 1, 5, 7, 19, 22, 23], + "up-to-1btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1d-adjusted-spent-output-profit-ratio": [0], "up-to-1d-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1d-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1d-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1d-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1d-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1d-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1d-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1d-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1d-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-1d-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1d-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-1d-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-1d-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1d-realized-cap-30d-change": [0], "up-to-1d-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4748,8 +5988,16 @@ export function createVecIdToIndexes() { "up-to-1m-adjusted-spent-output-profit-ratio": [0], "up-to-1m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-1m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-1m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-1m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1m-realized-cap-30d-change": [0], "up-to-1m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4804,8 +6052,16 @@ export function createVecIdToIndexes() { "up-to-1w-adjusted-spent-output-profit-ratio": [0], "up-to-1w-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1w-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1w-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1w-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1w-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1w-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1w-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1w-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1w-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-1w-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1w-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-1w-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-1w-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1w-realized-cap-30d-change": [0], "up-to-1w-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4860,8 +6116,16 @@ export function createVecIdToIndexes() { "up-to-1y-adjusted-spent-output-profit-ratio": [0], "up-to-1y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-1y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-1y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-1y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1y-realized-cap-30d-change": [0], "up-to-1y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4916,8 +6180,16 @@ export function createVecIdToIndexes() { "up-to-2m-adjusted-spent-output-profit-ratio": [0], "up-to-2m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-2m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-2m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-2m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2m-realized-cap-30d-change": [0], "up-to-2m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -4972,8 +6244,16 @@ export function createVecIdToIndexes() { "up-to-2y-adjusted-spent-output-profit-ratio": [0], "up-to-2y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-2y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-2y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-2y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2y-realized-cap-30d-change": [0], "up-to-2y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -5028,8 +6308,16 @@ export function createVecIdToIndexes() { "up-to-3m-adjusted-spent-output-profit-ratio": [0], "up-to-3m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-3m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-3m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-3m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3m-realized-cap-30d-change": [0], "up-to-3m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -5084,8 +6372,16 @@ export function createVecIdToIndexes() { "up-to-3y-adjusted-spent-output-profit-ratio": [0], "up-to-3y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-3y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-3y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-3y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3y-realized-cap-30d-change": [0], "up-to-3y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -5140,8 +6436,16 @@ export function createVecIdToIndexes() { "up-to-4m-adjusted-spent-output-profit-ratio": [0], "up-to-4m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-4m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-4m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-4m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4m-realized-cap-30d-change": [0], "up-to-4m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -5196,8 +6500,16 @@ export function createVecIdToIndexes() { "up-to-4y-adjusted-spent-output-profit-ratio": [0], "up-to-4y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-4y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-4y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-4y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4y-realized-cap-30d-change": [0], "up-to-4y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -5252,8 +6564,16 @@ export function createVecIdToIndexes() { "up-to-5m-adjusted-spent-output-profit-ratio": [0], "up-to-5m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-5m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-5m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-5m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5m-realized-cap-30d-change": [0], "up-to-5m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -5308,8 +6628,16 @@ export function createVecIdToIndexes() { "up-to-5y-adjusted-spent-output-profit-ratio": [0], "up-to-5y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-5y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-5y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-5y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5y-realized-cap-30d-change": [0], "up-to-5y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -5364,8 +6692,16 @@ export function createVecIdToIndexes() { "up-to-6m-adjusted-spent-output-profit-ratio": [0], "up-to-6m-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6m-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6m-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6m-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6m-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6m-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6m-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6m-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6m-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-6m-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6m-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-6m-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-6m-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6m-realized-cap-30d-change": [0], "up-to-6m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -5420,8 +6756,16 @@ export function createVecIdToIndexes() { "up-to-6y-adjusted-spent-output-profit-ratio": [0], "up-to-6y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-6y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-6y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-6y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6y-realized-cap-30d-change": [0], "up-to-6y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -5476,8 +6820,16 @@ export function createVecIdToIndexes() { "up-to-7y-adjusted-spent-output-profit-ratio": [0], "up-to-7y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-7y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-7y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-7y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-7y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-7y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-7y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-7y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-7y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-7y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-7y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-7y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-7y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-7y-realized-cap-30d-change": [0], "up-to-7y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], @@ -5532,8 +6884,16 @@ export function createVecIdToIndexes() { "up-to-8y-adjusted-spent-output-profit-ratio": [0], "up-to-8y-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-8y-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-8y-halved-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-8y-halved-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-8y-halved-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-8y-max-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-8y-min-price-paid": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-8y-negative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-8y-negative-unrealized-loss": [1, 5, 7, 19, 22, 23], "up-to-8y-net-realized-profit-and-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-8y-net-unrealized-profit-and-loss": [1, 5, 7, 19, 22, 23], + "up-to-8y-net-unrealized-profit-and-loss-relative-to-market-cap": [1, 5, 7, 19, 22, 23], "up-to-8y-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-8y-realized-cap-30d-change": [0], "up-to-8y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23],