diff --git a/Cargo.lock b/Cargo.lock index 4fcd09474..36d48d05a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -152,9 +152,9 @@ checksum = "7330592adf847ee2e3513587b4db2db410a0d751378654e7e993d9adcbe5c795" [[package]] name = "async-compression" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310c9bcae737a48ef5cdee3174184e6d548b292739ede61a1f955ef76a738861" +checksum = "c0cf008e5e1a9e9e22a7d3c9a4992e21a350290069e36d8fb72304ed17e8f2d2" dependencies = [ "brotli", "flate2", @@ -1557,9 +1557,9 @@ checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "linux-raw-sys" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9c683daf087dc577b7506e9695b3d556a9f3849903fa28186283afd6809e9" +checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" [[package]] name = "lock_api" diff --git a/README.md b/README.md index 8b4b92907..577c9f26a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,21 @@ # Bitcoin Research Kit +

+ + Version + + + Documentation + + + License + + Size + + Chat + +

+ The Bitcoin Research Kit is a suite of tools designed to parse, index, compute, serve and display data stored on a Bitcoin Core node. In other words it's an alternative to [Glassnode](https://glassnode.com), [mempool.space](https://mempool.space/) and [electrs](https://github.com/romanz/electrs) all in one package with a particular focus on the self-hosting experience. @@ -55,8 +71,6 @@ Pricing: `0.01 BTC / month` *or* `0.1 BTC / year` [`bc1q09 8zsm89 m7kgyz e338vf ejhpdt 92ua9p 3peuve`](bitcoin:bc1q098zsm89m7kgyze338vfejhpdt92ua9p3peuve) -image - [`lnurl1dp68gurn8ghj7ampd3kx2ar0veekzar0wd5xjtnrdakj7tnhv4kxctttdehhwm30d3h82unvwqhkxmmww3jkuar8d35kgetj8yuq363hv4`](lightning:lnurl1dp68gurn8ghj7ampd3kx2ar0veekzar0wd5xjtnrdakj7tnhv4kxctttdehhwm30d3h82unvwqhkxmmww3jkuar8d35kgetj8yuq363hv4) [Geyser Fund](https://geyser.fund/project/brk) diff --git a/crates/brk_computer/examples/main.rs b/crates/brk_computer/examples/main.rs index d267298d0..0191e2f8e 100644 --- a/crates/brk_computer/examples/main.rs +++ b/crates/brk_computer/examples/main.rs @@ -1,4 +1,4 @@ -use std::{path::Path, thread::sleep, time::Duration}; +use std::path::Path; use brk_computer::Computer; use brk_core::default_bitcoin_path; @@ -7,9 +7,8 @@ use brk_fetcher::Fetcher; use brk_indexer::Indexer; use brk_parser::{ Parser, - rpc::{self, RpcApi}, + rpc::{self}, }; -use log::info; pub fn main() -> color_eyre::Result<()> { color_eyre::install()?; @@ -40,22 +39,9 @@ pub fn main() -> color_eyre::Result<()> { computer.import_stores()?; computer.import_vecs()?; - loop { - let block_count = rpc.get_block_count()?; + let starting_indexes = indexer.index(&parser, rpc, &exit)?; - info!("{block_count} blocks found."); + computer.compute(&mut indexer, starting_indexes, &exit)?; - let starting_indexes = indexer.index(&parser, rpc, &exit)?; - - computer.compute(&mut indexer, starting_indexes, &exit)?; - - info!("Waiting for new blocks..."); - - while block_count == rpc.get_block_count()? { - sleep(Duration::from_secs(1)) - } - } - - #[allow(unreachable_code)] Ok(()) } diff --git a/crates/brk_indexer/examples/main.rs b/crates/brk_indexer/examples/main.rs index d4cbb3a33..07c3ef63c 100644 --- a/crates/brk_indexer/examples/main.rs +++ b/crates/brk_indexer/examples/main.rs @@ -23,7 +23,7 @@ fn main() -> color_eyre::Result<()> { let parser = Parser::new(bitcoin_dir.join("blocks"), rpc); - let outputs = dot_brk_path().join("outputs"); + let outputs = Path::new("../../_outputs"); let mut indexer = Indexer::new(outputs.join("indexed").to_owned(), true, true)?;