diff --git a/Cargo.lock b/Cargo.lock index 458a418bb..72490dbd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1103,7 +1103,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -1501,9 +1501,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jiff" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27e77966151130221b079bcec80f1f34a9e414fa489d99152a201c07fd2182bc" +checksum = "d07d8d955d798e7a4d6f9c58cd1f1916e790b42b092758a9ef6e16fef9f1b3fd" dependencies = [ "jiff-static", "jiff-tzdb-platform", @@ -1511,14 +1511,14 @@ dependencies = [ "portable-atomic", "portable-atomic-util", "serde", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] name = "jiff-static" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97265751f8a9a4228476f2fc17874a9e7e70e96b893368e42619880fe143b48a" +checksum = "f244cfe006d98d26f859c7abd1318d85327e1882dc9cef80f62daeeb0adcf300" dependencies = [ "proc-macro2", "quote", @@ -1799,9 +1799,9 @@ checksum = "1036865bb9422d3300cf723f657c2851d0e9ab12567854b1f4eba3d77decf564" [[package]] name = "oxc" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5cf75f3e465c16c27fe188143b2263b74b0729b3cf2044cd946452ce87ee93" +checksum = "f907527226ea09664a17963b36d3057ddcab280c1dcc19b3a287f40de30c3965" dependencies = [ "oxc_allocator", "oxc_ast", @@ -1842,9 +1842,9 @@ dependencies = [ [[package]] name = "oxc_allocator" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d5e92c9020da9b683bcf06bec4895e618e5d86a290c6e8a805faa7fde701116" +checksum = "d3da7bc2d06c0fd029c7817889b1e4d418f4955c25c003d5a9ea4a525db8fce9" dependencies = [ "allocator-api2", "bumpalo", @@ -1856,9 +1856,9 @@ dependencies = [ [[package]] name = "oxc_ast" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59d46e3425ff92b7edee4c9d299aff471b51fd813780d006b645243e7f522c3f" +checksum = "9a83d102ba84b604cf24be6b943c3347f13740afa97304461d798f2598d4a92e" dependencies = [ "bitflags", "cow-utils", @@ -1873,9 +1873,9 @@ dependencies = [ [[package]] name = "oxc_ast_macros" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1be1f451540565035dec927705c83826ca15e96d87d0352395c5e10d4822369" +checksum = "6e03da9a237d05fa378e3398a5a2c28124a387ff666218c1ca4ebfe5f0544d3d" dependencies = [ "proc-macro2", "quote", @@ -1884,9 +1884,9 @@ dependencies = [ [[package]] name = "oxc_ast_visit" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db4c6ac94f2c157a9dd96d5715a656f049653c2088f8c241aea55bd9789b811" +checksum = "f97a1716d68a3c9a0c9cf1d906eaeaa3a806052f91d8e4ef14e6afc50d515132" dependencies = [ "oxc_allocator", "oxc_ast", @@ -1896,9 +1896,9 @@ dependencies = [ [[package]] name = "oxc_cfg" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5bf065a22ae9438554b88b664974be1bcb1060e997bb4ea6be27831af48badb" +checksum = "de348366d30393be8eab6591bfa03c63c18e0b239cccf666554769547d94cd39" dependencies = [ "bitflags", "itertools", @@ -1911,9 +1911,9 @@ dependencies = [ [[package]] name = "oxc_codegen" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165f1993b33d4c07ec8e90c5522c6afe8985a463eca8545ac1c147863a86d472" +checksum = "740de9affaf00644d8122c3e74009c01888747d7233487c387415b298c5f9fd4" dependencies = [ "bitflags", "cow-utils", @@ -1932,15 +1932,15 @@ dependencies = [ [[package]] name = "oxc_data_structures" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc6d72677e31673f912d567f7d46d6390844a6ceabbc3bd4ef4a99b04178beb" +checksum = "a9603941570dc1dbc111e6312d622d60722395b502aa68e703646beacc45d0d2" [[package]] name = "oxc_diagnostics" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f53beee5473b6929be652ddfed20d3db3e6f96aea57f76a5c7f53ee1e7b458d" +checksum = "a01184ff8ddf40a39c5ec4b0979b53e6e3f8e5701e4a0aed8edefd208ae310eb" dependencies = [ "cow-utils", "oxc-miette", @@ -1948,9 +1948,9 @@ dependencies = [ [[package]] name = "oxc_ecmascript" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6674bfaf4ffaa4723cf665e994b630a13cfdc641d2d3f208a010a9ec2bed27c" +checksum = "d549b884069d155eae98207c404b71113dc8fce2bea84dc53e8476a221405a83" dependencies = [ "cow-utils", "num-bigint", @@ -1962,9 +1962,9 @@ dependencies = [ [[package]] name = "oxc_estree" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce1d1d67d2e951ee52e2c9d6e2995be7d54523574396d9c87423092ccb0f6b3c" +checksum = "66904246cb3ceef3c7f9dd4b3a79bb104b242d8e442eb94f6097cec241a0eec4" [[package]] name = "oxc_index" @@ -1974,9 +1974,9 @@ checksum = "2fa07b0cfa997730afed43705766ef27792873fdf5215b1391949fec678d2392" [[package]] name = "oxc_mangler" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6da1b7049a4a0439401b6ae72f1375a0e66a38e4461fb235912cfe67331ce596" +checksum = "d862ba81d295897e817489c0850b04c41facb927bf760d808778da40cc7ad580" dependencies = [ "fixedbitset", "itertools", @@ -1991,9 +1991,9 @@ dependencies = [ [[package]] name = "oxc_minifier" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5bae5ecc9c768d15821994a8445e0e6aff763a9bb19a5635d34cab40423366f" +checksum = "465c3ce7241550963b95a7127879e83a5f64094bdf217eb393e209b9eb9bed9c" dependencies = [ "cow-utils", "oxc_allocator", @@ -2013,9 +2013,9 @@ dependencies = [ [[package]] name = "oxc_parser" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fd747c632d17d36fe496a514c4c87cb2b150f7358a1adb2c01d9d9018e8aa3" +checksum = "a662d53b21550ca1a5600f70d033fcec40b2a25ba2b5281ecaf2ecd01cb16559" dependencies = [ "bitflags", "cow-utils", @@ -2036,9 +2036,9 @@ dependencies = [ [[package]] name = "oxc_regular_expression" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298174d22ce142abd379f6a0037d1f46b45e8b2beda894b636c18d7f7dc7645e" +checksum = "c53f760363c78764bb28b8e0f8316d9c28adf89a0ddfba625c8a9f465f4e2199" dependencies = [ "oxc_allocator", "oxc_ast_macros", @@ -2052,9 +2052,9 @@ dependencies = [ [[package]] name = "oxc_semantic" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f446d2505831faebbe32679dfd3ea5ff2ebafce34ec1cace54541afd7e8102b4" +checksum = "942de11616459d462489166eddf7870cfb8589ba3f12b91f61d28e80b77f7fd0" dependencies = [ "itertools", "oxc_allocator", @@ -2088,9 +2088,9 @@ dependencies = [ [[package]] name = "oxc_span" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b2d153db7fa3f82316d64f23da65588eabc7763e961c3fe9b4d6224fe5ae36" +checksum = "8f8e3cd484054ea0ce496e16437d802d4d9126e238deb267796db140a80d91dc" dependencies = [ "compact_str", "oxc-miette", @@ -2101,9 +2101,9 @@ dependencies = [ [[package]] name = "oxc_syntax" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf67148b2cef2b0f8df792e3bbda51957e4c39182e800b0370c60a98b682d1a" +checksum = "8933bda357ccc13260bb2fe3a08f02d98ceeb695c9af04d8ec5913edd9bec6d6" dependencies = [ "bitflags", "cow-utils", @@ -2122,9 +2122,9 @@ dependencies = [ [[package]] name = "oxc_traverse" -version = "0.67.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b56ff860c0a85863cde254924ec2c67da24dbb7b5dda999cab4ae18cbfd245" +checksum = "2e318be8193f3c72ab703afbb8941b31ed475168514067337325fa151416301a" dependencies = [ "itoa", "oxc_allocator", @@ -2503,7 +2503,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2858,7 +2858,7 @@ dependencies = [ "getrandom 0.3.2", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 53d330419..61bb9803b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ clap_derive = "4.5.32" color-eyre = "0.6.4" derive_deref = "1.1.1" fjall = "2.10.0" -jiff = "0.2.11" +jiff = "0.2.12" log = { version = "0.4.27" } minreq = { version = "2.13.4", features = ["https", "serde_json"] } rayon = "1.10.0" diff --git a/crates/brk_cli/src/run.rs b/crates/brk_cli/src/run.rs index f9ab8b780..9531ea5aa 100644 --- a/crates/brk_cli/src/run.rs +++ b/crates/brk_cli/src/run.rs @@ -125,7 +125,7 @@ pub struct RunConfig { mode: Option, /// Computation mode for compatible datasets, `lazy` computes data whenever requested without saving it, `eager` computes the data once and saves it to disk, default: Lazy, saved - #[arg(short, long)] + #[arg(short = 'C', long)] computation: Option, /// Activate compression of datasets, set to true to save disk space or false if prioritize speed, default: true, saved diff --git a/crates/brk_computer/src/storage/vecs/indexes.rs b/crates/brk_computer/src/storage/vecs/indexes.rs index 71b8c8369..d80b14fe8 100644 --- a/crates/brk_computer/src/storage/vecs/indexes.rs +++ b/crates/brk_computer/src/storage/vecs/indexes.rs @@ -2,9 +2,10 @@ use std::{fs, ops::Deref, path::Path}; use brk_core::{ Date, DateIndex, DecadeIndex, DifficultyEpoch, EmptyOutputIndex, HalvingEpoch, Height, - InputIndex, MonthIndex, OpReturnIndex, OutputIndex, P2AIndex, P2MSIndex, P2PK33Index, - P2PK65Index, P2PKHIndex, P2SHIndex, P2TRIndex, P2WPKHIndex, P2WSHIndex, QuarterIndex, - StoredUsize, Timestamp, TxIndex, UnknownOutputIndex, WeekIndex, YearIndex, + 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, }; use brk_exit::Exit; use brk_indexer::Indexer; @@ -16,72 +17,233 @@ use brk_vec::{ #[derive(Clone)] pub struct Vecs { pub dateindex_to_date: ComputedVecFrom1, - pub dateindex_to_dateindex: EagerVec, + pub dateindex_to_dateindex: ComputedVecFrom1, pub dateindex_to_first_height: EagerVec, pub dateindex_to_height_count: EagerVec, pub dateindex_to_monthindex: EagerVec, pub dateindex_to_weekindex: EagerVec, - pub decadeindex_to_decadeindex: EagerVec, + pub decadeindex_to_decadeindex: + ComputedVecFrom1, pub decadeindex_to_first_yearindex: EagerVec, pub decadeindex_to_yearindex_count: EagerVec, - pub difficultyepoch_to_difficultyepoch: EagerVec, + pub difficultyepoch_to_difficultyepoch: + ComputedVecFrom1, pub difficultyepoch_to_first_height: EagerVec, pub difficultyepoch_to_height_count: EagerVec, - pub emptyoutputindex_to_emptyoutputindex: EagerVec, + pub emptyoutputindex_to_emptyoutputindex: + ComputedVecFrom1, pub halvingepoch_to_first_height: EagerVec, - pub halvingepoch_to_halvingepoch: EagerVec, + pub halvingepoch_to_halvingepoch: + ComputedVecFrom1, pub height_to_date: EagerVec, pub height_to_date_fixed: EagerVec, pub height_to_dateindex: EagerVec, - pub height_to_difficultyepoch: EagerVec, - pub height_to_halvingepoch: EagerVec, - pub height_to_height: EagerVec, + pub height_to_difficultyepoch: ComputedVecFrom1, + pub height_to_halvingepoch: ComputedVecFrom1, + pub height_to_height: ComputedVecFrom1, pub height_to_timestamp_fixed: EagerVec, pub height_to_txindex_count: EagerVec, - pub inputindex_to_inputindex: EagerVec, + pub inputindex_to_inputindex: ComputedVecFrom1, pub monthindex_to_dateindex_count: EagerVec, pub monthindex_to_first_dateindex: EagerVec, - pub monthindex_to_monthindex: EagerVec, - pub monthindex_to_quarterindex: EagerVec, - pub monthindex_to_yearindex: EagerVec, - pub opreturnindex_to_opreturnindex: EagerVec, - pub outputindex_to_outputindex: EagerVec, - pub p2aindex_to_p2aindex: EagerVec, - pub p2msindex_to_p2msindex: EagerVec, - pub p2pk33index_to_p2pk33index: EagerVec, - pub p2pk65index_to_p2pk65index: EagerVec, - pub p2pkhindex_to_p2pkhindex: EagerVec, - pub p2shindex_to_p2shindex: EagerVec, - pub p2trindex_to_p2trindex: EagerVec, - pub p2wpkhindex_to_p2wpkhindex: EagerVec, - pub p2wshindex_to_p2wshindex: EagerVec, + pub monthindex_to_monthindex: ComputedVecFrom1, + pub monthindex_to_quarterindex: + ComputedVecFrom1, + pub monthindex_to_yearindex: ComputedVecFrom1, + pub opreturnindex_to_opreturnindex: + ComputedVecFrom1, + pub outputindex_to_outputindex: ComputedVecFrom1, + pub p2aindex_to_p2aindex: ComputedVecFrom1, + pub p2msindex_to_p2msindex: ComputedVecFrom1, + pub p2pk33index_to_p2pk33index: + ComputedVecFrom1, + pub p2pk65index_to_p2pk65index: + ComputedVecFrom1, + pub p2pkhindex_to_p2pkhindex: ComputedVecFrom1, + pub p2shindex_to_p2shindex: ComputedVecFrom1, + pub p2trindex_to_p2trindex: ComputedVecFrom1, + pub p2wpkhindex_to_p2wpkhindex: + ComputedVecFrom1, + pub p2wshindex_to_p2wshindex: ComputedVecFrom1, pub quarterindex_to_first_monthindex: EagerVec, pub quarterindex_to_monthindex_count: EagerVec, - pub quarterindex_to_quarterindex: EagerVec, + pub quarterindex_to_quarterindex: + ComputedVecFrom1, pub txindex_to_height: EagerVec, - pub txindex_to_txindex: EagerVec, - pub unknownoutputindex_to_unknownoutputindex: EagerVec, + pub txindex_to_txindex: ComputedVecFrom1, + pub unknownoutputindex_to_unknownoutputindex: + ComputedVecFrom1, pub weekindex_to_dateindex_count: EagerVec, pub weekindex_to_first_dateindex: EagerVec, - pub weekindex_to_weekindex: EagerVec, - pub yearindex_to_decadeindex: EagerVec, + pub weekindex_to_weekindex: ComputedVecFrom1, + pub yearindex_to_decadeindex: ComputedVecFrom1, pub yearindex_to_first_monthindex: EagerVec, pub yearindex_to_monthindex_count: EagerVec, - pub yearindex_to_yearindex: EagerVec, + pub yearindex_to_yearindex: ComputedVecFrom1, } impl Vecs { pub fn forced_import( path: &Path, + indexer: &Indexer, computation: Computation, compressed: Compressed, ) -> color_eyre::Result { fs::create_dir_all(path)?; - let dateindex_to_dateindex = EagerVec::forced_import( - &path.join("dateindex_to_dateindex"), + let outputindex_to_outputindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "outputindex_to_outputindex", Version::ZERO, compressed, + indexer.vecs().outputindex_to_value.boxed_clone(), + |index, _| Some(index), + )?; + + let inputindex_to_inputindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "inputindex_to_inputindex", + Version::ZERO, + compressed, + indexer.vecs().inputindex_to_outputindex.boxed_clone(), + |index, _| Some(index), + )?; + + let txindex_to_txindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "txindex_to_txindex", + Version::ZERO, + compressed, + indexer.vecs().txindex_to_txid.boxed_clone(), + |index, _| Some(index), + )?; + + let p2pk33index_to_p2pk33index = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "p2pk33index_to_p2pk33index", + Version::ZERO, + compressed, + indexer.vecs().p2pk33index_to_p2pk33bytes.boxed_clone(), + |index, _| Some(index), + )?; + let p2pk65index_to_p2pk65index = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "p2pk65index_to_p2pk65index", + Version::ZERO, + compressed, + indexer.vecs().p2pk65index_to_p2pk65bytes.boxed_clone(), + |index, _| Some(index), + )?; + let p2pkhindex_to_p2pkhindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "p2pkhindex_to_p2pkhindex", + Version::ZERO, + compressed, + indexer.vecs().p2pkhindex_to_p2pkhbytes.boxed_clone(), + |index, _| Some(index), + )?; + let p2shindex_to_p2shindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "p2shindex_to_p2shindex", + Version::ZERO, + compressed, + indexer.vecs().p2shindex_to_p2shbytes.boxed_clone(), + |index, _| Some(index), + )?; + let p2trindex_to_p2trindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "p2trindex_to_p2trindex", + Version::ZERO, + compressed, + indexer.vecs().p2trindex_to_p2trbytes.boxed_clone(), + |index, _| Some(index), + )?; + let p2wpkhindex_to_p2wpkhindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "p2wpkhindex_to_p2wpkhindex", + Version::ZERO, + compressed, + indexer.vecs().p2wpkhindex_to_p2wpkhbytes.boxed_clone(), + |index, _| Some(index), + )?; + let p2wshindex_to_p2wshindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "p2wshindex_to_p2wshindex", + Version::ZERO, + compressed, + indexer.vecs().p2wshindex_to_p2wshbytes.boxed_clone(), + |index, _| Some(index), + )?; + let p2aindex_to_p2aindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "p2aindex_to_p2aindex", + Version::ZERO, + compressed, + indexer.vecs().p2aindex_to_p2abytes.boxed_clone(), + |index, _| Some(index), + )?; + let p2msindex_to_p2msindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "p2msindex_to_p2msindex", + Version::ZERO, + compressed, + indexer.vecs().p2msindex_to_txindex.boxed_clone(), + |index, _| Some(index), + )?; + let emptyoutputindex_to_emptyoutputindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "emptyoutputindex_to_emptyoutputindex", + Version::ZERO, + compressed, + indexer.vecs().emptyoutputindex_to_txindex.boxed_clone(), + |index, _| Some(index), + )?; + let unknownoutputindex_to_unknownoutputindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "unknownoutputindex_to_unknownoutputindex", + Version::ZERO, + compressed, + indexer.vecs().unknownoutputindex_to_txindex.boxed_clone(), + |index, _| Some(index), + )?; + let opreturnindex_to_opreturnindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "opreturnindex_to_opreturnindex", + Version::ZERO, + compressed, + indexer.vecs().opreturnindex_to_txindex.boxed_clone(), + |index, _| Some(index), + )?; + + let dateindex_to_first_height = EagerVec::forced_import( + &path.join("dateindex_to_first_height"), + Version::ZERO, + compressed, + )?; + + let dateindex_to_dateindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "dateindex_to_dateindex", + Version::ZERO, + compressed, + dateindex_to_first_height.boxed_clone(), + |index, _| Some(index), )?; let dateindex_to_date = ComputedVec::forced_import_or_init_from_1( @@ -91,26 +253,238 @@ impl Vecs { Version::ZERO, compressed, dateindex_to_dateindex.boxed_clone(), - |index, dateindex_to_dateindex_iter| { - dateindex_to_dateindex_iter - .next_at(index) - .map(|(dateindex, _)| Date::from(dateindex)) - }, + |index, _| Some(Date::from(index)), + )?; + + let height_to_date = + EagerVec::forced_import(&path.join("height_to_date"), Version::ZERO, compressed)?; + + let height_to_height = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "height_to_height", + Version::ZERO, + compressed, + height_to_date.boxed_clone(), + |index, _| Some(index), + )?; + + let height_to_difficultyepoch = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "height_to_difficultyepoch", + Version::ZERO, + compressed, + height_to_height.boxed_clone(), + |index, _| Some(DifficultyEpoch::from(index)), + )?; + + let difficultyepoch_to_first_height = EagerVec::forced_import( + &path.join("difficultyepoch_to_first_height"), + Version::ZERO, + compressed, + )?; + + let difficultyepoch_to_difficultyepoch = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "difficultyepoch_to_difficultyepoch", + Version::ZERO, + compressed, + difficultyepoch_to_first_height.boxed_clone(), + |index, _| Some(index), + )?; + + let height_to_halvingepoch = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "height_to_halvingepoch", + Version::ZERO, + compressed, + height_to_height.boxed_clone(), + |index, _| Some(HalvingEpoch::from(index)), + )?; + + let halvingepoch_to_first_height = EagerVec::forced_import( + &path.join("halvingepoch_to_first_height"), + Version::ZERO, + compressed, + )?; + + let halvingepoch_to_halvingepoch = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "halvingepoch_to_halvingepoch", + Version::ZERO, + compressed, + halvingepoch_to_first_height.boxed_clone(), + |index, _| Some(index), + )?; + + let dateindex_to_weekindex = EagerVec::forced_import( + &path.join("dateindex_to_weekindex"), + Version::ZERO, + compressed, + )?; + + let weekindex_to_first_dateindex = EagerVec::forced_import( + &path.join("weekindex_to_first_dateindex"), + Version::ZERO, + compressed, + )?; + + let weekindex_to_weekindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "weekindex_to_weekindex", + Version::ZERO, + compressed, + weekindex_to_first_dateindex.boxed_clone(), + |index, _| Some(index), + )?; + + let dateindex_to_monthindex = EagerVec::forced_import( + &path.join("dateindex_to_monthindex"), + Version::ZERO, + compressed, + )?; + + let monthindex_to_first_dateindex = EagerVec::forced_import( + &path.join("monthindex_to_first_dateindex"), + Version::ZERO, + compressed, + )?; + + let monthindex_to_monthindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "monthindex_to_monthindex", + Version::ZERO, + compressed, + monthindex_to_first_dateindex.boxed_clone(), + |index, _| Some(index), + )?; + + let monthindex_to_quarterindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "monthindex_to_quarterindex", + Version::ZERO, + compressed, + monthindex_to_monthindex.boxed_clone(), + |index, _| Some(QuarterIndex::from(index)), + )?; + + let quarterindex_to_first_monthindex = EagerVec::forced_import( + &path.join("quarterindex_to_first_monthindex"), + Version::ZERO, + compressed, + )?; + + let quarterindex_to_quarterindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "quarterindex_to_quarterindex", + Version::ZERO, + compressed, + quarterindex_to_first_monthindex.boxed_clone(), + |index, _| Some(index), + )?; + + let monthindex_to_yearindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "monthindex_to_yearindex", + Version::ZERO, + compressed, + monthindex_to_monthindex.boxed_clone(), + |index, _| Some(YearIndex::from(index)), + )?; + + let yearindex_to_first_monthindex = EagerVec::forced_import( + &path.join("yearindex_to_first_monthindex"), + Version::ZERO, + compressed, + )?; + + let yearindex_to_yearindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "yearindex_to_yearindex", + Version::ZERO, + compressed, + yearindex_to_first_monthindex.boxed_clone(), + |index, _| Some(index), + )?; + + let yearindex_to_decadeindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "yearindex_to_decadeindex", + Version::ZERO, + compressed, + yearindex_to_yearindex.boxed_clone(), + |index, _| Some(DecadeIndex::from(index)), + )?; + + let decadeindex_to_first_yearindex = EagerVec::forced_import( + &path.join("decadeindex_to_first_yearindex"), + Version::ZERO, + compressed, + )?; + + let decadeindex_to_decadeindex = ComputedVec::forced_import_or_init_from_1( + computation, + path, + "decadeindex_to_decadeindex", + Version::ZERO, + compressed, + decadeindex_to_first_yearindex.boxed_clone(), + |index, _| Some(index), )?; Ok(Self { dateindex_to_date, dateindex_to_dateindex, - dateindex_to_first_height: EagerVec::forced_import( - &path.join("dateindex_to_first_height"), - Version::ZERO, - compressed, - )?, - height_to_date: EagerVec::forced_import( - &path.join("height_to_date"), - Version::ZERO, - compressed, - )?, + dateindex_to_first_height, + dateindex_to_monthindex, + dateindex_to_weekindex, + decadeindex_to_decadeindex, + decadeindex_to_first_yearindex, + difficultyepoch_to_difficultyepoch, + difficultyepoch_to_first_height, + emptyoutputindex_to_emptyoutputindex, + halvingepoch_to_first_height, + halvingepoch_to_halvingepoch, + height_to_date, + height_to_difficultyepoch, + height_to_halvingepoch, + inputindex_to_inputindex, + monthindex_to_first_dateindex, + monthindex_to_monthindex, + monthindex_to_quarterindex, + monthindex_to_yearindex, + opreturnindex_to_opreturnindex, + outputindex_to_outputindex, + p2aindex_to_p2aindex, + p2msindex_to_p2msindex, + p2pk33index_to_p2pk33index, + p2pk65index_to_p2pk65index, + p2pkhindex_to_p2pkhindex, + p2shindex_to_p2shindex, + p2trindex_to_p2trindex, + p2wpkhindex_to_p2wpkhindex, + p2wshindex_to_p2wshindex, + quarterindex_to_first_monthindex, + quarterindex_to_quarterindex, + txindex_to_txindex, + unknownoutputindex_to_unknownoutputindex, + weekindex_to_first_dateindex, + weekindex_to_weekindex, + yearindex_to_decadeindex, + yearindex_to_first_monthindex, + yearindex_to_yearindex, + height_to_date_fixed: EagerVec::forced_import( &path.join("height_to_date_fixed"), Version::ZERO, @@ -121,201 +495,17 @@ impl Vecs { Version::ZERO, compressed, )?, - height_to_height: EagerVec::forced_import( - &path.join("height_to_height"), - Version::ZERO, - compressed, - )?, + height_to_height, txindex_to_height: EagerVec::forced_import( &path.join("txindex_to_height"), Version::ZERO, compressed, )?, - difficultyepoch_to_first_height: EagerVec::forced_import( - &path.join("difficultyepoch_to_first_height"), - Version::ZERO, - compressed, - )?, - halvingepoch_to_first_height: EagerVec::forced_import( - &path.join("halvingepoch_to_first_height"), - Version::ZERO, - compressed, - )?, - weekindex_to_first_dateindex: EagerVec::forced_import( - &path.join("weekindex_to_first_dateindex"), - Version::ZERO, - compressed, - )?, - monthindex_to_first_dateindex: EagerVec::forced_import( - &path.join("monthindex_to_first_dateindex"), - Version::ZERO, - compressed, - )?, - yearindex_to_first_monthindex: EagerVec::forced_import( - &path.join("yearindex_to_first_monthindex"), - Version::ZERO, - compressed, - )?, - decadeindex_to_first_yearindex: EagerVec::forced_import( - &path.join("decadeindex_to_first_yearindex"), - Version::ZERO, - compressed, - )?, - dateindex_to_weekindex: EagerVec::forced_import( - &path.join("dateindex_to_weekindex"), - Version::ZERO, - compressed, - )?, - dateindex_to_monthindex: EagerVec::forced_import( - &path.join("dateindex_to_monthindex"), - Version::ZERO, - compressed, - )?, - monthindex_to_yearindex: EagerVec::forced_import( - &path.join("monthindex_to_yearindex"), - Version::ZERO, - compressed, - )?, - yearindex_to_decadeindex: EagerVec::forced_import( - &path.join("yearindex_to_decadeindex"), - Version::ZERO, - compressed, - )?, - height_to_difficultyepoch: EagerVec::forced_import( - &path.join("height_to_difficultyepoch"), - Version::ZERO, - compressed, - )?, - height_to_halvingepoch: EagerVec::forced_import( - &path.join("height_to_halvingepoch"), - Version::ZERO, - compressed, - )?, - weekindex_to_weekindex: EagerVec::forced_import( - &path.join("weekindex_to_weekindex"), - Version::ZERO, - compressed, - )?, - monthindex_to_monthindex: EagerVec::forced_import( - &path.join("monthindex_to_monthindex"), - Version::ZERO, - compressed, - )?, - yearindex_to_yearindex: EagerVec::forced_import( - &path.join("yearindex_to_yearindex"), - Version::ZERO, - compressed, - )?, - decadeindex_to_decadeindex: EagerVec::forced_import( - &path.join("decadeindex_to_decadeindex"), - Version::ZERO, - compressed, - )?, - difficultyepoch_to_difficultyepoch: EagerVec::forced_import( - &path.join("difficultyepoch_to_difficultyepoch"), - Version::ZERO, - compressed, - )?, - halvingepoch_to_halvingepoch: EagerVec::forced_import( - &path.join("halvingepoch_to_halvingepoch"), - Version::ZERO, - compressed, - )?, height_to_timestamp_fixed: EagerVec::forced_import( &path.join("height_to_timestamp_fixed"), Version::ZERO, compressed, )?, - monthindex_to_quarterindex: EagerVec::forced_import( - &path.join("monthindex_to_quarterindex"), - Version::ZERO, - compressed, - )?, - quarterindex_to_first_monthindex: EagerVec::forced_import( - &path.join("quarterindex_to_first_monthindex"), - Version::ZERO, - compressed, - )?, - quarterindex_to_quarterindex: EagerVec::forced_import( - &path.join("quarterindex_to_quarterindex"), - Version::ZERO, - compressed, - )?, - p2pk33index_to_p2pk33index: EagerVec::forced_import( - &path.join("p2pk33index_to_p2pk33index"), - Version::ZERO, - compressed, - )?, - p2pk65index_to_p2pk65index: EagerVec::forced_import( - &path.join("p2pk65index_to_p2pk65index"), - Version::ZERO, - compressed, - )?, - p2pkhindex_to_p2pkhindex: EagerVec::forced_import( - &path.join("p2pkhindex_to_p2pkhindex"), - Version::ZERO, - compressed, - )?, - p2shindex_to_p2shindex: EagerVec::forced_import( - &path.join("p2shindex_to_p2shindex"), - Version::ZERO, - compressed, - )?, - p2trindex_to_p2trindex: EagerVec::forced_import( - &path.join("p2trindex_to_p2trindex"), - Version::ZERO, - compressed, - )?, - p2wpkhindex_to_p2wpkhindex: EagerVec::forced_import( - &path.join("p2wpkhindex_to_p2wpkhindex"), - Version::ZERO, - compressed, - )?, - p2wshindex_to_p2wshindex: EagerVec::forced_import( - &path.join("p2wshindex_to_p2wshindex"), - Version::ZERO, - compressed, - )?, - txindex_to_txindex: EagerVec::forced_import( - &path.join("txindex_to_txindex"), - Version::ZERO, - compressed, - )?, - inputindex_to_inputindex: EagerVec::forced_import( - &path.join("inputindex_to_inputindex"), - Version::ZERO, - compressed, - )?, - emptyoutputindex_to_emptyoutputindex: EagerVec::forced_import( - &path.join("emptyoutputindex_to_emptyoutputindex"), - Version::ZERO, - compressed, - )?, - p2msindex_to_p2msindex: EagerVec::forced_import( - &path.join("p2msindex_to_p2msindex"), - Version::ZERO, - compressed, - )?, - opreturnindex_to_opreturnindex: EagerVec::forced_import( - &path.join("opreturnindex_to_opreturnindex"), - Version::ZERO, - compressed, - )?, - p2aindex_to_p2aindex: EagerVec::forced_import( - &path.join("p2aindex_to_p2aindex"), - Version::ZERO, - compressed, - )?, - unknownoutputindex_to_unknownoutputindex: EagerVec::forced_import( - &path.join("unknownoutputindex_to_unknownoutputindex"), - Version::ZERO, - compressed, - )?, - outputindex_to_outputindex: EagerVec::forced_import( - &path.join("outputindex_to_outputindex"), - Version::ZERO, - compressed, - )?, height_to_txindex_count: EagerVec::forced_import( &path.join("height_to_txindex_count"), Version::ZERO, @@ -371,119 +561,58 @@ impl Vecs { // OutputIndex // --- - self.outputindex_to_outputindex.compute_range( - starting_indexes.outputindex, - &indexer_vecs.outputindex_to_value, - |i| (i, i), - exit, - )?; + self.outputindex_to_outputindex + .compute_if_necessary(starting_indexes.outputindex, exit)?; - self.p2pk33index_to_p2pk33index.compute_range( - starting_indexes.p2pk33index, - &indexer_vecs.p2pk33index_to_p2pk33bytes, - |i| (i, i), - exit, - )?; + self.p2pk33index_to_p2pk33index + .compute_if_necessary(starting_indexes.p2pk33index, exit)?; - self.p2pk65index_to_p2pk65index.compute_range( - starting_indexes.p2pk65index, - &indexer_vecs.p2pk65index_to_p2pk65bytes, - |i| (i, i), - exit, - )?; + self.p2pk65index_to_p2pk65index + .compute_if_necessary(starting_indexes.p2pk65index, exit)?; - self.p2pkhindex_to_p2pkhindex.compute_range( - starting_indexes.p2pkhindex, - &indexer_vecs.p2pkhindex_to_p2pkhbytes, - |i| (i, i), - exit, - )?; + self.p2pkhindex_to_p2pkhindex + .compute_if_necessary(starting_indexes.p2pkhindex, exit)?; - self.p2shindex_to_p2shindex.compute_range( - starting_indexes.p2shindex, - &indexer_vecs.p2shindex_to_p2shbytes, - |i| (i, i), - exit, - )?; + self.p2shindex_to_p2shindex + .compute_if_necessary(starting_indexes.p2shindex, exit)?; - self.p2trindex_to_p2trindex.compute_range( - starting_indexes.p2trindex, - &indexer_vecs.p2trindex_to_p2trbytes, - |i| (i, i), - exit, - )?; + self.p2trindex_to_p2trindex + .compute_if_necessary(starting_indexes.p2trindex, exit)?; - self.p2wpkhindex_to_p2wpkhindex.compute_range( - starting_indexes.p2wpkhindex, - &indexer_vecs.p2wpkhindex_to_p2wpkhbytes, - |i| (i, i), - exit, - )?; + self.p2wpkhindex_to_p2wpkhindex + .compute_if_necessary(starting_indexes.p2wpkhindex, exit)?; - self.p2wshindex_to_p2wshindex.compute_range( - starting_indexes.p2wshindex, - &indexer_vecs.p2wshindex_to_p2wshbytes, - |i| (i, i), - exit, - )?; + self.p2wshindex_to_p2wshindex + .compute_if_necessary(starting_indexes.p2wshindex, exit)?; - self.emptyoutputindex_to_emptyoutputindex.compute_range( - starting_indexes.emptyoutputindex, - &indexer_vecs.emptyoutputindex_to_txindex, - |i| (i, i), - exit, - )?; + self.emptyoutputindex_to_emptyoutputindex + .compute_if_necessary(starting_indexes.emptyoutputindex, exit)?; - self.p2msindex_to_p2msindex.compute_range( - starting_indexes.p2msindex, - &indexer_vecs.p2msindex_to_txindex, - |i| (i, i), - exit, - )?; + self.p2msindex_to_p2msindex + .compute_if_necessary(starting_indexes.p2msindex, exit)?; - self.opreturnindex_to_opreturnindex.compute_range( - starting_indexes.opreturnindex, - &indexer_vecs.opreturnindex_to_txindex, - |i| (i, i), - exit, - )?; + self.opreturnindex_to_opreturnindex + .compute_if_necessary(starting_indexes.opreturnindex, exit)?; - self.p2aindex_to_p2aindex.compute_range( - starting_indexes.p2aindex, - &indexer_vecs.p2aindex_to_p2abytes, - |i| (i, i), - exit, - )?; + self.p2aindex_to_p2aindex + .compute_if_necessary(starting_indexes.p2aindex, exit)?; self.unknownoutputindex_to_unknownoutputindex - .compute_range( - starting_indexes.unknownoutputindex, - &indexer_vecs.unknownoutputindex_to_txindex, - |i| (i, i), - exit, - )?; + .compute_if_necessary(starting_indexes.unknownoutputindex, exit)?; // --- // InputIndex // --- - self.inputindex_to_inputindex.compute_range( - starting_indexes.inputindex, - &indexer_vecs.inputindex_to_outputindex, - |i| (i, i), - exit, - )?; + self.inputindex_to_inputindex + .compute_if_necessary(starting_indexes.inputindex, exit)?; // --- // TxIndex // --- - self.txindex_to_txindex.compute_range( - starting_indexes.txindex, - &indexer_vecs.txindex_to_txid, - |i| (i, i), - exit, - )?; + self.txindex_to_txindex + .compute_if_necessary(starting_indexes.txindex, exit)?; self.height_to_txindex_count.compute_count_from_indexes( starting_indexes.height, @@ -503,12 +632,8 @@ impl Vecs { // Height // --- - self.height_to_height.compute_range( - starting_indexes.height, - &indexer_vecs.height_to_timestamp, - |h| (h, h), - exit, - )?; + self.height_to_height + .compute_if_necessary(starting_indexes.height, exit)?; self.height_to_date.compute_transform( starting_indexes.height, @@ -526,7 +651,7 @@ impl Vecs { if let Some(prev_h) = h.decremented() { prev_timestamp_fixed.replace( height_to_timestamp_fixed_iter - .iter() + .into_iter() .unwrap_get_inner(prev_h), ); } @@ -554,7 +679,7 @@ impl Vecs { let starting_dateindex = self .height_to_dateindex - .iter() + .into_iter() .get_inner(decremented_starting_height) .unwrap_or_default(); @@ -567,7 +692,7 @@ impl Vecs { let starting_dateindex = if let Some(dateindex) = self .height_to_dateindex - .iter() + .into_iter() .get_inner(decremented_starting_height) { starting_dateindex.min(dateindex) @@ -582,12 +707,8 @@ impl Vecs { exit, )?; - self.dateindex_to_dateindex.compute_range( - starting_dateindex, - &self.dateindex_to_first_height, - |di| (di, di), - exit, - )?; + self.dateindex_to_dateindex + .compute_if_necessary(starting_dateindex, exit)?; self.dateindex_to_date .compute_if_necessary(starting_dateindex, exit)?; @@ -605,26 +726,22 @@ impl Vecs { let starting_weekindex = self .dateindex_to_weekindex - .iter() + .into_iter() .get_inner(starting_dateindex) .unwrap_or_default(); self.dateindex_to_weekindex.compute_range( starting_dateindex, &self.dateindex_to_dateindex, - |di| (di, WeekIndex::from(di)), + |i| (i, WeekIndex::from(i)), exit, )?; self.weekindex_to_first_dateindex .compute_inverse_more_to_less(starting_dateindex, &self.dateindex_to_weekindex, exit)?; - self.weekindex_to_weekindex.compute_range( - starting_weekindex, - &self.weekindex_to_first_dateindex, - |wi| (wi, wi), - exit, - )?; + self.weekindex_to_weekindex + .compute_if_necessary(starting_weekindex, exit)?; self.weekindex_to_dateindex_count .compute_count_from_indexes( @@ -640,16 +757,12 @@ impl Vecs { let starting_difficultyepoch = self .height_to_difficultyepoch - .iter() + .into_iter() .get_inner(decremented_starting_height) .unwrap_or_default(); - self.height_to_difficultyepoch.compute_range( - starting_indexes.height, - &self.height_to_height, - |h| (h, DifficultyEpoch::from(h)), - exit, - )?; + self.height_to_difficultyepoch + .compute_if_necessary(starting_indexes.height, exit)?; self.difficultyepoch_to_first_height .compute_inverse_more_to_less( @@ -658,12 +771,8 @@ impl Vecs { exit, )?; - self.difficultyepoch_to_difficultyepoch.compute_range( - starting_difficultyepoch, - &self.difficultyepoch_to_first_height, - |i| (i, i), - exit, - )?; + self.difficultyepoch_to_difficultyepoch + .compute_if_necessary(starting_difficultyepoch, exit)?; self.difficultyepoch_to_height_count .compute_count_from_indexes( @@ -679,14 +788,14 @@ impl Vecs { let starting_monthindex = self .dateindex_to_monthindex - .iter() + .into_iter() .get_inner(starting_dateindex) .unwrap_or_default(); self.dateindex_to_monthindex.compute_range( starting_dateindex, &self.dateindex_to_dateindex, - |di| (di, MonthIndex::from(di)), + |i| (i, MonthIndex::from(i)), exit, )?; @@ -697,12 +806,8 @@ impl Vecs { exit, )?; - self.monthindex_to_monthindex.compute_range( - starting_monthindex, - &self.monthindex_to_first_dateindex, - |mi| (mi, mi), - exit, - )?; + self.monthindex_to_monthindex + .compute_if_necessary(starting_monthindex, exit)?; self.monthindex_to_dateindex_count .compute_count_from_indexes( @@ -718,16 +823,12 @@ impl Vecs { let starting_quarterindex = self .monthindex_to_quarterindex - .iter() + .into_iter() .get_inner(starting_monthindex) .unwrap_or_default(); - self.monthindex_to_quarterindex.compute_range( - starting_monthindex, - &self.monthindex_to_monthindex, - |mi| (mi, QuarterIndex::from(mi)), - exit, - )?; + self.monthindex_to_quarterindex + .compute_if_necessary(starting_monthindex, exit)?; self.quarterindex_to_first_monthindex .compute_inverse_more_to_less( @@ -738,12 +839,8 @@ impl Vecs { // let quarter_count = self.quarterindex_to_first_monthindex.len(); - self.quarterindex_to_quarterindex.compute_range( - starting_quarterindex, - &self.quarterindex_to_first_monthindex, - |i| (i, i), - exit, - )?; + self.quarterindex_to_quarterindex + .compute_if_necessary(starting_quarterindex, exit)?; self.quarterindex_to_monthindex_count .compute_count_from_indexes( @@ -759,16 +856,12 @@ impl Vecs { let starting_yearindex = self .monthindex_to_yearindex - .iter() + .into_iter() .get_inner(starting_monthindex) .unwrap_or_default(); - self.monthindex_to_yearindex.compute_range( - starting_monthindex, - &self.monthindex_to_monthindex, - |i| (i, YearIndex::from(i)), - exit, - )?; + self.monthindex_to_yearindex + .compute_if_necessary(starting_monthindex, exit)?; self.yearindex_to_first_monthindex .compute_inverse_more_to_less( @@ -777,12 +870,8 @@ impl Vecs { exit, )?; - self.yearindex_to_yearindex.compute_range( - starting_yearindex, - &self.yearindex_to_first_monthindex, - |i| (i, i), - exit, - )?; + self.yearindex_to_yearindex + .compute_if_necessary(starting_yearindex, exit)?; self.yearindex_to_monthindex_count .compute_count_from_indexes( @@ -797,16 +886,12 @@ impl Vecs { let starting_halvingepoch = self .height_to_halvingepoch - .iter() + .into_iter() .get_inner(decremented_starting_height) .unwrap_or_default(); - self.height_to_halvingepoch.compute_range( - starting_indexes.height, - &self.height_to_height, - |h| (h, HalvingEpoch::from(h)), - exit, - )?; + self.height_to_halvingepoch + .compute_if_necessary(starting_indexes.height, exit)?; self.halvingepoch_to_first_height .compute_inverse_more_to_less( @@ -815,12 +900,8 @@ impl Vecs { exit, )?; - self.halvingepoch_to_halvingepoch.compute_range( - starting_halvingepoch, - &self.halvingepoch_to_first_height, - |i| (i, i), - exit, - )?; + self.halvingepoch_to_halvingepoch + .compute_if_necessary(starting_halvingepoch, exit)?; // --- // DecadeIndex @@ -828,16 +909,12 @@ impl Vecs { let starting_decadeindex = self .yearindex_to_decadeindex - .iter() + .into_iter() .get_inner(starting_yearindex) .unwrap_or_default(); - self.yearindex_to_decadeindex.compute_range( - starting_yearindex, - &self.yearindex_to_yearindex, - |i| (i, DecadeIndex::from(i)), - exit, - )?; + self.yearindex_to_decadeindex + .compute_if_necessary(starting_yearindex, exit)?; self.decadeindex_to_first_yearindex .compute_inverse_more_to_less( @@ -846,12 +923,8 @@ impl Vecs { exit, )?; - self.decadeindex_to_decadeindex.compute_range( - starting_decadeindex, - &self.decadeindex_to_first_yearindex, - |i| (i, i), - exit, - )?; + self.decadeindex_to_decadeindex + .compute_if_necessary(starting_decadeindex, exit)?; self.decadeindex_to_yearindex_count .compute_count_from_indexes( diff --git a/crates/brk_computer/src/storage/vecs/mod.rs b/crates/brk_computer/src/storage/vecs/mod.rs index d3ace65f8..bd88b93ca 100644 --- a/crates/brk_computer/src/storage/vecs/mod.rs +++ b/crates/brk_computer/src/storage/vecs/mod.rs @@ -35,7 +35,7 @@ impl Vecs { Ok(Self { // blocks: blocks::Vecs::forced_import(path, computation, compressed)?, - indexes: indexes::Vecs::forced_import(path, computation, compressed)?, + indexes: indexes::Vecs::forced_import(path, indexer, computation, compressed)?, // mining: mining::Vecs::forced_import(path, computation, compressed)?, // transactions: transactions::Vecs::forced_import( // path, diff --git a/crates/brk_server/Cargo.toml b/crates/brk_server/Cargo.toml index b81784558..479582d8e 100644 --- a/crates/brk_server/Cargo.toml +++ b/crates/brk_server/Cargo.toml @@ -23,7 +23,7 @@ color-eyre = { workspace = true } jiff = { workspace = true } log = { workspace = true } minreq = { workspace = true } -oxc = { version = "0.67.0", features = ["codegen", "minifier"] } +oxc = { version = "0.68.1", features = ["codegen", "minifier"] } serde = { workspace = true } tokio = { version = "1.44.2", features = ["full"] } tower-http = { version = "0.6.2", features = ["compression-full", "trace"] } diff --git a/crates/brk_server/src/files/minify.rs b/crates/brk_server/src/files/minify.rs index d591e3e82..92d01d452 100644 --- a/crates/brk_server/src/files/minify.rs +++ b/crates/brk_server/src/files/minify.rs @@ -4,7 +4,7 @@ use std::{fs, path::Path}; use oxc::{ allocator::Allocator, - codegen::{CodeGenerator, CodegenOptions, LegalComment}, + codegen::{Codegen, CodegenOptions, LegalComment}, minifier::{CompressOptions, MangleOptions, Minifier, MinifierOptions}, parser::Parser, span::SourceType, @@ -26,7 +26,7 @@ pub fn minify_js(path: &Path) -> String { }) .build(&allocator, &mut program); - CodeGenerator::new() + Codegen::new() .with_options(CodegenOptions { minify: true, single_quote: false, diff --git a/crates/brk_vec/src/variants/computed.rs b/crates/brk_vec/src/variants/computed.rs index c9147e7e1..881a26400 100644 --- a/crates/brk_vec/src/variants/computed.rs +++ b/crates/brk_vec/src/variants/computed.rs @@ -36,11 +36,11 @@ impl Computation { } #[derive(Clone)] -pub enum Dependencies { - From1(BoxedAnyIterableVec, ComputeFrom1), +pub enum Dependencies { + From1(BoxedAnyIterableVec, ComputeFrom1), From2( (BoxedAnyIterableVec, BoxedAnyIterableVec), - ComputeFrom2, + ComputeFrom2, ), From3( ( @@ -48,7 +48,7 @@ pub enum Dependencies { BoxedAnyIterableVec, BoxedAnyIterableVec, ), - ComputeFrom3, + ComputeFrom3, ), } @@ -63,7 +63,7 @@ pub type ComputedVecFrom3 = pub enum ComputedVec { Eager { vec: EagerVec, - deps: Dependencies, + deps: Dependencies, }, LazyFrom1(LazyVecFrom1), LazyFrom2(LazyVecFrom2), @@ -88,7 +88,7 @@ where version: Version, compressed: Compressed, source: BoxedAnyIterableVec, - compute: ComputeFrom1, + compute: ComputeFrom1, ) -> Result { Ok(match mode { Computation::Eager => Self::Eager { @@ -110,7 +110,7 @@ where compressed: Compressed, source1: BoxedAnyIterableVec, source2: BoxedAnyIterableVec, - compute: ComputeFrom2, + compute: ComputeFrom2, ) -> Result { Ok(match mode { Computation::Eager => Self::Eager { @@ -133,7 +133,7 @@ where source1: BoxedAnyIterableVec, source2: BoxedAnyIterableVec, source3: BoxedAnyIterableVec, - compute: ComputeFrom3, + compute: ComputeFrom3, ) -> Result { Ok(match mode { Computation::Eager => Self::Eager { @@ -161,11 +161,7 @@ where Dependencies::From1(source, compute) => { let version = source.version(); let mut iter = source.iter(); - let t = |i: I| { - compute(i.unwrap_to_usize(), &mut *iter) - .map(|v| (i, v)) - .unwrap() - }; + let t = |i: I| compute(i, &mut *iter).map(|v| (i, v)).unwrap(); vec.compute_to(max_from, 1, version, t, exit) } Dependencies::From2((source1, source2), compute) => { @@ -173,7 +169,7 @@ where let mut iter1 = source1.iter(); let mut iter2 = source2.iter(); let t = |i: I| { - compute(i.unwrap_to_usize(), &mut *iter1, &mut *iter2) + compute(i, &mut *iter1, &mut *iter2) .map(|v| (i, v)) .unwrap() }; @@ -185,7 +181,7 @@ where let mut iter2 = source2.iter(); let mut iter3 = source3.iter(); let t = |i: I| { - compute(i.unwrap_to_usize(), &mut *iter1, &mut *iter2, &mut *iter3) + compute(i, &mut *iter1, &mut *iter2, &mut *iter3) .map(|v| (i, v)) .unwrap() }; diff --git a/crates/brk_vec/src/variants/eager.rs b/crates/brk_vec/src/variants/eager.rs index 92342ab60..ee1087f87 100644 --- a/crates/brk_vec/src/variants/eager.rs +++ b/crates/brk_vec/src/variants/eager.rs @@ -84,41 +84,6 @@ where Ok(()) } - pub fn version(&self) -> Version { - self.computed_version.unwrap() - } - - pub fn len(&self) -> usize { - self.inner.len() - } - pub fn is_empty(&self) -> bool { - self.inner.is_empty() - } - - pub fn name(&self) -> String { - self.inner.name() - } - - pub fn modified_time(&self) -> Result { - self.inner.modified_time() - } - - // pub fn vec(&self) -> &StoredVec { - // &self.inner - // } - - // pub fn mut_vec(&mut self) -> &StoredVec { - // &mut self.inner - // } - - // pub fn any_vec(&self) -> &dyn AnyVec { - // &self.inner - // } - - // pub fn mut_any_vec(&mut self) -> &mut dyn AnyVec { - // &mut self.inner - // } - pub fn path(&self) -> &Path { self.inner.path() } @@ -134,6 +99,7 @@ where self.inner.reset()?; } version.write(path.as_ref())?; + self.computed_version = Some(version); if self.is_empty() { info!("Computing {}...", self.name()) @@ -142,10 +108,6 @@ where Ok(()) } - pub fn iter(&self) -> StoredVecIterator { - self.into_iter() - } - pub fn compute_to( &mut self, max_from: I, @@ -541,7 +503,7 @@ where { #[inline] fn version(&self) -> Version { - self.inner.version() + self.computed_version.unwrap() } #[inline] diff --git a/crates/brk_vec/src/variants/lazy1.rs b/crates/brk_vec/src/variants/lazy1.rs index 9121dd378..5ff97c3f2 100644 --- a/crates/brk_vec/src/variants/lazy1.rs +++ b/crates/brk_vec/src/variants/lazy1.rs @@ -5,15 +5,15 @@ use crate::{ BoxedVecIterator, CollectableVec, Result, StoredIndex, StoredType, Value, Version, }; -pub type ComputeFrom1 = - for<'a> fn(usize, &mut dyn BaseVecIterator)>) -> Option; +pub type ComputeFrom1 = + for<'a> fn(I, &mut dyn BaseVecIterator)>) -> Option; #[derive(Clone)] pub struct LazyVecFrom1 { name: String, version: Version, source: BoxedAnyIterableVec, - compute: ComputeFrom1, + compute: ComputeFrom1, phantom: PhantomData, } @@ -28,7 +28,7 @@ where name: &str, version: Version, source: BoxedAnyIterableVec, - compute: ComputeFrom1, + compute: ComputeFrom1, ) -> Self { Self { name: name.to_owned(), @@ -60,8 +60,8 @@ where type Item = (I, Value<'a, T>); fn next(&mut self) -> Option { - let opt = (self.lazy.compute)(self.index, &mut *self.source) - .map(|v| (I::from(self.index), Value::Owned(v))); + let index = I::from(self.index); + let opt = (self.lazy.compute)(index, &mut *self.source).map(|v| (index, Value::Owned(v))); if opt.is_some() { self.index += 1; } diff --git a/crates/brk_vec/src/variants/lazy2.rs b/crates/brk_vec/src/variants/lazy2.rs index 18dc4ba42..16ecd6b03 100644 --- a/crates/brk_vec/src/variants/lazy2.rs +++ b/crates/brk_vec/src/variants/lazy2.rs @@ -5,8 +5,8 @@ use crate::{ BoxedVecIterator, CollectableVec, Result, StoredIndex, StoredType, Value, Version, }; -pub type ComputeFrom2 = for<'a> fn( - usize, +pub type ComputeFrom2 = for<'a> fn( + I, &mut dyn BaseVecIterator)>, &mut dyn BaseVecIterator)>, ) -> Option; @@ -17,7 +17,7 @@ pub struct LazyVecFrom2 { version: Version, source1: BoxedAnyIterableVec, source2: BoxedAnyIterableVec, - compute: ComputeFrom2, + compute: ComputeFrom2, phantom: PhantomData, } @@ -35,7 +35,7 @@ where version: Version, source1: BoxedAnyIterableVec, source2: BoxedAnyIterableVec, - compute: ComputeFrom2, + compute: ComputeFrom2, ) -> Self { Self { name: name.to_string(), @@ -71,8 +71,9 @@ where type Item = (I, Value<'a, T>); fn next(&mut self) -> Option { - let opt = (self.lazy.compute)(self.index, &mut *self.source1, &mut *self.source2) - .map(|v| (I::from(self.index), Value::Owned(v))); + let index = I::from(self.index); + let opt = (self.lazy.compute)(index, &mut *self.source1, &mut *self.source2) + .map(|v| (index, Value::Owned(v))); if opt.is_some() { self.index += 1; } diff --git a/crates/brk_vec/src/variants/lazy3.rs b/crates/brk_vec/src/variants/lazy3.rs index f512bc6f9..fad727ac5 100644 --- a/crates/brk_vec/src/variants/lazy3.rs +++ b/crates/brk_vec/src/variants/lazy3.rs @@ -5,8 +5,8 @@ use crate::{ BoxedVecIterator, CollectableVec, Result, StoredIndex, StoredType, Value, Version, }; -pub type ComputeFrom3 = for<'a> fn( - usize, +pub type ComputeFrom3 = for<'a> fn( + I, &mut dyn BaseVecIterator)>, &mut dyn BaseVecIterator)>, &mut dyn BaseVecIterator)>, @@ -19,7 +19,7 @@ pub struct LazyVecFrom3 { source1: BoxedAnyIterableVec, source2: BoxedAnyIterableVec, source3: BoxedAnyIterableVec, - compute: ComputeFrom3, + compute: ComputeFrom3, phantom: PhantomData, } @@ -40,7 +40,7 @@ where source1: BoxedAnyIterableVec, source2: BoxedAnyIterableVec, source3: BoxedAnyIterableVec, - compute: ComputeFrom3, + compute: ComputeFrom3, ) -> Self { Self { name: name.to_string(), @@ -81,13 +81,14 @@ where type Item = (I, Value<'a, T>); fn next(&mut self) -> Option { + let index = I::from(self.index); let opt = (self.lazy.compute)( - self.index, + index, &mut *self.source1, &mut *self.source2, &mut *self.source3, ) - .map(|v| (I::from(self.index), Value::Owned(v))); + .map(|v| (index, Value::Owned(v))); if opt.is_some() { self.index += 1; } diff --git a/crates/brk_vec/src/variants/raw.rs b/crates/brk_vec/src/variants/raw.rs index a71868c19..4b6063dce 100644 --- a/crates/brk_vec/src/variants/raw.rs +++ b/crates/brk_vec/src/variants/raw.rs @@ -163,11 +163,6 @@ where Ok(()) } - - // #[inline] - // fn version(&self) -> Version { - // self.version - // } } impl AnyVec for RawVec diff --git a/update.sh b/update.sh index 0d75c46c1..d6951dfc1 100755 --- a/update.sh +++ b/update.sh @@ -4,4 +4,4 @@ cargo clean rustup update cargo upgrade --incompatible cargo update -cargo build -r --all-targets +cargo build --all-targets diff --git a/websites/kibo.money/scripts/vecid-to-indexes.js b/websites/kibo.money/scripts/vecid-to-indexes.js index 7317a0dc4..bfeee3fe2 100644 --- a/websites/kibo.money/scripts/vecid-to-indexes.js +++ b/websites/kibo.money/scripts/vecid-to-indexes.js @@ -57,110 +57,15 @@ export function createVecIdToIndexes() { return /** @type {const} */ ({ "base-size": [TxIndex], - "block-count": [Height], - "block-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-interval-10p": [DateIndex], - "block-interval-25p": [DateIndex], - "block-interval-75p": [DateIndex], - "block-interval-90p": [DateIndex], - "block-interval-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-interval-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-interval-median": [DateIndex], - "block-interval-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-size-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-vbytes-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "block-weight-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], blockhash: [Height], - close: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "close-in-cents": [DateIndex, Height], - "close-in-sats": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - coinbase: [Height], - "coinbase-10p": [DateIndex], - "coinbase-25p": [DateIndex], - "coinbase-75p": [DateIndex], - "coinbase-90p": [DateIndex], - "coinbase-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-btc": [Height], - "coinbase-in-btc-10p": [DateIndex], - "coinbase-in-btc-25p": [DateIndex], - "coinbase-in-btc-75p": [DateIndex], - "coinbase-in-btc-90p": [DateIndex], - "coinbase-in-btc-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-btc-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-btc-median": [DateIndex], - "coinbase-in-btc-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-btc-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-usd": [Height], - "coinbase-in-usd-10p": [DateIndex], - "coinbase-in-usd-25p": [DateIndex], - "coinbase-in-usd-75p": [DateIndex], - "coinbase-in-usd-90p": [DateIndex], - "coinbase-in-usd-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-usd-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-usd-median": [DateIndex], - "coinbase-in-usd-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-in-usd-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-median": [DateIndex], - "coinbase-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "coinbase-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], date: [DateIndex, Height], "date-fixed": [Height], dateindex: [DateIndex, Height], "dateindex-count": [MonthIndex, WeekIndex], decadeindex: [DecadeIndex, YearIndex], - difficulty: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - difficultyepoch: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "emptyoutput-count": [Height], - "emptyoutput-count-10p": [DateIndex], - "emptyoutput-count-25p": [DateIndex], - "emptyoutput-count-75p": [DateIndex], - "emptyoutput-count-90p": [DateIndex], - "emptyoutput-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "emptyoutput-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "emptyoutput-count-median": [DateIndex], - "emptyoutput-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "emptyoutput-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], + difficulty: [Height], + difficultyepoch: [DifficultyEpoch, Height], emptyoutputindex: [EmptyOutputIndex], - fee: [TxIndex], - "fee-10p": [Height], - "fee-25p": [Height], - "fee-75p": [Height], - "fee-90p": [Height], - "fee-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-btc": [TxIndex], - "fee-in-btc-10p": [Height], - "fee-in-btc-25p": [Height], - "fee-in-btc-75p": [Height], - "fee-in-btc-90p": [Height], - "fee-in-btc-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-btc-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-btc-median": [Height], - "fee-in-btc-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-btc-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-usd": [TxIndex], - "fee-in-usd-10p": [Height], - "fee-in-usd-25p": [Height], - "fee-in-usd-75p": [Height], - "fee-in-usd-90p": [Height], - "fee-in-usd-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-usd-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-usd-median": [Height], - "fee-in-usd-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-in-usd-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-median": [Height], - "fee-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "fee-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - feerate: [TxIndex], - "feerate-10p": [Height], - "feerate-25p": [Height], - "feerate-75p": [Height], - "feerate-90p": [Height], - "feerate-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "feerate-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "feerate-median": [Height], - "feerate-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], "first-dateindex": [MonthIndex, WeekIndex], "first-emptyoutputindex": [Height], "first-height": [DateIndex, DifficultyEpoch, HalvingEpoch], @@ -180,294 +85,47 @@ export function createVecIdToIndexes() { "first-txindex": [Height], "first-unknownoutputindex": [Height], "first-yearindex": [DecadeIndex], - halvingepoch: [DateIndex, DecadeIndex, HalvingEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], + halvingepoch: [HalvingEpoch, Height], height: [Height, TxIndex], "height-count": [DateIndex, DifficultyEpoch], - high: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "high-in-cents": [DateIndex, Height], - "high-in-sats": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-count": [TxIndex], - "input-count-10p": [Height], - "input-count-25p": [Height], - "input-count-75p": [Height], - "input-count-90p": [Height], - "input-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-count-median": [Height], - "input-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-value": [TxIndex], - "input-value-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "input-value-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], inputindex: [InputIndex], - interval: [Height], - "is-coinbase": [TxIndex], "is-explicitly-rbf": [TxIndex], - low: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "low-in-cents": [DateIndex, Height], - "low-in-sats": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], monthindex: [DateIndex, MonthIndex], "monthindex-count": [QuarterIndex, YearIndex], - ohlc: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "ohlc-in-cents": [DateIndex, Height], - "ohlc-in-sats": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - open: [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "open-in-cents": [DateIndex, Height], - "open-in-sats": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "opreturn-count": [Height], - "opreturn-count-10p": [DateIndex], - "opreturn-count-25p": [DateIndex], - "opreturn-count-75p": [DateIndex], - "opreturn-count-90p": [DateIndex], - "opreturn-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "opreturn-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "opreturn-count-median": [DateIndex], - "opreturn-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "opreturn-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], opreturnindex: [OpReturnIndex], - "output-count": [TxIndex], - "output-count-10p": [Height], - "output-count-25p": [Height], - "output-count-75p": [Height], - "output-count-90p": [Height], - "output-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "output-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "output-count-median": [Height], - "output-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "output-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "output-value": [TxIndex], - "output-value-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "output-value-sum": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], outputindex: [InputIndex, OutputIndex], outputtype: [OutputIndex], outputtypeindex: [OutputIndex], - "p2a-count": [Height], - "p2a-count-10p": [DateIndex], - "p2a-count-25p": [DateIndex], - "p2a-count-75p": [DateIndex], - "p2a-count-90p": [DateIndex], - "p2a-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2a-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2a-count-median": [DateIndex], - "p2a-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2a-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2abytes: [P2AIndex], p2aindex: [P2AIndex], - "p2ms-count": [Height], - "p2ms-count-10p": [DateIndex], - "p2ms-count-25p": [DateIndex], - "p2ms-count-75p": [DateIndex], - "p2ms-count-90p": [DateIndex], - "p2ms-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2ms-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2ms-count-median": [DateIndex], - "p2ms-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2ms-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2msindex: [P2MSIndex], - "p2pk33-count": [Height], - "p2pk33-count-10p": [DateIndex], - "p2pk33-count-25p": [DateIndex], - "p2pk33-count-75p": [DateIndex], - "p2pk33-count-90p": [DateIndex], - "p2pk33-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk33-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk33-count-median": [DateIndex], - "p2pk33-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk33-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2pk33bytes: [P2PK33Index], p2pk33index: [P2PK33Index], - "p2pk65-count": [Height], - "p2pk65-count-10p": [DateIndex], - "p2pk65-count-25p": [DateIndex], - "p2pk65-count-75p": [DateIndex], - "p2pk65-count-90p": [DateIndex], - "p2pk65-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk65-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk65-count-median": [DateIndex], - "p2pk65-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pk65-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2pk65bytes: [P2PK65Index], p2pk65index: [P2PK65Index], - "p2pkh-count": [Height], - "p2pkh-count-10p": [DateIndex], - "p2pkh-count-25p": [DateIndex], - "p2pkh-count-75p": [DateIndex], - "p2pkh-count-90p": [DateIndex], - "p2pkh-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pkh-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pkh-count-median": [DateIndex], - "p2pkh-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2pkh-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2pkhbytes: [P2PKHIndex], p2pkhindex: [P2PKHIndex], - "p2sh-count": [Height], - "p2sh-count-10p": [DateIndex], - "p2sh-count-25p": [DateIndex], - "p2sh-count-75p": [DateIndex], - "p2sh-count-90p": [DateIndex], - "p2sh-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2sh-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2sh-count-median": [DateIndex], - "p2sh-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2sh-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2shbytes: [P2SHIndex], p2shindex: [P2SHIndex], - "p2tr-count": [Height], - "p2tr-count-10p": [DateIndex], - "p2tr-count-25p": [DateIndex], - "p2tr-count-75p": [DateIndex], - "p2tr-count-90p": [DateIndex], - "p2tr-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2tr-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2tr-count-median": [DateIndex], - "p2tr-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2tr-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2trbytes: [P2TRIndex], p2trindex: [P2TRIndex], - "p2wpkh-count": [Height], - "p2wpkh-count-10p": [DateIndex], - "p2wpkh-count-25p": [DateIndex], - "p2wpkh-count-75p": [DateIndex], - "p2wpkh-count-90p": [DateIndex], - "p2wpkh-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wpkh-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wpkh-count-median": [DateIndex], - "p2wpkh-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wpkh-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2wpkhbytes: [P2WPKHIndex], p2wpkhindex: [P2WPKHIndex], - "p2wsh-count": [Height], - "p2wsh-count-10p": [DateIndex], - "p2wsh-count-25p": [DateIndex], - "p2wsh-count-75p": [DateIndex], - "p2wsh-count-90p": [DateIndex], - "p2wsh-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wsh-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wsh-count-median": [DateIndex], - "p2wsh-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "p2wsh-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], p2wshbytes: [P2WSHIndex], p2wshindex: [P2WSHIndex], quarterindex: [MonthIndex, QuarterIndex], rawlocktime: [TxIndex], - subsidy: [Height], - "subsidy-10p": [DateIndex], - "subsidy-25p": [DateIndex], - "subsidy-75p": [DateIndex], - "subsidy-90p": [DateIndex], - "subsidy-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-btc": [Height], - "subsidy-in-btc-10p": [DateIndex], - "subsidy-in-btc-25p": [DateIndex], - "subsidy-in-btc-75p": [DateIndex], - "subsidy-in-btc-90p": [DateIndex], - "subsidy-in-btc-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-btc-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-btc-median": [DateIndex], - "subsidy-in-btc-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-btc-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-usd": [Height], - "subsidy-in-usd-10p": [DateIndex], - "subsidy-in-usd-25p": [DateIndex], - "subsidy-in-usd-75p": [DateIndex], - "subsidy-in-usd-90p": [DateIndex], - "subsidy-in-usd-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-usd-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-usd-median": [DateIndex], - "subsidy-in-usd-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-in-usd-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-median": [DateIndex], - "subsidy-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "subsidy-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - timestamp: [DateIndex, DecadeIndex, DifficultyEpoch, HalvingEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], + timestamp: [Height], "timestamp-fixed": [Height], - "total-block-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-block-size": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-block-vbytes": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-block-weight": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-coinbase": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-coinbase-in-btc": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-coinbase-in-usd": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-emptyoutput-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-fee": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-fee-in-btc": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-fee-in-usd": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-input-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-input-value": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-opreturn-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-output-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-output-value": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2a-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2ms-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2pk33-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2pk65-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2pkh-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2sh-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2tr-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2wpkh-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-p2wsh-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], "total-size": [Height, TxIndex], - "total-subsidy": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-subsidy-in-btc": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-subsidy-in-usd": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-tx-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-tx-v1": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-tx-v2": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-tx-v3": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "total-unknownoutput-count": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-count": [Height], - "tx-count-10p": [DateIndex], - "tx-count-25p": [DateIndex], - "tx-count-75p": [DateIndex], - "tx-count-90p": [DateIndex], - "tx-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-count-median": [DateIndex], - "tx-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-v1": [Height], - "tx-v1-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-v2": [Height], - "tx-v2-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-v3": [Height], - "tx-v3-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-vsize-10p": [Height], - "tx-vsize-25p": [Height], - "tx-vsize-75p": [Height], - "tx-vsize-90p": [Height], - "tx-vsize-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-vsize-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-vsize-median": [Height], - "tx-vsize-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-weight-10p": [Height], - "tx-weight-25p": [Height], - "tx-weight-75p": [Height], - "tx-weight-90p": [Height], - "tx-weight-average": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-weight-max": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "tx-weight-median": [Height], - "tx-weight-min": [DateIndex, DecadeIndex, DifficultyEpoch, Height, MonthIndex, QuarterIndex, WeekIndex, YearIndex], txid: [TxIndex], txindex: [EmptyOutputIndex, OpReturnIndex, P2MSIndex, TxIndex, UnknownOutputIndex], "txindex-count": [Height], txversion: [TxIndex], - "unknownoutput-count": [Height], - "unknownoutput-count-10p": [DateIndex], - "unknownoutput-count-25p": [DateIndex], - "unknownoutput-count-75p": [DateIndex], - "unknownoutput-count-90p": [DateIndex], - "unknownoutput-count-average": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "unknownoutput-count-max": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "unknownoutput-count-median": [DateIndex], - "unknownoutput-count-min": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], - "unknownoutput-count-sum": [DateIndex, DecadeIndex, DifficultyEpoch, MonthIndex, QuarterIndex, WeekIndex, YearIndex], unknownoutputindex: [UnknownOutputIndex], - value: [InputIndex, OutputIndex], - vbytes: [Height], - vsize: [TxIndex], + value: [OutputIndex], weekindex: [DateIndex, WeekIndex], - weight: [Height, TxIndex], + weight: [Height], yearindex: [MonthIndex, YearIndex], "yearindex-count": [DecadeIndex], });