mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-24 06:39:58 -07:00
snapshot
This commit is contained in:
257
Cargo.lock
generated
257
Cargo.lock
generated
@@ -527,7 +527,6 @@ dependencies = [
|
||||
"brk_bencher",
|
||||
"brk_binder",
|
||||
"brk_bundler",
|
||||
"brk_cli",
|
||||
"brk_computer",
|
||||
"brk_error",
|
||||
"brk_fetcher",
|
||||
@@ -843,17 +842,17 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f412a191d92496744b72c8455f18b67e14d062211dfa7c9469850f8bd5d0b5b"
|
||||
checksum = "3b364266a980e4ef9103403d7df033a296bae3e9070a1813e26fd38efa8e178c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"append-only-vec",
|
||||
"arcstr",
|
||||
"bitflags 2.10.0",
|
||||
"brk_rolldown_common",
|
||||
"brk_rolldown_debug",
|
||||
"brk_rolldown_dev_common",
|
||||
"brk_rolldown_devtools",
|
||||
"brk_rolldown_ecmascript",
|
||||
"brk_rolldown_ecmascript_utils",
|
||||
"brk_rolldown_error",
|
||||
@@ -868,7 +867,6 @@ dependencies = [
|
||||
"brk_rolldown_std_utils",
|
||||
"brk_rolldown_tracing",
|
||||
"brk_rolldown_utils",
|
||||
"brk_rolldown_watcher",
|
||||
"brk_string_wizard",
|
||||
"commondir",
|
||||
"css-module-lexer",
|
||||
@@ -899,9 +897,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_common"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c42a7ac84c4b90d60662984d08b0a510a344e24b774a9d3ade71e86cce82a645"
|
||||
checksum = "827632ee8afa97703c8f071e0745887ab58e552d1905d1d98c86ee346130cb06"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arcstr",
|
||||
@@ -930,13 +928,24 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_debug"
|
||||
version = "0.3.0"
|
||||
name = "brk_rolldown_dev_common"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7955468206aaf1fb8e8f42eae21044c5d9f756e640eb466898240fda7025247"
|
||||
checksum = "358da3a5f3f5138de180d12802b887260e724ec7f57fb50a5d71d17b18f37908"
|
||||
dependencies = [
|
||||
"brk_rolldown_common",
|
||||
"brk_rolldown_error",
|
||||
"derive_more",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_devtools"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40934290db9fd9d230af056565a485f8189f3b83b44a5d4216da3d66826cc610"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"brk_rolldown_debug_action",
|
||||
"brk_rolldown_devtools_action",
|
||||
"dashmap",
|
||||
"rustc-hash",
|
||||
"serde",
|
||||
@@ -946,31 +955,20 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_debug_action"
|
||||
version = "0.3.0"
|
||||
name = "brk_rolldown_devtools_action"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f56b235d6fcda652d7084ad82700e65b3b49c493f564960c33da2c652381334"
|
||||
checksum = "a249525f317d69cc220254fa55c2f93cada5aefae238d2a9c00b96c8c502595b"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"ts-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_dev_common"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a143b08dad4b0813392081209e009f569e392746fe89090fb31d5e72828e7884"
|
||||
dependencies = [
|
||||
"brk_rolldown_common",
|
||||
"brk_rolldown_error",
|
||||
"derive_more",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_ecmascript"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2daa700ee9d876e5a21bcd970a64b585cbbf421550340f399f12c912c3f3876f"
|
||||
checksum = "7ac3c00fb7dca60e30c97d14a34bb27343f4fd433363eeb8e3aa630075b49eb6"
|
||||
dependencies = [
|
||||
"arcstr",
|
||||
"brk_rolldown_error",
|
||||
@@ -981,9 +979,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_ecmascript_utils"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "58612909a88129ecb2c3a198f51f4cc01ca547c170ed4d5accd0066e4b570997"
|
||||
checksum = "f65855f91040323a46eeb93471948e19382d74597eeb25b233eacbc8593be6b5"
|
||||
dependencies = [
|
||||
"brk_rolldown_common",
|
||||
"oxc",
|
||||
@@ -992,9 +990,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_error"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "99c20482a66ce9f9fe292367f00d970244019146eede619d835c3a5d6c2578d5"
|
||||
checksum = "630677b212d97019f49374f77404c873535eada9cce670c6fc0212c658f96e36"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arcstr",
|
||||
@@ -1012,9 +1010,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_fs"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5172058eb2643d3643157b5b23f86f1ad3b82773f89f5b771722779508ede568"
|
||||
checksum = "12d79615fdbaa3202d16b48e914754e4ea333b4a30b6d2b3bd1474914f8f7b6e"
|
||||
dependencies = [
|
||||
"oxc_resolver",
|
||||
"vfs",
|
||||
@@ -1022,16 +1020,16 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_plugin"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "16655ceec1fa0d5c08a599b0f31766c74f60794e85028f9ab44cf0d1d80b1f41"
|
||||
checksum = "723f806cd14b933f477902e80c66f14aabdd480ed076417bc7381ea9ed8d2509"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arcstr",
|
||||
"async-trait",
|
||||
"bitflags 2.10.0",
|
||||
"brk_rolldown_common",
|
||||
"brk_rolldown_debug",
|
||||
"brk_rolldown_devtools",
|
||||
"brk_rolldown_ecmascript",
|
||||
"brk_rolldown_error",
|
||||
"brk_rolldown_resolver",
|
||||
@@ -1052,9 +1050,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_plugin_chunk_import_map"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fb17feedfc1c07dad397b70450f7e81a5621f73b95652c28742a98f841b0773f"
|
||||
checksum = "f1edd58ab6d786f046bf8ee5cabf164723fa44eb355f5cecfe50493fc64bbcbb"
|
||||
dependencies = [
|
||||
"arcstr",
|
||||
"brk_rolldown_common",
|
||||
@@ -1067,9 +1065,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_plugin_data_uri"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b4c0bb9d31f665cff83a30902cd9baf5836117fa380eae9cc2fb40bc9b9998c"
|
||||
checksum = "02abd52b8d1039bfbea205b2187bb70aaa0d5a4a98f6b98964081da3c643b974"
|
||||
dependencies = [
|
||||
"arcstr",
|
||||
"base64-simd",
|
||||
@@ -1082,9 +1080,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_plugin_hmr"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2055551fefc6d9666aa9b0bd97c48b76cb5c2c2f0c9319fe9282115fc91863e"
|
||||
checksum = "ddaa6d6b746c58932c0a2be7349828b57af1e60c6915cc44a66f1f8cea4fa425"
|
||||
dependencies = [
|
||||
"arcstr",
|
||||
"brk_rolldown_common",
|
||||
@@ -1094,9 +1092,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_plugin_oxc_runtime"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "20898ad2923745d9c9ae0878eacc883ad5774fb5f8662e4449cf251a6a3d6702"
|
||||
checksum = "b4d8bc78ecc86eba7cc81f47a5d12615f828c1e845eaad19a468b838fc8493a7"
|
||||
dependencies = [
|
||||
"arcstr",
|
||||
"brk_rolldown_plugin",
|
||||
@@ -1106,9 +1104,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_resolver"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d0e25308a361c8e232fb30e1534cdf66abbdc6783db8eb8fc5c81dfa2c5e109"
|
||||
checksum = "04131fec652171bc12654fecbefcce8f3c9b36a146056bb8352df38a6e046df3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arcstr",
|
||||
@@ -1123,9 +1121,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_sourcemap"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e92e47566e454a6a9ac66c348186774c2ef4beb078ce731d6c60d60c82219d8"
|
||||
checksum = "63136e1550beeee9fed780ec88d87377e91f885ebe9912a4af4c62031655abcc"
|
||||
dependencies = [
|
||||
"brk_rolldown_utils",
|
||||
"memchr",
|
||||
@@ -1136,18 +1134,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_std_utils"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4fcba6dbaec5478aebd62f1b4a96a8a4219288b344183c051e608215224058d"
|
||||
checksum = "cb5489323b1194d0f0d194760202e19b516fc1c5f311d3220b6ae55749b746ff"
|
||||
dependencies = [
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_tracing"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8438868ae972329cb31a3f309b938a23d4cfab6d7ce6dcaed1b9481dc2adb0a9"
|
||||
checksum = "99301f73f3c567eb708c4720c62d24ce799d62e2320d0c8e4dbffe30b5ecc8c2"
|
||||
dependencies = [
|
||||
"tracing",
|
||||
"tracing-chrome",
|
||||
@@ -1156,9 +1154,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_utils"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40ae48fbf2a18c25c60ed0ad519d54156047dd5bee9114ed6e0c9d9ac610baaa"
|
||||
checksum = "693bbb5c14cd63f1b9eea2de4443d923fc5a690bdcce778c4f34cbb6c4cdae6c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arcstr",
|
||||
@@ -1192,17 +1190,6 @@ dependencies = [
|
||||
"xxhash-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brk_rolldown_watcher"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eceece43bf7306e92be8925264257d7deba1c6bd790f2774781b9009779eb037"
|
||||
dependencies = [
|
||||
"brk_rolldown_error",
|
||||
"rolldown-notify",
|
||||
"rolldown-notify-debouncer-full",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brk_rpc"
|
||||
version = "0.0.111"
|
||||
@@ -1261,9 +1248,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brk_string_wizard"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7cbd9fe230b4e6438d525af3de487d962e43a3d42a5e312bc23363b61e6bdc10"
|
||||
checksum = "d6ac938b032f908cebd47d4bccde3c1c94430b08c35f384d35efde47f151c4a4"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"oxc_index",
|
||||
@@ -1458,9 +1445,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.51"
|
||||
version = "4.5.53"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5"
|
||||
checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
@@ -1468,9 +1455,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.51"
|
||||
version = "4.5.53"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a"
|
||||
checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
@@ -2118,14 +2105,14 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"
|
||||
|
||||
[[package]]
|
||||
name = "fjall"
|
||||
version = "3.0.0-pre.6"
|
||||
version = "3.0.0-pre.7"
|
||||
dependencies = [
|
||||
"byteorder-lite",
|
||||
"byteview 0.8.0",
|
||||
"dashmap",
|
||||
"flume",
|
||||
"log",
|
||||
"lsm-tree 3.0.0-pre.6",
|
||||
"lsm-tree 3.0.0-pre.7",
|
||||
"lz4_flex",
|
||||
"tempfile",
|
||||
"xxhash-rust",
|
||||
@@ -3017,7 +3004,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lsm-tree"
|
||||
version = "3.0.0-pre.6"
|
||||
version = "3.0.0-pre.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "16d54fa339f44103a194d3e7f208a33c666391a9d9ddb2621f956f4d223a407f"
|
||||
dependencies = [
|
||||
"byteorder-lite",
|
||||
"byteview 0.8.0",
|
||||
@@ -3303,9 +3292,9 @@ checksum = "9c6901729fa79e91a0913333229e9ca5dc725089d1c363b2f4b4760709dc4a52"
|
||||
|
||||
[[package]]
|
||||
name = "oxc"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2de9d29ee93972a681161c620c428c87adc2137d8bdd0c010eb076251e8c474"
|
||||
checksum = "87899ddffc6f9f155c7be64151a24baeae290feb60cc2baf832cf1be003a0fd5"
|
||||
dependencies = [
|
||||
"oxc_allocator",
|
||||
"oxc_ast",
|
||||
@@ -3369,9 +3358,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_allocator"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "71ef2dba21be1ce515378b2b7143eaa2a912f9e6ffe162ae20639d56f53d60e3"
|
||||
checksum = "674f1447d47e26970ff13d8da8140ffb0d7fde347ab9af3e5c00e67943d4bc9b"
|
||||
dependencies = [
|
||||
"allocator-api2",
|
||||
"bumpalo",
|
||||
@@ -3384,9 +3373,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_ast"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fad9195311a1961bb6ef1de0ce6a52147bccea50b5a40423b7b44e8448ed4fc"
|
||||
checksum = "d6c0d01c611150a159b448272d08d198e57a69531b78c599133310a1e38177e2"
|
||||
dependencies = [
|
||||
"bitflags 2.10.0",
|
||||
"oxc_allocator",
|
||||
@@ -3401,9 +3390,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_ast_macros"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f03da6fac191c0817a32ae1a7dde27fd27d98732c61fcaeb55a99a4d543ba49"
|
||||
checksum = "43a3373b0b8c5c1914cc7082f31cd81f3412f395f5e81970689fb6d547847a11"
|
||||
dependencies = [
|
||||
"phf",
|
||||
"proc-macro2",
|
||||
@@ -3413,9 +3402,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_ast_visit"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b42fcdb162d247a0e9c1aa985b388f000eba19fb1ee1845b2ec0ddc595f95131"
|
||||
checksum = "8169aac113a81df22d73872e3a54dc6fa6c7465890b3379f83088977a894bdf9"
|
||||
dependencies = [
|
||||
"oxc_allocator",
|
||||
"oxc_ast",
|
||||
@@ -3425,9 +3414,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_cfg"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "388f6e0dd1a825de3a11d94af540726539cccd428651fee3bab841da196549d4"
|
||||
checksum = "070b4b6ecfcf81f43c87049a19cc69f81a2c720d26f8d52eff67f718b9107de1"
|
||||
dependencies = [
|
||||
"bitflags 2.10.0",
|
||||
"itertools 0.14.0",
|
||||
@@ -3439,9 +3428,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_codegen"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46c9a53ca79c87846e4f2b4f3df514b0b2bf910a1ba76a9e8cb742570b8b47ce"
|
||||
checksum = "ace497cd606cd1dc74553cce8afec424b0b6ca3b97723610111df2797e3627ff"
|
||||
dependencies = [
|
||||
"bitflags 2.10.0",
|
||||
"cow-utils",
|
||||
@@ -3460,9 +3449,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_compat"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "271a875e3e9e1f6d259c99e0557fcc83d96b025ddfca40e215d6bbb58bae9d45"
|
||||
checksum = "3e0856e92b71c10152f9f2f8a25b827e13751e21f5b766b0730a6339a7e9657d"
|
||||
dependencies = [
|
||||
"cow-utils",
|
||||
"oxc-browserslist",
|
||||
@@ -3473,18 +3462,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_data_structures"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c5f5171d7b8bc907a1b29e557d14f8478509a2154272d56db9ee8aed6bfe8dec"
|
||||
checksum = "b2b15eb8528cea49be898e99b523653b27daed396fdf77d048547d94f091199c"
|
||||
dependencies = [
|
||||
"ropey",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oxc_diagnostics"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ef2bf6a713fd27bc65812d695bdfde3f8fcef735f00b861258518346642721b"
|
||||
checksum = "bd2de22e8e8c94f10adc58f13ae94550e350b82e5143962c0e5c0cb9932acf5d"
|
||||
dependencies = [
|
||||
"cow-utils",
|
||||
"oxc-miette",
|
||||
@@ -3493,9 +3482,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_ecmascript"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f908100cb2759dd2f42ca33d95ea158b8d78e2591b577757729fc9a4a4c63bc3"
|
||||
checksum = "665d01392d92af2c7904a1106d19272fd62e4ab45079519f8c33fae5046b53a5"
|
||||
dependencies = [
|
||||
"cow-utils",
|
||||
"num-bigint",
|
||||
@@ -3508,9 +3497,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_estree"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5644d3399116ff3f0cfb81f9a790c4b8173b504ed52274ecc757b57f30098ad1"
|
||||
checksum = "66ed73e88c330b977905de971e7a06ba4309c6658a83cfcf63f2013b37922beb"
|
||||
dependencies = [
|
||||
"dragonbox_ecma",
|
||||
"itoa",
|
||||
@@ -3530,9 +3519,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_isolated_declarations"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "88a7b1c97cb29091217c319843518202aaade72978eca5ef8bb374e8c78d3ae3"
|
||||
checksum = "5c0f557d328bacc724cd18961131aee3f8ff8dd191e8161c59c2a0362d8e146e"
|
||||
dependencies = [
|
||||
"bitflags 2.10.0",
|
||||
"oxc_allocator",
|
||||
@@ -3547,9 +3536,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_mangler"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba3695e3b0694093d24f0f7c8b77dc36b1a4b55020bf52166271010c8095bba5"
|
||||
checksum = "6adc903fc3ac929ff1329a7449580f1ea5a290658cb196af9eb00dc655e89d45"
|
||||
dependencies = [
|
||||
"itertools 0.14.0",
|
||||
"oxc_allocator",
|
||||
@@ -3564,9 +3553,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_minifier"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "869d4f7493209202a6d2824a1d18a3bced22c7e6a32b9b0f41d718dc090fa4dc"
|
||||
checksum = "15933b28ce93793d88d5a481cd12ed4c848d78d660855a6c9a2e6a9d17436def"
|
||||
dependencies = [
|
||||
"cow-utils",
|
||||
"oxc_allocator",
|
||||
@@ -3589,9 +3578,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_parser"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e080498b7a4456a63111f9c65b4dd1b98147955347854b809b6ad4cc5d6a0c0a"
|
||||
checksum = "b9e94af4e21a37daf13e4b8c2233566daa0e85cc25cf50bf2670ae6235b41767"
|
||||
dependencies = [
|
||||
"bitflags 2.10.0",
|
||||
"cow-utils",
|
||||
@@ -3612,9 +3601,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_regular_expression"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb87ab0b072e1e97d8101cb1678204bc3873d84f13255ae5aa088f1b85f7a8e1"
|
||||
checksum = "1bb5d767d654aac7cb95bffe2ae0bcc953e6c8330e0aa311b4c06edb65da384c"
|
||||
dependencies = [
|
||||
"bitflags 2.10.0",
|
||||
"oxc_allocator",
|
||||
@@ -3653,9 +3642,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_semantic"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c56958658ca1f9f5f050dc4317821255d2ca132763b6fbee9227e45ef79ed173"
|
||||
checksum = "e38d51bf83b46fdb16caa8992da99a3c3df4cd7ae200bfe7abe6c5f7bbd52b65"
|
||||
dependencies = [
|
||||
"itertools 0.14.0",
|
||||
"oxc_allocator",
|
||||
@@ -3688,9 +3677,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_span"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41422232cfd9915d31dbb76ba2e5ae212884cad232e37203bdcb15bd1466951d"
|
||||
checksum = "4ad5a043ad3a15cafe9d50c3f8e289546d2ff66d039285af30829d667a81bbf2"
|
||||
dependencies = [
|
||||
"compact_str",
|
||||
"oxc-miette",
|
||||
@@ -3702,9 +3691,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_syntax"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ea81736f2343df141c7d8de78a91d155be4f712dfa6cd1bdd9a8b4f0676f01f"
|
||||
checksum = "d87f83a206be495b3536c4ed11f6e444efbdaead4dc778192b2c2038afdd7acb"
|
||||
dependencies = [
|
||||
"bitflags 2.10.0",
|
||||
"cow-utils",
|
||||
@@ -3723,9 +3712,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_transformer"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f6aee257a9750a3beeb8124f1fffcc3a5c2623ac2e36e851fbab8da339e9263"
|
||||
checksum = "ac3e5343d946d84ba975673d1fc2b2c238bac8a4f862de99bda5b53bf5dbd516"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"compact_str",
|
||||
@@ -3753,9 +3742,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_transformer_plugins"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38addf2f866a14a53c3e937b248429f717546da230be59f35664ecfc3a6aea07"
|
||||
checksum = "a8fbfa79a74b201a4cf305485e42e18099403e01868465270c40e0535d6239e2"
|
||||
dependencies = [
|
||||
"cow-utils",
|
||||
"itoa",
|
||||
@@ -3775,9 +3764,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_traverse"
|
||||
version = "0.96.0"
|
||||
version = "0.98.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bdcbcda1412b43a921856314e2984cb9282f0d23c1439ae21bd5879110e01681"
|
||||
checksum = "8dd74744115efb7fbd2e3ff40d55ab8ef1c9071577ea2f682a4a2e627473e5b8"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"oxc_allocator",
|
||||
@@ -4375,15 +4364,6 @@ dependencies = [
|
||||
"yansi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rolldown-file-id"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "987e6977d7746be897071f69d1f8ec72b25a246c8130cf7985c1a536f6eaf1be"
|
||||
dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rolldown-notify"
|
||||
version = "8.2.1"
|
||||
@@ -4391,7 +4371,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "858a3e78503d89287b47d66fb042b4f04e34b237774506fbb48d7c3e5eb445cf"
|
||||
dependencies = [
|
||||
"bitflags 2.10.0",
|
||||
"fsevent-sys",
|
||||
"inotify",
|
||||
"kqueue",
|
||||
"libc",
|
||||
@@ -4402,19 +4381,6 @@ dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rolldown-notify-debouncer-full"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "45e06775bbad4fa50fb0c07a1dfbb5ec3356131b6f0e19679910cb698aa54068"
|
||||
dependencies = [
|
||||
"log",
|
||||
"rolldown-file-id",
|
||||
"rolldown-notify",
|
||||
"rolldown-notify-types",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rolldown-notify-types"
|
||||
version = "2.0.1"
|
||||
@@ -4712,9 +4678,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sfa"
|
||||
version = "0.0.3"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b84349eedbb0664e9febec9c385e8a6644d0496281965ed28b1b20a0108264a9"
|
||||
checksum = "86cc3fab8d5eb0e19832083e29d69607305b01ae6a16d5790b3e5374c5da3d91"
|
||||
dependencies = [
|
||||
"byteorder-lite",
|
||||
"log",
|
||||
@@ -5467,7 +5433,6 @@ dependencies = [
|
||||
"pco",
|
||||
"rawdb",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"vecdb_derive",
|
||||
"zerocopy",
|
||||
|
||||
@@ -79,7 +79,7 @@ serde_bytes = "0.11.19"
|
||||
serde_derive = "1.0.228"
|
||||
serde_json = { version = "1.0.145", features = ["float_roundtrip"] }
|
||||
tokio = { version = "1.48.0", features = ["rt-multi-thread"] }
|
||||
vecdb = { path = "../seqdb/crates/vecdb", features = ["derive"] }
|
||||
vecdb = { path = "../anydb/crates/vecdb", features = ["derive", "serde_json"] }
|
||||
# vecdb = { version = "0.3.20", features = ["derive"] }
|
||||
zerocopy = { version = "0.8.27", features = ["derive"] }
|
||||
|
||||
|
||||
@@ -10,12 +10,10 @@ rust-version.workspace = true
|
||||
build = "build.rs"
|
||||
|
||||
[features]
|
||||
default = ["cli"]
|
||||
full = [
|
||||
"bencher",
|
||||
"binder",
|
||||
"bundler",
|
||||
"cli",
|
||||
"computer",
|
||||
"error",
|
||||
"fetcher",
|
||||
@@ -36,7 +34,6 @@ full = [
|
||||
bencher = ["brk_bencher"]
|
||||
binder = ["brk_binder"]
|
||||
bundler = ["brk_bundler"]
|
||||
cli = ["brk_cli"]
|
||||
computer = ["brk_computer"]
|
||||
error = ["brk_error"]
|
||||
fetcher = ["brk_fetcher"]
|
||||
@@ -58,7 +55,6 @@ types = ["brk_types"]
|
||||
brk_bencher = { workspace = true, optional = true }
|
||||
brk_binder = { workspace = true, optional = true }
|
||||
brk_bundler = { workspace = true, optional = true }
|
||||
brk_cli = { workspace = true, optional = true }
|
||||
brk_computer = { workspace = true, optional = true }
|
||||
brk_error = { workspace = true, optional = true }
|
||||
brk_fetcher = { workspace = true, optional = true }
|
||||
|
||||
@@ -12,10 +12,6 @@ pub use brk_binder as binder;
|
||||
#[doc(inline)]
|
||||
pub use brk_bundler as bundler;
|
||||
|
||||
#[cfg(feature = "cli")]
|
||||
#[doc(inline)]
|
||||
pub use brk_cli as cli;
|
||||
|
||||
#[cfg(feature = "computer")]
|
||||
#[doc(inline)]
|
||||
pub use brk_computer as computer;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
use brk_cli::main;
|
||||
@@ -340,7 +340,7 @@ impl Visualizer {
|
||||
crate_name: &str,
|
||||
runs: &[BenchmarkRun],
|
||||
) -> Result<()> {
|
||||
let output_path = crate_path.join("disk_chart.svg");
|
||||
let output_path = crate_path.join("disk.svg");
|
||||
let root = SVGBackend::new(&output_path, SIZE).into_drawing_area();
|
||||
root.fill(&BG_COLOR)?;
|
||||
|
||||
@@ -404,7 +404,7 @@ impl Visualizer {
|
||||
crate_name: &str,
|
||||
runs: &[BenchmarkRun],
|
||||
) -> Result<()> {
|
||||
let output_path = crate_path.join("memory_chart.svg");
|
||||
let output_path = crate_path.join("memory.svg");
|
||||
let root = SVGBackend::new(&output_path, SIZE).into_drawing_area();
|
||||
root.fill(&BG_COLOR)?;
|
||||
|
||||
@@ -628,7 +628,7 @@ impl Visualizer {
|
||||
crate_name: &str,
|
||||
runs: &[BenchmarkRun],
|
||||
) -> Result<()> {
|
||||
let output_path = crate_path.join("io_read_chart.svg");
|
||||
let output_path = crate_path.join("io_read.svg");
|
||||
let root = SVGBackend::new(&output_path, SIZE).into_drawing_area();
|
||||
root.fill(&BG_COLOR)?;
|
||||
|
||||
@@ -710,7 +710,7 @@ impl Visualizer {
|
||||
crate_name: &str,
|
||||
runs: &[BenchmarkRun],
|
||||
) -> Result<()> {
|
||||
let output_path = crate_path.join("io_write_chart.svg");
|
||||
let output_path = crate_path.join("io_write.svg");
|
||||
let root = SVGBackend::new(&output_path, SIZE).into_drawing_area();
|
||||
root.fill(&BG_COLOR)?;
|
||||
|
||||
@@ -792,7 +792,7 @@ impl Visualizer {
|
||||
crate_name: &str,
|
||||
runs: &[BenchmarkRun],
|
||||
) -> Result<()> {
|
||||
let output_path = crate_path.join("progress_chart.svg");
|
||||
let output_path = crate_path.join("progress.svg");
|
||||
let root = SVGBackend::new(&output_path, SIZE).into_drawing_area();
|
||||
root.fill(&BG_COLOR)?;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ build = "build.rs"
|
||||
[dependencies]
|
||||
log = { workspace = true }
|
||||
notify = "8.2.0"
|
||||
rolldown = { version = "0.3.0", package = "brk_rolldown" }
|
||||
rolldown = { version = "0.4.0", package = "brk_rolldown" }
|
||||
# brk_rolldown = { path = "../../../rolldown/crates/rolldown"}
|
||||
sugar_path = "1.2.1"
|
||||
tokio = { workspace = true }
|
||||
|
||||
@@ -23,7 +23,7 @@ brk_reader = { workspace = true }
|
||||
brk_rpc = { workspace = true }
|
||||
brk_server = { workspace = true }
|
||||
vecdb = { workspace = true }
|
||||
clap = { version = "4.5.51", features = ["derive", "string"] }
|
||||
clap = { version = "4.5.53", features = ["derive", "string"] }
|
||||
color-eyre = "0.6.5"
|
||||
log = { workspace = true }
|
||||
minreq = { workspace = true }
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
use std::{
|
||||
fs,
|
||||
io::Cursor,
|
||||
path::Path,
|
||||
thread::{self, sleep},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use brk_binder::generate_js_files;
|
||||
use brk_bundler::bundle;
|
||||
use brk_computer::Computer;
|
||||
use brk_error::Result;
|
||||
use brk_indexer::Indexer;
|
||||
use brk_iterator::Blocks;
|
||||
use brk_query::AsyncQuery;
|
||||
use brk_reader::Reader;
|
||||
use brk_server::{Server, VERSION};
|
||||
use log::info;
|
||||
use vecdb::Exit;
|
||||
|
||||
mod config;
|
||||
mod paths;
|
||||
mod website;
|
||||
|
||||
use crate::{config::Config, paths::*};
|
||||
|
||||
pub fn main() -> color_eyre::Result<()> {
|
||||
// Can't increase main thread's stack size, thus we need to use another thread
|
||||
thread::Builder::new()
|
||||
.stack_size(512 * 1024 * 1024)
|
||||
.spawn(run)?
|
||||
.join()
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
pub fn run() -> color_eyre::Result<()> {
|
||||
color_eyre::install()?;
|
||||
|
||||
fs::create_dir_all(dot_brk_path())?;
|
||||
|
||||
brk_logger::init(Some(&dot_brk_log_path()))?;
|
||||
|
||||
let config = Config::import()?;
|
||||
|
||||
let client = config.rpc()?;
|
||||
|
||||
let exit = Exit::new();
|
||||
exit.set_ctrlc_handler();
|
||||
|
||||
let reader = Reader::new(config.blocksdir(), &client);
|
||||
|
||||
let blocks = Blocks::new(&client, &reader);
|
||||
|
||||
let mut indexer = Indexer::forced_import(&config.brkdir())?;
|
||||
|
||||
let mut computer = Computer::forced_import(&config.brkdir(), &indexer, config.fetcher())?;
|
||||
|
||||
let query = AsyncQuery::build(&reader, &indexer, &computer);
|
||||
|
||||
let website = config.website();
|
||||
|
||||
let downloads_path = config.downloads_dir();
|
||||
|
||||
let future = async move {
|
||||
let bundle_path = if website.is_some() {
|
||||
let websites_dev_path = Path::new("../../websites");
|
||||
let modules_dev_path = Path::new("../../modules");
|
||||
|
||||
let websites_path;
|
||||
let modules_path;
|
||||
|
||||
if fs::exists(websites_dev_path)? && fs::exists(modules_dev_path)? {
|
||||
websites_path = websites_dev_path.to_path_buf();
|
||||
modules_path = modules_dev_path.to_path_buf();
|
||||
} else {
|
||||
let downloaded_brk_path = downloads_path.join(format!("brk-{VERSION}"));
|
||||
|
||||
let downloaded_websites_path = downloaded_brk_path.join("websites");
|
||||
let downloaded_modules_path = downloaded_brk_path.join("modules");
|
||||
|
||||
if !fs::exists(&downloaded_websites_path)? {
|
||||
info!("Downloading source from Github...");
|
||||
|
||||
let url = format!(
|
||||
"https://github.com/bitcoinresearchkit/brk/archive/refs/tags/v{VERSION}.zip",
|
||||
);
|
||||
|
||||
let response = minreq::get(url).send()?;
|
||||
let bytes = response.as_bytes();
|
||||
let cursor = Cursor::new(bytes);
|
||||
|
||||
let mut zip = zip::ZipArchive::new(cursor).unwrap();
|
||||
|
||||
zip.extract(downloads_path).unwrap();
|
||||
}
|
||||
|
||||
websites_path = downloaded_websites_path;
|
||||
modules_path = downloaded_modules_path;
|
||||
}
|
||||
|
||||
generate_js_files(query.inner(), &modules_path)?;
|
||||
|
||||
Some(
|
||||
bundle(
|
||||
&modules_path,
|
||||
&websites_path,
|
||||
website.to_folder_name(),
|
||||
true,
|
||||
)
|
||||
.await?,
|
||||
)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let server = Server::new(&query, bundle_path);
|
||||
|
||||
tokio::spawn(async move {
|
||||
server.serve(true).await.unwrap();
|
||||
});
|
||||
|
||||
Ok(()) as Result<()>
|
||||
};
|
||||
|
||||
let runtime = tokio::runtime::Builder::new_multi_thread()
|
||||
.enable_all()
|
||||
.build()?;
|
||||
|
||||
let _handle = runtime.spawn(future);
|
||||
|
||||
loop {
|
||||
client.wait_for_synced_node()?;
|
||||
|
||||
let last_height = client.get_last_height()?;
|
||||
|
||||
info!("{} blocks found.", u32::from(last_height) + 1);
|
||||
|
||||
let starting_indexes = if config.check_collisions() {
|
||||
indexer.checked_index(&blocks, &client, &exit)?
|
||||
} else {
|
||||
indexer.index(&blocks, &client, &exit)?
|
||||
};
|
||||
|
||||
computer.compute(&indexer, starting_indexes, &reader, &exit)?;
|
||||
|
||||
info!("Waiting for new blocks...");
|
||||
|
||||
while last_height == client.get_last_height()? {
|
||||
sleep(Duration::from_secs(1))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +1,154 @@
|
||||
use brk_cli::main;
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
use std::{
|
||||
fs,
|
||||
io::Cursor,
|
||||
path::Path,
|
||||
thread::{self, sleep},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use brk_binder::generate_js_files;
|
||||
use brk_bundler::bundle;
|
||||
use brk_computer::Computer;
|
||||
use brk_error::Result;
|
||||
use brk_indexer::Indexer;
|
||||
use brk_iterator::Blocks;
|
||||
use brk_query::AsyncQuery;
|
||||
use brk_reader::Reader;
|
||||
use brk_server::{Server, VERSION};
|
||||
use log::info;
|
||||
use vecdb::Exit;
|
||||
|
||||
mod config;
|
||||
mod paths;
|
||||
mod website;
|
||||
|
||||
use crate::{config::Config, paths::*};
|
||||
|
||||
pub fn main() -> color_eyre::Result<()> {
|
||||
// Can't increase main thread's stack size, thus we need to use another thread
|
||||
thread::Builder::new()
|
||||
.stack_size(512 * 1024 * 1024)
|
||||
.spawn(run)?
|
||||
.join()
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
pub fn run() -> color_eyre::Result<()> {
|
||||
color_eyre::install()?;
|
||||
|
||||
fs::create_dir_all(dot_brk_path())?;
|
||||
|
||||
brk_logger::init(Some(&dot_brk_log_path()))?;
|
||||
|
||||
let config = Config::import()?;
|
||||
|
||||
let client = config.rpc()?;
|
||||
|
||||
let exit = Exit::new();
|
||||
exit.set_ctrlc_handler();
|
||||
|
||||
let reader = Reader::new(config.blocksdir(), &client);
|
||||
|
||||
let blocks = Blocks::new(&client, &reader);
|
||||
|
||||
let mut indexer = Indexer::forced_import(&config.brkdir())?;
|
||||
|
||||
let mut computer = Computer::forced_import(&config.brkdir(), &indexer, config.fetcher())?;
|
||||
|
||||
let query = AsyncQuery::build(&reader, &indexer, &computer);
|
||||
|
||||
let website = config.website();
|
||||
|
||||
let downloads_path = config.downloads_dir();
|
||||
|
||||
let future = async move {
|
||||
let bundle_path = if website.is_some() {
|
||||
let websites_dev_path = Path::new("../../websites");
|
||||
let modules_dev_path = Path::new("../../modules");
|
||||
|
||||
let websites_path;
|
||||
let modules_path;
|
||||
|
||||
if fs::exists(websites_dev_path)? && fs::exists(modules_dev_path)? {
|
||||
websites_path = websites_dev_path.to_path_buf();
|
||||
modules_path = modules_dev_path.to_path_buf();
|
||||
} else {
|
||||
let downloaded_brk_path = downloads_path.join(format!("brk-{VERSION}"));
|
||||
|
||||
let downloaded_websites_path = downloaded_brk_path.join("websites");
|
||||
let downloaded_modules_path = downloaded_brk_path.join("modules");
|
||||
|
||||
if !fs::exists(&downloaded_websites_path)? {
|
||||
info!("Downloading source from Github...");
|
||||
|
||||
let url = format!(
|
||||
"https://github.com/bitcoinresearchkit/brk/archive/refs/tags/v{VERSION}.zip",
|
||||
);
|
||||
|
||||
let response = minreq::get(url).send()?;
|
||||
let bytes = response.as_bytes();
|
||||
let cursor = Cursor::new(bytes);
|
||||
|
||||
let mut zip = zip::ZipArchive::new(cursor).unwrap();
|
||||
|
||||
zip.extract(downloads_path).unwrap();
|
||||
}
|
||||
|
||||
websites_path = downloaded_websites_path;
|
||||
modules_path = downloaded_modules_path;
|
||||
}
|
||||
|
||||
generate_js_files(query.inner(), &modules_path)?;
|
||||
|
||||
Some(
|
||||
bundle(
|
||||
&modules_path,
|
||||
&websites_path,
|
||||
website.to_folder_name(),
|
||||
true,
|
||||
)
|
||||
.await?,
|
||||
)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let server = Server::new(&query, bundle_path);
|
||||
|
||||
tokio::spawn(async move {
|
||||
server.serve(true).await.unwrap();
|
||||
});
|
||||
|
||||
Ok(()) as Result<()>
|
||||
};
|
||||
|
||||
let runtime = tokio::runtime::Builder::new_multi_thread()
|
||||
.enable_all()
|
||||
.build()?;
|
||||
|
||||
let _handle = runtime.spawn(future);
|
||||
|
||||
loop {
|
||||
client.wait_for_synced_node()?;
|
||||
|
||||
let last_height = client.get_last_height()?;
|
||||
|
||||
info!("{} blocks found.", u32::from(last_height) + 1);
|
||||
|
||||
let starting_indexes = if config.check_collisions() {
|
||||
indexer.checked_index(&blocks, &client, &exit)?
|
||||
} else {
|
||||
indexer.index(&blocks, &client, &exit)?
|
||||
};
|
||||
|
||||
computer.compute(&indexer, starting_indexes, &reader, &exit)?;
|
||||
|
||||
info!("Waiting for new blocks...");
|
||||
|
||||
while last_height == client.get_last_height()? {
|
||||
sleep(Duration::from_secs(1))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ use brk_computer::Computer;
|
||||
use brk_error::Result;
|
||||
use brk_fetcher::Fetcher;
|
||||
use brk_indexer::{Indexer, Indexes};
|
||||
use brk_iterator::Blocks;
|
||||
use brk_reader::Reader;
|
||||
use brk_rpc::{Auth, Client};
|
||||
use log::{debug, info};
|
||||
@@ -37,9 +36,7 @@ fn run() -> Result<()> {
|
||||
|
||||
let reader = Reader::new(bitcoin_dir.join("blocks"), &client);
|
||||
|
||||
let blocks = Blocks::new(&client, &reader);
|
||||
|
||||
let mut indexer = Indexer::forced_import(&outputs_dir)?;
|
||||
let indexer = Indexer::forced_import(&outputs_dir)?;
|
||||
|
||||
let fetcher = Fetcher::import(true, None)?;
|
||||
|
||||
|
||||
97
crates/brk_computer/examples/computer_read.rs
Normal file
97
crates/brk_computer/examples/computer_read.rs
Normal file
@@ -0,0 +1,97 @@
|
||||
use std::{env, path::Path, thread};
|
||||
|
||||
use brk_computer::Computer;
|
||||
use brk_error::Result;
|
||||
use brk_fetcher::Fetcher;
|
||||
use brk_indexer::Indexer;
|
||||
use brk_types::TxIndex;
|
||||
use vecdb::{AnyStoredVec, Exit, GenericStoredVec};
|
||||
|
||||
pub fn main() -> Result<()> {
|
||||
// Can't increase main thread's stack size, thus we need to use another thread
|
||||
thread::Builder::new()
|
||||
.stack_size(512 * 1024 * 1024)
|
||||
.spawn(run)?
|
||||
.join()
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
fn run() -> Result<()> {
|
||||
brk_logger::init(Some(Path::new(".log")))?;
|
||||
|
||||
let outputs_dir = Path::new(&env::var("HOME").unwrap()).join(".brk");
|
||||
// let outputs_dir = Path::new("../../_outputs");
|
||||
|
||||
let indexer = Indexer::forced_import(&outputs_dir)?;
|
||||
|
||||
let fetcher = Fetcher::import(true, None)?;
|
||||
|
||||
let exit = Exit::new();
|
||||
exit.set_ctrlc_handler();
|
||||
|
||||
let computer = Computer::forced_import(&outputs_dir, &indexer, Some(fetcher))?;
|
||||
|
||||
let txindex = TxIndex::new(134217893);
|
||||
|
||||
dbg!(
|
||||
indexer
|
||||
.vecs
|
||||
.txindex_to_txid
|
||||
.read_once(txindex)
|
||||
.unwrap()
|
||||
.to_string()
|
||||
);
|
||||
let first_txinindex = indexer.vecs.txindex_to_first_txinindex.read_once(txindex)?;
|
||||
dbg!(first_txinindex);
|
||||
let first_txoutindex = indexer
|
||||
.vecs
|
||||
.txindex_to_first_txoutindex
|
||||
.read_once(txindex)?;
|
||||
dbg!(first_txoutindex);
|
||||
let input_count = *computer.indexes.txindex_to_input_count.read_once(txindex)?;
|
||||
dbg!(input_count);
|
||||
let output_count = *computer
|
||||
.indexes
|
||||
.txindex_to_output_count
|
||||
.read_once(txindex)?;
|
||||
dbg!(output_count);
|
||||
dbg!(
|
||||
computer
|
||||
.indexes
|
||||
.txinindex_to_txoutindex
|
||||
.read_once(first_txinindex)
|
||||
);
|
||||
dbg!(
|
||||
computer
|
||||
.indexes
|
||||
.txinindex_to_txoutindex
|
||||
.read_once(first_txinindex + 1)
|
||||
);
|
||||
dbg!(computer.chain.txinindex_to_value.read_once(first_txinindex));
|
||||
dbg!(
|
||||
computer
|
||||
.chain
|
||||
.txinindex_to_value
|
||||
.read_once(first_txinindex + 1)
|
||||
);
|
||||
dbg!(indexer.vecs.txoutindex_to_value.read_once(first_txoutindex));
|
||||
dbg!(
|
||||
indexer
|
||||
.vecs
|
||||
.txoutindex_to_value
|
||||
.read_once(first_txoutindex + 1)
|
||||
);
|
||||
dbg!(computer.chain.txindex_to_input_value.read_once(txindex));
|
||||
dbg!(computer.chain.txindex_to_input_value.read_once(txindex));
|
||||
dbg!(computer.chain.txindex_to_output_value.read_once(txindex));
|
||||
// dbg!(computer.indexes.txindex_to_txindex.ge(txindex));
|
||||
dbg!(
|
||||
computer
|
||||
.indexes
|
||||
.txinindex_to_txoutindex
|
||||
.region()
|
||||
.meta()
|
||||
.len()
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
@@ -10,8 +10,8 @@ use brk_types::{
|
||||
TxVersion, Version, WeekIndex, Weight, YearIndex,
|
||||
};
|
||||
use vecdb::{
|
||||
AnyVec, Database, EagerVec, Exit, GenericStoredVec, IterableCloneableVec, IterableVec,
|
||||
LazyVecFrom1, LazyVecFrom2, PAGE_SIZE, TypedVecIterator, VecIndex, unlikely,
|
||||
Database, EagerVec, Exit, GenericStoredVec, IterableCloneableVec, IterableVec, LazyVecFrom1,
|
||||
LazyVecFrom2, PAGE_SIZE, TypedVecIterator, VecIndex, unlikely,
|
||||
};
|
||||
|
||||
use crate::grouped::{
|
||||
@@ -1311,20 +1311,6 @@ impl Vecs {
|
||||
exit,
|
||||
)?;
|
||||
|
||||
// Debug: verify the computed txinindex_to_value
|
||||
dbg!("txinindex_to_value first 20:");
|
||||
for i in 0..20.min(self.txinindex_to_value.len()) {
|
||||
let val = self.txinindex_to_value.read_at_unwrap_once(i);
|
||||
dbg!((TxInIndex::from(i), val));
|
||||
}
|
||||
|
||||
// Debug: verify the computed txindex_to_input_count
|
||||
dbg!("txindex_to_input_count first 20:");
|
||||
for i in 0..20.min(indexes.txindex_to_input_count.len()) {
|
||||
let val = indexes.txindex_to_input_count.read_at_unwrap_once(i);
|
||||
dbg!((TxInIndex::from(i), val));
|
||||
}
|
||||
|
||||
self.txindex_to_input_value.compute_sum_from_indexes(
|
||||
starting_indexes.txindex,
|
||||
&indexer.vecs.txindex_to_first_txinindex,
|
||||
@@ -1333,12 +1319,6 @@ impl Vecs {
|
||||
exit,
|
||||
)?;
|
||||
|
||||
// Debug: verify the computed input values
|
||||
for i in 0..10.min(self.txindex_to_input_value.len()) {
|
||||
let val = self.txindex_to_input_value.read_at_unwrap_once(i);
|
||||
dbg!((TxIndex::from(i), "input_value", val));
|
||||
}
|
||||
|
||||
self.txindex_to_output_value.compute_sum_from_indexes(
|
||||
starting_indexes.txindex,
|
||||
&indexer.vecs.txindex_to_first_txoutindex,
|
||||
@@ -1347,26 +1327,17 @@ impl Vecs {
|
||||
exit,
|
||||
)?;
|
||||
|
||||
// Debug: verify the computed output values
|
||||
for i in 0..10.min(self.txindex_to_output_value.len()) {
|
||||
let val = self.txindex_to_output_value.read_at_unwrap_once(i);
|
||||
dbg!((TxIndex::from(i), "output_value", val));
|
||||
}
|
||||
|
||||
self.txindex_to_fee.compute_transform2(
|
||||
starting_indexes.txindex,
|
||||
&self.txindex_to_input_value,
|
||||
&self.txindex_to_output_value,
|
||||
|(i, input, output, ..)| {
|
||||
(
|
||||
i,
|
||||
if unlikely(input.is_max()) {
|
||||
Sats::ZERO
|
||||
} else {
|
||||
dbg!((i, input, output));
|
||||
input.checked_sub(output).unwrap()
|
||||
},
|
||||
)
|
||||
let fee = if unlikely(input.is_max()) {
|
||||
Sats::ZERO
|
||||
} else {
|
||||
input - output
|
||||
};
|
||||
(i, fee)
|
||||
},
|
||||
exit,
|
||||
)?;
|
||||
@@ -1381,11 +1352,12 @@ impl Vecs {
|
||||
|
||||
self.indexes_to_sent
|
||||
.compute_all(indexes, price, starting_indexes, exit, |v| {
|
||||
v.compute_sum_from_indexes(
|
||||
v.compute_filtered_sum_from_indexes(
|
||||
starting_indexes.height,
|
||||
&indexer.vecs.height_to_first_txindex,
|
||||
&indexes.height_to_txindex_count,
|
||||
&self.txindex_to_input_value,
|
||||
|sats| !sats.is_max(),
|
||||
exit,
|
||||
)?;
|
||||
Ok(())
|
||||
@@ -1472,6 +1444,8 @@ impl Vecs {
|
||||
},
|
||||
exit,
|
||||
)?;
|
||||
drop(height_to_coinbase_iter);
|
||||
|
||||
if let Some(mut height_to_coinbase_iter) = self
|
||||
.indexes_to_coinbase
|
||||
.dollars
|
||||
@@ -1493,18 +1467,20 @@ impl Vecs {
|
||||
)?;
|
||||
}
|
||||
|
||||
drop(height_to_coinbase_iter);
|
||||
|
||||
self.indexes_to_subsidy
|
||||
.compute_all(indexes, price, starting_indexes, exit, |vec| {
|
||||
let mut indexes_to_fee_sum_iter =
|
||||
self.indexes_to_fee.sats.height.unwrap_sum().iter();
|
||||
vec.compute_transform(
|
||||
vec.compute_transform2(
|
||||
starting_indexes.height,
|
||||
self.indexes_to_coinbase.sats.height.as_ref().unwrap(),
|
||||
|(height, coinbase, ..)| {
|
||||
let fees = indexes_to_fee_sum_iter.get_unwrap(height);
|
||||
(height, coinbase.checked_sub(fees).unwrap())
|
||||
self.indexes_to_fee.sats.height.unwrap_sum(),
|
||||
|(height, coinbase, fees, ..)| {
|
||||
(
|
||||
height,
|
||||
coinbase.checked_sub(fees).unwrap_or_else(|| {
|
||||
dbg!(height, coinbase, fees);
|
||||
panic!()
|
||||
}),
|
||||
)
|
||||
},
|
||||
exit,
|
||||
)?;
|
||||
|
||||
@@ -235,21 +235,17 @@ where
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn compute<I2>(
|
||||
pub fn compute<A>(
|
||||
&mut self,
|
||||
max_from: I,
|
||||
source: &impl IterableVec<I2, T>,
|
||||
first_indexes: &impl IterableVec<I, I2>,
|
||||
source: &impl IterableVec<A, T>,
|
||||
first_indexes: &impl IterableVec<I, A>,
|
||||
count_indexes: &impl IterableVec<I, StoredU64>,
|
||||
exit: &Exit,
|
||||
) -> Result<()>
|
||||
where
|
||||
I2: VecIndex + VecValue + CheckedSub<I2>,
|
||||
A: VecIndex + VecValue + CheckedSub<A>,
|
||||
{
|
||||
dbg!(source.len());
|
||||
dbg!(first_indexes.len());
|
||||
dbg!(count_indexes.len());
|
||||
|
||||
self.validate_computed_version_or_reset(
|
||||
source.version() + first_indexes.version() + count_indexes.version(),
|
||||
)?;
|
||||
@@ -399,16 +395,16 @@ where
|
||||
}
|
||||
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
pub fn from_aligned<I2>(
|
||||
pub fn from_aligned<A>(
|
||||
&mut self,
|
||||
max_from: I,
|
||||
source: &EagerVecsBuilder<I2, T>,
|
||||
first_indexes: &impl IterableVec<I, I2>,
|
||||
source: &EagerVecsBuilder<A, T>,
|
||||
first_indexes: &impl IterableVec<I, A>,
|
||||
count_indexes: &impl IterableVec<I, StoredU64>,
|
||||
exit: &Exit,
|
||||
) -> Result<()>
|
||||
where
|
||||
I2: VecIndex + VecValue + CheckedSub<I2>,
|
||||
A: VecIndex + VecValue + CheckedSub<A>,
|
||||
{
|
||||
if self.pct90.is_some()
|
||||
|| self.pct75.is_some()
|
||||
|
||||
@@ -438,9 +438,9 @@ impl Vecs {
|
||||
starting_indexes: brk_indexer::Indexes,
|
||||
exit: &Exit,
|
||||
) -> Result<Indexes> {
|
||||
let idxs = self.compute_(indexer, starting_indexes, exit)?;
|
||||
let indexes = self.compute_(indexer, starting_indexes, exit)?;
|
||||
self.db.compact()?;
|
||||
Ok(idxs)
|
||||
Ok(indexes)
|
||||
}
|
||||
|
||||
fn compute_(
|
||||
@@ -460,13 +460,12 @@ impl Vecs {
|
||||
&indexer.vecs.txinindex_to_outpoint,
|
||||
|(txinindex, outpoint, ..)| {
|
||||
if unlikely(outpoint.is_coinbase()) {
|
||||
(txinindex, TxOutIndex::COINBASE)
|
||||
} else {
|
||||
let txoutindex = txindex_to_first_txoutindex
|
||||
.read_unwrap(outpoint.txindex(), &txindex_to_first_txoutindex_reader)
|
||||
+ outpoint.vout();
|
||||
(txinindex, txoutindex)
|
||||
return (txinindex, TxOutIndex::COINBASE);
|
||||
}
|
||||
let txoutindex = txindex_to_first_txoutindex
|
||||
.read_unwrap(outpoint.txindex(), &txindex_to_first_txoutindex_reader)
|
||||
+ outpoint.vout();
|
||||
(txinindex, txoutindex)
|
||||
},
|
||||
exit,
|
||||
)?;
|
||||
|
||||
@@ -157,8 +157,6 @@ impl Computer {
|
||||
info!("Computing indexes...");
|
||||
let mut starting_indexes = self.indexes.compute(indexer, starting_indexes, exit)?;
|
||||
|
||||
return Ok(());
|
||||
|
||||
if let Some(fetched) = self.fetched.as_mut() {
|
||||
info!("Computing fetched...");
|
||||
fetched.compute(indexer, &self.indexes, &starting_indexes, exit)?;
|
||||
@@ -201,6 +199,8 @@ impl Computer {
|
||||
self.market.compute(price, &starting_indexes, exit)?;
|
||||
}
|
||||
|
||||
return Ok(());
|
||||
|
||||
// constants.join().unwrap()?;
|
||||
// chain.join().unwrap()?;
|
||||
// Ok(())
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
use std::{collections::BTreeMap, sync::Arc};
|
||||
|
||||
use brk_computer::Computer;
|
||||
use brk_error::Result;
|
||||
use brk_error::{Error, Result};
|
||||
use brk_indexer::Indexer;
|
||||
use brk_reader::Reader;
|
||||
use brk_traversable::TreeNode;
|
||||
@@ -191,8 +191,8 @@ impl Query {
|
||||
Format::JSON => {
|
||||
let mut values = metrics
|
||||
.iter()
|
||||
.map(|vec| vec.collect_range_json_bytes(from, to))
|
||||
.collect::<Vec<_>>();
|
||||
.map(|vec| vec.collect_range_json_bytes(from, to).map_err(Error::from))
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
|
||||
if values.is_empty() {
|
||||
return Ok(Output::default(format));
|
||||
|
||||
@@ -17,9 +17,12 @@ pub struct FeeRate(f64);
|
||||
impl From<(Sats, StoredU64)> for FeeRate {
|
||||
#[inline]
|
||||
fn from((sats, vsize): (Sats, StoredU64)) -> Self {
|
||||
if sats.is_zero() {
|
||||
return Self(0.0);
|
||||
}
|
||||
let sats = u64::from(sats);
|
||||
let vsize = u64::from(vsize);
|
||||
Self(((sats * 1000 + vsize.checked_sub(1).unwrap()) / vsize) as f64 / 1000.0)
|
||||
Self((sats * 1000).div_ceil(vsize) as f64 / 1000.0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,11 @@ impl OutPoint {
|
||||
pub fn is_coinbase(self) -> bool {
|
||||
self == Self::COINBASE
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn is_not_coinbase(self) -> bool {
|
||||
self != Self::COINBASE
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for OutPoint {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::{
|
||||
iter::Sum,
|
||||
ops::{Add, AddAssign, Div, Mul, SubAssign},
|
||||
ops::{Add, AddAssign, Div, Mul, Sub, SubAssign},
|
||||
};
|
||||
|
||||
use bitcoin::Amount;
|
||||
@@ -78,16 +78,14 @@ impl Sats {
|
||||
impl Add for Sats {
|
||||
type Output = Self;
|
||||
fn add(self, rhs: Self) -> Self::Output {
|
||||
Self::from(self.0 + rhs.0)
|
||||
// Self::from(
|
||||
// self.0
|
||||
// .checked_add(rhs.0)
|
||||
// .or_else(|| {
|
||||
// dbg!(rhs);
|
||||
// panic!();
|
||||
// })
|
||||
// .unwrap(),
|
||||
// )
|
||||
Self(self.0 + rhs.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl Sub for Sats {
|
||||
type Output = Self;
|
||||
fn sub(self, rhs: Self) -> Self::Output {
|
||||
Self(self.0 - rhs.0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -151,3 +151,4 @@
|
||||
- https://マリウス.com/thoughts-on-cloudflare/
|
||||
- tor: https://news.ycombinator.com/item?id=45683380
|
||||
- design: https://opencode.ai/
|
||||
- design: https://vortex.dev/
|
||||
|
||||
Reference in New Issue
Block a user