From 93e01902e32288d476eaa700f4c8429c8a4575e0 Mon Sep 17 00:00:00 2001 From: nym21 Date: Tue, 27 May 2025 15:19:53 +0200 Subject: [PATCH] global: snapshot --- Cargo.lock | 43 +- Cargo.toml | 2 + README.md | 1 + crates/brk/Cargo.toml | 3 + crates/brk/src/lib.rs | 4 + crates/brk_cli/Cargo.toml | 2 + crates/brk_cli/src/run.rs | 6 +- crates/brk_computer/Cargo.toml | 3 + crates/brk_computer/examples/main.rs | 6 +- crates/brk_computer/src/lib.rs | 4 +- crates/brk_computer/src/states/cohort.rs | 32 +- .../src/states/outputs/by_size.rs | 26 +- .../src/states/outputs/by_type.rs | 4 +- .../src/states/outputs/by_unspendable_type.rs | 8 +- crates/brk_computer/src/states/outputs/mod.rs | 53 +- crates/brk_computer/src/states/realized.rs | 111 +- crates/brk_computer/src/stores.rs | 2 +- crates/brk_computer/src/vecs/blocks.rs | 21 +- crates/brk_computer/src/vecs/constants.rs | 4 +- crates/brk_computer/src/vecs/fetched.rs | 4 +- .../brk_computer/src/vecs/grouped/builder.rs | 109 +- .../src/vecs/grouped/from_dateindex.rs | 6 +- .../src/vecs/grouped/from_height.rs | 5 +- .../src/vecs/grouped/from_height_strict.rs | 4 +- .../src/vecs/grouped/from_txindex.rs | 17 +- .../src/vecs/grouped/ratio_from_dateindex.rs | 6 +- .../src/vecs/grouped/value_from_height.rs | 6 +- .../src/vecs/grouped/value_from_txindex.rs | 4 +- crates/brk_computer/src/vecs/indexes.rs | 4 +- crates/brk_computer/src/vecs/market.rs | 10 +- crates/brk_computer/src/vecs/mining.rs | 4 +- crates/brk_computer/src/vecs/mod.rs | 3 +- crates/brk_computer/src/vecs/transactions.rs | 66 +- crates/brk_computer/src/vecs/utxos/cohort.rs | 473 ++++++- crates/brk_computer/src/vecs/utxos/mod.rs | 101 +- crates/brk_core/Cargo.toml | 3 +- .../{brk_vec => brk_core}/src/enums/error.rs | 17 + crates/{brk_vec => brk_core}/src/enums/mod.rs | 0 .../{brk_vec => brk_core}/src/enums/value.rs | 0 crates/brk_core/src/error.rs | 49 - crates/brk_core/src/lib.rs | 4 +- crates/brk_core/src/structs/mod.rs | 2 + .../src/structs/version.rs | 2 +- crates/brk_indexer/Cargo.toml | 3 +- crates/brk_indexer/examples/main.rs | 6 +- crates/brk_indexer/src/indexes.rs | 4 +- crates/brk_indexer/src/lib.rs | 9 +- .../src/{stores/mod.rs => stores.rs} | 11 +- .../brk_indexer/src/{vecs/mod.rs => vecs.rs} | 11 +- crates/brk_parser/src/lib.rs | 3 - crates/brk_query/Cargo.toml | 1 + crates/brk_query/src/lib.rs | 5 +- crates/brk_query/src/vec_trees.rs | 8 +- crates/brk_server/Cargo.toml | 3 +- crates/brk_server/examples/main.rs | 10 +- crates/brk_server/src/api/query/dts.rs | 10 - crates/brk_server/src/lib.rs | 1 - crates/brk_store/Cargo.toml | 16 + .../stores/base.rs => brk_store/src/lib.rs} | 9 +- .../src/stores => brk_store/src}/meta.rs | 27 +- crates/brk_vec/examples/main.rs | 5 +- crates/brk_vec/src/lib.rs | 2 - crates/brk_vec/src/structs/compressed.rs | 2 +- .../src/structs/compressed_pages_meta.rs | 3 +- crates/brk_vec/src/structs/length.rs | 3 +- crates/brk_vec/src/structs/mod.rs | 2 - crates/brk_vec/src/traits/any.rs | 2 +- crates/brk_vec/src/traits/collectable.rs | 2 +- crates/brk_vec/src/traits/generic.rs | 3 +- crates/brk_vec/src/traits/index.rs | 2 +- crates/brk_vec/src/traits/iterator.rs | 2 +- crates/brk_vec/src/variants/compressed.rs | 5 +- crates/brk_vec/src/variants/computed.rs | 4 +- crates/brk_vec/src/variants/eager.rs | 8 +- crates/brk_vec/src/variants/indexed.rs | 6 +- crates/brk_vec/src/variants/lazy1.rs | 5 +- crates/brk_vec/src/variants/lazy2.rs | 4 +- crates/brk_vec/src/variants/lazy3.rs | 4 +- crates/brk_vec/src/variants/raw.rs | 3 +- crates/brk_vec/src/variants/stored.rs | 3 +- websites/kibo.money/scripts/main.js | 298 +++-- websites/kibo.money/scripts/options.js | 1191 ++++++----------- websites/kibo.money/scripts/simulation.js | 18 +- .../kibo.money/scripts/vecid-to-indexes.js | 891 +++++++++++- 84 files changed, 2445 insertions(+), 1394 deletions(-) rename crates/{brk_vec => brk_core}/src/enums/error.rs (84%) rename crates/{brk_vec => brk_core}/src/enums/mod.rs (100%) rename crates/{brk_vec => brk_core}/src/enums/value.rs (100%) delete mode 100644 crates/brk_core/src/error.rs rename crates/{brk_vec => brk_core}/src/structs/version.rs (98%) rename crates/brk_indexer/src/{stores/mod.rs => stores.rs} (99%) rename crates/brk_indexer/src/{vecs/mod.rs => vecs.rs} (99%) create mode 100644 crates/brk_store/Cargo.toml rename crates/{brk_indexer/src/stores/base.rs => brk_store/src/lib.rs} (97%) rename crates/{brk_indexer/src/stores => brk_store/src}/meta.rs (85%) diff --git a/Cargo.lock b/Cargo.lock index b2358c3f3..3914c01a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -393,6 +393,7 @@ dependencies = [ "brk_parser", "brk_query", "brk_server", + "brk_store", "brk_vec", ] @@ -400,6 +401,7 @@ dependencies = [ name = "brk_cli" version = "0.0.40" dependencies = [ + "bitcoincore-rpc", "brk_computer", "brk_core", "brk_exit", @@ -416,6 +418,7 @@ dependencies = [ "log", "serde", "tabled", + "tokio", "toml", ] @@ -423,6 +426,8 @@ dependencies = [ name = "brk_computer" version = "0.0.40" dependencies = [ + "bitcoin", + "bitcoincore-rpc", "brk_core", "brk_exit", "brk_fetcher", @@ -435,6 +440,7 @@ dependencies = [ "color-eyre", "derive_deref", "fjall", + "jiff", "log", "rayon", "serde", @@ -458,6 +464,7 @@ dependencies = [ "serde", "serde_bytes", "serde_derive", + "serde_json", "zerocopy", "zerocopy-derive", ] @@ -494,6 +501,7 @@ dependencies = [ "brk_exit", "brk_logger", "brk_parser", + "brk_store", "brk_vec", "byteview 0.7.0", "color-eyre", @@ -533,6 +541,7 @@ name = "brk_query" version = "0.0.40" dependencies = [ "brk_computer", + "brk_core", "brk_indexer", "brk_vec", "clap", @@ -550,6 +559,7 @@ name = "brk_server" version = "0.0.40" dependencies = [ "axum", + "bitcoincore-rpc", "brk_computer", "brk_core", "brk_exit", @@ -573,6 +583,17 @@ dependencies = [ "zip", ] +[[package]] +name = "brk_store" +version = "0.0.40" +dependencies = [ + "brk_core", + "byteview 0.7.0", + "color-eyre", + "fjall", + "zerocopy", +] + [[package]] name = "brk_vec" version = "0.0.40" @@ -2162,16 +2183,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - [[package]] name = "parking_lot_core" version = "0.9.10" @@ -2736,15 +2747,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "signal-hook-registry" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" -dependencies = [ - "libc", -] - [[package]] name = "simd-adler32" version = "0.3.7" @@ -2956,12 +2958,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" dependencies = [ "backtrace", - "bytes", "libc", "mio", - "parking_lot", "pin-project-lite", - "signal-hook-registry", "socket2", "tokio-macros", "windows-sys 0.52.0", diff --git a/Cargo.toml b/Cargo.toml index b7a50ea9d..5d0be255c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,7 @@ brk_logger = { version = "0", path = "crates/brk_logger" } brk_parser = { version = "0", path = "crates/brk_parser" } brk_query = { version = "0", path = "crates/brk_query" } brk_server = { version = "0", path = "crates/brk_server" } +brk_store = { version = "0", path = "crates/brk_store" } brk_vec = { version = "0", path = "crates/brk_vec" } byteview = "0.7.0" clap = { version = "4.5.38", features = ["string"] } @@ -44,6 +45,7 @@ serde = { version = "1.0.219" } serde_derive = "1.0.219" serde_json = { version = "1.0.140", features = ["float_roundtrip"] } tabled = "0.19.0" +tokio = { version = "1.45.1", features = ["rt-multi-thread"] } zerocopy = { version = "0.8.25" } zerocopy-derive = "0.8.25" diff --git a/README.md b/README.md index 2f208d645..cba15808e 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ In contrast, existing alternatives tend to be either [very costly](https://studi - [`brk_parser`](https://crates.io/crates/brk_parser): A very fast Bitcoin Core block parser and iterator built on top of bitcoin-rust - [`brk_query`](https://crates.io/crates/brk_query): A library that finds requested datasets. - [`brk_server`](https://crates.io/crates/brk_server): A server that serves Bitcoin data and swappable front-ends, built on top of `brk_indexer`, `brk_fetcher` and `brk_computer` +- [`brk_store`](https://crates.io/crates/brk_store): A thin wrapper around [`fjall`](https://crates.io/crates/fjall) - [`brk_vec`](https://crates.io/crates/brk_vec): A push-only, truncable, compressable, saveable Vec ## Acknowledgments diff --git a/crates/brk/Cargo.toml b/crates/brk/Cargo.toml index 383b5f3a7..3a662a706 100644 --- a/crates/brk/Cargo.toml +++ b/crates/brk/Cargo.toml @@ -18,6 +18,7 @@ full = [ "parser", "query", "server", + "store", "vec", ] core = ["brk_core"] @@ -29,6 +30,7 @@ logger = ["brk_logger"] parser = ["brk_parser"] query = ["brk_query"] server = ["brk_server"] +store = ["brk_store"] vec = ["brk_vec"] [dependencies] @@ -42,6 +44,7 @@ brk_logger = { workspace = true, optional = true } brk_parser = { workspace = true, optional = true } brk_query = { workspace = true, optional = true } brk_server = { workspace = true, optional = true } +brk_store = { workspace = true, optional = true } brk_vec = { workspace = true, optional = true } [package.metadata.docs.rs] diff --git a/crates/brk/src/lib.rs b/crates/brk/src/lib.rs index ff0ad9975..f8d159f50 100644 --- a/crates/brk/src/lib.rs +++ b/crates/brk/src/lib.rs @@ -36,6 +36,10 @@ pub use brk_query as query; #[doc(inline)] pub use brk_server as server; +#[cfg(feature = "store")] +#[doc(inline)] +pub use brk_store as store; + #[cfg(feature = "vec")] #[doc(inline)] pub use brk_vec as vec; diff --git a/crates/brk_cli/Cargo.toml b/crates/brk_cli/Cargo.toml index 2d00d2904..12fe222e4 100644 --- a/crates/brk_cli/Cargo.toml +++ b/crates/brk_cli/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true repository.workspace = true [dependencies] +bitcoincore-rpc = { workspace = true } brk_computer = { workspace = true } brk_core = { workspace = true } brk_exit = { workspace = true } @@ -23,6 +24,7 @@ color-eyre = { workspace = true } log = { workspace = true } serde = { workspace = true } tabled = { workspace = true } +tokio = { workspace = true } toml = "0.8.22" [[bin]] diff --git a/crates/brk_cli/src/run.rs b/crates/brk_cli/src/run.rs index d8c2cf4a5..8044a8a93 100644 --- a/crates/brk_cli/src/run.rs +++ b/crates/brk_cli/src/run.rs @@ -5,13 +5,13 @@ use std::{ time::Duration, }; +use bitcoincore_rpc::{self, Auth, Client, RpcApi}; use brk_computer::Computer; use brk_core::{default_bitcoin_path, default_brk_path, dot_brk_path}; use brk_exit::Exit; use brk_fetcher::Fetcher; use brk_indexer::Indexer; -use brk_parser::rpc::{self, Auth, Client, RpcApi}; -use brk_server::{Server, Website, tokio}; +use brk_server::{Server, Website}; use brk_vec::Computation; use clap_derive::{Parser, ValueEnum}; use color_eyre::eyre::eyre; @@ -314,7 +314,7 @@ impl RunConfig { } pub fn rpc(&self) -> color_eyre::Result<&'static Client> { - Ok(Box::leak(Box::new(rpc::Client::new( + Ok(Box::leak(Box::new(Client::new( &format!( "http://{}:{}", self.rpcconnect().unwrap_or(&"localhost".to_string()), diff --git a/crates/brk_computer/Cargo.toml b/crates/brk_computer/Cargo.toml index c966bef9f..a183387c0 100644 --- a/crates/brk_computer/Cargo.toml +++ b/crates/brk_computer/Cargo.toml @@ -7,6 +7,8 @@ license.workspace = true repository.workspace = true [dependencies] +bitcoin = { workspace = true } +bitcoincore-rpc = { workspace = true } brk_core = { workspace = true } brk_exit = { workspace = true } brk_fetcher = { workspace = true } @@ -19,6 +21,7 @@ clap_derive = { workspace = true } color-eyre = { workspace = true } derive_deref = { workspace = true } fjall = { workspace = true } +jiff = { workspace = true } log = { workspace = true } rayon = { workspace = true } serde = { workspace = true } diff --git a/crates/brk_computer/examples/main.rs b/crates/brk_computer/examples/main.rs index 7af68a97a..9370290e4 100644 --- a/crates/brk_computer/examples/main.rs +++ b/crates/brk_computer/examples/main.rs @@ -5,7 +5,7 @@ use brk_core::{default_bitcoin_path, default_brk_path}; use brk_exit::Exit; use brk_fetcher::Fetcher; use brk_indexer::Indexer; -use brk_parser::{Parser, rpc}; +use brk_parser::Parser; use brk_vec::Computation; pub fn main() -> color_eyre::Result<()> { @@ -15,9 +15,9 @@ pub fn main() -> color_eyre::Result<()> { let bitcoin_dir = default_bitcoin_path(); - let rpc = Box::leak(Box::new(rpc::Client::new( + let rpc = Box::leak(Box::new(bitcoincore_rpc::Client::new( "http://localhost:8332", - rpc::Auth::CookieFile(bitcoin_dir.join(".cookie")), + bitcoincore_rpc::Auth::CookieFile(bitcoin_dir.join(".cookie")), )?)); let exit = Exit::new(); diff --git a/crates/brk_computer/src/lib.rs b/crates/brk_computer/src/lib.rs index f017fb506..32024c048 100644 --- a/crates/brk_computer/src/lib.rs +++ b/crates/brk_computer/src/lib.rs @@ -5,11 +5,11 @@ use std::path::{Path, PathBuf}; +use brk_core::Version; use brk_exit::Exit; use brk_fetcher::Fetcher; use brk_indexer::Indexer; -pub use brk_parser::rpc; -use brk_vec::{AnyCollectableVec, Compressed, Computation, Version}; +use brk_vec::{AnyCollectableVec, Compressed, Computation}; mod states; mod stores; diff --git a/crates/brk_computer/src/states/cohort.rs b/crates/brk_computer/src/states/cohort.rs index e46b0a1d5..8f665bc0a 100644 --- a/crates/brk_computer/src/states/cohort.rs +++ b/crates/brk_computer/src/states/cohort.rs @@ -2,7 +2,6 @@ use brk_core::Dollars; use super::{RealizedState, SupplyState}; -// Vecs ? probably #[derive(Debug, Default, Clone)] pub struct CohortState { pub supply: SupplyState, @@ -11,6 +10,12 @@ pub struct CohortState { } impl CohortState { + pub fn reset_single_iteration_values(&mut self) { + if let Some(realized) = self.realized.as_mut() { + realized.reset_single_iteration_values(); + } + } + pub fn increment(&mut self, supply_state: &SupplyState, price: Option) { self.supply += supply_state; if let Some(realized) = self.realized.as_mut() { @@ -25,7 +30,28 @@ impl CohortState { } } - pub fn send(&mut self, supply_state: &SupplyState, price: Option) {} + pub fn receive(&mut self, supply_state: &SupplyState, price: Option) { + self.supply += supply_state; + if let Some(realized) = self.realized.as_mut() { + realized.receive(supply_state, price.unwrap()); + } + } - pub fn receive(&mut self, supply_state: &SupplyState, price: Option) {} + pub fn send( + &mut self, + supply_state: &SupplyState, + current_price: Option, + prev_price: Option, + older_than_hour: bool, + ) { + self.supply -= supply_state; + if let Some(realized) = self.realized.as_mut() { + realized.send( + supply_state, + current_price.unwrap(), + prev_price.unwrap(), + older_than_hour, + ); + } + } } diff --git a/crates/brk_computer/src/states/outputs/by_size.rs b/crates/brk_computer/src/states/outputs/by_size.rs index 118d99464..085d1a211 100644 --- a/crates/brk_computer/src/states/outputs/by_size.rs +++ b/crates/brk_computer/src/states/outputs/by_size.rs @@ -107,31 +107,31 @@ impl OutputsBySize { pub fn get_mut(&mut self, group: usize) -> &mut T { if group == 0 { &mut self._0sat - } else if group == 10 { + } else if group == 1 { &mut self.from_1sat_to_10sats - } else if group == 100 { + } else if group == 10 { &mut self.from_10sats_to_100sats - } else if group == 1_000 { + } else if group == 100 { &mut self.from_100sats_to_1_000sats - } else if group == 10_000 { + } else if group == 1_000 { &mut self.from_1_000sats_to_10_000sats - } else if group == 100_000 { + } else if group == 10_000 { &mut self.from_10_000sats_to_100_000sats - } else if group == 1_000_000 { + } else if group == 100_000 { &mut self.from_100_000sats_to_1_000_000sats - } else if group == 10_000_000 { + } else if group == 1_000_000 { &mut self.from_1_000_000sats_to_10_000_000sats - } else if group == 1_00_000_000 { + } else if group == 10_000_000 { &mut self.from_10_000_000sats_to_1btc - } else if group == 10_00_000_000 { + } else if group == 1_00_000_000 { &mut self.from_1btc_to_10btc - } else if group == 100_00_000_000 { + } else if group == 10_00_000_000 { &mut self.from_10btc_to_100btc - } else if group == 1_000_00_000_000 { + } else if group == 100_00_000_000 { &mut self.from_100btc_to_1_000btc - } else if group == 10_000_00_000_000 { + } else if group == 1_000_00_000_000 { &mut self.from_1_000btc_to_10_000btc - } else if group == 100_000_00_000_000 { + } else if group == 10_000_00_000_000 { &mut self.from_10_000btc_to_100_000btc } else { &mut self.from_100_000btc diff --git a/crates/brk_computer/src/states/outputs/by_type.rs b/crates/brk_computer/src/states/outputs/by_type.rs index a64d4b691..9495c6887 100644 --- a/crates/brk_computer/src/states/outputs/by_type.rs +++ b/crates/brk_computer/src/states/outputs/by_type.rs @@ -24,7 +24,7 @@ impl OutputsByType { OutputType::P2A => &self.spendable.p2a, OutputType::Empty => &self.spendable.empty, OutputType::Unknown => &self.spendable.unknown, - OutputType::OpReturn => &self.unspendable.op_return, + OutputType::OpReturn => &self.unspendable.opreturn, } } @@ -41,7 +41,7 @@ impl OutputsByType { OutputType::P2A => &mut self.spendable.p2a, OutputType::Unknown => &mut self.spendable.unknown, OutputType::Empty => &mut self.spendable.empty, - OutputType::OpReturn => &mut self.unspendable.op_return, + OutputType::OpReturn => &mut self.unspendable.opreturn, } } diff --git a/crates/brk_computer/src/states/outputs/by_unspendable_type.rs b/crates/brk_computer/src/states/outputs/by_unspendable_type.rs index 66d422918..6f5673539 100644 --- a/crates/brk_computer/src/states/outputs/by_unspendable_type.rs +++ b/crates/brk_computer/src/states/outputs/by_unspendable_type.rs @@ -2,12 +2,12 @@ use std::ops::{Add, AddAssign}; #[derive(Default, Clone)] pub struct OutputsByUnspendableType { - pub op_return: T, + pub opreturn: T, } impl OutputsByUnspendableType { pub fn as_vec(&self) -> [&T; 1] { - [&self.op_return] + [&self.opreturn] } } @@ -18,7 +18,7 @@ where type Output = Self; fn add(self, rhs: Self) -> Self::Output { Self { - op_return: self.op_return + rhs.op_return, + opreturn: self.opreturn + rhs.opreturn, } } } @@ -28,6 +28,6 @@ where T: AddAssign, { fn add_assign(&mut self, rhs: Self) { - self.op_return += rhs.op_return; + self.opreturn += rhs.opreturn; } } diff --git a/crates/brk_computer/src/states/outputs/mod.rs b/crates/brk_computer/src/states/outputs/mod.rs index 7f7f15c29..bb67d5c95 100644 --- a/crates/brk_computer/src/states/outputs/mod.rs +++ b/crates/brk_computer/src/states/outputs/mod.rs @@ -2,7 +2,7 @@ use brk_vec::StoredIndex; use rayon::prelude::*; use std::{collections::BTreeMap, ops::ControlFlow}; -use brk_core::{Dollars, HalvingEpoch, Height, Timestamp}; +use brk_core::{CheckedSub, Dollars, HalvingEpoch, Height, Timestamp}; mod by_epoch; mod by_from; @@ -133,16 +133,27 @@ impl Outputs<(OutputFilter, vecs::utxos::cohort::Vecs)> { .collect::>(); let last_timestamp = chain_state.last().unwrap().timestamp; + let current_price = chain_state.last().unwrap().price; height_to_sent.into_iter().for_each(|(height, sent)| { let block_state = chain_state.get(height.unwrap_to_usize()).unwrap(); - let price = block_state.price; + let prev_price = block_state.price; let days_old = block_state .timestamp .difference_in_days_between(last_timestamp); - self.all.1.state.decrement(&sent.spendable_supply, price); + let older_than_hour = + jiff::Timestamp::from(last_timestamp.checked_sub(block_state.timestamp).unwrap()) + .as_second() + >= 60 * 60; + + self.all.1.state.send( + &sent.spendable_supply, + current_price, + prev_price, + older_than_hour, + ); time_based_vecs .iter_mut() @@ -154,25 +165,32 @@ impl Outputs<(OutputFilter, vecs::utxos::cohort::Vecs)> { _ => unreachable!(), }) .for_each(|(_, vecs)| { - vecs.state.decrement(&sent.spendable_supply, price); + vecs.state.send( + &sent.spendable_supply, + current_price, + prev_price, + older_than_hour, + ); }); sent.by_type.spendable.as_typed_vec().into_iter().for_each( |(output_type, supply_state)| { - self.by_type - .get_mut(output_type) - .1 - .state - .decrement(supply_state, price) + self.by_type.get_mut(output_type).1.state.send( + supply_state, + current_price, + prev_price, + older_than_hour, + ) }, ); sent.by_size.into_iter().for_each(|(group, supply_state)| { - self.by_size - .get_mut(group) - .1 - .state - .decrement(&supply_state, price); + self.by_size.get_mut(group).1.state.send( + &supply_state, + current_price, + prev_price, + older_than_hour, + ); }); }); } @@ -189,7 +207,7 @@ impl Outputs<(OutputFilter, vecs::utxos::cohort::Vecs)> { .into_iter() .chain(self.by_up_to.as_mut_vec().map(|(_, v)| v)) .for_each(|v| { - v.state.increment(&supply_state, price); + v.state.receive(&supply_state, price); }); self.by_type @@ -200,8 +218,7 @@ impl Outputs<(OutputFilter, vecs::utxos::cohort::Vecs)> { OutputFilter::Type(output_type) => *output_type, _ => unreachable!(), }; - vecs.state - .increment(received.by_type.get(output_type), price) + vecs.state.receive(received.by_type.get(output_type), price) }); received @@ -212,7 +229,7 @@ impl Outputs<(OutputFilter, vecs::utxos::cohort::Vecs)> { .get_mut(group) .1 .state - .increment(&supply_state, price); + .receive(&supply_state, price); }); } } diff --git a/crates/brk_computer/src/states/realized.rs b/crates/brk_computer/src/states/realized.rs index f824982a4..6ed11e964 100644 --- a/crates/brk_computer/src/states/realized.rs +++ b/crates/brk_computer/src/states/realized.rs @@ -1,49 +1,98 @@ +use std::cmp::Ordering; + use brk_core::{Bitcoin, CheckedSub, Dollars}; use super::SupplyState; #[derive(Debug, Default, Clone)] pub struct RealizedState { - pub realized_cap: Dollars, - // pub realized_profit: Dollars, // sent price vs now price - // pub realized_loss: Dollars, // sent price vs now price - // pub value_created: Dollars, // supply * price now - // pub adjusted_value_created: Dollars, // supply - up to 1 hour supply * price now - // pub value_destroyed: Dollars, // supply * price then - // pub adjusted_value_destroyed: Dollars, // supply - up to 1 hour supply * price then + pub cap: Dollars, + pub profit: Dollars, + pub loss: Dollars, + pub value_created: Dollars, + pub adj_value_created: Dollars, + pub value_destroyed: Dollars, + pub adj_value_destroyed: Dollars, } impl RealizedState { pub const NAN: Self = Self { - realized_cap: Dollars::NAN, - // realized_profit: Dollars::NAN, - // realized_loss: Dollars::NAN, - // value_created: Dollars::NAN, - // adjusted_value_created: Dollars::NAN, - // value_destroyed: Dollars::NAN, - // adjusted_value_destroyed: Dollars::NAN, + cap: Dollars::NAN, + profit: Dollars::NAN, + loss: Dollars::NAN, + value_created: Dollars::NAN, + adj_value_created: Dollars::NAN, + value_destroyed: Dollars::NAN, + adj_value_destroyed: Dollars::NAN, }; - pub fn increment(&mut self, supply_state: &SupplyState, price: Dollars) { - if supply_state.value.is_not_zero() { - if self.realized_cap == Dollars::NAN { - self.realized_cap = Dollars::ZERO; - // self.realized_profit = Dollars::ZERO; - // self.realized_loss = Dollars::ZERO; - // self.value_created = Dollars::ZERO; - // self.adjusted_value_created = Dollars::ZERO; - // self.value_destroyed = Dollars::ZERO; - // self.adjusted_value_destroyed = Dollars::ZERO; - } - - self.realized_cap += price * Bitcoin::from(supply_state.value); + pub fn reset_single_iteration_values(&mut self) { + if self.cap != Dollars::NAN { + self.profit = Dollars::ZERO; + self.loss = Dollars::ZERO; + self.value_created = Dollars::ZERO; + self.adj_value_created = Dollars::ZERO; + self.value_destroyed = Dollars::ZERO; + self.adj_value_destroyed = Dollars::ZERO; } } + pub fn increment(&mut self, supply_state: &SupplyState, price: Dollars) { + if supply_state.value.is_zero() { + return; + } + + if self.cap == Dollars::NAN { + self.cap = Dollars::ZERO; + self.profit = Dollars::ZERO; + self.loss = Dollars::ZERO; + self.value_created = Dollars::ZERO; + self.adj_value_created = Dollars::ZERO; + self.value_destroyed = Dollars::ZERO; + self.adj_value_destroyed = Dollars::ZERO; + } + + let value = price * Bitcoin::from(supply_state.value); + self.cap += value; + } + pub fn decrement(&mut self, supply_state: &SupplyState, price: Dollars) { - self.realized_cap = self - .realized_cap - .checked_sub(price * Bitcoin::from(supply_state.value)) - .unwrap(); + let value = price * Bitcoin::from(supply_state.value); + self.cap = self.cap.checked_sub(value).unwrap(); + } + + pub fn receive(&mut self, supply_state: &SupplyState, current_price: Dollars) { + self.increment(supply_state, current_price); + } + + pub fn send( + &mut self, + supply_state: &SupplyState, + current_price: Dollars, + prev_price: Dollars, + older_than_hour: bool, + ) { + let current_value = current_price * Bitcoin::from(supply_state.value); + let prev_value = prev_price * Bitcoin::from(supply_state.value); + + self.value_created += current_value; + self.value_destroyed += prev_value; + + if older_than_hour { + self.adj_value_created += current_value; + self.adj_value_destroyed += prev_value; + } + + match current_price.cmp(&prev_price) { + Ordering::Greater => { + self.profit += current_value.checked_sub(prev_value).unwrap(); + } + Ordering::Less => { + self.loss += prev_value.checked_sub(current_value).unwrap(); + } + Ordering::Equal => {} + } + + self.decrement(supply_state, prev_price); } } diff --git a/crates/brk_computer/src/stores.rs b/crates/brk_computer/src/stores.rs index 45bd5ce3d..b1b886c68 100644 --- a/crates/brk_computer/src/stores.rs +++ b/crates/brk_computer/src/stores.rs @@ -1,6 +1,6 @@ use std::path::Path; -use brk_vec::Version; +use brk_core::Version; use fjall::TransactionalKeyspace; const _VERSION: Version = Version::ZERO; diff --git a/crates/brk_computer/src/vecs/blocks.rs b/crates/brk_computer/src/vecs/blocks.rs index 8aeb06186..6f497182b 100644 --- a/crates/brk_computer/src/vecs/blocks.rs +++ b/crates/brk_computer/src/vecs/blocks.rs @@ -2,12 +2,11 @@ use std::{fs, path::Path}; use brk_core::{ CheckedSub, DifficultyEpoch, HalvingEpoch, Height, StoredU32, StoredU64, StoredUsize, - Timestamp, Weight, + Timestamp, Version, Weight, }; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_parser::bitcoin; -use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, Computation, EagerVec, Version}; +use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, Computation, EagerVec}; use super::{ Indexes, @@ -71,7 +70,9 @@ impl Vecs { true, version + VERSION + Version::ZERO, compressed, - StorableVecGeneatorOptions::default().add_sum().add_total(), + StorableVecGeneatorOptions::default() + .add_sum() + .add_cumulative(), )?, indexes_to_block_weight: ComputedVecsFromHeight::forced_import( path, @@ -79,7 +80,9 @@ impl Vecs { false, version + VERSION + Version::ZERO, compressed, - StorableVecGeneatorOptions::default().add_sum().add_total(), + StorableVecGeneatorOptions::default() + .add_sum() + .add_cumulative(), )?, indexes_to_block_size: ComputedVecsFromHeight::forced_import( path, @@ -87,7 +90,9 @@ impl Vecs { false, version + VERSION + Version::ZERO, compressed, - StorableVecGeneatorOptions::default().add_sum().add_total(), + StorableVecGeneatorOptions::default() + .add_sum() + .add_cumulative(), )?, height_to_vbytes: EagerVec::forced_import( path, @@ -101,7 +106,9 @@ impl Vecs { false, version + VERSION + Version::ZERO, compressed, - StorableVecGeneatorOptions::default().add_sum().add_total(), + StorableVecGeneatorOptions::default() + .add_sum() + .add_cumulative(), )?, difficultyepoch_to_timestamp: EagerVec::forced_import( path, diff --git a/crates/brk_computer/src/vecs/constants.rs b/crates/brk_computer/src/vecs/constants.rs index 1a48a8b21..96a0250a4 100644 --- a/crates/brk_computer/src/vecs/constants.rs +++ b/crates/brk_computer/src/vecs/constants.rs @@ -1,9 +1,9 @@ use std::{fs, path::Path}; -use brk_core::StoredU8; +use brk_core::{StoredU8, Version}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, AnyVec, Compressed, Computation, Version}; +use brk_vec::{AnyCollectableVec, AnyVec, Compressed, Computation}; use super::{ Indexes, diff --git a/crates/brk_computer/src/vecs/fetched.rs b/crates/brk_computer/src/vecs/fetched.rs index 5a853be6e..43200d5a2 100644 --- a/crates/brk_computer/src/vecs/fetched.rs +++ b/crates/brk_computer/src/vecs/fetched.rs @@ -2,12 +2,12 @@ use std::{fs, path::Path}; use brk_core::{ Cents, Close, DateIndex, DecadeIndex, DifficultyEpoch, Dollars, Height, High, Low, MonthIndex, - OHLCCents, OHLCDollars, OHLCSats, Open, QuarterIndex, Sats, WeekIndex, YearIndex, + OHLCCents, OHLCDollars, OHLCSats, Open, QuarterIndex, Sats, Version, WeekIndex, YearIndex, }; use brk_exit::Exit; use brk_fetcher::Fetcher; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, Computation, EagerVec, Version}; +use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, Computation, EagerVec}; use super::{ Indexes, diff --git a/crates/brk_computer/src/vecs/grouped/builder.rs b/crates/brk_computer/src/vecs/grouped/builder.rs index 3bb04a0e1..2d6e78c91 100644 --- a/crates/brk_computer/src/vecs/grouped/builder.rs +++ b/crates/brk_computer/src/vecs/grouped/builder.rs @@ -1,11 +1,8 @@ use std::path::Path; -use brk_core::{CheckedSub, StoredUsize}; +use brk_core::{CheckedSub, Result, StoredUsize, Version}; use brk_exit::Exit; -use brk_vec::{ - AnyCollectableVec, AnyIterableVec, Compressed, EagerVec, Result, StoredIndex, StoredType, - Version, -}; +use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, EagerVec, StoredIndex, StoredType}; use color_eyre::eyre::ContextCompat; use crate::utils::get_percentile; @@ -29,7 +26,7 @@ where pub _10p: Option>>, pub min: Option>>, pub last: Option>>, - pub total: Option>>, + pub cumulative: Option>>, } const VERSION: Version = Version::ZERO; @@ -141,11 +138,11 @@ where .unwrap(), ) }), - total: options.total.then(|| { + cumulative: options.cumulative.then(|| { Box::new( EagerVec::forced_import( path, - &prefix("total"), + &prefix("cumulative"), version + VERSION + Version::ZERO, compressed, ) @@ -207,20 +204,20 @@ where source: &impl AnyIterableVec, exit: &Exit, ) -> Result<()> { - if self.total.is_none() { + if self.cumulative.is_none() { return Ok(()); }; let index = self.starting_index(max_from); - let total_vec = self.total.as_mut().unwrap(); + let cumulative_vec = self.cumulative.as_mut().unwrap(); - let mut total = index.decremented().map_or(T::from(0_usize), |index| { - total_vec.iter().unwrap_get_inner(index) + let mut cumulative = index.decremented().map_or(T::from(0_usize), |index| { + cumulative_vec.iter().unwrap_get_inner(index) }); source.iter_at(index).try_for_each(|(i, v)| -> Result<()> { - total = total.clone() + v.into_inner(); - total_vec.forced_push_at(i, total.clone(), exit) + cumulative = cumulative.clone() + v.into_inner(); + cumulative_vec.forced_push_at(i, cumulative.clone(), exit) })?; self.safe_flush(exit)?; @@ -248,11 +245,11 @@ where let mut count_indexes_iter = count_indexes.iter(); let mut source_iter = source.iter(); - let total_vec = self.total.as_mut(); + let cumulative_vec = self.cumulative.as_mut(); - let mut total = total_vec.map(|total_vec| { + let mut cumulative = cumulative_vec.map(|cumulative_vec| { index.decremented().map_or(T::from(0_usize), |index| { - total_vec.iter().unwrap_get_inner(index) + cumulative_vec.iter().unwrap_get_inner(index) }) }); @@ -286,8 +283,9 @@ where last.forced_push_at(index, v, exit)?; } - let needs_sum_or_total = self.sum.is_some() || self.total.is_some(); - let needs_average_sum_or_total = needs_sum_or_total || self.average.is_some(); + let needs_sum_or_cumulative = self.sum.is_some() || self.cumulative.is_some(); + let needs_average_sum_or_cumulative = + needs_sum_or_cumulative || self.average.is_some(); let needs_sorted = self.max.is_some() || self._90p.is_some() || self._75p.is_some() @@ -295,7 +293,7 @@ where || self._25p.is_some() || self._10p.is_some() || self.min.is_some(); - let needs_values = needs_sorted || needs_average_sum_or_total; + let needs_values = needs_sorted || needs_average_sum_or_cumulative; if needs_values { source_iter.set(first_index); @@ -356,7 +354,7 @@ where } } - if needs_average_sum_or_total { + if needs_average_sum_or_cumulative { let len = values.len(); let sum = values.into_iter().fold(T::from(0), |a, b| a + b); @@ -365,15 +363,15 @@ where average.forced_push_at(i, avg, exit)?; } - if needs_sum_or_total { + if needs_sum_or_cumulative { if let Some(sum_vec) = self.sum.as_mut() { sum_vec.forced_push_at(i, sum.clone(), exit)?; } - if let Some(total_vec) = self.total.as_mut() { - let t = total.as_ref().unwrap().clone() + sum; - total.replace(t.clone()); - total_vec.forced_push_at(i, t, exit)?; + if let Some(cumulative_vec) = self.cumulative.as_mut() { + let t = cumulative.as_ref().unwrap().clone() + sum; + cumulative.replace(t.clone()); + cumulative_vec.forced_push_at(i, t, exit)?; } } } @@ -423,9 +421,9 @@ where let mut source_average_iter = source.average.as_ref().map(|f| f.iter()); let mut source_sum_iter = source.sum.as_ref().map(|f| f.iter()); - let mut total = self.total.as_mut().map(|total_vec| { + let mut cumulative = self.cumulative.as_mut().map(|cumulative_vec| { index.decremented().map_or(T::from(0_usize), |index| { - total_vec.iter().unwrap_get_inner(index) + cumulative_vec.iter().unwrap_get_inner(index) }) }); @@ -457,10 +455,11 @@ where last.forced_push_at(index, v, exit)?; } - let needs_sum_or_total = self.sum.is_some() || self.total.is_some(); - let needs_average_sum_or_total = needs_sum_or_total || self.average.is_some(); + let needs_sum_or_cumulative = self.sum.is_some() || self.cumulative.is_some(); + let needs_average_sum_or_cumulative = + needs_sum_or_cumulative || self.average.is_some(); let needs_sorted = self.max.is_some() || self.min.is_some(); - let needs_values = needs_sorted || needs_average_sum_or_total; + let needs_values = needs_sorted || needs_average_sum_or_cumulative; if needs_values { if needs_sorted { @@ -487,7 +486,7 @@ where } } - if needs_average_sum_or_total { + if needs_average_sum_or_cumulative { if let Some(average) = self.average.as_mut() { let source_average_iter = source_average_iter.as_mut().unwrap(); source_average_iter.set(first_index); @@ -497,14 +496,14 @@ where .collect::>(); let len = values.len(); - let total = values.into_iter().fold(T::from(0), |a, b| a + b); - // TODO: Multiply by count then divide by total + let cumulative = values.into_iter().fold(T::from(0), |a, b| a + b); + // TODO: Multiply by count then divide by cumulative // Right now it's not 100% accurate as there could be more or less elements in the lower timeframe (28 days vs 31 days in a month for example) - let avg = total / len; + let avg = cumulative / len; average.forced_push_at(i, avg, exit)?; } - if needs_sum_or_total { + if needs_sum_or_cumulative { let source_sum_iter = source_sum_iter.as_mut().unwrap(); source_sum_iter.set(first_index); let values = source_sum_iter @@ -518,10 +517,10 @@ where sum_vec.forced_push_at(i, sum.clone(), exit)?; } - if let Some(total_vec) = self.total.as_mut() { - let t = total.as_ref().unwrap().clone() + sum; - total.replace(t.clone()); - total_vec.forced_push_at(i, t, exit)?; + if let Some(cumulative_vec) = self.cumulative.as_mut() { + let t = cumulative.as_ref().unwrap().clone() + sum; + cumulative.replace(t.clone()); + cumulative_vec.forced_push_at(i, t, exit)?; } } } @@ -581,8 +580,8 @@ where self.last.as_ref().unwrap() } #[allow(unused)] - pub fn unwrap_total(&self) -> &EagerVec { - self.total.as_ref().unwrap() + pub fn unwrap_cumulative(&self) -> &EagerVec { + self.cumulative.as_ref().unwrap() } pub fn vecs(&self) -> Vec<&dyn AnyCollectableVec> { @@ -609,8 +608,8 @@ where if let Some(sum) = self.sum.as_ref() { v.push(sum.as_ref()); } - if let Some(total) = self.total.as_ref() { - v.push(total.as_ref()); + if let Some(cumulative) = self.cumulative.as_ref() { + v.push(cumulative.as_ref()); } if let Some(_90p) = self._90p.as_ref() { v.push(_90p.as_ref()); @@ -650,8 +649,8 @@ where if let Some(sum) = self.sum.as_mut() { sum.safe_flush(exit)?; } - if let Some(total) = self.total.as_mut() { - total.safe_flush(exit)?; + if let Some(cumulative) = self.cumulative.as_mut() { + cumulative.safe_flush(exit)?; } if let Some(_90p) = self._90p.as_mut() { _90p.safe_flush(exit)?; @@ -691,8 +690,8 @@ where if let Some(sum) = self.sum.as_mut() { sum.validate_computed_version_or_reset_file(Version::ZERO + version)?; } - if let Some(total) = self.total.as_mut() { - total.validate_computed_version_or_reset_file(Version::ZERO + version)?; + if let Some(cumulative) = self.cumulative.as_mut() { + cumulative.validate_computed_version_or_reset_file(Version::ZERO + version)?; } if let Some(_90p) = self._90p.as_mut() { _90p.validate_computed_version_or_reset_file(Version::ZERO + version)?; @@ -724,7 +723,7 @@ pub struct StorableVecGeneatorOptions { min: bool, first: bool, last: bool, - total: bool, + cumulative: bool, } impl StorableVecGeneatorOptions { @@ -788,8 +787,8 @@ impl StorableVecGeneatorOptions { self } - pub fn add_total(mut self) -> Self { - self.total = true; + pub fn add_cumulative(mut self) -> Self { + self.cumulative = true; self } @@ -848,8 +847,8 @@ impl StorableVecGeneatorOptions { } #[allow(unused)] - pub fn rm_total(mut self) -> Self { - self.total = false; + pub fn rm_cumulative(mut self) -> Self { + self.cumulative = false; self } @@ -890,7 +889,7 @@ impl StorableVecGeneatorOptions { self.min, self.first, self.last, - self.total, + self.cumulative, ] .iter() .filter(|b| **b) @@ -900,7 +899,7 @@ impl StorableVecGeneatorOptions { pub fn copy_self_extra(&self) -> Self { Self { - total: self.total, + cumulative: self.cumulative, ..Self::default() } } diff --git a/crates/brk_computer/src/vecs/grouped/from_dateindex.rs b/crates/brk_computer/src/vecs/grouped/from_dateindex.rs index 9b53d2dc3..caf691635 100644 --- a/crates/brk_computer/src/vecs/grouped/from_dateindex.rs +++ b/crates/brk_computer/src/vecs/grouped/from_dateindex.rs @@ -1,9 +1,11 @@ use std::path::Path; -use brk_core::{DateIndex, DecadeIndex, MonthIndex, QuarterIndex, WeekIndex, YearIndex}; +use brk_core::{ + DateIndex, DecadeIndex, MonthIndex, QuarterIndex, Result, Version, WeekIndex, YearIndex, +}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, Compressed, EagerVec, Result, Version}; +use brk_vec::{AnyCollectableVec, Compressed, EagerVec}; use crate::vecs::{Indexes, indexes}; diff --git a/crates/brk_computer/src/vecs/grouped/from_height.rs b/crates/brk_computer/src/vecs/grouped/from_height.rs index 1d449c71c..a8d5ccc71 100644 --- a/crates/brk_computer/src/vecs/grouped/from_height.rs +++ b/crates/brk_computer/src/vecs/grouped/from_height.rs @@ -1,11 +1,12 @@ use std::path::Path; use brk_core::{ - DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex, + DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, Result, Version, + WeekIndex, YearIndex, }; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, EagerVec, Result, Version}; +use brk_vec::{AnyCollectableVec, AnyIterableVec, Compressed, EagerVec}; use crate::vecs::{Indexes, indexes}; 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 26f5b9805..8110cc010 100644 --- a/crates/brk_computer/src/vecs/grouped/from_height_strict.rs +++ b/crates/brk_computer/src/vecs/grouped/from_height_strict.rs @@ -1,9 +1,9 @@ use std::path::Path; -use brk_core::{DifficultyEpoch, Height}; +use brk_core::{DifficultyEpoch, Height, Result, Version}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, Compressed, EagerVec, Result, Version}; +use brk_vec::{AnyCollectableVec, Compressed, EagerVec}; use crate::vecs::{Indexes, indexes}; diff --git a/crates/brk_computer/src/vecs/grouped/from_txindex.rs b/crates/brk_computer/src/vecs/grouped/from_txindex.rs index 40479253f..ed4c25e74 100644 --- a/crates/brk_computer/src/vecs/grouped/from_txindex.rs +++ b/crates/brk_computer/src/vecs/grouped/from_txindex.rs @@ -2,13 +2,12 @@ use std::path::Path; use brk_core::{ Bitcoin, DateIndex, DecadeIndex, DifficultyEpoch, Dollars, Height, MonthIndex, QuarterIndex, - Sats, TxIndex, WeekIndex, YearIndex, + Result, Sats, TxIndex, Version, WeekIndex, YearIndex, }; use brk_exit::Exit; use brk_indexer::Indexer; use brk_vec::{ - AnyCollectableVec, AnyVec, CollectableVec, Compressed, EagerVec, Result, StoredIndex, - VecIterator, Version, + AnyCollectableVec, AnyVec, CollectableVec, Compressed, EagerVec, StoredIndex, VecIterator, }; use crate::vecs::{Indexes, fetched, indexes}; @@ -425,12 +424,12 @@ impl ComputedVecsFromTxindex { exit, )?; } - if let Some(total) = self.height.total.as_mut() { - total.forced_push_at( + if let Some(cumulative) = self.height.cumulative.as_mut() { + cumulative.forced_push_at( height, Bitcoin::from( sats.height - .unwrap_total() + .unwrap_cumulative() .into_iter() .unwrap_get_inner(height), ), @@ -608,13 +607,13 @@ impl ComputedVecsFromTxindex { exit, )?; } - if let Some(total) = self.height.total.as_mut() { - total.forced_push_at( + if let Some(cumulative) = self.height.cumulative.as_mut() { + cumulative.forced_push_at( height, price * bitcoin .height - .unwrap_total() + .unwrap_cumulative() .into_iter() .unwrap_get_inner(height), exit, 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 bb871fe3c..2352eaedd 100644 --- a/crates/brk_computer/src/vecs/grouped/ratio_from_dateindex.rs +++ b/crates/brk_computer/src/vecs/grouped/ratio_from_dateindex.rs @@ -1,11 +1,11 @@ use std::{f32, path::Path}; -use brk_core::{Date, DateIndex, Dollars, StoredF32}; +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, Result, - StoredIndex, VecIterator, Version, + AnyCollectableVec, AnyIterableVec, AnyVec, CollectableVec, Compressed, EagerVec, StoredIndex, + VecIterator, }; use crate::{ 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 c74000ffa..a627b2f95 100644 --- a/crates/brk_computer/src/vecs/grouped/value_from_height.rs +++ b/crates/brk_computer/src/vecs/grouped/value_from_height.rs @@ -1,11 +1,9 @@ use std::path::Path; -use brk_core::{Bitcoin, Dollars, Height, Sats}; +use brk_core::{Bitcoin, Dollars, Height, Result, Sats, Version}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{ - AnyCollectableVec, CollectableVec, Compressed, EagerVec, Result, StoredVec, Version, -}; +use brk_vec::{AnyCollectableVec, CollectableVec, Compressed, EagerVec, StoredVec}; use crate::vecs::{Indexes, fetched, indexes}; 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 22edce0ec..f7a96c523 100644 --- a/crates/brk_computer/src/vecs/grouped/value_from_txindex.rs +++ b/crates/brk_computer/src/vecs/grouped/value_from_txindex.rs @@ -1,11 +1,11 @@ use std::path::Path; -use brk_core::{Bitcoin, Close, Dollars, Height, Sats, TxIndex}; +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, Version, + Computation, ComputedVecFrom3, LazyVecFrom1, StoredIndex, StoredVec, }; use crate::vecs::{Indexes, fetched, indexes}; diff --git a/crates/brk_computer/src/vecs/indexes.rs b/crates/brk_computer/src/vecs/indexes.rs index 5320a58d4..78ead6aaa 100644 --- a/crates/brk_computer/src/vecs/indexes.rs +++ b/crates/brk_computer/src/vecs/indexes.rs @@ -5,13 +5,13 @@ use brk_core::{ InputIndex, MonthIndex, OpReturnIndex, OutputIndex, P2ABytes, P2AIndex, P2MSIndex, P2PK33Bytes, P2PK33Index, P2PK65Bytes, P2PK65Index, P2PKHBytes, P2PKHIndex, P2SHBytes, P2SHIndex, P2TRBytes, P2TRIndex, P2WPKHBytes, P2WPKHIndex, P2WSHBytes, P2WSHIndex, QuarterIndex, Sats, StoredUsize, - Timestamp, TxIndex, Txid, UnknownOutputIndex, WeekIndex, YearIndex, + Timestamp, TxIndex, Txid, UnknownOutputIndex, Version, WeekIndex, YearIndex, }; use brk_exit::Exit; use brk_indexer::Indexer; use brk_vec::{ AnyCollectableVec, CloneableAnyIterableVec, Compressed, Computation, ComputedVec, - ComputedVecFrom1, ComputedVecFrom2, EagerVec, StoredIndex, VecIterator, Version, + ComputedVecFrom1, ComputedVecFrom2, EagerVec, StoredIndex, VecIterator, }; const VERSION: Version = Version::ZERO; diff --git a/crates/brk_computer/src/vecs/market.rs b/crates/brk_computer/src/vecs/market.rs index b1c8d73fb..8da981bdc 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}; +use brk_core::{Date, DateIndex, Dollars, Sats, StoredF32, StoredUsize, Version}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, Compressed, Computation, StoredIndex, VecIterator, Version}; +use brk_vec::{AnyCollectableVec, Compressed, Computation, StoredIndex, VecIterator}; use super::{ Indexes, fetched, @@ -1097,17 +1097,17 @@ impl Vecs { starting_indexes, exit, |v, _, _, starting_indexes, exit| { - let mut total_subsidy_in_btc = transactions + let mut cumulative_subsidy_in_btc = transactions .indexes_to_subsidy .bitcoin .dateindex - .unwrap_total() + .unwrap_cumulative() .into_iter(); v.compute_transform( starting_indexes.dateindex, &fetched.timeindexes_to_close.dateindex, |(i, close, ..)| { - let supply = total_subsidy_in_btc.unwrap_get_inner(i); + let supply = cumulative_subsidy_in_btc.unwrap_get_inner(i); (i, *close * supply) }, exit, diff --git a/crates/brk_computer/src/vecs/mining.rs b/crates/brk_computer/src/vecs/mining.rs index 44c503492..35ff38471 100644 --- a/crates/brk_computer/src/vecs/mining.rs +++ b/crates/brk_computer/src/vecs/mining.rs @@ -1,9 +1,9 @@ use std::{fs, path::Path}; -use brk_core::{DifficultyEpoch, HalvingEpoch, StoredF64}; +use brk_core::{DifficultyEpoch, HalvingEpoch, StoredF64, Version}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, Compressed, Computation, VecIterator, Version}; +use brk_vec::{AnyCollectableVec, Compressed, Computation, VecIterator}; use super::{ Indexes, diff --git a/crates/brk_computer/src/vecs/mod.rs b/crates/brk_computer/src/vecs/mod.rs index b4fe7d683..5373cb4fb 100644 --- a/crates/brk_computer/src/vecs/mod.rs +++ b/crates/brk_computer/src/vecs/mod.rs @@ -1,9 +1,10 @@ use std::{fs, path::Path}; +use brk_core::Version; use brk_exit::Exit; use brk_fetcher::Fetcher; use brk_indexer::Indexer; -use brk_vec::{AnyCollectableVec, Compressed, Computation, Version}; +use brk_vec::{AnyCollectableVec, Compressed, Computation}; pub mod blocks; pub mod constants; diff --git a/crates/brk_computer/src/vecs/transactions.rs b/crates/brk_computer/src/vecs/transactions.rs index b880e5adf..f8775813b 100644 --- a/crates/brk_computer/src/vecs/transactions.rs +++ b/crates/brk_computer/src/vecs/transactions.rs @@ -2,15 +2,13 @@ use std::{fs, path::Path}; use brk_core::{ CheckedSub, Feerate, HalvingEpoch, Height, InputIndex, OutputIndex, Sats, StoredU32, - StoredUsize, TxIndex, TxVersion, Weight, + StoredUsize, TxIndex, TxVersion, Version, Weight, }; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_parser::bitcoin; use brk_vec::{ AnyCollectableVec, AnyIterableVec, CloneableAnyIterableVec, Compressed, Computation, ComputedVec, ComputedVecFrom1, ComputedVecFrom2, ComputedVecFrom3, StoredIndex, VecIterator, - Version, }; use super::{ @@ -244,7 +242,7 @@ impl Vecs { // StorableVecGeneatorOptions::default() // .add_average() // .add_sum() - // .add_total(), + // .add_cumulative(), // )?; let txindex_to_output_value = ComputedVec::forced_import_or_init_from_3( @@ -293,7 +291,7 @@ impl Vecs { // StorableVecGeneatorOptions::default() // .add_average() // .add_sum() - // .add_total(), + // .add_cumulative(), // )?; let txindex_to_fee = ComputedVecFrom2::forced_import_or_init_from_2( @@ -351,7 +349,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_input_count: ComputedVecsFromTxindex::forced_import( path, @@ -364,7 +362,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_output_count: ComputedVecsFromTxindex::forced_import( path, @@ -377,7 +375,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_tx_v1: ComputedVecsFromHeight::forced_import( path, @@ -385,7 +383,9 @@ impl Vecs { true, version + VERSION + Version::ZERO, compressed, - StorableVecGeneatorOptions::default().add_sum().add_total(), + StorableVecGeneatorOptions::default() + .add_sum() + .add_cumulative(), )?, indexes_to_tx_v2: ComputedVecsFromHeight::forced_import( path, @@ -393,7 +393,9 @@ impl Vecs { true, version + VERSION + Version::ZERO, compressed, - StorableVecGeneatorOptions::default().add_sum().add_total(), + StorableVecGeneatorOptions::default() + .add_sum() + .add_cumulative(), )?, indexes_to_tx_v3: ComputedVecsFromHeight::forced_import( path, @@ -401,7 +403,9 @@ impl Vecs { true, version + VERSION + Version::ZERO, compressed, - StorableVecGeneatorOptions::default().add_sum().add_total(), + StorableVecGeneatorOptions::default() + .add_sum() + .add_cumulative(), )?, indexes_to_fee: ComputedValueVecsFromTxindex::forced_import( path, @@ -414,7 +418,7 @@ impl Vecs { fetched, StorableVecGeneatorOptions::default() .add_sum() - .add_total() + .add_cumulative() .add_percentiles() .add_minmax() .add_average(), @@ -461,7 +465,7 @@ impl Vecs { StorableVecGeneatorOptions::default() .add_percentiles() .add_sum() - .add_total() + .add_cumulative() .add_minmax() .add_average(), compute_dollars, @@ -474,7 +478,7 @@ impl Vecs { compressed, StorableVecGeneatorOptions::default() .add_sum() - .add_total() + .add_cumulative() .add_percentiles() .add_minmax() .add_average(), @@ -486,7 +490,9 @@ impl Vecs { true, version + VERSION + Version::ZERO, compressed, - StorableVecGeneatorOptions::default().add_sum().add_total(), + StorableVecGeneatorOptions::default() + .add_sum() + .add_cumulative(), compute_dollars, )?, indexes_to_p2a_count: ComputedVecsFromHeight::forced_import( @@ -500,7 +506,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_p2ms_count: ComputedVecsFromHeight::forced_import( path, @@ -513,7 +519,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_p2pk33_count: ComputedVecsFromHeight::forced_import( path, @@ -526,7 +532,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_p2pk65_count: ComputedVecsFromHeight::forced_import( path, @@ -539,7 +545,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_p2pkh_count: ComputedVecsFromHeight::forced_import( path, @@ -552,7 +558,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_p2sh_count: ComputedVecsFromHeight::forced_import( path, @@ -565,7 +571,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_p2tr_count: ComputedVecsFromHeight::forced_import( path, @@ -578,7 +584,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_p2wpkh_count: ComputedVecsFromHeight::forced_import( path, @@ -591,7 +597,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_p2wsh_count: ComputedVecsFromHeight::forced_import( path, @@ -604,7 +610,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_opreturn_count: ComputedVecsFromHeight::forced_import( path, @@ -617,7 +623,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_unknownoutput_count: ComputedVecsFromHeight::forced_import( path, @@ -630,7 +636,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_emptyoutput_count: ComputedVecsFromHeight::forced_import( path, @@ -643,7 +649,7 @@ impl Vecs { .add_minmax() .add_percentiles() .add_sum() - .add_total(), + .add_cumulative(), )?, indexes_to_exact_utxo_count: ComputedVecsFromHeight::forced_import( path, @@ -1088,16 +1094,16 @@ impl Vecs { let mut input_count_iter = self .indexes_to_input_count .height - .unwrap_total() + .unwrap_cumulative() .into_iter(); let mut opreturn_count_iter = self .indexes_to_opreturn_count .height_extra - .unwrap_total() + .unwrap_cumulative() .into_iter(); v.compute_transform( starting_indexes.height, - self.indexes_to_output_count.height.unwrap_total(), + self.indexes_to_output_count.height.unwrap_cumulative(), |(h, output_count, ..)| { let input_count = input_count_iter.unwrap_get_inner(h); let opreturn_count = opreturn_count_iter.unwrap_get_inner(h); diff --git a/crates/brk_computer/src/vecs/utxos/cohort.rs b/crates/brk_computer/src/vecs/utxos/cohort.rs index 78d3b5812..635261c10 100644 --- a/crates/brk_computer/src/vecs/utxos/cohort.rs +++ b/crates/brk_computer/src/vecs/utxos/cohort.rs @@ -1,11 +1,9 @@ use std::{fs, path::Path}; -use brk_core::{CheckedSub, Dollars, Height, Sats, StoredUsize}; +use brk_core::{CheckedSub, Dollars, Height, Result, Sats, StoredUsize, Version}; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_vec::{ - AnyCollectableVec, AnyVec, Compressed, Computation, EagerVec, Result, VecIterator, Version, -}; +use brk_vec::{AnyCollectableVec, AnyVec, Compressed, Computation, EagerVec, VecIterator}; use crate::{ states::{CohortState, RealizedState}, @@ -32,6 +30,19 @@ pub struct Vecs { pub height_to_utxo_count: EagerVec, pub indexes_to_utxo_count: ComputedVecsFromHeight, + pub height_to_realized_profit: Option>, + pub indexes_to_realized_profit: Option>, + pub height_to_realized_loss: Option>, + pub indexes_to_realized_loss: Option>, + pub height_to_value_created: Option>, + pub indexes_to_value_created: Option>, + pub height_to_adjusted_value_created: Option>, + pub indexes_to_adjusted_value_created: Option>, + pub height_to_value_destroyed: Option>, + pub indexes_to_value_destroyed: Option>, + pub height_to_adjusted_value_destroyed: Option>, + pub indexes_to_adjusted_value_destroyed: Option>, + pub indexes_to_realized_price: Option>, pub indexes_to_realized_price_extra: Option, } @@ -134,6 +145,130 @@ impl Vecs { ) .unwrap() }), + height_to_realized_profit: compute_dollars.then(|| { + EagerVec::forced_import( + path, + &suffix("realized_profit"), + version + VERSION + Version::ZERO, + compressed, + ) + .unwrap() + }), + indexes_to_realized_profit: compute_dollars.then(|| { + ComputedVecsFromHeight::forced_import( + path, + &suffix("realized_profit"), + false, + version + VERSION + Version::ZERO, + compressed, + StorableVecGeneatorOptions::default() + .add_sum() + .add_cumulative(), + ) + .unwrap() + }), + height_to_realized_loss: compute_dollars.then(|| { + EagerVec::forced_import( + path, + &suffix("realized_loss"), + version + VERSION + Version::ZERO, + compressed, + ) + .unwrap() + }), + indexes_to_realized_loss: compute_dollars.then(|| { + ComputedVecsFromHeight::forced_import( + path, + &suffix("realized_loss"), + false, + version + VERSION + Version::ZERO, + compressed, + StorableVecGeneatorOptions::default() + .add_sum() + .add_cumulative(), + ) + .unwrap() + }), + height_to_value_created: compute_dollars.then(|| { + EagerVec::forced_import( + path, + &suffix("value_created"), + version + VERSION + Version::ZERO, + compressed, + ) + .unwrap() + }), + indexes_to_value_created: compute_dollars.then(|| { + ComputedVecsFromHeight::forced_import( + path, + &suffix("value_created"), + false, + version + VERSION + Version::ZERO, + compressed, + StorableVecGeneatorOptions::default().add_sum(), + ) + .unwrap() + }), + height_to_adjusted_value_created: compute_dollars.then(|| { + EagerVec::forced_import( + path, + &suffix("adjusted_value_created"), + version + VERSION + Version::ZERO, + compressed, + ) + .unwrap() + }), + indexes_to_adjusted_value_created: compute_dollars.then(|| { + ComputedVecsFromHeight::forced_import( + path, + &suffix("adjusted_value_created"), + false, + version + VERSION + Version::ZERO, + compressed, + StorableVecGeneatorOptions::default().add_sum(), + ) + .unwrap() + }), + height_to_value_destroyed: compute_dollars.then(|| { + EagerVec::forced_import( + path, + &suffix("value_destroyed"), + version + VERSION + Version::ZERO, + compressed, + ) + .unwrap() + }), + indexes_to_value_destroyed: compute_dollars.then(|| { + ComputedVecsFromHeight::forced_import( + path, + &suffix("value_destroyed"), + false, + version + VERSION + Version::ZERO, + compressed, + StorableVecGeneatorOptions::default().add_sum(), + ) + .unwrap() + }), + height_to_adjusted_value_destroyed: compute_dollars.then(|| { + EagerVec::forced_import( + path, + &suffix("adjusted_value_destroyed"), + version + VERSION + Version::ZERO, + compressed, + ) + .unwrap() + }), + indexes_to_adjusted_value_destroyed: compute_dollars.then(|| { + ComputedVecsFromHeight::forced_import( + path, + &suffix("adjusted_value_destroyed"), + false, + version + VERSION + Version::ZERO, + compressed, + StorableVecGeneatorOptions::default().add_sum(), + ) + .unwrap() + }), }) } @@ -144,6 +279,24 @@ impl Vecs { self.height_to_realized_cap .as_ref() .map_or(usize::MAX, |v| v.len()), + self.height_to_realized_profit + .as_ref() + .map_or(usize::MAX, |v| v.len()), + self.height_to_realized_loss + .as_ref() + .map_or(usize::MAX, |v| v.len()), + self.height_to_value_created + .as_ref() + .map_or(usize::MAX, |v| v.len()), + self.height_to_adjusted_value_created + .as_ref() + .map_or(usize::MAX, |v| v.len()), + self.height_to_value_destroyed + .as_ref() + .map_or(usize::MAX, |v| v.len()), + self.height_to_adjusted_value_destroyed + .as_ref() + .map_or(usize::MAX, |v| v.len()), ] .into_iter() .map(Height::from) @@ -169,7 +322,7 @@ impl Vecs { .unwrap_get_inner(prev_height); if let Some(height_to_realized_cap) = self.height_to_realized_cap.as_mut() { - self.state.realized.as_mut().unwrap().realized_cap = height_to_realized_cap + self.state.realized.as_mut().unwrap().cap = height_to_realized_cap .into_iter() .unwrap_get_inner(prev_height); } @@ -191,6 +344,73 @@ impl Vecs { height_to_realized_cap.validate_computed_version_or_reset_file( base_version + height_to_realized_cap.inner_version(), )?; + + let height_to_realized_profit_inner_version = self + .height_to_realized_profit + .as_ref() + .unwrap() + .inner_version(); + self.height_to_realized_profit + .as_mut() + .unwrap() + .validate_computed_version_or_reset_file( + base_version + height_to_realized_profit_inner_version, + )?; + let height_to_realized_loss_inner_version = self + .height_to_realized_loss + .as_ref() + .unwrap() + .inner_version(); + self.height_to_realized_loss + .as_mut() + .unwrap() + .validate_computed_version_or_reset_file( + base_version + height_to_realized_loss_inner_version, + )?; + let height_to_value_created_inner_version = self + .height_to_value_created + .as_ref() + .unwrap() + .inner_version(); + self.height_to_value_created + .as_mut() + .unwrap() + .validate_computed_version_or_reset_file( + base_version + height_to_value_created_inner_version, + )?; + let height_to_adjusted_value_created_inner_version = self + .height_to_adjusted_value_created + .as_ref() + .unwrap() + .inner_version(); + self.height_to_adjusted_value_created + .as_mut() + .unwrap() + .validate_computed_version_or_reset_file( + base_version + height_to_adjusted_value_created_inner_version, + )?; + let height_to_value_destroyed_inner_version = self + .height_to_value_destroyed + .as_ref() + .unwrap() + .inner_version(); + self.height_to_value_destroyed + .as_mut() + .unwrap() + .validate_computed_version_or_reset_file( + base_version + height_to_value_destroyed_inner_version, + )?; + let height_to_adjusted_value_destroyed_inner_version = self + .height_to_adjusted_value_destroyed + .as_ref() + .unwrap() + .inner_version(); + self.height_to_adjusted_value_destroyed + .as_mut() + .unwrap() + .validate_computed_version_or_reset_file( + base_version + height_to_adjusted_value_destroyed_inner_version, + )?; } Ok(()) @@ -211,18 +431,37 @@ impl Vecs { )?; if let Some(height_to_realized_cap) = self.height_to_realized_cap.as_mut() { - height_to_realized_cap.forced_push_at( - height, - self.state - .realized - .as_ref() - .unwrap_or_else(|| { - dbg!(&self.state); - panic!(); - }) - .realized_cap, - exit, - )?; + let realized = self.state.realized.as_ref().unwrap_or_else(|| { + dbg!(&self.state); + panic!(); + }); + + height_to_realized_cap.forced_push_at(height, realized.cap, exit)?; + + self.height_to_realized_profit + .as_mut() + .unwrap() + .forced_push_at(height, realized.profit, exit)?; + self.height_to_realized_loss + .as_mut() + .unwrap() + .forced_push_at(height, realized.loss, exit)?; + self.height_to_value_created + .as_mut() + .unwrap() + .forced_push_at(height, realized.value_created, exit)?; + self.height_to_adjusted_value_created + .as_mut() + .unwrap() + .forced_push_at(height, realized.adj_value_created, exit)?; + self.height_to_value_destroyed + .as_mut() + .unwrap() + .forced_push_at(height, realized.value_destroyed, exit)?; + self.height_to_adjusted_value_destroyed + .as_mut() + .unwrap() + .forced_push_at(height, realized.adj_value_destroyed, exit)?; } Ok(()) } @@ -234,6 +473,30 @@ impl Vecs { if let Some(height_to_realized_cap) = self.height_to_realized_cap.as_mut() { height_to_realized_cap.safe_flush(exit)?; + self.height_to_realized_profit + .as_mut() + .unwrap() + .safe_flush(exit)?; + self.height_to_realized_loss + .as_mut() + .unwrap() + .safe_flush(exit)?; + self.height_to_value_created + .as_mut() + .unwrap() + .safe_flush(exit)?; + self.height_to_adjusted_value_created + .as_mut() + .unwrap() + .safe_flush(exit)?; + self.height_to_value_destroyed + .as_mut() + .unwrap() + .safe_flush(exit)?; + self.height_to_adjusted_value_destroyed + .as_mut() + .unwrap() + .safe_flush(exit)?; } Ok(()) @@ -270,41 +533,102 @@ impl Vecs { exit, Some(self.height_to_realized_cap.as_ref().unwrap()), )?; - } - if let Some(indexes_to_realized_price) = self.indexes_to_realized_price.as_mut() { - indexes_to_realized_price.compute_all( - indexer, - indexes, - starting_indexes, - exit, - |vec, _, _, starting_indexes, exit| { - vec.compute_divide( - starting_indexes.height, - self.height_to_realized_cap.as_ref().unwrap(), - &**self.indexes_to_supply.bitcoin.height.as_ref().unwrap(), - exit, - ) - }, - )?; - } + self.indexes_to_realized_price + .as_mut() + .unwrap() + .compute_all( + indexer, + indexes, + starting_indexes, + exit, + |vec, _, _, starting_indexes, exit| { + vec.compute_divide( + starting_indexes.height, + self.height_to_realized_cap.as_ref().unwrap(), + &**self.indexes_to_supply.bitcoin.height.as_ref().unwrap(), + exit, + ) + }, + )?; - if let Some(indexes_to_realized_price_extra) = self.indexes_to_realized_price_extra.as_mut() - { - indexes_to_realized_price_extra.compute_rest( - indexer, - indexes, - fetched.as_ref().unwrap(), - starting_indexes, - exit, - Some( - self.indexes_to_realized_price - .as_ref() - .unwrap() - .dateindex - .unwrap_last(), - ), - )?; + self.indexes_to_realized_price_extra + .as_mut() + .unwrap() + .compute_rest( + indexer, + indexes, + fetched.as_ref().unwrap(), + starting_indexes, + exit, + Some( + self.indexes_to_realized_price + .as_ref() + .unwrap() + .dateindex + .unwrap_last(), + ), + )?; + + self.indexes_to_realized_profit + .as_mut() + .unwrap() + .compute_rest( + indexes, + starting_indexes, + exit, + Some(self.height_to_realized_profit.as_ref().unwrap()), + )?; + + self.indexes_to_realized_loss + .as_mut() + .unwrap() + .compute_rest( + indexes, + starting_indexes, + exit, + Some(self.height_to_realized_loss.as_ref().unwrap()), + )?; + + self.indexes_to_value_created + .as_mut() + .unwrap() + .compute_rest( + indexes, + starting_indexes, + exit, + Some(self.height_to_value_created.as_ref().unwrap()), + )?; + + self.indexes_to_adjusted_value_created + .as_mut() + .unwrap() + .compute_rest( + indexes, + starting_indexes, + exit, + Some(self.height_to_adjusted_value_created.as_ref().unwrap()), + )?; + + self.indexes_to_value_destroyed + .as_mut() + .unwrap() + .compute_rest( + indexes, + starting_indexes, + exit, + Some(self.height_to_value_destroyed.as_ref().unwrap()), + )?; + + self.indexes_to_adjusted_value_destroyed + .as_mut() + .unwrap() + .compute_rest( + indexes, + starting_indexes, + exit, + Some(self.height_to_adjusted_value_destroyed.as_ref().unwrap()), + )?; } Ok(()) @@ -330,6 +654,42 @@ impl Vecs { self.indexes_to_realized_price_extra .as_ref() .map_or(vec![], |v| v.vecs()), + self.height_to_realized_profit + .as_ref() + .map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]), + self.indexes_to_realized_profit + .as_ref() + .map_or(vec![], |v| v.vecs()), + self.height_to_realized_loss + .as_ref() + .map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]), + self.indexes_to_realized_loss + .as_ref() + .map_or(vec![], |v| v.vecs()), + self.height_to_value_created + .as_ref() + .map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]), + self.indexes_to_value_created + .as_ref() + .map_or(vec![], |v| v.vecs()), + self.height_to_adjusted_value_created + .as_ref() + .map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]), + self.indexes_to_adjusted_value_created + .as_ref() + .map_or(vec![], |v| v.vecs()), + self.height_to_value_destroyed + .as_ref() + .map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]), + self.indexes_to_value_destroyed + .as_ref() + .map_or(vec![], |v| v.vecs()), + self.height_to_adjusted_value_destroyed + .as_ref() + .map_or(vec![], |v| vec![v as &dyn AnyCollectableVec]), + self.indexes_to_adjusted_value_destroyed + .as_ref() + .map_or(vec![], |v| v.vecs()), ] .into_iter() .flatten() @@ -350,6 +710,19 @@ impl Clone for Vecs { height_to_utxo_count: self.height_to_utxo_count.clone(), indexes_to_utxo_count: self.indexes_to_utxo_count.clone(), + height_to_realized_profit: self.height_to_realized_profit.clone(), + indexes_to_realized_profit: self.indexes_to_realized_profit.clone(), + height_to_realized_loss: self.height_to_realized_loss.clone(), + indexes_to_realized_loss: self.indexes_to_realized_loss.clone(), + height_to_value_created: self.height_to_value_created.clone(), + indexes_to_value_created: self.indexes_to_value_created.clone(), + height_to_adjusted_value_created: self.height_to_adjusted_value_created.clone(), + indexes_to_adjusted_value_created: self.indexes_to_adjusted_value_created.clone(), + height_to_value_destroyed: self.height_to_value_destroyed.clone(), + indexes_to_value_destroyed: self.indexes_to_value_destroyed.clone(), + height_to_adjusted_value_destroyed: self.height_to_adjusted_value_destroyed.clone(), + indexes_to_adjusted_value_destroyed: self.indexes_to_adjusted_value_destroyed.clone(), + indexes_to_realized_price: self.indexes_to_realized_price.clone(), indexes_to_realized_price_extra: self.indexes_to_realized_price_extra.clone(), } diff --git a/crates/brk_computer/src/vecs/utxos/mod.rs b/crates/brk_computer/src/vecs/utxos/mod.rs index 6245a04ba..b94d197e1 100644 --- a/crates/brk_computer/src/vecs/utxos/mod.rs +++ b/crates/brk_computer/src/vecs/utxos/mod.rs @@ -1,11 +1,11 @@ use std::{cmp::Ordering, collections::BTreeMap, mem, path::Path, thread}; -use brk_core::{Height, InputIndex, OutputIndex, OutputType, Sats}; +use brk_core::{Height, InputIndex, OutputIndex, OutputType, Sats, Version}; use brk_exit::Exit; use brk_indexer::Indexer; use brk_vec::{ AnyCollectableVec, AnyVec, BaseVecIterator, CollectableVec, Compressed, Computation, EagerVec, - GenericStoredVec, StoredIndex, StoredVec, UnsafeSlice, VecIterator, Version, + GenericStoredVec, StoredIndex, StoredVec, UnsafeSlice, VecIterator, }; use log::info; use rayon::prelude::*; @@ -24,6 +24,7 @@ use super::{ pub mod cohort; const VERSION: Version = Version::ZERO; +const BYSIZE_VERSION: Version = Version::ONE; #[derive(Clone)] pub struct Vecs { @@ -32,8 +33,8 @@ pub struct Vecs { // cointime,... pub height_to_unspendable_supply: EagerVec, pub indexes_to_unspendable_supply: ComputedValueVecsFromHeight, - // pub height_to_opreturn_supply: EagerVec, - // pub indexes_to_opreturn_supply: ComputedValueVecsFromHeight, + pub height_to_opreturn_supply: EagerVec, + pub indexes_to_opreturn_supply: ComputedValueVecsFromHeight, utxos_vecs: Outputs<(OutputFilter, cohort::Vecs)>, } @@ -74,6 +75,21 @@ impl Vecs { StorableVecGeneatorOptions::default().add_last(), compute_dollars, )?, + height_to_opreturn_supply: EagerVec::forced_import( + path, + "opreturn_supply", + version + VERSION + Version::ZERO, + compressed, + )?, + indexes_to_opreturn_supply: ComputedValueVecsFromHeight::forced_import( + path, + "opreturn_supply", + false, + version + VERSION + Version::ZERO, + compressed, + StorableVecGeneatorOptions::default().add_last(), + compute_dollars, + )?, utxos_vecs: { Outputs::<(OutputFilter, cohort::Vecs)>::from(Outputs { all: cohort::Vecs::forced_import( @@ -540,7 +556,7 @@ impl Vecs { Some("0sat"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_1sat_to_10sats: cohort::Vecs::forced_import( @@ -548,7 +564,7 @@ impl Vecs { Some("from_1sat_to_10sats"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_10sats_to_100sats: cohort::Vecs::forced_import( @@ -556,7 +572,7 @@ impl Vecs { Some("from_10sats_to_100sats"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_100sats_to_1_000sats: cohort::Vecs::forced_import( @@ -564,7 +580,7 @@ impl Vecs { Some("from_100sats_to_1_000sats"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_1_000sats_to_10_000sats: cohort::Vecs::forced_import( @@ -572,7 +588,7 @@ impl Vecs { Some("from_1_000sats_to_10_000sats"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_10_000sats_to_100_000sats: cohort::Vecs::forced_import( @@ -580,7 +596,7 @@ impl Vecs { Some("from_10_000sats_to_100_000sats"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_100_000sats_to_1_000_000sats: cohort::Vecs::forced_import( @@ -588,7 +604,7 @@ impl Vecs { Some("from_100_000sats_to_1_000_000sats"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_1_000_000sats_to_10_000_000sats: cohort::Vecs::forced_import( @@ -596,7 +612,7 @@ impl Vecs { Some("from_1_000_000sats_to_10_000_000sats"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_10_000_000sats_to_1btc: cohort::Vecs::forced_import( @@ -604,7 +620,7 @@ impl Vecs { Some("from_10_000_000sats_to_1btc"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_1btc_to_10btc: cohort::Vecs::forced_import( @@ -612,7 +628,7 @@ impl Vecs { Some("from_1btc_to_10btc"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_10btc_to_100btc: cohort::Vecs::forced_import( @@ -620,7 +636,7 @@ impl Vecs { Some("from_10btc_to_100btc"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_100btc_to_1_000btc: cohort::Vecs::forced_import( @@ -628,7 +644,7 @@ impl Vecs { Some("from_100btc_to_1_000btc"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_1_000btc_to_10_000btc: cohort::Vecs::forced_import( @@ -636,7 +652,7 @@ impl Vecs { Some("from_1_000btc_to_10_000btc"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_10_000btc_to_100_000btc: cohort::Vecs::forced_import( @@ -644,7 +660,7 @@ impl Vecs { Some("from_10_000btc_to_100_000btc"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, from_100_000btc: cohort::Vecs::forced_import( @@ -652,7 +668,7 @@ impl Vecs { Some("from_100_000btc"), _computation, compressed, - version + VERSION + Version::ZERO, + version + BYSIZE_VERSION + Version::ZERO, fetched, )?, }, @@ -790,9 +806,9 @@ impl Vecs { version + VERSION + Version::ZERO, fetched, )?, - // op_return: cohort::Vecs::forced_import( + // opreturn: cohort::Vecs::forced_import( // path, - // Some("op_return"), + // Some("opreturn"), // _computation, // compressed, // VERSION + Version::ZERO, @@ -925,6 +941,10 @@ impl Vecs { .validate_computed_version_or_reset_file( base_version + self.height_to_unspendable_supply.inner_version(), )?; + self.height_to_opreturn_supply + .validate_computed_version_or_reset_file( + base_version + self.height_to_opreturn_supply.inner_version(), + )?; let mut chain_state: Vec; let mut chain_state_starting_height = Height::from(self.chain_state.len()); @@ -972,7 +992,8 @@ impl Vecs { let starting_height = starting_indexes .height .min(stateful_starting_height) - .min(Height::from(self.height_to_unspendable_supply.len())); + .min(Height::from(self.height_to_unspendable_supply.len())) + .min(Height::from(self.height_to_opreturn_supply.len())); // --- // INIT @@ -990,12 +1011,25 @@ impl Vecs { Sats::ZERO }; + let mut opreturn_supply = if let Some(prev_height) = starting_height.decremented() { + self.height_to_opreturn_supply + .into_iter() + .unwrap_get_inner(prev_height) + } else { + Sats::ZERO + }; + let mut height = Height::ZERO; (starting_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() + .iter_mut() + .for_each(|(_, v)| v.state.reset_single_iteration_values()); + info!("Processing utxo set at {height}..."); let timestamp = height_to_timestamp_fixed_iter.unwrap_get_inner(height); @@ -1130,6 +1164,8 @@ impl Vecs { .sum::() + height_to_unclaimed_rewards_iter.unwrap_get_inner(height); + opreturn_supply += received.by_type.unspendable.opreturn.value; + if height == Height::new(0) { received = Transacted::default(); unspendable_supply += Sats::FIFTY_BTC; @@ -1183,6 +1219,9 @@ impl Vecs { exit, )?; + self.height_to_opreturn_supply + .forced_push_at(height, opreturn_supply, exit)?; + Ok(()) })?; @@ -1199,6 +1238,10 @@ impl Vecs { .par_iter_mut() .try_for_each(|(_, v)| v.safe_flush_height_vecs(exit))?; self.height_to_unspendable_supply.safe_flush(exit)?; + flat_vecs_ + .par_iter_mut() + .try_for_each(|(_, v)| v.safe_flush_height_vecs(exit))?; + self.height_to_opreturn_supply.safe_flush(exit)?; info!("Computing rest..."); @@ -1214,6 +1257,14 @@ impl Vecs { exit, Some(&self.height_to_unspendable_supply), )?; + self.indexes_to_opreturn_supply.compute_rest( + indexer, + indexes, + fetched, + starting_indexes, + exit, + Some(&self.height_to_opreturn_supply), + )?; info!("Chain state..."); @@ -1239,7 +1290,11 @@ impl Vecs { .flat_map(|v| v.vecs()) .collect::>(), self.indexes_to_unspendable_supply.vecs(), - vec![&self.height_to_unspendable_supply], + self.indexes_to_opreturn_supply.vecs(), + vec![ + &self.height_to_unspendable_supply, + &self.height_to_opreturn_supply, + ], ] .into_iter() .flatten() diff --git a/crates/brk_core/Cargo.toml b/crates/brk_core/Cargo.toml index 6ab376ed7..d01a8c917 100644 --- a/crates/brk_core/Cargo.toml +++ b/crates/brk_core/Cargo.toml @@ -16,8 +16,9 @@ log = { workspace = true } rapidhash = "1.4.0" rlimit = "0.10.2" serde = { workspace = true } -serde_derive = { workspace = true } serde_bytes = "0.11.17" +serde_derive = { workspace = true } +serde_json = { workspace = true } zerocopy = { workspace = true } zerocopy-derive = { workspace = true } diff --git a/crates/brk_vec/src/enums/error.rs b/crates/brk_core/src/enums/error.rs similarity index 84% rename from crates/brk_vec/src/enums/error.rs rename to crates/brk_core/src/enums/error.rs index f80135b4c..2f159ed3b 100644 --- a/crates/brk_vec/src/enums/error.rs +++ b/crates/brk_core/src/enums/error.rs @@ -26,6 +26,10 @@ pub enum Error { DifferentCompressionMode, SystemTimeError, ToSerdeJsonValueError(serde_json::Error), + Jiff(jiff::Error), + WrongLength, + WrongAddressType, + UnindexableDate, } impl From for Error { @@ -40,6 +44,12 @@ impl From for Error { } } +impl From for Error { + fn from(value: jiff::Error) -> Self { + Self::Jiff(value) + } +} + impl From> for Error { fn from(_: zerocopy::error::ConvertError) -> Self { Self::ZeroCopyError @@ -87,6 +97,13 @@ impl fmt::Display for Error { Error::DifferentCompressionMode => write!(f, "Different compression mode chosen"), Error::EmptyVec => write!(f, "The Vec is empty, maybe wait for a bit"), Error::ToSerdeJsonValueError(error) => Debug::fmt(&error, f), + Error::Jiff(error) => Debug::fmt(&error, f), + Error::WrongLength => write!(f, "Wrong length"), + Error::WrongAddressType => write!(f, "Wrong address type"), + Error::UnindexableDate => write!( + f, + "Date cannot be indexed, must be 2009-01-03, 2009-01-09 or greater" + ), } } } diff --git a/crates/brk_vec/src/enums/mod.rs b/crates/brk_core/src/enums/mod.rs similarity index 100% rename from crates/brk_vec/src/enums/mod.rs rename to crates/brk_core/src/enums/mod.rs diff --git a/crates/brk_vec/src/enums/value.rs b/crates/brk_core/src/enums/value.rs similarity index 100% rename from crates/brk_vec/src/enums/value.rs rename to crates/brk_core/src/enums/value.rs diff --git a/crates/brk_core/src/error.rs b/crates/brk_core/src/error.rs deleted file mode 100644 index 2a00c66b3..000000000 --- a/crates/brk_core/src/error.rs +++ /dev/null @@ -1,49 +0,0 @@ -use std::{ - fmt::{self, Debug}, - io, -}; - -pub type Result = std::result::Result; - -#[derive(Debug)] -pub enum Error { - IO(io::Error), - Jiff(jiff::Error), - ZeroCopyError, - WrongLength, - WrongAddressType, - UnindexableDate, -} - -impl From for Error { - fn from(value: io::Error) -> Self { - Self::IO(value) - } -} - -impl From for Error { - fn from(value: jiff::Error) -> Self { - Self::Jiff(value) - } -} - -impl From> for Error { - fn from(_: zerocopy::error::SizeError) -> Self { - Self::ZeroCopyError - } -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - Error::IO(error) => Debug::fmt(&error, f), - Error::Jiff(error) => Debug::fmt(&error, f), - Error::ZeroCopyError => write!(f, "Zero copy convert error"), - Error::WrongLength => write!(f, "Wrong length"), - Error::WrongAddressType => write!(f, "Wrong address type"), - Error::UnindexableDate => write!(f, "Date cannot be indexed, must be 2009-01-03, 2009-01-09 or greater"), - } - } -} - -impl std::error::Error for Error {} diff --git a/crates/brk_core/src/lib.rs b/crates/brk_core/src/lib.rs index 2c5951430..807f0c594 100644 --- a/crates/brk_core/src/lib.rs +++ b/crates/brk_core/src/lib.rs @@ -1,9 +1,9 @@ #![doc = include_str!("../README.md")] -mod error; +mod enums; mod structs; mod utils; -pub use error::*; +pub use enums::*; pub use structs::*; pub use utils::*; diff --git a/crates/brk_core/src/structs/mod.rs b/crates/brk_core/src/structs/mod.rs index c7842b0da..7e8f7268f 100644 --- a/crates/brk_core/src/structs/mod.rs +++ b/crates/brk_core/src/structs/mod.rs @@ -36,6 +36,7 @@ mod txidprefix; mod txindex; mod txversion; mod unit; +mod version; mod vin; mod vout; mod weekindex; @@ -80,6 +81,7 @@ pub use txidprefix::*; pub use txindex::*; pub use txversion::*; pub use unit::*; +pub use version::*; pub use vin::*; pub use vout::*; pub use weekindex::*; diff --git a/crates/brk_vec/src/structs/version.rs b/crates/brk_core/src/structs/version.rs similarity index 98% rename from crates/brk_vec/src/structs/version.rs rename to crates/brk_core/src/structs/version.rs index 24fc707c5..e0907cc99 100644 --- a/crates/brk_vec/src/structs/version.rs +++ b/crates/brk_core/src/structs/version.rs @@ -58,7 +58,7 @@ impl From for Version { impl TryFrom<&Path> for Version { type Error = Error; fn try_from(value: &Path) -> Result { - let mut buf = [0; 4]; + let mut buf = [0; 8]; fs::read(value)?.as_slice().read_exact(&mut buf)?; Ok(*(Self::ref_from_bytes(&buf)?)) } diff --git a/crates/brk_indexer/Cargo.toml b/crates/brk_indexer/Cargo.toml index b8c9ed309..db98f0b08 100644 --- a/crates/brk_indexer/Cargo.toml +++ b/crates/brk_indexer/Cargo.toml @@ -11,8 +11,9 @@ bitcoin = { workspace = true } bitcoincore-rpc = { workspace = true } brk_core = { workspace = true } brk_exit = { workspace = true } -brk_parser = { workspace = true } brk_logger = { workspace = true } +brk_parser = { workspace = true } +brk_store = { workspace = true } brk_vec = { workspace = true } byteview = { workspace = true } color-eyre = { workspace = true } diff --git a/crates/brk_indexer/examples/main.rs b/crates/brk_indexer/examples/main.rs index 5a5ce1285..5b4ee1c3e 100644 --- a/crates/brk_indexer/examples/main.rs +++ b/crates/brk_indexer/examples/main.rs @@ -3,7 +3,7 @@ use std::{path::Path, time::Instant}; use brk_core::default_bitcoin_path; use brk_exit::Exit; use brk_indexer::Indexer; -use brk_parser::{Parser, rpc}; +use brk_parser::Parser; fn main() -> color_eyre::Result<()> { color_eyre::install()?; @@ -14,9 +14,9 @@ fn main() -> color_eyre::Result<()> { let bitcoin_dir = default_bitcoin_path(); - let rpc = Box::leak(Box::new(rpc::Client::new( + let rpc = Box::leak(Box::new(bitcoincore_rpc::Client::new( "http://localhost:8332", - rpc::Auth::CookieFile(bitcoin_dir.join(".cookie")), + bitcoincore_rpc::Auth::CookieFile(bitcoin_dir.join(".cookie")), )?)); let exit = Exit::new(); diff --git a/crates/brk_indexer/src/indexes.rs b/crates/brk_indexer/src/indexes.rs index 749b7108c..d57787b95 100644 --- a/crates/brk_indexer/src/indexes.rs +++ b/crates/brk_indexer/src/indexes.rs @@ -2,7 +2,7 @@ use bitcoincore_rpc::Client; use brk_core::{ BlockHash, CheckedSub, EmptyOutputIndex, Height, InputIndex, OpReturnIndex, OutputIndex, OutputType, OutputTypeIndex, P2AIndex, P2MSIndex, P2PK33Index, P2PK65Index, P2PKHIndex, - P2SHIndex, P2TRIndex, P2WPKHIndex, P2WSHIndex, TxIndex, UnknownOutputIndex, + P2SHIndex, P2TRIndex, P2WPKHIndex, P2WSHIndex, Result, TxIndex, UnknownOutputIndex, }; use brk_parser::NUMBER_OF_UNSAFE_BLOCKS; use brk_vec::{AnyIterableVec, AnyVec, IndexedVec, StoredIndex, StoredType}; @@ -48,7 +48,7 @@ impl Indexes { } } - pub fn push_if_needed(&self, vecs: &mut Vecs) -> brk_vec::Result<()> { + pub fn push_if_needed(&self, vecs: &mut Vecs) -> Result<()> { let height = self.height; vecs.height_to_first_txindex .push_if_needed(height, self.txindex)?; diff --git a/crates/brk_indexer/src/lib.rs b/crates/brk_indexer/src/lib.rs index 0f426bba7..6f0734af0 100644 --- a/crates/brk_indexer/src/lib.rs +++ b/crates/brk_indexer/src/lib.rs @@ -12,13 +12,14 @@ use std::{ use brk_core::{ AddressBytes, AddressBytesHash, BlockHash, BlockHashPrefix, Height, InputIndex, OutputIndex, - OutputType, OutputTypeIndex, Sats, Timestamp, TxIndex, Txid, TxidPrefix, Vin, Vout, setrlimit, + OutputType, OutputTypeIndex, Sats, Timestamp, TxIndex, Txid, TxidPrefix, Version, Vin, Vout, + setrlimit, }; -pub use brk_parser::*; use bitcoin::{Transaction, TxIn, TxOut}; use brk_exit::Exit; -use brk_vec::{AnyVec, Compressed, VecIterator, Version}; +use brk_parser::Parser; +use brk_vec::{AnyVec, Compressed, VecIterator}; use color_eyre::eyre::{ContextCompat, eyre}; use fjall::TransactionalKeyspace; use log::{error, info}; @@ -82,7 +83,7 @@ impl Indexer { pub fn index( &mut self, parser: &Parser, - rpc: &'static rpc::Client, + rpc: &'static bitcoincore_rpc::Client, exit: &Exit, ) -> color_eyre::Result { let starting_indexes = Indexes::try_from(( diff --git a/crates/brk_indexer/src/stores/mod.rs b/crates/brk_indexer/src/stores.rs similarity index 99% rename from crates/brk_indexer/src/stores/mod.rs rename to crates/brk_indexer/src/stores.rs index 2bf548b65..12d01c19c 100644 --- a/crates/brk_indexer/src/stores/mod.rs +++ b/crates/brk_indexer/src/stores.rs @@ -2,19 +2,14 @@ use std::{fs, path::Path, thread}; use brk_core::{ AddressBytes, AddressBytesHash, BlockHashPrefix, Height, OutputType, OutputTypeIndex, TxIndex, - TxidPrefix, + TxidPrefix, Value, Version, }; -use brk_vec::{AnyIterableVec, Value, Version}; +use brk_store::Store; +use brk_vec::AnyIterableVec; use fjall::{PersistMode, TransactionalKeyspace}; use crate::Indexes; -mod base; -mod meta; - -pub use base::*; -pub use meta::*; - use super::Vecs; #[derive(Clone)] diff --git a/crates/brk_indexer/src/vecs/mod.rs b/crates/brk_indexer/src/vecs.rs similarity index 99% rename from crates/brk_indexer/src/vecs/mod.rs rename to crates/brk_indexer/src/vecs.rs index b85e42f80..28e60fc2d 100644 --- a/crates/brk_indexer/src/vecs/mod.rs +++ b/crates/brk_indexer/src/vecs.rs @@ -4,10 +4,11 @@ use brk_core::{ AddressBytes, BlockHash, EmptyOutputIndex, Height, InputIndex, OpReturnIndex, OutputIndex, OutputType, OutputTypeIndex, P2ABytes, P2AIndex, P2MSIndex, P2PK33Bytes, P2PK33Index, P2PK65Bytes, P2PK65Index, P2PKHBytes, P2PKHIndex, P2SHBytes, P2SHIndex, P2TRBytes, P2TRIndex, - P2WPKHBytes, P2WPKHIndex, P2WSHBytes, P2WSHIndex, RawLockTime, Sats, StoredF64, StoredU32, - StoredUsize, Timestamp, TxIndex, TxVersion, Txid, UnknownOutputIndex, Weight, + P2WPKHBytes, P2WPKHIndex, P2WSHBytes, P2WSHIndex, RawLockTime, Result, Sats, StoredF64, + StoredU32, StoredUsize, Timestamp, TxIndex, TxVersion, Txid, UnknownOutputIndex, Version, + Weight, }; -use brk_vec::{AnyCollectableVec, AnyIndexedVec, Compressed, IndexedVec, Result, Version}; +use brk_vec::{AnyCollectableVec, AnyIndexedVec, Compressed, IndexedVec}; use rayon::prelude::*; use crate::Indexes; @@ -340,7 +341,7 @@ impl Vecs { }) } - pub fn rollback_if_needed(&mut self, starting_indexes: &Indexes) -> brk_vec::Result<()> { + pub fn rollback_if_needed(&mut self, starting_indexes: &Indexes) -> Result<()> { let saved_height = starting_indexes.height.decremented().unwrap_or_default(); let &Indexes { @@ -458,7 +459,7 @@ impl Vecs { &mut self, index: OutputTypeIndex, bytes: AddressBytes, - ) -> brk_vec::Result<()> { + ) -> Result<()> { match bytes { AddressBytes::P2PK65(bytes) => self .p2pk65index_to_p2pk65bytes diff --git a/crates/brk_parser/src/lib.rs b/crates/brk_parser/src/lib.rs index 2ea6c30aa..3c39923e2 100644 --- a/crates/brk_parser/src/lib.rs +++ b/crates/brk_parser/src/lib.rs @@ -13,9 +13,6 @@ use brk_core::Height; use crossbeam::channel::{Receiver, bounded}; use rayon::prelude::*; -pub use bitcoin; -pub use bitcoincore_rpc as rpc; - mod blk_index_to_blk_path; mod blk_index_to_blk_recap; mod blk_metadata; diff --git a/crates/brk_query/Cargo.toml b/crates/brk_query/Cargo.toml index fe99255e2..0dc8cc6fd 100644 --- a/crates/brk_query/Cargo.toml +++ b/crates/brk_query/Cargo.toml @@ -7,6 +7,7 @@ version.workspace = true repository.workspace = true [dependencies] +brk_core = { workspace = true } brk_computer = { workspace = true } brk_indexer = { workspace = true } brk_vec = { workspace = true } diff --git a/crates/brk_query/src/lib.rs b/crates/brk_query/src/lib.rs index b48aa6499..a9985f091 100644 --- a/crates/brk_query/src/lib.rs +++ b/crates/brk_query/src/lib.rs @@ -4,6 +4,7 @@ #![doc = "```"] use brk_computer::Computer; +use brk_core::Result; use brk_indexer::Indexer; use brk_vec::AnyCollectableVec; use tabled::settings::Style; @@ -92,10 +93,10 @@ impl<'a> Query<'a> { ) -> color_eyre::Result { let mut values = vecs .iter() - .map(|(_, vec)| -> brk_vec::Result> { + .map(|(_, vec)| -> Result> { vec.collect_range_serde_json(from, to) }) - .collect::>>()?; + .collect::>>()?; if values.is_empty() { return Ok(Output::default(format)); diff --git a/crates/brk_query/src/vec_trees.rs b/crates/brk_query/src/vec_trees.rs index 5e70262b3..01911e57e 100644 --- a/crates/brk_query/src/vec_trees.rs +++ b/crates/brk_query/src/vec_trees.rs @@ -18,8 +18,12 @@ impl<'a> VecTrees<'a> { let split = name.split("_to_").collect::>(); if split.len() != 2 && !(split.len() == 3 - && (split.get(1) == Some(&"up") - || split.get(1).is_some_and(|s| s.starts_with("from")))) + && split.get(1).is_some_and(|s| { + s == &"up" + || s.starts_with("from") + || s == &"cumulative_up" + || s.starts_with("cumulative_from") + })) { dbg!(&name, &split); panic!(); diff --git a/crates/brk_server/Cargo.toml b/crates/brk_server/Cargo.toml index 263d761ab..9a56aec02 100644 --- a/crates/brk_server/Cargo.toml +++ b/crates/brk_server/Cargo.toml @@ -8,6 +8,7 @@ repository.workspace = true [dependencies] axum = { workspace = true } +bitcoincore-rpc = { workspace = true } brk_computer = { workspace = true } brk_exit = { workspace = true } brk_core = { workspace = true } @@ -25,7 +26,7 @@ log = { workspace = true } minreq = { workspace = true } oxc = { version = "0.72.0", features = ["codegen", "minifier"] } serde = { workspace = true } -tokio = { version = "1.45.1", features = ["full"] } +tokio = { workspace = true } tower-http = { version = "0.6.4", features = ["compression-full", "trace"] } zip = "4.0.0" tracing = "0.1.41" diff --git a/crates/brk_server/examples/main.rs b/crates/brk_server/examples/main.rs index 1c3bb9a54..20bab17ce 100644 --- a/crates/brk_server/examples/main.rs +++ b/crates/brk_server/examples/main.rs @@ -1,14 +1,12 @@ use std::{path::Path, thread::sleep, time::Duration}; +use bitcoincore_rpc::RpcApi; use brk_computer::Computer; use brk_core::default_bitcoin_path; use brk_exit::Exit; use brk_fetcher::Fetcher; use brk_indexer::Indexer; -use brk_parser::{ - Parser, - rpc::{self, RpcApi}, -}; +use brk_parser::Parser; use brk_server::{Server, Website}; use brk_vec::Computation; @@ -21,9 +19,9 @@ pub fn main() -> color_eyre::Result<()> { let bitcoin_dir = default_bitcoin_path(); - let rpc = Box::leak(Box::new(rpc::Client::new( + let rpc = Box::leak(Box::new(bitcoincore_rpc::Client::new( "http://localhost:8332", - rpc::Auth::CookieFile(bitcoin_dir.join(".cookie")), + bitcoincore_rpc::Auth::CookieFile(bitcoin_dir.join(".cookie")), )?)); let exit = Exit::new(); diff --git a/crates/brk_server/src/api/query/dts.rs b/crates/brk_server/src/api/query/dts.rs index 0d36aad2b..9d534dc24 100644 --- a/crates/brk_server/src/api/query/dts.rs +++ b/crates/brk_server/src/api/query/dts.rs @@ -57,16 +57,6 @@ impl DTS for Query<'static> { contents += "\n\nexport function createVecIdToIndexes() {\n"; - // contents += &indexes - // .iter() - // .enumerate() - // .map(|(i_of_i, i)| { - // // let lowered = i.to_string().to_lowercase(); - // format!(" const {i} = /** @satisfies {{{i}}} */ ({i_of_i});",) - // }) - // .collect::>() - // .join("\n"); - contents += "\n\n return /** @type {const} */ ({\n"; self.vec_trees diff --git a/crates/brk_server/src/lib.rs b/crates/brk_server/src/lib.rs index c0de7399e..b5907f5c8 100644 --- a/crates/brk_server/src/lib.rs +++ b/crates/brk_server/src/lib.rs @@ -26,7 +26,6 @@ use brk_query::Query; use color_eyre::owo_colors::OwoColorize; use files::FilesRoutes; use log::{error, info}; -pub use tokio; use tokio::net::TcpListener; use tower_http::{compression::CompressionLayer, trace::TraceLayer}; diff --git a/crates/brk_store/Cargo.toml b/crates/brk_store/Cargo.toml new file mode 100644 index 000000000..7440d1f1f --- /dev/null +++ b/crates/brk_store/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "brk_store" +description = "A thin wrapper around fjall" +keywords = ["store", "fjall"] +categories = ["database"] +version.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true + +[dependencies] +brk_core = { workspace = true } +byteview = { workspace = true } +color-eyre = { workspace = true } +fjall = { workspace = true } +zerocopy = { workspace = true } diff --git a/crates/brk_indexer/src/stores/base.rs b/crates/brk_store/src/lib.rs similarity index 97% rename from crates/brk_indexer/src/stores/base.rs rename to crates/brk_store/src/lib.rs index 65588d3d4..c0dca67db 100644 --- a/crates/brk_indexer/src/stores/base.rs +++ b/crates/brk_store/src/lib.rs @@ -6,8 +6,7 @@ use std::{ path::Path, }; -use brk_core::Height; -use brk_vec::{Value, Version}; +use brk_core::{Height, Value, Version}; use byteview::ByteView; use fjall::{ PartitionCreateOptions, PersistMode, ReadTransaction, Result, TransactionalKeyspace, @@ -15,7 +14,8 @@ use fjall::{ }; use zerocopy::{Immutable, IntoBytes}; -use super::StoreMeta; +mod meta; +use meta::*; pub struct Store { meta: StoreMeta, @@ -47,7 +47,8 @@ where &path.join(format!("meta/{name}")), MAJOR_FJALL_VERSION + version, || { - Self::open_partition_handle(&keyspace, name).inspect_err(|_| { + Self::open_partition_handle(&keyspace, name).inspect_err(|e| { + eprintln!("{e}"); eprintln!("Delete {path:?} and try again"); }) }, diff --git a/crates/brk_indexer/src/stores/meta.rs b/crates/brk_store/src/meta.rs similarity index 85% rename from crates/brk_indexer/src/stores/meta.rs rename to crates/brk_store/src/meta.rs index 80967f4d1..239626dd9 100644 --- a/crates/brk_indexer/src/stores/meta.rs +++ b/crates/brk_store/src/meta.rs @@ -3,7 +3,7 @@ use std::{ path::{Path, PathBuf}, }; -use brk_vec::Version; +use brk_core::Version; use fjall::{TransactionalKeyspace, TransactionalPartitionHandle}; use zerocopy::{FromBytes, IntoBytes}; @@ -29,8 +29,11 @@ impl StoreMeta { { fs::create_dir_all(path)?; - let is_same_version = Version::try_from(Self::path_version_(path).as_path()) - .is_ok_and(|prev_version| version == prev_version); + let read_version = Version::try_from(Self::path_version_(path).as_path()); + + let is_same_version = read_version + .as_ref() + .is_ok_and(|prev_version| &version == prev_version); let mut partition = open_partition_handle()?; @@ -56,13 +59,13 @@ impl StoreMeta { pub fn len(&self) -> usize { self.len } - pub fn is_empty(&self) -> bool { - self.len() == 0 - } + // pub fn is_empty(&self) -> bool { + // self.len() == 0 + // } - pub fn version(&self) -> Version { - self.version - } + // pub fn version(&self) -> Version { + // self.version + // } pub fn export(&mut self, len: usize, height: Height) -> io::Result<()> { self.len = len; @@ -71,9 +74,9 @@ impl StoreMeta { height.write(&self.path_height()) } - pub fn reset(&self) -> io::Result<()> { - Self::reset_(self.pathbuf.as_path()) - } + // pub fn reset(&self) -> io::Result<()> { + // Self::reset_(self.pathbuf.as_path()) + // } fn reset_(path: &Path) -> io::Result<()> { fs::remove_dir_all(path)?; fs::create_dir(path) diff --git a/crates/brk_vec/examples/main.rs b/crates/brk_vec/examples/main.rs index 015052a1a..5bbc94092 100644 --- a/crates/brk_vec/examples/main.rs +++ b/crates/brk_vec/examples/main.rs @@ -1,8 +1,7 @@ use std::{fs, path::Path}; -use brk_vec::{ - AnyVec, CollectableVec, Compressed, GenericStoredVec, StoredVec, VecIterator, Version, -}; +use brk_core::Version; +use brk_vec::{AnyVec, CollectableVec, Compressed, GenericStoredVec, StoredVec, VecIterator}; fn main() -> Result<(), Box> { let _ = fs::remove_dir_all("./vec"); diff --git a/crates/brk_vec/src/lib.rs b/crates/brk_vec/src/lib.rs index 6c84b3cdb..a3f1fe79b 100644 --- a/crates/brk_vec/src/lib.rs +++ b/crates/brk_vec/src/lib.rs @@ -3,12 +3,10 @@ #![doc = include_str!("../examples/main.rs")] #![doc = "```"] -mod enums; mod structs; mod traits; mod variants; -pub use enums::*; pub use memmap2::Mmap; pub use structs::*; pub use traits::*; diff --git a/crates/brk_vec/src/structs/compressed.rs b/crates/brk_vec/src/structs/compressed.rs index 3e35d7555..1e51acfb3 100644 --- a/crates/brk_vec/src/structs/compressed.rs +++ b/crates/brk_vec/src/structs/compressed.rs @@ -1,6 +1,6 @@ use std::{fs, io, ops::Deref, path::Path}; -use crate::{Error, Result}; +use brk_core::{Error, Result}; #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub struct Compressed(bool); diff --git a/crates/brk_vec/src/structs/compressed_pages_meta.rs b/crates/brk_vec/src/structs/compressed_pages_meta.rs index b57b8f069..e2f2b20ff 100644 --- a/crates/brk_vec/src/structs/compressed_pages_meta.rs +++ b/crates/brk_vec/src/structs/compressed_pages_meta.rs @@ -4,11 +4,10 @@ use std::{ path::{Path, PathBuf}, }; +use brk_core::Result; use rayon::prelude::*; use zerocopy::{IntoBytes, TryFromBytes}; -use crate::Result; - use super::{CompressedPageMetadata, UnsafeSlice}; #[derive(Debug, Clone)] diff --git a/crates/brk_vec/src/structs/length.rs b/crates/brk_vec/src/structs/length.rs index 7f7542f53..e32d87e00 100644 --- a/crates/brk_vec/src/structs/length.rs +++ b/crates/brk_vec/src/structs/length.rs @@ -5,11 +5,10 @@ use std::{ path::Path, }; +use brk_core::{Error, Result}; use zerocopy::{FromBytes, IntoBytes}; use zerocopy_derive::{FromBytes, Immutable, IntoBytes, KnownLayout}; -use crate::{Error, Result}; - #[derive( Debug, Default, diff --git a/crates/brk_vec/src/structs/mod.rs b/crates/brk_vec/src/structs/mod.rs index e6feedea9..bac79b2fa 100644 --- a/crates/brk_vec/src/structs/mod.rs +++ b/crates/brk_vec/src/structs/mod.rs @@ -3,11 +3,9 @@ mod compressed_page_meta; mod compressed_pages_meta; mod length; mod unsafe_slice; -mod version; pub use compressed::*; pub use compressed_page_meta::*; pub use compressed_pages_meta::*; pub use length::*; pub use unsafe_slice::*; -pub use version::*; diff --git a/crates/brk_vec/src/traits/any.rs b/crates/brk_vec/src/traits/any.rs index bda7cfa15..2ee5f5a06 100644 --- a/crates/brk_vec/src/traits/any.rs +++ b/crates/brk_vec/src/traits/any.rs @@ -1,6 +1,6 @@ use std::time::Duration; -use crate::{Result, Version}; +use brk_core::{Result, Version}; use super::{BoxedVecIterator, StoredIndex, StoredType}; diff --git a/crates/brk_vec/src/traits/collectable.rs b/crates/brk_vec/src/traits/collectable.rs index 239309753..59b1e7529 100644 --- a/crates/brk_vec/src/traits/collectable.rs +++ b/crates/brk_vec/src/traits/collectable.rs @@ -1,4 +1,4 @@ -use crate::{Error, Result}; +use brk_core::{Error, Result}; use super::{AnyIterableVec, AnyVec, StoredIndex, StoredType}; diff --git a/crates/brk_vec/src/traits/generic.rs b/crates/brk_vec/src/traits/generic.rs index cc976944c..3d4aab484 100644 --- a/crates/brk_vec/src/traits/generic.rs +++ b/crates/brk_vec/src/traits/generic.rs @@ -7,10 +7,9 @@ use std::{ }; use arc_swap::ArcSwap; +use brk_core::{Result, Value}; use memmap2::Mmap; -use crate::{Result, Value}; - use super::{StoredIndex, StoredType}; pub trait GenericStoredVec: Send + Sync diff --git a/crates/brk_vec/src/traits/index.rs b/crates/brk_vec/src/traits/index.rs index 431c02133..588e851a1 100644 --- a/crates/brk_vec/src/traits/index.rs +++ b/crates/brk_vec/src/traits/index.rs @@ -4,7 +4,7 @@ use std::{ path::{Path, PathBuf}, }; -use crate::{Error, Result}; +use brk_core::{Error, Result}; pub trait StoredIndex where diff --git a/crates/brk_vec/src/traits/iterator.rs b/crates/brk_vec/src/traits/iterator.rs index 485d3d85a..1c7a67c70 100644 --- a/crates/brk_vec/src/traits/iterator.rs +++ b/crates/brk_vec/src/traits/iterator.rs @@ -1,6 +1,6 @@ use std::iter::Skip; -use crate::Value; +use brk_core::Value; use super::{StoredIndex, StoredType}; diff --git a/crates/brk_vec/src/variants/compressed.rs b/crates/brk_vec/src/variants/compressed.rs index 3862b383f..bb649c495 100644 --- a/crates/brk_vec/src/variants/compressed.rs +++ b/crates/brk_vec/src/variants/compressed.rs @@ -7,14 +7,15 @@ use std::{ }; use arc_swap::{ArcSwap, Guard}; +use brk_core::{Error, Result, Value, Version}; use memmap2::Mmap; use rayon::prelude::*; use zstd::DEFAULT_COMPRESSION_LEVEL; use crate::{ AnyCollectableVec, AnyIterableVec, AnyVec, BaseVecIterator, BoxedVecIterator, CollectableVec, - CompressedPageMetadata, CompressedPagesMetadata, Error, GenericStoredVec, RawVec, Result, - StoredIndex, StoredType, UnsafeSlice, Value, Version, + CompressedPageMetadata, CompressedPagesMetadata, GenericStoredVec, RawVec, StoredIndex, + StoredType, UnsafeSlice, }; const ONE_KIB: usize = 1024; diff --git a/crates/brk_vec/src/variants/computed.rs b/crates/brk_vec/src/variants/computed.rs index 65649b943..ad5a7d120 100644 --- a/crates/brk_vec/src/variants/computed.rs +++ b/crates/brk_vec/src/variants/computed.rs @@ -4,11 +4,11 @@ use brk_exit::Exit; use clap_derive::ValueEnum; use serde::{Deserialize, Serialize}; -use brk_core::StoredPhantom; +use brk_core::{Result, StoredPhantom, Value, Version}; use crate::{ AnyCollectableVec, AnyIterableVec, AnyVec, BaseVecIterator, BoxedAnyIterableVec, - BoxedVecIterator, CollectableVec, Compressed, Result, StoredIndex, StoredType, Value, Version, + BoxedVecIterator, CollectableVec, Compressed, StoredIndex, StoredType, }; use super::{ diff --git a/crates/brk_vec/src/variants/eager.rs b/crates/brk_vec/src/variants/eager.rs index 811eea2cd..062769d72 100644 --- a/crates/brk_vec/src/variants/eager.rs +++ b/crates/brk_vec/src/variants/eager.rs @@ -10,16 +10,16 @@ use std::{ use arc_swap::ArcSwap; use brk_core::{ - Bitcoin, CheckedSub, Close, Date, DateIndex, Dollars, Height, Sats, StoredUsize, TxIndex, + Bitcoin, CheckedSub, Close, Date, DateIndex, Dollars, Error, Height, Result, Sats, StoredUsize, + TxIndex, Value, Version, }; use brk_exit::Exit; use log::info; use memmap2::Mmap; use crate::{ - AnyCollectableVec, AnyIterableVec, AnyVec, BoxedVecIterator, CollectableVec, Compressed, Error, - GenericStoredVec, Result, StoredIndex, StoredType, StoredVec, StoredVecIterator, Value, - VecIterator, Version, + AnyCollectableVec, AnyIterableVec, AnyVec, BoxedVecIterator, CollectableVec, Compressed, + GenericStoredVec, StoredIndex, StoredType, StoredVec, StoredVecIterator, VecIterator, }; const ONE_KIB: usize = 1024; diff --git a/crates/brk_vec/src/variants/indexed.rs b/crates/brk_vec/src/variants/indexed.rs index 0c3f594ee..3943b06dc 100644 --- a/crates/brk_vec/src/variants/indexed.rs +++ b/crates/brk_vec/src/variants/indexed.rs @@ -6,11 +6,11 @@ use std::{ }; use arc_swap::ArcSwap; -use brk_core::Height; +use brk_core::{Error, Height, Result, Value, Version}; use crate::{ - AnyCollectableVec, AnyIterableVec, AnyVec, BoxedVecIterator, CollectableVec, Compressed, Error, - GenericStoredVec, Mmap, Result, StoredIndex, StoredType, StoredVec, Value, Version, + AnyCollectableVec, AnyIterableVec, AnyVec, BoxedVecIterator, CollectableVec, Compressed, + GenericStoredVec, Mmap, StoredIndex, StoredType, StoredVec, }; use super::StoredVecIterator; diff --git a/crates/brk_vec/src/variants/lazy1.rs b/crates/brk_vec/src/variants/lazy1.rs index 748e6be45..f535166b7 100644 --- a/crates/brk_vec/src/variants/lazy1.rs +++ b/crates/brk_vec/src/variants/lazy1.rs @@ -1,9 +1,10 @@ -use core::panic; use std::marker::PhantomData; +use brk_core::{Result, Value, Version}; + use crate::{ AnyCollectableVec, AnyIterableVec, AnyVec, BaseVecIterator, BoxedAnyIterableVec, - BoxedVecIterator, CollectableVec, Result, StoredIndex, StoredType, Value, Version, + BoxedVecIterator, CollectableVec, StoredIndex, StoredType, }; pub type ComputeFrom1 = diff --git a/crates/brk_vec/src/variants/lazy2.rs b/crates/brk_vec/src/variants/lazy2.rs index 71a6c5537..dd147f281 100644 --- a/crates/brk_vec/src/variants/lazy2.rs +++ b/crates/brk_vec/src/variants/lazy2.rs @@ -1,8 +1,10 @@ use std::marker::PhantomData; +use brk_core::{Result, Value, Version}; + use crate::{ AnyCollectableVec, AnyIterableVec, AnyVec, BaseVecIterator, BoxedAnyIterableVec, - BoxedVecIterator, CollectableVec, Result, StoredIndex, StoredType, Value, Version, + BoxedVecIterator, CollectableVec, StoredIndex, StoredType, }; pub type ComputeFrom2 = for<'a> fn( diff --git a/crates/brk_vec/src/variants/lazy3.rs b/crates/brk_vec/src/variants/lazy3.rs index 6ef31c95e..96be74887 100644 --- a/crates/brk_vec/src/variants/lazy3.rs +++ b/crates/brk_vec/src/variants/lazy3.rs @@ -1,8 +1,10 @@ use std::marker::PhantomData; +use brk_core::{Result, Value, Version}; + use crate::{ AnyCollectableVec, AnyIterableVec, AnyVec, BaseVecIterator, BoxedAnyIterableVec, - BoxedVecIterator, CollectableVec, Result, StoredIndex, StoredType, Value, Version, + BoxedVecIterator, CollectableVec, StoredIndex, StoredType, }; pub type ComputeFrom3 = for<'a> fn( diff --git a/crates/brk_vec/src/variants/raw.rs b/crates/brk_vec/src/variants/raw.rs index 77e203a4b..39486c25e 100644 --- a/crates/brk_vec/src/variants/raw.rs +++ b/crates/brk_vec/src/variants/raw.rs @@ -8,12 +8,13 @@ use std::{ }; use arc_swap::{ArcSwap, Guard}; +use brk_core::{Error, Result, Value, Version}; use memmap2::Mmap; use rayon::prelude::*; use crate::{ AnyCollectableVec, AnyIterableVec, AnyVec, BaseVecIterator, BoxedVecIterator, CollectableVec, - Error, GenericStoredVec, Result, StoredIndex, StoredType, UnsafeSlice, Value, Version, + GenericStoredVec, StoredIndex, StoredType, UnsafeSlice, }; #[derive(Debug)] diff --git a/crates/brk_vec/src/variants/stored.rs b/crates/brk_vec/src/variants/stored.rs index 6f24a5051..cf3387d91 100644 --- a/crates/brk_vec/src/variants/stored.rs +++ b/crates/brk_vec/src/variants/stored.rs @@ -1,11 +1,12 @@ use std::{path::Path, time::Duration}; use arc_swap::ArcSwap; +use brk_core::{Result, Value, Version}; use memmap2::Mmap; use crate::{ AnyCollectableVec, AnyIterableVec, AnyVec, BaseVecIterator, BoxedVecIterator, CollectableVec, - Compressed, GenericStoredVec, Result, StoredIndex, StoredType, Value, Version, + Compressed, GenericStoredVec, StoredIndex, StoredType, }; use super::{CompressedVec, CompressedVecIterator, RawVec, RawVecIterator}; diff --git a/websites/kibo.money/scripts/main.js b/websites/kibo.money/scripts/main.js index 41bb5245a..3990f94f0 100644 --- a/websites/kibo.money/scripts/main.js +++ b/websites/kibo.money/scripts/main.js @@ -45,10 +45,17 @@ * "cagr" | * "vB" | * "performance" | - * "zscore" + * "sd" | + * "Epoch" | + * "Height" | + * "Type" | + * "zscore" | + * "Bytes" * } Unit */ +const localhost = window.location.hostname === "localhost"; + function initPackages() { const imports = { async signals() { @@ -682,110 +689,217 @@ function createUtils() { }); } + const thoroughUnitCheck = localhost; + /** * @param {VecId} id */ function vecidToUnit(id) { - /** @type {Unit} */ + /** @type {Unit | undefined} */ let unit; - if (id.endsWith("zscore")) { - unit = "zscore"; - } else if (id.endsWith("cagr")) { - unit = "cagr"; - } else if (id.endsWith("returns")) { - unit = "performance"; - } else if (id === "drawdown" || id.endsWith("oscillator")) { - unit = "percentage"; - } else if (id.endsWith("-as-price")) { - unit = "USD"; - } else if (id.includes("type")) { - unit = "Type"; - } else if (id.includes("days-")) { - unit = "Days"; - } else if (id.includes("years-")) { - unit = "Years"; - } else if (id === "rawlocktime") { - unit = "Locktime"; - } else if (id.startsWith("is-")) { - unit = "Bool"; - } else if ( - id.includes("bytes") || - id.includes("hash") || - id.includes("address") || - id.includes("txid") + + if ( + (!unit || thoroughUnitCheck) && + (id.includes("in-sats") || + id.endsWith("supply") || + id.endsWith("stack") || + id.endsWith("value") || + ((id.includes("coinbase") || + id.includes("fee") || + id.includes("subsidy") || + id.includes("rewards")) && + !( + id.startsWith("is-") || + id.includes("in-btc") || + id.includes("in-usd") + ))) ) { - unit = "Hash"; - } else if (id.includes("interval")) { - unit = "Seconds"; - } else if (id.includes("feerate")) { - unit = "sat/vB"; - } else if (id.includes("in-cents")) { - unit = "Cents"; - } else if (id.includes("in-usd")) { - unit = "USD"; - } else if (id.includes("ratio")) { - unit = "Ratio"; - } else if (id.includes("in-btc")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Sats"; + } + if ((!unit || thoroughUnitCheck) && id.includes("in-btc")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); unit = "BTC"; - } else if ( - id.includes("in-sats") || - id.startsWith("sats-") || - id.includes("input-value") || - id.includes("output-value") || - id.includes("fee") || - id.includes("coinbase") || - id.includes("subsidy") || - id.endsWith("stack") || - id.includes("supply") || - id.includes("rewards") || - id.includes("realized-cap") - ) { - unit = "Sats"; - } else if ( - id.includes("open") || - id.includes("high") || - id.includes("low") || - id.includes("close") || - id.includes("ohlc") || - id.includes("marketcap") || - id.includes("ath") || - id.includes("-sma") || - id.endsWith("-price") || - id.startsWith("price-") || - id.startsWith("realized-") + } + if ( + (!unit || thoroughUnitCheck) && + (id === "high" || + id === "ohlc" || + id === "low" || + id === "close" || + id === "open" || + id === "marketcap" || + id.startsWith("price") || + id.endsWith("price") || + id.endsWith("value-created") || + id.endsWith("value-destroyed") || + id.endsWith("realized-cap") || + id.endsWith("realized-loss") || + id.endsWith("realized-loss-sum") || + id.endsWith("realized-profit") || + id.endsWith("realized-profit-sum") || + id.includes("in-usd") || + (!id.includes("ratio") && id.endsWith("sma")) || + id.endsWith("ath")) ) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); unit = "USD"; - } else if (id.includes("count") || id.match(/v[1-3]/g)) { - unit = "Count"; - } else if (id.includes("date")) { - unit = "Date"; - } else if (id.includes("timestamp")) { - unit = "Timestamp"; - } else if ( - id.includes("index") || - id.includes("height") || - id.includes("epoch") + } + if ((!unit || thoroughUnitCheck) && id.endsWith("cents")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Cents"; + } + if ( + (!unit || thoroughUnitCheck) && + (id.endsWith("ratio") || + (id.includes("ratio") && + (id.endsWith("-sma") || + id.endsWith("-1w-sma") || + id.endsWith("-1m-sma") || + id.endsWith("-1y-sma"))) || + id.endsWith("1sd") || + id.endsWith("2sd") || + id.endsWith("3sd") || + id.endsWith("p0-1") || + id.endsWith("p0-5") || + id.endsWith("p1") || + id.endsWith("p99") || + id.endsWith("p99-5") || + id.endsWith("p99-9")) ) { - unit = "Index"; - } else if (id === "0" || id === "1" || id === "50" || id === "100") { - unit = "constant"; - } else if (id.includes("difficulty")) { - unit = "Difficulty"; - } else if (id.includes("-size")) { - unit = "mb"; - } else if (id.includes("weight")) { - unit = "WU"; - } else if (id.includes("vbytes") || id.includes("vsize")) { - unit = "vB"; - } else if (id.includes("version")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Ratio"; + } + if ( + (!unit || thoroughUnitCheck) && + (id === "drawdown" || id.endsWith("oscillator")) + ) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "percentage"; + } + if ( + (!unit || thoroughUnitCheck) && + (id.endsWith("count") || + id.includes("-count-") || + id.startsWith("block-count") || + id.includes("tx-v")) + ) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Count"; + } + if ((!unit || thoroughUnitCheck) && id.startsWith("is-")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Bool"; + } + if ((!unit || thoroughUnitCheck) && id.endsWith("type")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Type"; + } + if ( + (!unit || thoroughUnitCheck) && + (id === "interval" || id.startsWith("block-interval")) + ) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Seconds"; + } + if ((!unit || thoroughUnitCheck) && id.endsWith("returns")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "performance"; + } + if ((!unit || thoroughUnitCheck) && id.endsWith("zscore")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "zscore"; + } + if ((!unit || thoroughUnitCheck) && id.endsWith("locktime")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Locktime"; + } + if ((!unit || thoroughUnitCheck) && id.endsWith("cagr")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "cagr"; + } + if ((!unit || thoroughUnitCheck) && id.endsWith("version")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); unit = "Version"; - } else if (id === "value") { - unit = "Sats"; - } else { + } + if ( + (!unit || thoroughUnitCheck) && + (id === "txid" || (id.endsWith("bytes") && !id.endsWith("vbytes"))) + ) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Bytes"; + } + if ((!unit || thoroughUnitCheck) && id.endsWith("standard-deviation")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "sd"; + } + if ( + (!unit || thoroughUnitCheck) && + (id.endsWith("-size") || id.endsWith("-size-sum")) + ) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "mb"; + } + if ( + (!unit || thoroughUnitCheck) && + (id.endsWith("vsize") || + id.endsWith("vbytes") || + id.endsWith("-vbytes-sum")) + ) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "vB"; + } + if ((!unit || thoroughUnitCheck) && id.includes("weight")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "WU"; + } + if ((!unit || thoroughUnitCheck) && id.endsWith("index")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Index"; + } + if ( + (!unit || thoroughUnitCheck) && + (id === "date" || id === "date-fixed") + ) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Date"; + } + if ( + (!unit || thoroughUnitCheck) && + (id === "timestamp" || id === "timestamp-fixed") + ) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Timestamp"; + } + if ((!unit || thoroughUnitCheck) && id.endsWith("height")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Height"; + } + if ((!unit || thoroughUnitCheck) && id.endsWith("epoch")) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Epoch"; + } + if ((!unit || thoroughUnitCheck) && id === "difficulty") { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Difficulty"; + } + if ((!unit || thoroughUnitCheck) && id === "blockhash") { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "Hash"; + } + if ( + (!unit || thoroughUnitCheck) && + (id === "0" || id === "1" || id === "50" || id === "100") + ) { + if (unit) throw Error(`Unit "${unit}" already assigned "${id}"`); + unit = "constant"; + } + + if (!unit) { console.log(); throw Error(`Unit not set for "${id}"`); } - return unit; + return /** @type {Unit} */ (unit); } const locale = { @@ -1476,7 +1590,7 @@ function initEnv() { iphone, ipad, ios, - localhost: window.location.hostname === "localhost", + localhost, }; } /** @typedef {ReturnType} Env */ diff --git a/websites/kibo.money/scripts/options.js b/websites/kibo.money/scripts/options.js index c70d898e6..c3f4d51a3 100644 --- a/websites/kibo.money/scripts/options.js +++ b/websites/kibo.money/scripts/options.js @@ -146,9 +146,9 @@ function createPartialOptions(colors) { */ /** - * @typedef {"total-"} TotalPrefix - * @typedef {StartsWith} TotalVecId - * @typedef {WithoutPrefix} TotalVecIdBase + * @typedef {"cumulative-"} CumulativePrefix + * @typedef {StartsWith} CumulativeVecId + * @typedef {WithoutPrefix} CumulativeVecIdBase * @typedef {"-sum"} SumSuffix * @typedef {EndsWith} VecIdSum * @typedef {WithoutSuffix} VecIdSumBase @@ -758,10 +758,10 @@ function createPartialOptions(colors) { /** * @param {Object} args - * @param {VecIdSumBase & TotalVecIdBase} args.concat + * @param {VecIdSumBase & CumulativeVecIdBase} args.concat * @param {string} [args.name] */ - function createSumTotalSeries({ concat, name }) { + function createSumCumulativeSeries({ concat, name }) { return /** @satisfies {AnyFetchedSeriesBlueprint[]} */ ([ { key: `${concat}-sum`, @@ -769,8 +769,8 @@ function createPartialOptions(colors) { color: colors.orange, }, { - key: `total-${concat}`, - title: name ? `Total ${name}` : "Total", + key: `cumulative-${concat}`, + title: name ? `Cumulative ${name}` : "Cumulative", color: colors.red, defaultActive: false, }, @@ -829,43 +829,46 @@ function createPartialOptions(colors) { } /** - * @param {VecIdAverageBase & VecIdSumBase & TotalVecIdBase & VecIdMinBase & VecIdMaxBase & VecId90pBase & VecId75pBase & VecIdMedianBase & VecId25pBase & VecId10pBase} key + * @param {VecIdAverageBase & VecIdSumBase & CumulativeVecIdBase & VecIdMinBase & VecIdMaxBase & VecId90pBase & VecId75pBase & VecIdMedianBase & VecId25pBase & VecId10pBase} key */ - function createAverageSumTotalMinMaxPercentilesSeries(key) { + function createAverageSumCumulativeMinMaxPercentilesSeries(key) { return [ createAverageSeries({ concat: key }), - ...createSumTotalSeries({ concat: key }), + ...createSumCumulativeSeries({ concat: key }), ...createMinMaxPercentilesSeries({ concat: key }), ]; } /** * @param {Object} args - * @param {ChartableVecId & VecIdAverageBase & VecIdSumBase & TotalVecIdBase & VecIdMinBase & VecIdMaxBase & VecId90pBase & VecId75pBase & VecIdMedianBase & VecId25pBase & VecId10pBase} args.key + * @param {ChartableVecId & VecIdAverageBase & VecIdSumBase & CumulativeVecIdBase & VecIdMinBase & VecIdMaxBase & VecId90pBase & VecId75pBase & VecIdMedianBase & VecId25pBase & VecId10pBase} args.key * @param {string} args.name */ - function createBaseAverageSumTotalMinMaxPercentilesSeries({ key, name }) { + function createBaseAverageSumCumulativeMinMaxPercentilesSeries({ + key, + name, + }) { return [ createBaseSeries({ key, name, }), - ...createAverageSumTotalMinMaxPercentilesSeries(key), + ...createAverageSumCumulativeMinMaxPercentilesSeries(key), ]; } /** * @param {Object} args - * @param {ChartableVecId & VecIdSumBase & TotalVecIdBase} args.key + * @param {ChartableVecId & VecIdSumBase & CumulativeVecIdBase} args.key * @param {string} args.name */ - function createBaseSumTotalSeries({ key, name }) { + function createBaseSumCumulativeSeries({ key, name }) { return [ createBaseSeries({ key, name, }), - ...createSumTotalSeries({ + ...createSumCumulativeSeries({ concat: key, }), ]; @@ -1180,38 +1183,81 @@ function createPartialOptions(colors) { }), }, { - name: "realized cap", - title: `${args.title} Realized Capitalization`, - bottom: list.flatMap(({ color, name, key: _key }) => { - const key = fixKey(_key); - return /** @type {const} */ ([ - createBaseSeries({ - key: `${key}realized-cap`, - name: useGroupName ? name : "Realized Cap", - color, + name: "Realized", + tree: [ + { + name: "cap", + title: `${args.title} Realized Capitalization`, + bottom: list.flatMap(({ color, name, key: _key }) => { + const key = fixKey(_key); + return /** @type {const} */ ([ + createBaseSeries({ + key: `${key}realized-cap`, + name: useGroupName ? name : "Cap", + color, + }), + ]); }), - ]); - }), - }, - "list" in args - ? { - name: "Realized Price", - title: `${args.title} Realized Prices`, - top: args.list.map(({ color, name, key }) => - createBaseSeries({ - key: `${fixKey(key)}realized-price`, - name, - color, + }, + "list" in args + ? { + name: "Price", + title: `${args.title} Realized Prices`, + top: args.list.map(({ color, name, key }) => + createBaseSeries({ + key: `${fixKey(key)}realized-price`, + name, + color, + }), + ), + } + : createPriceWithRatio({ + title: `${args.title} Realized Price`, + key: `${fixKey(args.key)}realized-price`, + name: "price", + legend: "realized", + color: args.color, }), - ), - } - : createPriceWithRatio({ - title: `${args.title} Realized Price`, - key: `${fixKey(args.key)}realized-price`, - name: "realized price", - legend: "realized", - color: args.color, - }), + { + name: "profit", + title: `${args.title} Realized Profit`, + bottom: list.flatMap(({ color, name, key: _key }) => { + const key = fixKey(_key); + return /** @type {const} */ ([ + createBaseSeries({ + key: `${key}realized-profit`, + name: useGroupName ? name : "Profit", + color: useGroupName ? color : colors.green, + }), + createBaseSeries({ + key: `${key}realized-profit-sum`, + name: useGroupName ? name : "Profit", + color: useGroupName ? color : colors.green, + }), + ]); + }), + }, + { + name: "loss", + title: `${args.title} Realized Loss`, + bottom: list.flatMap(({ color, name, key: _key }) => { + const key = fixKey(_key); + return /** @type {const} */ ([ + createBaseSeries({ + key: `${key}realized-loss`, + name: useGroupName ? name : "Loss", + color: useGroupName ? color : colors.red, + }), + createBaseSeries({ + key: `${key}realized-loss-sum`, + name: useGroupName ? name : "Loss", + color: useGroupName ? color : colors.red, + }), + ]); + }), + }, + ], + }, ], }); } @@ -1249,50 +1295,16 @@ function createPartialOptions(colors) { name: "ath", }), ], - // }, - // { - // name: "drawdown", - // title: "All Time High Drawdown", - // top: [ - // createBaseSeries({ - // key: "ath", - // name: "ath", - // }), - // ], bottom: [ createBaseSeries({ key: "drawdown", name: "Drawdown", color: colors.red, }), - // ], - // }, - // { - // name: "days since", - // title: "Number of days Since All Time High", - // top: [ - // createBaseSeries({ - // key: "ath", - // name: "ath", - // }), - // ], - // bottom: [ createBaseSeries({ key: "days-since-ath", name: "Days since", }), - // ], - // }, - // { - // name: "max between", - // title: "Maximum time between All Time Highs", - // top: [ - // createBaseSeries({ - // key: "ath", - // name: "ath", - // }), - // ], - // bottom: [ createBaseSeries({ key: "max-days-between-ath", name: "Max", @@ -1303,8 +1315,6 @@ function createPartialOptions(colors) { name: "Max", color: colors.red, }), - // ], - // }, ], }, { @@ -1547,7 +1557,7 @@ function createPartialOptions(colors) { title: "Circulating Supply", bottom: [ createBaseSeries({ - key: "total-subsidy-in-btc", + key: "cumulative-subsidy-in-btc", name: "Mined", }), ], @@ -1556,15 +1566,15 @@ function createPartialOptions(colors) { name: "Coinbase", title: "Coinbase", bottom: [ - ...createBaseAverageSumTotalMinMaxPercentilesSeries({ + ...createBaseAverageSumCumulativeMinMaxPercentilesSeries({ key: "coinbase", name: "Coinbase", }), - ...createBaseAverageSumTotalMinMaxPercentilesSeries({ + ...createBaseAverageSumCumulativeMinMaxPercentilesSeries({ key: "coinbase-in-btc", name: "Coinbase", }), - ...createBaseAverageSumTotalMinMaxPercentilesSeries({ + ...createBaseAverageSumCumulativeMinMaxPercentilesSeries({ key: "coinbase-in-usd", name: "Coinbase", }), @@ -1574,15 +1584,15 @@ function createPartialOptions(colors) { name: "Subsidy", title: "Subsidy", bottom: [ - ...createBaseAverageSumTotalMinMaxPercentilesSeries({ + ...createBaseAverageSumCumulativeMinMaxPercentilesSeries({ key: "subsidy", name: "Subsidy", }), - ...createBaseAverageSumTotalMinMaxPercentilesSeries({ + ...createBaseAverageSumCumulativeMinMaxPercentilesSeries({ key: "subsidy-in-btc", name: "Subsidy", }), - ...createBaseAverageSumTotalMinMaxPercentilesSeries({ + ...createBaseAverageSumCumulativeMinMaxPercentilesSeries({ key: "subsidy-in-usd", name: "Subsidy", }), @@ -1592,24 +1602,28 @@ function createPartialOptions(colors) { name: "Fee", title: "Transaction Fee", bottom: [ - ...createAverageSumTotalMinMaxPercentilesSeries("fee"), - ...createAverageSumTotalMinMaxPercentilesSeries("fee-in-btc"), - ...createAverageSumTotalMinMaxPercentilesSeries("fee-in-usd"), + ...createAverageSumCumulativeMinMaxPercentilesSeries("fee"), + ...createAverageSumCumulativeMinMaxPercentilesSeries( + "fee-in-btc", + ), + ...createAverageSumCumulativeMinMaxPercentilesSeries( + "fee-in-usd", + ), ], }, { name: "Unclaimed Rewards", title: "Unclaimed Rewards", bottom: [ - ...createBaseSumTotalSeries({ + ...createBaseSumCumulativeSeries({ key: "unclaimed-rewards", name: "unclaimed", }), - ...createBaseSumTotalSeries({ + ...createBaseSumCumulativeSeries({ key: "unclaimed-rewards-in-btc", name: "unclaimed", }), - ...createBaseSumTotalSeries({ + ...createBaseSumCumulativeSeries({ key: "unclaimed-rewards-in-usd", name: "unclaimed", }), @@ -1668,7 +1682,7 @@ function createPartialOptions(colors) { key: "block-count", name: "Count", }), - ...createSumTotalSeries({ concat: "block-count" }), + ...createSumCumulativeSeries({ concat: "block-count" }), ], }, { @@ -1693,7 +1707,7 @@ function createPartialOptions(colors) { key: "total-size", name: "Size", }), - ...createSumTotalSeries({ concat: "block-size" }), + ...createSumCumulativeSeries({ concat: "block-size" }), ], }, { @@ -1704,7 +1718,7 @@ function createPartialOptions(colors) { key: "weight", name: "Weight", }), - ...createSumTotalSeries({ concat: "block-weight" }), + ...createSumCumulativeSeries({ concat: "block-weight" }), ], }, { @@ -1715,7 +1729,7 @@ function createPartialOptions(colors) { key: "vbytes", name: "Vbytes", }), - ...createSumTotalSeries({ concat: "block-vbytes" }), + ...createSumCumulativeSeries({ concat: "block-vbytes" }), ], }, ], @@ -1726,7 +1740,7 @@ function createPartialOptions(colors) { { name: "Count", title: "Transaction Count", - bottom: createBaseAverageSumTotalMinMaxPercentilesSeries({ + bottom: createBaseAverageSumCumulativeMinMaxPercentilesSeries({ key: "tx-count", name: "Count", }), @@ -1759,17 +1773,17 @@ function createPartialOptions(colors) { key: "tx-v1", name: "v1 Count", }), - ...createSumTotalSeries({ concat: "tx-v1", name: "v1" }), + ...createSumCumulativeSeries({ concat: "tx-v1", name: "v1" }), createBaseSeries({ key: "tx-v2", name: "v2 Count", }), - ...createSumTotalSeries({ concat: "tx-v2", name: "v2" }), + ...createSumCumulativeSeries({ concat: "tx-v2", name: "v2" }), createBaseSeries({ key: "tx-v3", name: "v3 Count", }), - ...createSumTotalSeries({ concat: "tx-v3", name: "v3" }), + ...createSumCumulativeSeries({ concat: "tx-v3", name: "v3" }), ], }, ], @@ -1782,7 +1796,7 @@ function createPartialOptions(colors) { title: "Transaction Input Count", bottom: [ createAverageSeries({ concat: "input-count" }), - ...createSumTotalSeries({ concat: "input-count" }), + ...createSumCumulativeSeries({ concat: "input-count" }), ...createMinMaxPercentilesSeries({ concat: "input-count", }), @@ -1793,7 +1807,7 @@ function createPartialOptions(colors) { // title: "Transaction Input Value", // bottom: [ // createAverageSeries({ concat: "input-value" }), - // ...createSumTotalSeries({ concat: "input-value" }), + // ...createSumCumulativeSeries({ concat: "input-value" }), // ], // }, ], @@ -1806,247 +1820,247 @@ function createPartialOptions(colors) { title: "Transaction Output Count", bottom: [ createAverageSeries({ concat: "output-count" }), - ...createSumTotalSeries({ concat: "output-count" }), + ...createSumCumulativeSeries({ concat: "output-count" }), ...createMinMaxPercentilesSeries({ concat: "output-count", }), ], }, - { - name: "Unspent Count", - title: "Unspent Transaction Output Count", - bottom: [ - createBaseSeries({ - key: "exact-utxo-count", - name: "total", - }), - ], - }, + // { + // name: "Unspent Count", + // title: "Unspent Transaction Output Count", + // bottom: [ + // createBaseSeries({ + // key: "exact-utxo-count", + // name: "cumulative", + // }), + // ], + // }, // { // name: "Value", // title: "Transaction Output Value", // bottom: [ // createAverageSeries({ concat: "output-value" }), - // ...createSumTotalSeries({ concat: "output-value" }), + // ...createSumCumulativeSeries({ concat: "output-value" }), // ], // }, - { - name: "types", - tree: [ - { - name: "p2pk", - title: "Pay To Public Key Outputs", - bottom: [ - createBaseSeries({ - key: "p2pk33-count", - name: "33B Count", - }), - createBaseSeries({ - key: "p2pk33-count-sum", - name: "33B sum", - }), - createBaseSeries({ - key: "total-p2pk33-count", - name: "33B total", - }), - createBaseSeries({ - key: "p2pk65-count", - name: "65B Count", - }), - createBaseSeries({ - key: "p2pk65-count-sum", - name: "65B sum", - }), - createBaseSeries({ - key: "total-p2pk65-count", - name: "65B total", - }), - ], - }, - { - name: "p2pkh", - title: "Pay To Public Key Hash Outputs", - bottom: [ - createBaseSeries({ - key: "p2pkh-count", - name: "Count", - }), - createBaseSeries({ - key: "p2pkh-count-sum", - name: "sum", - }), - createBaseSeries({ - key: "total-p2pkh-count", - name: "total", - }), - ], - }, - { - name: "p2ms", - title: "Pay To Multisig Outputs", - bottom: [ - createBaseSeries({ - key: "p2ms-count", - name: "Count", - }), - createBaseSeries({ - key: "p2ms-count-sum", - name: "sum", - }), - createBaseSeries({ - key: "total-p2ms-count", - name: "total", - }), - ], - }, - { - name: "p2sh", - title: "Pay To Script Hash Outputs", - bottom: [ - createBaseSeries({ - key: "p2sh-count", - name: "Count", - }), - createBaseSeries({ - key: "p2sh-count-sum", - name: "sum", - }), - createBaseSeries({ - key: "total-p2sh-count", - name: "total", - }), - ], - }, - { - name: "op_return", - title: "op_return outputs", - bottom: [ - createBaseSeries({ key: "opreturn-count", name: "Count" }), - createBaseSeries({ - key: "opreturn-count-sum", - name: "sum", - }), - createBaseSeries({ - key: "total-opreturn-count", - name: "total", - }), - ], - }, - { - name: "p2wpkh", - title: "Pay To Witness Public Key Hash Outputs", - bottom: [ - createBaseSeries({ - key: "p2wpkh-count", - name: "Count", - }), - createBaseSeries({ - key: "p2wpkh-count-sum", - name: "sum", - }), - createBaseSeries({ - key: "total-p2wpkh-count", - name: "total", - }), - ], - }, - { - name: "p2wsh", - title: "Pay To Witness Script Hash Outputs", - bottom: [ - createBaseSeries({ - key: "p2wsh-count", - name: "Count", - }), - createBaseSeries({ - key: "p2wsh-count-sum", - name: "sum", - }), - createBaseSeries({ - key: "total-p2wsh-count", - name: "total", - }), - ], - }, - { - name: "p2tr", - title: "Pay To Taproot Outputs", - bottom: [ - createBaseSeries({ - key: "p2tr-count", - name: "Count", - }), - createBaseSeries({ - key: "p2tr-count-sum", - name: "sum", - }), - createBaseSeries({ - key: "total-p2tr-count", - name: "total", - }), - ], - }, - { - name: "p2a", - title: "Pay To Anchor outputs", - bottom: [ - createBaseSeries({ - key: "p2a-count", - name: "Count", - }), - createBaseSeries({ - key: "p2a-count-sum", - name: "sum", - }), - createBaseSeries({ - key: "total-p2a-count", - name: "total", - }), - ], - }, - { - name: "empty", - title: "empty outputs", - bottom: [ - createBaseSeries({ - key: "emptyoutput-count", - name: "Count", - }), - createBaseSeries({ - key: "emptyoutput-count-sum", - name: "sum", - }), - createBaseSeries({ - key: "total-emptyoutput-count", - name: "total", - }), - ], - }, - { - name: "unknown", - title: "unknown outputs", - bottom: [ - createBaseSeries({ - key: "unknownoutput-count", - name: "Count", - }), - createBaseSeries({ - key: "unknownoutput-count-sum", - name: "sum", - }), - createBaseSeries({ - key: "total-unknownoutput-count", - name: "total", - }), - ], - }, - ], - // title: "Transaction Output Value", - // bottom: [ - // createAverageSeries({ concat: "output-value" }), - // ...createSumTotalSeries({ concat: "output-value" }), - // ], - }, + // { + // name: "types", + // tree: [ + // { + // name: "p2pk", + // title: "Pay To Public Key Outputs", + // bottom: [ + // createBaseSeries({ + // key: "p2pk33-count", + // name: "33B Count", + // }), + // createBaseSeries({ + // key: "p2pk33-count-sum", + // name: "33B sum", + // }), + // createBaseSeries({ + // key: "cumulative-p2pk33-count", + // name: "33B cumulative", + // }), + // createBaseSeries({ + // key: "p2pk65-count", + // name: "65B Count", + // }), + // createBaseSeries({ + // key: "p2pk65-count-sum", + // name: "65B sum", + // }), + // createBaseSeries({ + // key: "cumulative-p2pk65-count", + // name: "65B cumulative", + // }), + // ], + // }, + // { + // name: "p2pkh", + // title: "Pay To Public Key Hash Outputs", + // bottom: [ + // createBaseSeries({ + // key: "p2pkh-count", + // name: "Count", + // }), + // createBaseSeries({ + // key: "p2pkh-count-sum", + // name: "sum", + // }), + // createBaseSeries({ + // key: "cumulative-p2pkh-count", + // name: "cumulative", + // }), + // ], + // }, + // { + // name: "p2ms", + // title: "Pay To Multisig Outputs", + // bottom: [ + // createBaseSeries({ + // key: "p2ms-count", + // name: "Count", + // }), + // createBaseSeries({ + // key: "p2ms-count-sum", + // name: "sum", + // }), + // createBaseSeries({ + // key: "cumulative-p2ms-count", + // name: "cumulative", + // }), + // ], + // }, + // { + // name: "p2sh", + // title: "Pay To Script Hash Outputs", + // bottom: [ + // createBaseSeries({ + // key: "p2sh-count", + // name: "Count", + // }), + // createBaseSeries({ + // key: "p2sh-count-sum", + // name: "sum", + // }), + // createBaseSeries({ + // key: "cumulative-p2sh-count", + // name: "cumulative", + // }), + // ], + // }, + // { + // name: "op_return", + // title: "op_return outputs", + // bottom: [ + // createBaseSeries({ key: "opreturn-count", name: "Count" }), + // createBaseSeries({ + // key: "opreturn-count-sum", + // name: "sum", + // }), + // createBaseSeries({ + // key: "cumulative-opreturn-count", + // name: "cumulative", + // }), + // ], + // }, + // { + // name: "p2wpkh", + // title: "Pay To Witness Public Key Hash Outputs", + // bottom: [ + // createBaseSeries({ + // key: "p2wpkh-count", + // name: "Count", + // }), + // createBaseSeries({ + // key: "p2wpkh-count-sum", + // name: "sum", + // }), + // createBaseSeries({ + // key: "cumulative-p2wpkh-count", + // name: "cumulative", + // }), + // ], + // }, + // { + // name: "p2wsh", + // title: "Pay To Witness Script Hash Outputs", + // bottom: [ + // createBaseSeries({ + // key: "p2wsh-count", + // name: "Count", + // }), + // createBaseSeries({ + // key: "p2wsh-count-sum", + // name: "sum", + // }), + // createBaseSeries({ + // key: "cumulative-p2wsh-count", + // name: "cumulative", + // }), + // ], + // }, + // { + // name: "p2tr", + // title: "Pay To Taproot Outputs", + // bottom: [ + // createBaseSeries({ + // key: "p2tr-count", + // name: "Count", + // }), + // createBaseSeries({ + // key: "p2tr-count-sum", + // name: "sum", + // }), + // createBaseSeries({ + // key: "cumulative-p2tr-count", + // name: "cumulative", + // }), + // ], + // }, + // { + // name: "p2a", + // title: "Pay To Anchor outputs", + // bottom: [ + // createBaseSeries({ + // key: "p2a-count", + // name: "Count", + // }), + // createBaseSeries({ + // key: "p2a-count-sum", + // name: "sum", + // }), + // createBaseSeries({ + // key: "cumulative-p2a-count", + // name: "cumulative", + // }), + // ], + // }, + // { + // name: "empty", + // title: "empty outputs", + // bottom: [ + // createBaseSeries({ + // key: "emptyoutput-count", + // name: "Count", + // }), + // createBaseSeries({ + // key: "emptyoutput-count-sum", + // name: "sum", + // }), + // createBaseSeries({ + // key: "cumulative-emptyoutput-count", + // name: "cumulative", + // }), + // ], + // }, + // { + // name: "unknown", + // title: "unknown outputs", + // bottom: [ + // createBaseSeries({ + // key: "unknownoutput-count", + // name: "Count", + // }), + // createBaseSeries({ + // key: "unknownoutput-count-sum", + // name: "sum", + // }), + // createBaseSeries({ + // key: "cumulative-unknownoutput-count", + // name: "cumulative", + // }), + // ], + // }, + // ], + // // title: "Transaction Output Value", + // // bottom: [ + // // createAverageSeries({ concat: "output-value" }), + // // ...createSumCumulativeSeries({ concat: "output-value" }), + // // ], + // }, ], }, { @@ -2158,6 +2172,45 @@ function createPartialOptions(colors) { }), ], }, + { + name: "op_return", + tree: [ + { + name: "outputs", + title: "op_return outputs", + bottom: [ + createBaseSeries({ key: "opreturn-count", name: "Count" }), + createBaseSeries({ + key: "opreturn-count-sum", + name: "sum", + }), + createBaseSeries({ + key: "cumulative-opreturn-count", + name: "cumulative", + color: colors.red, + }), + ], + }, + { + name: "supply", + title: "OP-return Supply", + bottom: [ + createBaseSeries({ + key: "opreturn-supply", + name: "Supply", + }), + createBaseSeries({ + key: "opreturn-supply-in-btc", + name: "Supply", + }), + createBaseSeries({ + key: "opreturn-supply-in-usd", + name: "Supply", + }), + ], + }, + ], + }, ], }, ], @@ -2632,319 +2685,6 @@ export function initOptions({ } /** @typedef {ReturnType} Options */ -// /** -// * @param {Number | undefined} value -// * @param {Unit} unit -// */ -// function formatValue(value, unit) { -// if (!value) return ""; - -// const s = -// unit !== "Count" -// ? utils.locale.numberToShortUSFormat(value) -// : utils.locale.numberToUSFormat( -// value, -// unit === "Count" ? 0 : undefined, -// ); - -// switch (unit) { -// case "USD": { -// return `$${s}`; -// } -// case "Bitcoin": { -// return `₿${s}`; -// } -// case "Percentage": { -// return `${s}%`; -// } -// case "Seconds": { -// return `${s} sec`; -// } -// case "Megabytes": { -// return `${s} MB`; -// } -// default: { -// return s; -// } -// } -// } - -/** - type DefaultCohortOption = CohortOption; - - interface CohortOption { - name: string; - title: string; - datasetId: Id; - color: Color; - filenameAddon?: string; - } - - type DefaultCohortOptions = CohortOptions; - - interface CohortOptions { - name: string; - title: string; - list: CohortOption[]; - } - - interface RatioOption { - color: Color; - // valueDatasetPath: AnyDatasetPath; - // ratioDatasetPath: AnyDatasetPath; - title: string; - } - - interface RatioOptions { - title: string; - list: RatioOption[]; - } -*/ - -// function initGroups() { -// const xTermHolders = /** @type {const} */ ([ -// { -// id: "sth", -// key: "sth", -// name: "Short Term Holders", -// legend: "Short Term Holders - STH", -// }, -// { -// id: "lth", -// key: "lth", -// name: "Long Term Holders", -// legend: "Long Term Holders - LTH", -// }, -// ]); - -// const upTo = /** @type {const} */ ([ -// { -// id: "up-to-1d", -// key: "up_to_1d", -// name: "Up To 1 Day", -// legend: "1D", -// }, -// { -// id: "up-to-1w", -// key: "up_to_1w", -// name: "Up To 1 Week", -// legend: "1W", -// }, -// { -// id: "up-to-1m", -// key: "up_to_1m", -// name: "Up To 1 Month", -// legend: "1M", -// }, -// { -// id: "up-to-2m", -// key: "up_to_2m", -// name: "Up To 2 Months", -// legend: "2M", -// }, -// { -// id: "up-to-3m", -// key: "up_to_3m", -// name: "Up To 3 Months", -// legend: "3M", -// }, -// { -// id: "up-to-4m", -// key: "up_to_4m", -// name: "Up To 4 Months", -// legend: "4M", -// }, -// { -// id: "up-to-5m", -// key: "up_to_5m", -// name: "Up To 5 Months", -// legend: "5M", -// }, -// { -// id: "up-to-6m", -// key: "up_to_6m", -// name: "Up To 6 Months", -// legend: "6M", -// }, -// { -// id: "up-to-1y", -// key: "up_to_1y", -// name: "Up To 1 Year", -// legend: "1Y", -// }, -// { -// id: "up-to-2y", -// key: "up_to_2y", -// name: "Up To 2 Years", -// legend: "2Y", -// }, -// { -// id: "up-to-3y", -// key: "up_to_3y", -// name: "Up To 3 Years", -// legend: "3Y", -// }, -// { -// id: "up-to-5y", -// key: "up_to_5y", -// name: "Up To 5 Years", -// legend: "5Y", -// }, -// { -// id: "up-to-7y", -// key: "up_to_7y", -// name: "Up To 7 Years", -// legend: "7Y", -// }, -// { -// id: "up-to-10y", -// key: "up_to_10y", -// name: "Up To 10 Years", -// legend: "10Y", -// }, -// { -// id: "up-to-15y", -// key: "up_to_15y", -// name: "Up To 15 Years", -// legend: "15Y", -// }, -// ]); - -// const fromXToY = /** @type {const} */ ([ -// { -// id: "up-to-1d", -// key: "up_to_1d", -// name: "24h", -// legend: "24h", -// }, -// { -// id: "from-1d-to-1w", -// key: "from_1d_to_1w", -// name: "From 1 Day To 1 Week", -// legend: "1D — 1W", -// }, -// { -// id: "from-1w-to-1m", -// key: "from_1w_to_1m", -// name: "From 1 Week To 1 Month", -// legend: "1W — 1M", -// }, -// { -// id: "from-1m-to-3m", -// key: "from_1m_to_3m", -// name: "From 1 Month To 3 Months", -// legend: "1M — 3M", -// }, -// { -// id: "from-3m-to-6m", -// key: "from_3m_to_6m", -// name: "From 3 Months To 6 Months", -// legend: "3M — 6M", -// }, -// { -// id: "from-6m-to-1y", -// key: "from_6m_to_1y", -// name: "From 6 Months To 1 Year", -// legend: "6M — 1Y", -// }, -// { -// id: "from-1y-to-2y", -// key: "from_1y_to_2y", -// name: "From 1 Year To 2 Years", -// legend: "1Y — 2Y", -// }, -// { -// id: "from-2y-to-3y", -// key: "from_2y_to_3y", -// name: "From 2 Years To 3 Years", -// legend: "2Y — 3Y", -// }, -// { -// id: "from-3y-to-5y", -// key: "from_3y_to_5y", -// name: "From 3 Years To 5 Years", -// legend: "3Y — 5Y", -// }, -// { -// id: "from-5y-to-7y", -// key: "from_5y_to_7y", -// name: "From 5 Years To 7 Years", -// legend: "5Y — 7Y", -// }, -// { -// id: "from-7y-to-10y", -// key: "from_7y_to_10y", -// name: "From 7 Years To 10 Years", -// legend: "7Y — 10Y", -// }, -// { -// id: "from-10y-to-15y", -// key: "from_10y_to_15y", -// name: "From 10 Years To 15 Years", -// legend: "10Y — 15Y", -// }, -// { -// id: "from-15y", -// key: "from_15y", -// name: "From 15 Years To End", -// legend: "15Y — End", -// }, -// ]); - -// const fromX = /** @type {const} */ ([ -// { -// id: "from-1y", -// key: "from_1y", -// name: "From 1 Year", -// legend: "1Y+", -// }, -// { -// id: "from-2y", -// key: "from_2y", -// name: "From 2 Years", -// legend: "2Y+", -// }, -// { -// id: "from-4y", -// key: "from_4y", -// name: "From 4 Years", -// legend: "4Y+", -// }, -// { -// id: "from-10y", -// key: "from_10y", -// name: "From 10 Years", -// legend: "10Y+", -// }, -// { -// id: "from-15y", -// key: "from_15y", -// name: "From 15 Years", -// legend: "15Y+", -// }, -// ]); - -// const epochs = /** @type {const} */ ([ -// { id: "epoch-1", key: "epoch_1", name: "Epoch 1" }, -// { id: "epoch-2", key: "epoch_2", name: "Epoch 2" }, -// { id: "epoch-3", key: "epoch_3", name: "Epoch 3" }, -// { id: "epoch-4", key: "epoch_4", name: "Epoch 4" }, -// { id: "epoch-5", key: "epoch_5", name: "Epoch 5" }, -// ]); - -// const age = /** @type {const} */ ([ -// { -// key: "", -// id: "", -// name: "", -// }, -// ...xTermHolders, -// ...upTo, -// ...fromXToY, -// ...fromX, -// ...epochs, -// ]); - // const size = /** @type {const} */ ([ // { // key: "plankton", @@ -2997,159 +2737,6 @@ export function initOptions({ // }, // ]); -// const totalReturns = /** @type {const} */ ([ -// { name: "1 Day", key: "1d" }, -// { name: "1 Month", key: "1m" }, -// { name: "6 Months", key: "6m" }, -// { name: "1 Year", key: "1y" }, -// { name: "2 Years", key: "2y" }, -// { name: "3 Years", key: "3y" }, -// { name: "4 Years", key: "4y" }, -// { name: "6 Years", key: "6y" }, -// { name: "8 Years", key: "8y" }, -// { name: "10 Years", key: "10y" }, -// ]); - -// const compoundReturns = /** @type {const} */ ([ -// { name: "4 Years", key: "4y" }, -// ]); - -// const percentiles = /** @type {const} */ ([ -// { -// key: "median_price_paid", -// id: "median-price-paid", -// name: "Median", -// title: "Median Paid", -// value: 50, -// }, -// { -// key: "95p_price_paid", -// id: "95p-price-paid", -// name: `95%`, -// title: `95th Percentile Paid`, -// value: 95, -// }, -// { -// key: "90p_price_paid", -// id: "90p-price-paid", -// name: `90%`, -// title: `90th Percentile Paid`, -// value: 90, -// }, -// { -// key: "85p_price_paid", -// id: "85p-price-paid", -// name: `85%`, -// title: `85th Percentile Paid`, -// value: 85, -// }, -// { -// key: "80p_price_paid", -// id: "80p-price-paid", -// name: `80%`, -// title: `80th Percentile Paid`, -// value: 80, -// }, -// { -// key: "75p_price_paid", -// id: "75p-price-paid", -// name: `75%`, -// title: `75th Percentile Paid`, -// value: 75, -// }, -// { -// key: "70p_price_paid", -// id: "70p-price-paid", -// name: `70%`, -// title: `70th Percentile Paid`, -// value: 70, -// }, -// { -// key: "65p_price_paid", -// id: "65p-price-paid", -// name: `65%`, -// title: `65th Percentile Paid`, -// value: 65, -// }, -// { -// key: "60p_price_paid", -// id: "60p-price-paid", -// name: `60%`, -// title: `60th Percentile Paid`, -// value: 60, -// }, -// { -// key: "55p_price_paid", -// id: "55p-price-paid", -// name: `55%`, -// title: `55th Percentile Paid`, -// value: 55, -// }, -// { -// key: "45p_price_paid", -// id: "45p-price-paid", -// name: `45%`, -// title: `45th Percentile Paid`, -// value: 45, -// }, -// { -// key: "40p_price_paid", -// id: "40p-price-paid", -// name: `40%`, -// title: `40th Percentile Paid`, -// value: 40, -// }, -// { -// key: "35p_price_paid", -// id: "35p-price-paid", -// name: `35%`, -// title: `35th Percentile Paid`, -// value: 35, -// }, -// { -// key: "30p_price_paid", -// id: "30p-price-paid", -// name: `30%`, -// title: `30th Percentile Paid`, -// value: 30, -// }, -// { -// key: "25p_price_paid", -// id: "25p-price-paid", -// name: `25%`, -// title: `25th Percentile Paid`, -// value: 25, -// }, -// { -// key: "20p_price_paid", -// id: "20p-price-paid", -// name: `20%`, -// title: `20th Percentile Paid`, -// value: 20, -// }, -// { -// key: "15p_price_paid", -// id: "15p-price-paid", -// name: `15%`, -// title: `15th Percentile Paid`, -// value: 15, -// }, -// { -// key: "10p_price_paid", -// id: "10p-price-paid", -// name: `10%`, -// title: `10th Percentile Paid`, -// value: 10, -// }, -// { -// key: "05p_price_paid", -// id: "05p-price-paid", -// name: `5%`, -// title: `5th Percentile Paid`, -// value: 5, -// }, -// ]); - // return { // xTermHolders, // upTo, @@ -3162,7 +2749,7 @@ export function initOptions({ // address, // liquidities, // averages, -// totalReturns, +// cumulativeReturns, // compoundReturns, // percentiles, // }; @@ -3188,7 +2775,7 @@ export function initOptions({ // * // * @typedef {Groups["averages"][number]["key"]} AverageName // * -// * @typedef {Groups["totalReturns"][number]["key"]} TotalReturnKey +// * @typedef {Groups["cumulativeReturns"][number]["key"]} CumulativeReturnKey // * // * @typedef {Groups["compoundReturns"][number]["key"]} CompoundReturnKey // * diff --git a/websites/kibo.money/scripts/simulation.js b/websites/kibo.money/scripts/simulation.js index 913c58138..75fbff58a 100644 --- a/websites/kibo.money/scripts/simulation.js +++ b/websites/kibo.money/scripts/simulation.js @@ -720,13 +720,13 @@ export function init({ { title: "Dollars Converted", type: "Line", - color: colors.dollars, + color: colors.green, data: totalInvestedAmountData, }, { title: "Dollars Left", type: "Line", - color: colors.offDollars, + color: colors.emerald, data: dollarsLeftData, defaultActive: false, }, @@ -758,7 +758,7 @@ export function init({ { title: "Bitcoin Stack", type: "Line", - color: colors.bitcoin, + color: colors.orange, data: bitcoinData, }, ], @@ -788,7 +788,7 @@ export function init({ { title: "Average Price Paid", type: "Line", - color: colors.lightDollars, + color: colors.lime, data: averagePricePaidData, }, ], @@ -1074,14 +1074,14 @@ export function init({ */ const c = (c, t) => createColoredSpan({ color: c, text: t }); - const serInvestedAmount = c("dollars", fd(investedAmount)); + const serInvestedAmount = c("green", fd(investedAmount)); const serDaysCount = c("sky", f(daysCount)); const serSats = c("orange", f(sats)); const serBitcoin = c("orange", `~${f(bitcoin)}`); const serBitcoinValue = c("amber", fd(bitcoinValue)); - const serAveragePricePaid = c("lightDollars", fd(averagePricePaid)); + const serAveragePricePaid = c("lime", fd(averagePricePaid)); const serRoi = c("yellow", fp(roi / 100)); - const serDollars = c("offDollars", fd(dollars)); + const serDollars = c("emerald", fd(dollars)); const serTotalFeesPaid = c("rose", fd(totalFeesPaid)); p1.innerHTML = `After exchanging ${serInvestedAmount} in the span of ${serDaysCount} days, you would have accumulated ${serSats} Satoshis (${serBitcoin} Bitcoin) worth today ${serBitcoinValue} at an average price of ${serAveragePricePaid} per Bitcoin with a return of investment of ${serRoi}, have ${serDollars} left and paid a total of ${serTotalFeesPaid} in fees.`; @@ -1089,8 +1089,8 @@ export function init({ const dayDiff = Math.floor( utils.date.differenceBetween(new Date(), lastInvestDay), ); - const serDailyInvestment = c("offDollars", fd(dailyInvestment)); - const setLastSatsAdded = c("bitcoin", f(lastSatsAdded)); + const serDailyInvestment = c("emerald", fd(dailyInvestment)); + const setLastSatsAdded = c("orange", f(lastSatsAdded)); p2.innerHTML = `You would've last bought ${c("blue", dayDiff ? `${f(dayDiff)} ${dayDiff > 1 ? "days" : "day"} ago` : "today")} and exchanged ${serDailyInvestment} for approximately ${setLastSatsAdded} Satoshis`; const serProfitableDaysRatio = c("green", fp(profitableDaysRatio)); diff --git a/websites/kibo.money/scripts/vecid-to-indexes.js b/websites/kibo.money/scripts/vecid-to-indexes.js index 8e0fde66a..fc8e0fdb5 100644 --- a/websites/kibo.money/scripts/vecid-to-indexes.js +++ b/websites/kibo.money/scripts/vecid-to-indexes.js @@ -34,7 +34,11 @@ export function createVecIdToIndexes() { return /** @type {const} */ ({ "0": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "0sat-realized-loss": [5], + "0sat-realized-loss-sum": [0, 1, 2, 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], @@ -68,10 +72,14 @@ export function createVecIdToIndexes() { "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": [5], + "0sat-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "0sat-supply": [0, 1, 2, 5, 7, 19, 22, 23], "0sat-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "0sat-supply-in-usd": [0, 1, 2, 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], "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], @@ -567,6 +575,8 @@ export function createVecIdToIndexes() { "8y-dca-returns": [0, 1, 7, 19, 22, 23], "8y-dca-stack": [0, 1, 7, 19, 22, 23], "8y-returns": [0, 1, 7, 19, 22, 23], + "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], "base-size": [20], "block-count": [5], @@ -616,6 +626,204 @@ export function createVecIdToIndexes() { "coinbase-median": [0], "coinbase-min": [0, 1, 2, 7, 19, 22, 23], "coinbase-sum": [0, 1, 2, 7, 19, 22, 23], + "cumulative-0sat-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-0sat-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-block-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-block-size": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-block-vbytes": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-block-weight": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-coinbase": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-coinbase-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-coinbase-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-empty-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-empty-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-emptyoutput-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-epoch-0-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-epoch-0-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-epoch-1-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-epoch-1-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-epoch-2-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-epoch-2-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-epoch-3-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-epoch-3-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-epoch-4-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-epoch-4-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-fee": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-fee-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-fee-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1-000-000sats-to-10-000-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1-000-000sats-to-10-000-000sats-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1-000btc-to-10-000btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1-000btc-to-10-000btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1-000sats-to-10-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1-000sats-to-10-000sats-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10-000-000sats-to-1btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10-000-000sats-to-1btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10-000btc-to-100-000btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10-000btc-to-100-000btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10-000sats-to-100-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10-000sats-to-100-000sats-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-100-000btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-100-000btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-100-000sats-to-1-000-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-100-000sats-to-1-000-000sats-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-100btc-to-1-000btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-100btc-to-1-000btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-100sats-to-1-000sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-100sats-to-1-000sats-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10btc-to-100btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10btc-to-100btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10sats-to-100sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10sats-to-100sats-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10y-to-15y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-10y-to-15y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-15y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-15y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1btc-to-10btc-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1btc-to-10btc-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1d-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1d-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1d-to-1w-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1d-to-1w-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1m-to-3m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1m-to-3m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1sat-to-10sats-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1sat-to-10sats-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1w-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1w-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1w-to-1m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1w-to-1m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1y-to-2y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-1y-to-2y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-2m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-2m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-2y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-2y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-2y-to-3y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-2y-to-3y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-3m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-3m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-3m-to-6m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-3m-to-6m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-3y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-3y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-3y-to-4y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-3y-to-4y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-4m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-4m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-4y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-4y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-4y-to-5y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-4y-to-5y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-5m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-5m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-5y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-5y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-5y-to-7y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-5y-to-7y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-6m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-6m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-6m-to-1y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-6m-to-1y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-6y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-6y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-7y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-7y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-7y-to-10y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-7y-to-10y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-8y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-from-8y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-input-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-lth-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-lth-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-opreturn-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-output-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2a-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2a-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2a-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2ms-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2ms-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2ms-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2pk33-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2pk33-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2pk33-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2pk65-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2pk65-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2pk65-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2pkh-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2pkh-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2pkh-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2sh-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2sh-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2sh-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2tr-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2tr-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2tr-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2wpkh-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2wpkh-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2wpkh-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2wsh-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2wsh-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-p2wsh-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-sth-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-sth-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-subsidy": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-subsidy-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-subsidy-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-tx-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-tx-v1": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-tx-v2": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-tx-v3": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-unclaimed-rewards": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-unclaimed-rewards-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-unclaimed-rewards-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-unknown-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-unknown-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-unknownoutput-count": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-10y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-10y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-15y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-15y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-1d-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-1d-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-1m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-1m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-1w-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-1w-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-1y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-1y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-2m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-2m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-2y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-2y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-3m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-3m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-3y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-3y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-4m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-4m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-4y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-4y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-5m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-5m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-5y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-5y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-6m-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-6m-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-6y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-6y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-7y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-7y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-8y-realized-loss": [0, 1, 2, 5, 7, 19, 22, 23], + "cumulative-up-to-8y-realized-profit": [0, 1, 2, 5, 7, 19, 22, 23], "date": [0, 5], "date-fixed": [5], "dateindex": [0, 5], @@ -658,7 +866,11 @@ export function createVecIdToIndexes() { "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], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "empty-realized-loss": [5], + "empty-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "empty-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "empty-realized-price-ratio": [0, 1, 7, 19, 22, 23], "empty-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -692,10 +904,14 @@ export function createVecIdToIndexes() { "empty-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "empty-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "empty-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "empty-realized-profit": [5], + "empty-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "empty-supply": [0, 1, 2, 5, 7, 19, 22, 23], "empty-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "empty-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "empty-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "empty-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "empty-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "emptyoutput-count": [5], "emptyoutput-count-10p": [0], "emptyoutput-count-25p": [0], @@ -707,7 +923,11 @@ export function createVecIdToIndexes() { "emptyoutput-count-min": [0, 1, 2, 7, 19, 22, 23], "emptyoutput-count-sum": [0, 1, 2, 7, 19, 22, 23], "emptyoutputindex": [3], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-0-realized-loss": [5], + "epoch-0-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "epoch-0-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-0-realized-price-ratio": [0, 1, 7, 19, 22, 23], "epoch-0-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -741,11 +961,19 @@ export function createVecIdToIndexes() { "epoch-0-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "epoch-0-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "epoch-0-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "epoch-0-realized-profit": [5], + "epoch-0-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "epoch-0-supply": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-0-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-0-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-0-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-0-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-0-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-1-realized-loss": [5], + "epoch-1-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "epoch-1-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-1-realized-price-ratio": [0, 1, 7, 19, 22, 23], "epoch-1-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -779,11 +1007,19 @@ export function createVecIdToIndexes() { "epoch-1-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "epoch-1-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "epoch-1-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "epoch-1-realized-profit": [5], + "epoch-1-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "epoch-1-supply": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-1-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-1-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-1-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-1-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-1-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-2-realized-loss": [5], + "epoch-2-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "epoch-2-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-2-realized-price-ratio": [0, 1, 7, 19, 22, 23], "epoch-2-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -817,11 +1053,19 @@ export function createVecIdToIndexes() { "epoch-2-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "epoch-2-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "epoch-2-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "epoch-2-realized-profit": [5], + "epoch-2-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "epoch-2-supply": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-2-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-2-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-2-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-2-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-2-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-3-realized-loss": [5], + "epoch-3-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "epoch-3-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-3-realized-price-ratio": [0, 1, 7, 19, 22, 23], "epoch-3-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -855,11 +1099,19 @@ export function createVecIdToIndexes() { "epoch-3-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "epoch-3-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "epoch-3-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "epoch-3-realized-profit": [5], + "epoch-3-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "epoch-3-supply": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-3-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-3-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-3-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-3-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-3-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-4-realized-loss": [5], + "epoch-4-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "epoch-4-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-4-realized-price-ratio": [0, 1, 7, 19, 22, 23], "epoch-4-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -893,10 +1145,14 @@ export function createVecIdToIndexes() { "epoch-4-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "epoch-4-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "epoch-4-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "epoch-4-realized-profit": [5], + "epoch-4-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "epoch-4-supply": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-4-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-4-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "epoch-4-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-4-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "epoch-4-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "exact-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "fee": [20], "fee-10p": [5], @@ -954,7 +1210,11 @@ export function createVecIdToIndexes() { "first-txindex": [5], "first-unknownoutputindex": [5], "first-yearindex": [1], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-realized-loss": [5], + "from-1-000-000sats-to-10-000-000sats-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -988,11 +1248,19 @@ export function createVecIdToIndexes() { "from-1-000-000sats-to-10-000-000sats-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-realized-profit": [5], + "from-1-000-000sats-to-10-000-000sats-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000-000sats-to-10-000-000sats-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000-000sats-to-10-000-000sats-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000btc-to-10-000btc-realized-loss": [5], + "from-1-000btc-to-10-000btc-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1026,11 +1294,19 @@ export function createVecIdToIndexes() { "from-1-000btc-to-10-000btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1-000btc-to-10-000btc-realized-profit": [5], + "from-1-000btc-to-10-000btc-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000btc-to-10-000btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "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-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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1-000sats-to-10-000sats-realized-loss": [5], + "from-1-000sats-to-10-000sats-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1064,11 +1340,19 @@ export function createVecIdToIndexes() { "from-1-000sats-to-10-000sats-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1-000sats-to-10-000sats-realized-profit": [5], + "from-1-000sats-to-10-000sats-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1-000sats-to-10-000sats-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "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-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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-realized-loss": [5], + "from-10-000-000sats-to-1btc-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1102,11 +1386,19 @@ export function createVecIdToIndexes() { "from-10-000-000sats-to-1btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-realized-profit": [5], + "from-10-000-000sats-to-1btc-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000-000sats-to-1btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000-000sats-to-1btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-realized-loss": [5], + "from-10-000btc-to-100-000btc-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1140,11 +1432,19 @@ export function createVecIdToIndexes() { "from-10-000btc-to-100-000btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-realized-profit": [5], + "from-10-000btc-to-100-000btc-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000btc-to-100-000btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000btc-to-100-000btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-realized-loss": [5], + "from-10-000sats-to-100-000sats-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1178,11 +1478,19 @@ export function createVecIdToIndexes() { "from-10-000sats-to-100-000sats-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-realized-profit": [5], + "from-10-000sats-to-100-000sats-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-10-000sats-to-100-000sats-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10-000sats-to-100-000sats-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000btc-realized-loss": [5], + "from-100-000btc-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-100-000btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-100-000btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1216,11 +1524,19 @@ export function createVecIdToIndexes() { "from-100-000btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-100-000btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-100-000btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-100-000btc-realized-profit": [5], + "from-100-000btc-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-100-000btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000btc-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000btc-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000btc-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100-000sats-to-1-000-000sats-realized-loss": [5], + "from-100-000sats-to-1-000-000sats-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1254,11 +1570,19 @@ export function createVecIdToIndexes() { "from-100-000sats-to-1-000-000sats-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-100-000sats-to-1-000-000sats-realized-profit": [5], + "from-100-000sats-to-1-000-000sats-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-100-000sats-to-1-000-000sats-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "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-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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100btc-to-1-000btc-realized-loss": [5], + "from-100btc-to-1-000btc-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-100btc-to-1-000btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-100btc-to-1-000btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-100btc-to-1-000btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1292,11 +1616,19 @@ export function createVecIdToIndexes() { "from-100btc-to-1-000btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-100btc-to-1-000btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-100btc-to-1-000btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-100btc-to-1-000btc-realized-profit": [5], + "from-100btc-to-1-000btc-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-100btc-to-1-000btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-100btc-to-1-000btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-100btc-to-1-000btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "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-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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-100sats-to-1-000sats-realized-loss": [5], + "from-100sats-to-1-000sats-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-100sats-to-1-000sats-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-100sats-to-1-000sats-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-100sats-to-1-000sats-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1330,11 +1662,19 @@ export function createVecIdToIndexes() { "from-100sats-to-1-000sats-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-100sats-to-1-000sats-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-100sats-to-1-000sats-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-100sats-to-1-000sats-realized-profit": [5], + "from-100sats-to-1-000sats-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-100sats-to-1-000sats-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-100sats-to-1-000sats-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-100sats-to-1-000sats-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "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-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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10btc-to-100btc-realized-loss": [5], + "from-10btc-to-100btc-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-10btc-to-100btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-10btc-to-100btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-10btc-to-100btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1368,11 +1708,19 @@ export function createVecIdToIndexes() { "from-10btc-to-100btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-10btc-to-100btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-10btc-to-100btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-10btc-to-100btc-realized-profit": [5], + "from-10btc-to-100btc-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-10btc-to-100btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-10btc-to-100btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-10btc-to-100btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "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-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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10sats-to-100sats-realized-loss": [5], + "from-10sats-to-100sats-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-10sats-to-100sats-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-10sats-to-100sats-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-10sats-to-100sats-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1406,11 +1754,19 @@ export function createVecIdToIndexes() { "from-10sats-to-100sats-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-10sats-to-100sats-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-10sats-to-100sats-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-10sats-to-100sats-realized-profit": [5], + "from-10sats-to-100sats-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-10sats-to-100sats-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-10sats-to-100sats-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-10sats-to-100sats-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-10sats-to-100sats-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10sats-to-100sats-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10sats-to-100sats-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-realized-loss": [5], + "from-10y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-10y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-10y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1444,10 +1800,16 @@ export function createVecIdToIndexes() { "from-10y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-10y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-10y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-10y-realized-profit": [5], + "from-10y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-10y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-to-15y-realized-loss": [5], + "from-10y-to-15y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-10y-to-15y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-to-15y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-10y-to-15y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1481,12 +1843,22 @@ export function createVecIdToIndexes() { "from-10y-to-15y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-10y-to-15y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-10y-to-15y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-10y-to-15y-realized-profit": [5], + "from-10y-to-15y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-10y-to-15y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-to-15y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-to-15y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-to-15y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-to-15y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-to-15y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-10y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-10y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-15y-realized-loss": [5], + "from-15y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-15y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-15y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-15y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1520,11 +1892,19 @@ export function createVecIdToIndexes() { "from-15y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-15y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-15y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-15y-realized-profit": [5], + "from-15y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-15y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-15y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-15y-supply-in-usd": [0, 1, 2, 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-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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1btc-to-10btc-realized-loss": [5], + "from-1btc-to-10btc-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1btc-to-10btc-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1btc-to-10btc-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1btc-to-10btc-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1558,11 +1938,19 @@ export function createVecIdToIndexes() { "from-1btc-to-10btc-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1btc-to-10btc-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1btc-to-10btc-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1btc-to-10btc-realized-profit": [5], + "from-1btc-to-10btc-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1btc-to-10btc-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1btc-to-10btc-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1btc-to-10btc-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "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-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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-realized-loss": [5], + "from-1d-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1d-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1d-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1596,10 +1984,16 @@ export function createVecIdToIndexes() { "from-1d-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1d-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1d-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1d-realized-profit": [5], + "from-1d-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1d-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-to-1w-realized-loss": [5], + "from-1d-to-1w-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1d-to-1w-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-to-1w-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1d-to-1w-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1633,12 +2027,22 @@ export function createVecIdToIndexes() { "from-1d-to-1w-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1d-to-1w-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1d-to-1w-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1d-to-1w-realized-profit": [5], + "from-1d-to-1w-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1d-to-1w-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-to-1w-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-to-1w-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-to-1w-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-to-1w-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-to-1w-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-1d-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1d-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-realized-loss": [5], + "from-1m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1672,10 +2076,16 @@ export function createVecIdToIndexes() { "from-1m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1m-realized-profit": [5], + "from-1m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-to-3m-realized-loss": [5], + "from-1m-to-3m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1m-to-3m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-to-3m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1m-to-3m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1709,12 +2119,22 @@ export function createVecIdToIndexes() { "from-1m-to-3m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1m-to-3m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1m-to-3m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1m-to-3m-realized-profit": [5], + "from-1m-to-3m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1m-to-3m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-to-3m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-to-3m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-to-3m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-to-3m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-to-3m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-1m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1sat-to-10sats-realized-loss": [5], + "from-1sat-to-10sats-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1sat-to-10sats-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1sat-to-10sats-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1sat-to-10sats-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1748,11 +2168,19 @@ export function createVecIdToIndexes() { "from-1sat-to-10sats-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1sat-to-10sats-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1sat-to-10sats-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1sat-to-10sats-realized-profit": [5], + "from-1sat-to-10sats-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1sat-to-10sats-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1sat-to-10sats-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1sat-to-10sats-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-1sat-to-10sats-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1sat-to-10sats-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1sat-to-10sats-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-realized-loss": [5], + "from-1w-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1w-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1w-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1786,10 +2214,16 @@ export function createVecIdToIndexes() { "from-1w-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1w-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1w-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1w-realized-profit": [5], + "from-1w-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1w-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-to-1m-realized-loss": [5], + "from-1w-to-1m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1w-to-1m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-to-1m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1w-to-1m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1823,12 +2257,22 @@ export function createVecIdToIndexes() { "from-1w-to-1m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1w-to-1m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1w-to-1m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1w-to-1m-realized-profit": [5], + "from-1w-to-1m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1w-to-1m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-to-1m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-to-1m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-to-1m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-to-1m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-to-1m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-1w-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1w-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-realized-loss": [5], + "from-1y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1862,10 +2306,16 @@ export function createVecIdToIndexes() { "from-1y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1y-realized-profit": [5], + "from-1y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-to-2y-realized-loss": [5], + "from-1y-to-2y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-1y-to-2y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-to-2y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-1y-to-2y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1899,12 +2349,22 @@ export function createVecIdToIndexes() { "from-1y-to-2y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-1y-to-2y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-1y-to-2y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-1y-to-2y-realized-profit": [5], + "from-1y-to-2y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-1y-to-2y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-to-2y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-to-2y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-to-2y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-to-2y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-to-2y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-1y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-1y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2m-realized-loss": [5], + "from-2m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-2m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-2m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-2m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1938,11 +2398,19 @@ export function createVecIdToIndexes() { "from-2m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-2m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-2m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-2m-realized-profit": [5], + "from-2m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-2m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-2m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-2m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-2m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-realized-loss": [5], + "from-2y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-2y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-2y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -1976,10 +2444,16 @@ export function createVecIdToIndexes() { "from-2y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-2y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-2y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-2y-realized-profit": [5], + "from-2y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-2y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-to-3y-realized-loss": [5], + "from-2y-to-3y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-2y-to-3y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-to-3y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-2y-to-3y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2013,12 +2487,22 @@ export function createVecIdToIndexes() { "from-2y-to-3y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-2y-to-3y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-2y-to-3y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-2y-to-3y-realized-profit": [5], + "from-2y-to-3y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-2y-to-3y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-to-3y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-to-3y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-to-3y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-to-3y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-to-3y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-2y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-2y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-realized-loss": [5], + "from-3m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-3m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-3m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2052,10 +2536,16 @@ export function createVecIdToIndexes() { "from-3m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-3m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-3m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-3m-realized-profit": [5], + "from-3m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-3m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-to-6m-realized-loss": [5], + "from-3m-to-6m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-3m-to-6m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-to-6m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-3m-to-6m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2089,12 +2579,22 @@ export function createVecIdToIndexes() { "from-3m-to-6m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-3m-to-6m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-3m-to-6m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-3m-to-6m-realized-profit": [5], + "from-3m-to-6m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-3m-to-6m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-to-6m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-to-6m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-to-6m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-to-6m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-to-6m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-3m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-realized-loss": [5], + "from-3y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-3y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-3y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2128,10 +2628,16 @@ export function createVecIdToIndexes() { "from-3y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-3y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-3y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-3y-realized-profit": [5], + "from-3y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-3y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-to-4y-realized-loss": [5], + "from-3y-to-4y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-3y-to-4y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-to-4y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-3y-to-4y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2165,12 +2671,22 @@ export function createVecIdToIndexes() { "from-3y-to-4y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-3y-to-4y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-3y-to-4y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-3y-to-4y-realized-profit": [5], + "from-3y-to-4y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-3y-to-4y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-to-4y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-to-4y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-to-4y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-to-4y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-to-4y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-3y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-3y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4m-realized-loss": [5], + "from-4m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-4m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-4m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-4m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2204,11 +2720,19 @@ export function createVecIdToIndexes() { "from-4m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-4m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-4m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-4m-realized-profit": [5], + "from-4m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-4m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-4m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-4m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-4m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-realized-loss": [5], + "from-4y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-4y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-4y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2242,10 +2766,16 @@ export function createVecIdToIndexes() { "from-4y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-4y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-4y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-4y-realized-profit": [5], + "from-4y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-4y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-to-5y-realized-loss": [5], + "from-4y-to-5y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-4y-to-5y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-to-5y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-4y-to-5y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2279,12 +2809,22 @@ export function createVecIdToIndexes() { "from-4y-to-5y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-4y-to-5y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-4y-to-5y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-4y-to-5y-realized-profit": [5], + "from-4y-to-5y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-4y-to-5y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-to-5y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-to-5y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-to-5y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-to-5y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-to-5y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-4y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-4y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5m-realized-loss": [5], + "from-5m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-5m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-5m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-5m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2318,11 +2858,19 @@ export function createVecIdToIndexes() { "from-5m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-5m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-5m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-5m-realized-profit": [5], + "from-5m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-5m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-5m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-5m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-5m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-realized-loss": [5], + "from-5y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-5y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-5y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2356,10 +2904,16 @@ export function createVecIdToIndexes() { "from-5y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-5y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-5y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-5y-realized-profit": [5], + "from-5y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-5y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-to-7y-realized-loss": [5], + "from-5y-to-7y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-5y-to-7y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-to-7y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-5y-to-7y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2393,12 +2947,22 @@ export function createVecIdToIndexes() { "from-5y-to-7y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-5y-to-7y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-5y-to-7y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-5y-to-7y-realized-profit": [5], + "from-5y-to-7y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-5y-to-7y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-to-7y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-to-7y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-to-7y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-to-7y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-to-7y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-5y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-5y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-realized-loss": [5], + "from-6m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-6m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-6m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2432,10 +2996,16 @@ export function createVecIdToIndexes() { "from-6m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-6m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-6m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-6m-realized-profit": [5], + "from-6m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-6m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-to-1y-realized-loss": [5], + "from-6m-to-1y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-6m-to-1y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-to-1y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-6m-to-1y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2469,12 +3039,22 @@ export function createVecIdToIndexes() { "from-6m-to-1y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-6m-to-1y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-6m-to-1y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-6m-to-1y-realized-profit": [5], + "from-6m-to-1y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-6m-to-1y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-to-1y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-to-1y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-to-1y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-to-1y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-to-1y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-6m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6y-realized-loss": [5], + "from-6y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-6y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-6y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-6y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2508,11 +3088,19 @@ export function createVecIdToIndexes() { "from-6y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-6y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-6y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-6y-realized-profit": [5], + "from-6y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-6y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-6y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-6y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-6y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-6y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-realized-loss": [5], + "from-7y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-7y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-7y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2546,10 +3134,16 @@ export function createVecIdToIndexes() { "from-7y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-7y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-7y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-7y-realized-profit": [5], + "from-7y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-7y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-to-10y-realized-loss": [5], + "from-7y-to-10y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-7y-to-10y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-to-10y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-7y-to-10y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2583,12 +3177,22 @@ export function createVecIdToIndexes() { "from-7y-to-10y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-7y-to-10y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-7y-to-10y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-7y-to-10y-realized-profit": [5], + "from-7y-to-10y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-7y-to-10y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-to-10y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-to-10y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-to-10y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-to-10y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-to-10y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "from-7y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "from-7y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "from-8y-realized-loss": [5], + "from-8y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "from-8y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "from-8y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "from-8y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2622,10 +3226,14 @@ export function createVecIdToIndexes() { "from-8y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "from-8y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "from-8y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "from-8y-realized-profit": [5], + "from-8y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "from-8y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "from-8y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "from-8y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "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], "halvingepoch": [0, 1, 4, 5, 7, 19, 22, 23], "height": [5, 20], "height-count": [0, 2], @@ -2650,7 +3258,11 @@ export function createVecIdToIndexes() { "low": [0, 1, 2, 5, 7, 19, 22, 23], "low-in-cents": [0, 5], "low-in-sats": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "lth-realized-loss": [5], + "lth-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "lth-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "lth-realized-price-ratio": [0, 1, 7, 19, 22, 23], "lth-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2684,10 +3296,14 @@ export function createVecIdToIndexes() { "lth-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "lth-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "lth-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "lth-realized-profit": [5], + "lth-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "lth-supply": [0, 1, 2, 5, 7, 19, 22, 23], "lth-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "lth-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "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], @@ -2709,6 +3325,9 @@ export function createVecIdToIndexes() { "opreturn-count-median": [0], "opreturn-count-min": [0, 1, 2, 7, 19, 22, 23], "opreturn-count-sum": [0, 1, 2, 7, 19, 22, 23], + "opreturn-supply": [0, 1, 2, 5, 7, 19, 22, 23], + "opreturn-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], + "opreturn-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "opreturnindex": [8], "output-count": [20], "output-count-10p": [5], @@ -2724,6 +3343,8 @@ export function createVecIdToIndexes() { "outputindex": [6, 9], "outputtype": [9], "outputtypeindex": [9], + "p2a-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2a-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2a-count": [5], "p2a-count-10p": [0], "p2a-count-25p": [0], @@ -2735,6 +3356,8 @@ export function createVecIdToIndexes() { "p2a-count-min": [0, 1, 2, 7, 19, 22, 23], "p2a-count-sum": [0, 1, 2, 7, 19, 22, 23], "p2a-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "p2a-realized-loss": [5], + "p2a-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "p2a-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "p2a-realized-price-ratio": [0, 1, 7, 19, 22, 23], "p2a-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2768,12 +3391,18 @@ export function createVecIdToIndexes() { "p2a-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "p2a-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "p2a-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "p2a-realized-profit": [5], + "p2a-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "p2a-supply": [0, 1, 2, 5, 7, 19, 22, 23], "p2a-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "p2a-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "p2a-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "p2a-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2a-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2abytes": [10], "p2aindex": [10], + "p2ms-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2ms-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2ms-count": [5], "p2ms-count-10p": [0], "p2ms-count-25p": [0], @@ -2785,6 +3414,8 @@ export function createVecIdToIndexes() { "p2ms-count-min": [0, 1, 2, 7, 19, 22, 23], "p2ms-count-sum": [0, 1, 2, 7, 19, 22, 23], "p2ms-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "p2ms-realized-loss": [5], + "p2ms-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "p2ms-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "p2ms-realized-price-ratio": [0, 1, 7, 19, 22, 23], "p2ms-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2818,11 +3449,17 @@ export function createVecIdToIndexes() { "p2ms-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "p2ms-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "p2ms-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "p2ms-realized-profit": [5], + "p2ms-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "p2ms-supply": [0, 1, 2, 5, 7, 19, 22, 23], "p2ms-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "p2ms-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "p2ms-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "p2ms-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2ms-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2msindex": [11], + "p2pk33-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk33-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk33-count": [5], "p2pk33-count-10p": [0], "p2pk33-count-25p": [0], @@ -2834,6 +3471,8 @@ export function createVecIdToIndexes() { "p2pk33-count-min": [0, 1, 2, 7, 19, 22, 23], "p2pk33-count-sum": [0, 1, 2, 7, 19, 22, 23], "p2pk33-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk33-realized-loss": [5], + "p2pk33-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "p2pk33-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk33-realized-price-ratio": [0, 1, 7, 19, 22, 23], "p2pk33-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2867,12 +3506,18 @@ export function createVecIdToIndexes() { "p2pk33-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "p2pk33-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "p2pk33-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "p2pk33-realized-profit": [5], + "p2pk33-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "p2pk33-supply": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk33-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk33-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk33-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk33-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk33-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk33bytes": [12], "p2pk33index": [12], + "p2pk65-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk65-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk65-count": [5], "p2pk65-count-10p": [0], "p2pk65-count-25p": [0], @@ -2884,6 +3529,8 @@ export function createVecIdToIndexes() { "p2pk65-count-min": [0, 1, 2, 7, 19, 22, 23], "p2pk65-count-sum": [0, 1, 2, 7, 19, 22, 23], "p2pk65-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk65-realized-loss": [5], + "p2pk65-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "p2pk65-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk65-realized-price-ratio": [0, 1, 7, 19, 22, 23], "p2pk65-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2917,12 +3564,18 @@ export function createVecIdToIndexes() { "p2pk65-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "p2pk65-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "p2pk65-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "p2pk65-realized-profit": [5], + "p2pk65-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "p2pk65-supply": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk65-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk65-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk65-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk65-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pk65-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2pk65bytes": [13], "p2pk65index": [13], + "p2pkh-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pkh-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2pkh-count": [5], "p2pkh-count-10p": [0], "p2pkh-count-25p": [0], @@ -2934,6 +3587,8 @@ export function createVecIdToIndexes() { "p2pkh-count-min": [0, 1, 2, 7, 19, 22, 23], "p2pkh-count-sum": [0, 1, 2, 7, 19, 22, 23], "p2pkh-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pkh-realized-loss": [5], + "p2pkh-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "p2pkh-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "p2pkh-realized-price-ratio": [0, 1, 7, 19, 22, 23], "p2pkh-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -2967,12 +3622,18 @@ export function createVecIdToIndexes() { "p2pkh-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "p2pkh-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "p2pkh-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "p2pkh-realized-profit": [5], + "p2pkh-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "p2pkh-supply": [0, 1, 2, 5, 7, 19, 22, 23], "p2pkh-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "p2pkh-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "p2pkh-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pkh-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2pkh-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2pkhbytes": [14], "p2pkhindex": [14], + "p2sh-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2sh-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2sh-count": [5], "p2sh-count-10p": [0], "p2sh-count-25p": [0], @@ -2984,6 +3645,8 @@ export function createVecIdToIndexes() { "p2sh-count-min": [0, 1, 2, 7, 19, 22, 23], "p2sh-count-sum": [0, 1, 2, 7, 19, 22, 23], "p2sh-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "p2sh-realized-loss": [5], + "p2sh-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "p2sh-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "p2sh-realized-price-ratio": [0, 1, 7, 19, 22, 23], "p2sh-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3017,12 +3680,18 @@ export function createVecIdToIndexes() { "p2sh-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "p2sh-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "p2sh-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "p2sh-realized-profit": [5], + "p2sh-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "p2sh-supply": [0, 1, 2, 5, 7, 19, 22, 23], "p2sh-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "p2sh-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "p2sh-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "p2sh-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2sh-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2shbytes": [15], "p2shindex": [15], + "p2tr-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2tr-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2tr-count": [5], "p2tr-count-10p": [0], "p2tr-count-25p": [0], @@ -3034,6 +3703,8 @@ export function createVecIdToIndexes() { "p2tr-count-min": [0, 1, 2, 7, 19, 22, 23], "p2tr-count-sum": [0, 1, 2, 7, 19, 22, 23], "p2tr-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "p2tr-realized-loss": [5], + "p2tr-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "p2tr-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "p2tr-realized-price-ratio": [0, 1, 7, 19, 22, 23], "p2tr-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3067,12 +3738,18 @@ export function createVecIdToIndexes() { "p2tr-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "p2tr-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "p2tr-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "p2tr-realized-profit": [5], + "p2tr-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "p2tr-supply": [0, 1, 2, 5, 7, 19, 22, 23], "p2tr-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "p2tr-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "p2tr-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "p2tr-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2tr-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2trbytes": [16], "p2trindex": [16], + "p2wpkh-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wpkh-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2wpkh-count": [5], "p2wpkh-count-10p": [0], "p2wpkh-count-25p": [0], @@ -3084,6 +3761,8 @@ export function createVecIdToIndexes() { "p2wpkh-count-min": [0, 1, 2, 7, 19, 22, 23], "p2wpkh-count-sum": [0, 1, 2, 7, 19, 22, 23], "p2wpkh-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wpkh-realized-loss": [5], + "p2wpkh-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "p2wpkh-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "p2wpkh-realized-price-ratio": [0, 1, 7, 19, 22, 23], "p2wpkh-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3117,12 +3796,18 @@ export function createVecIdToIndexes() { "p2wpkh-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "p2wpkh-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "p2wpkh-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "p2wpkh-realized-profit": [5], + "p2wpkh-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "p2wpkh-supply": [0, 1, 2, 5, 7, 19, 22, 23], "p2wpkh-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "p2wpkh-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "p2wpkh-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wpkh-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wpkh-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2wpkhbytes": [17], "p2wpkhindex": [17], + "p2wsh-adjusted-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wsh-adjusted-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2wsh-count": [5], "p2wsh-count-10p": [0], "p2wsh-count-25p": [0], @@ -3134,6 +3819,8 @@ export function createVecIdToIndexes() { "p2wsh-count-min": [0, 1, 2, 7, 19, 22, 23], "p2wsh-count-sum": [0, 1, 2, 7, 19, 22, 23], "p2wsh-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wsh-realized-loss": [5], + "p2wsh-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "p2wsh-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "p2wsh-realized-price-ratio": [0, 1, 7, 19, 22, 23], "p2wsh-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3167,10 +3854,14 @@ export function createVecIdToIndexes() { "p2wsh-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "p2wsh-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "p2wsh-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "p2wsh-realized-profit": [5], + "p2wsh-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "p2wsh-supply": [0, 1, 2, 5, 7, 19, 22, 23], "p2wsh-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "p2wsh-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "p2wsh-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wsh-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "p2wsh-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "p2wshbytes": [18], "p2wshindex": [18], "price-10y-ago": [0, 1, 7, 19, 22, 23], @@ -3189,6 +3880,8 @@ export function createVecIdToIndexes() { "quarterindex": [7, 19], "rawlocktime": [20], "realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "realized-loss": [5], + "realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "realized-price-ratio": [0, 1, 7, 19, 22, 23], "realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3222,7 +3915,13 @@ export function createVecIdToIndexes() { "realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "realized-profit": [5], + "realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "sth-realized-loss": [5], + "sth-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "sth-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "sth-realized-price-ratio": [0, 1, 7, 19, 22, 23], "sth-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3256,10 +3955,14 @@ export function createVecIdToIndexes() { "sth-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "sth-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "sth-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "sth-realized-profit": [5], + "sth-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "sth-supply": [0, 1, 2, 5, 7, 19, 22, 23], "sth-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "sth-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "sth-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "sth-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "sth-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "subsidy": [5], "subsidy-10p": [0], "subsidy-25p": [0], @@ -3295,41 +3998,7 @@ export function createVecIdToIndexes() { "supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "timestamp": [0, 1, 2, 4, 5, 7, 19, 22, 23], "timestamp-fixed": [5], - "total-block-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-block-size": [0, 1, 2, 5, 7, 19, 22, 23], - "total-block-vbytes": [0, 1, 2, 5, 7, 19, 22, 23], - "total-block-weight": [0, 1, 2, 5, 7, 19, 22, 23], - "total-coinbase": [0, 1, 2, 5, 7, 19, 22, 23], - "total-coinbase-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], - "total-coinbase-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], - "total-emptyoutput-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-fee": [0, 1, 2, 5, 7, 19, 22, 23], - "total-fee-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], - "total-fee-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], - "total-input-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-opreturn-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-output-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-p2a-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-p2ms-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-p2pk33-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-p2pk65-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-p2pkh-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-p2sh-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-p2tr-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-p2wpkh-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-p2wsh-count": [0, 1, 2, 5, 7, 19, 22, 23], "total-size": [5, 20], - "total-subsidy": [0, 1, 2, 5, 7, 19, 22, 23], - "total-subsidy-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], - "total-subsidy-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], - "total-tx-count": [0, 1, 2, 5, 7, 19, 22, 23], - "total-tx-v1": [0, 1, 2, 5, 7, 19, 22, 23], - "total-tx-v2": [0, 1, 2, 5, 7, 19, 22, 23], - "total-tx-v3": [0, 1, 2, 5, 7, 19, 22, 23], - "total-unclaimed-rewards": [0, 1, 2, 5, 7, 19, 22, 23], - "total-unclaimed-rewards-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], - "total-unclaimed-rewards-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], - "total-unknownoutput-count": [0, 1, 2, 5, 7, 19, 22, 23], "tx-count": [5], "tx-count-10p": [0], "tx-count-25p": [0], @@ -3372,7 +4041,11 @@ export function createVecIdToIndexes() { "unclaimed-rewards-in-usd": [5], "unclaimed-rewards-in-usd-sum": [0, 1, 2, 7, 19, 22, 23], "unclaimed-rewards-sum": [0, 1, 2, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "unknown-realized-loss": [5], + "unknown-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "unknown-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "unknown-realized-price-ratio": [0, 1, 7, 19, 22, 23], "unknown-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3406,10 +4079,14 @@ export function createVecIdToIndexes() { "unknown-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "unknown-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "unknown-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "unknown-realized-profit": [5], + "unknown-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "unknown-supply": [0, 1, 2, 5, 7, 19, 22, 23], "unknown-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "unknown-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "unknown-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "unknown-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "unknown-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "unknownoutput-count": [5], "unknownoutput-count-10p": [0], "unknownoutput-count-25p": [0], @@ -3424,7 +4101,11 @@ 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-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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10y-realized-loss": [5], + "up-to-10y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-10y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-10y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-10y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3458,11 +4139,19 @@ export function createVecIdToIndexes() { "up-to-10y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-10y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-10y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-10y-realized-profit": [5], + "up-to-10y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-10y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-10y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-10y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-10y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-10y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-15y-realized-loss": [5], + "up-to-15y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-15y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-15y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-15y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3496,11 +4185,19 @@ export function createVecIdToIndexes() { "up-to-15y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-15y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-15y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-15y-realized-profit": [5], + "up-to-15y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-15y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-15y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-15y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "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-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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1d-realized-loss": [5], + "up-to-1d-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-1d-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1d-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-1d-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3534,11 +4231,19 @@ export function createVecIdToIndexes() { "up-to-1d-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-1d-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-1d-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-1d-realized-profit": [5], + "up-to-1d-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-1d-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1d-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1d-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1d-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1d-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1d-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1m-realized-loss": [5], + "up-to-1m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-1m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-1m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3572,11 +4277,19 @@ export function createVecIdToIndexes() { "up-to-1m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-1m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-1m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-1m-realized-profit": [5], + "up-to-1m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-1m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1w-realized-loss": [5], + "up-to-1w-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-1w-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1w-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-1w-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3610,11 +4323,19 @@ export function createVecIdToIndexes() { "up-to-1w-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-1w-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-1w-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-1w-realized-profit": [5], + "up-to-1w-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-1w-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1w-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1w-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1w-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1w-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1w-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1y-realized-loss": [5], + "up-to-1y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-1y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-1y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3648,11 +4369,19 @@ export function createVecIdToIndexes() { "up-to-1y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-1y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-1y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-1y-realized-profit": [5], + "up-to-1y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-1y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-1y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-1y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2m-realized-loss": [5], + "up-to-2m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-2m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-2m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3686,11 +4415,19 @@ export function createVecIdToIndexes() { "up-to-2m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-2m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-2m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-2m-realized-profit": [5], + "up-to-2m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-2m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2y-realized-loss": [5], + "up-to-2y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-2y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-2y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3724,11 +4461,19 @@ export function createVecIdToIndexes() { "up-to-2y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-2y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-2y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-2y-realized-profit": [5], + "up-to-2y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-2y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-2y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-2y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3m-realized-loss": [5], + "up-to-3m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-3m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-3m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3762,11 +4507,19 @@ export function createVecIdToIndexes() { "up-to-3m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-3m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-3m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-3m-realized-profit": [5], + "up-to-3m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-3m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3y-realized-loss": [5], + "up-to-3y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-3y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-3y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3800,11 +4553,19 @@ export function createVecIdToIndexes() { "up-to-3y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-3y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-3y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-3y-realized-profit": [5], + "up-to-3y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-3y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-3y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-3y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4m-realized-loss": [5], + "up-to-4m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-4m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-4m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3838,11 +4599,19 @@ export function createVecIdToIndexes() { "up-to-4m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-4m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-4m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-4m-realized-profit": [5], + "up-to-4m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-4m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4y-realized-loss": [5], + "up-to-4y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-4y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-4y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3876,11 +4645,19 @@ export function createVecIdToIndexes() { "up-to-4y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-4y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-4y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-4y-realized-profit": [5], + "up-to-4y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-4y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-4y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-4y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5m-realized-loss": [5], + "up-to-5m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-5m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-5m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3914,11 +4691,19 @@ export function createVecIdToIndexes() { "up-to-5m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-5m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-5m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-5m-realized-profit": [5], + "up-to-5m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-5m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5y-realized-loss": [5], + "up-to-5y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-5y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-5y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3952,11 +4737,19 @@ export function createVecIdToIndexes() { "up-to-5y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-5y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-5y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-5y-realized-profit": [5], + "up-to-5y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-5y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-5y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-5y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6m-realized-loss": [5], + "up-to-6m-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-6m-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6m-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-6m-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -3990,11 +4783,19 @@ export function createVecIdToIndexes() { "up-to-6m-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-6m-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-6m-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-6m-realized-profit": [5], + "up-to-6m-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-6m-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6m-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6m-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6m-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6m-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6m-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6y-realized-loss": [5], + "up-to-6y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-6y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-6y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -4028,11 +4829,19 @@ export function createVecIdToIndexes() { "up-to-6y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-6y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-6y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-6y-realized-profit": [5], + "up-to-6y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-6y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-6y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-6y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-7y-realized-loss": [5], + "up-to-7y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-7y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-7y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-7y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -4066,11 +4875,19 @@ export function createVecIdToIndexes() { "up-to-7y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-7y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-7y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-7y-realized-profit": [5], + "up-to-7y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-7y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-7y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-7y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-7y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-7y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-7y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], + "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-realized-cap": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-8y-realized-loss": [5], + "up-to-8y-realized-loss-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-8y-realized-price": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-8y-realized-price-ratio": [0, 1, 7, 19, 22, 23], "up-to-8y-realized-price-ratio-1m-sma": [0, 1, 7, 19, 22, 23], @@ -4104,12 +4921,18 @@ export function createVecIdToIndexes() { "up-to-8y-realized-price-ratio-sma": [0, 1, 7, 19, 22, 23], "up-to-8y-realized-price-ratio-standard-deviation": [0, 1, 7, 19, 22, 23], "up-to-8y-realized-price-ratio-zscore": [0, 1, 7, 19, 22, 23], + "up-to-8y-realized-profit": [5], + "up-to-8y-realized-profit-sum": [0, 1, 2, 7, 19, 22, 23], "up-to-8y-supply": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-8y-supply-in-btc": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-8y-supply-in-usd": [0, 1, 2, 5, 7, 19, 22, 23], "up-to-8y-utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-8y-value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "up-to-8y-value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "utxo-count": [0, 1, 2, 5, 7, 19, 22, 23], "value": [6, 9], + "value-created": [0, 1, 2, 5, 7, 19, 22, 23], + "value-destroyed": [0, 1, 2, 5, 7, 19, 22, 23], "vbytes": [5], "vsize": [20], "weekindex": [0, 22],