diff --git a/Cargo.lock b/Cargo.lock index 5036a4b45..1f53c6961 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -228,9 +228,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axum" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425" +checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" dependencies = [ "axum-core", "bytes", @@ -2974,9 +2974,9 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "lsm-tree" -version = "3.0.0-rc.6" +version = "3.0.0-rc.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "315d36f307af4d53f1030d6561de3fb6b914d5c242c353be101ddff91527c4b4" +checksum = "58db607ef63b47ede3640944f69e0872bc169e938253bcaa8dcf32631638ceab" dependencies = [ "byteorder-lite", "byteview", @@ -4037,9 +4037,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.11.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "f59e70c4aef1e55797c2e8fd94a4f2a973fc972cfde0e0b05f683667b0cd39dd" [[package]] name = "portable-atomic-util" @@ -4208,9 +4208,9 @@ dependencies = [ [[package]] name = "rapidhash" -version = "4.1.1" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8e65c75143ce5d47c55b510297eeb1182f3c739b6043c537670e9fc18612dae" +checksum = "2988730ee014541157f48ce4dcc603940e00915edc3c7f9a8d78092256bb2493" dependencies = [ "rustversion", ] @@ -4468,9 +4468,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea" [[package]] name = "same-file" @@ -6005,9 +6005,9 @@ dependencies = [ [[package]] name = "zip" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b" +checksum = "bdd8a47718a4ee5fe78e07667cd36f3de80e7c2bfe727c7074245ffc7303c037" dependencies = [ "arbitrary", "crc32fast", diff --git a/Cargo.toml b/Cargo.toml index fe69e3727..abf3c5340 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ debug = true [workspace.dependencies] aide = { version = "0.16.0-alpha.1", features = ["axum-json", "axum-query"] } -axum = "0.8.7" +axum = "0.8.8" bitcoin = { version = "0.32.8", features = ["serde"] } bitcoincore-rpc = "0.19.0" brk_bencher = { version = "0.1.0-alpha.0", path = "crates/brk_bencher" } diff --git a/crates/brk_cli/Cargo.toml b/crates/brk_cli/Cargo.toml index a88994e30..96dbf6aea 100644 --- a/crates/brk_cli/Cargo.toml +++ b/crates/brk_cli/Cargo.toml @@ -31,7 +31,7 @@ serde = { workspace = true } tokio = { workspace = true } toml = "0.9.10" vecdb = { workspace = true } -zip = { version = "6.0.0", default-features = false, features = ["deflate"] } +zip = { version = "7.0.0", default-features = false, features = ["deflate"] } [[bin]] name = "brk" diff --git a/crates/brk_indexer/src/processor.rs b/crates/brk_indexer/src/processor.rs index 5d7b713b2..02ed1323d 100644 --- a/crates/brk_indexer/src/processor.rs +++ b/crates/brk_indexer/src/processor.rs @@ -9,7 +9,7 @@ use brk_types::{ use log::error; use rayon::prelude::*; use rustc_hash::{FxHashMap, FxHashSet}; -use vecdb::{AnyVec, GenericStoredVec, TypedVecIterator}; +use vecdb::{AnyVec, GenericStoredVec, TypedVecIterator, likely}; use crate::{Indexes, Readers, Stores, Vecs, constants::*}; @@ -628,7 +628,7 @@ impl<'a> BlockProcessor<'a> { /// Check for TXID collisions (only for known duplicate TXIDs). pub fn check_txid_collisions(&self, txs: &[ComputedTx]) -> Result<()> { - if !self.check_collisions { + if likely(!self.check_collisions) { return Ok(()); } diff --git a/crates/brk_indexer/src/vecs/mod.rs b/crates/brk_indexer/src/vecs/mod.rs index beead49b7..4f1249863 100644 --- a/crates/brk_indexer/src/vecs/mod.rs +++ b/crates/brk_indexer/src/vecs/mod.rs @@ -122,6 +122,7 @@ impl Vecs { pub fn flush(&mut self, height: Height) -> Result<()> { self.iter_mut_any_stored_vec() + // self.par_iter_mut_any_stored_vec() .par_bridge() .try_for_each(|vec| vec.stamped_write(Stamp::from(height)))?; self.db.flush()?; @@ -161,6 +162,16 @@ impl Vecs { .chain(self.output.iter_mut_any()) } + // fn par_iter_mut_any_stored_vec(&mut self) -> impl Iterator { + // self.block + // .iter_mut_any() + // .chain(self.tx.iter_mut_any()) + // .chain(self.txin.iter_mut_any()) + // .chain(self.txout.iter_mut_any()) + // .chain(self.address.iter_mut_any()) + // .chain(self.output.iter_mut_any()) + // } + pub fn db(&self) -> &Database { &self.db } diff --git a/crates/brk_types/Cargo.toml b/crates/brk_types/Cargo.toml index 9a5a20107..f4fef6e81 100644 --- a/crates/brk_types/Cargo.toml +++ b/crates/brk_types/Cargo.toml @@ -16,8 +16,8 @@ derive_deref = { workspace = true } itoa = "1.0.15" jiff = { workspace = true } num_enum = "0.7.5" -rapidhash = "4.1.1" -ryu = "1.0.20" +rapidhash = "4.2.0" +ryu = "1.0.21" schemars = { workspace = true } serde = { workspace = true } serde_json = { workspace = true }