mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-20 11:44:20 -07:00
global: snapshot
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
.DS_Store
|
||||
/target
|
||||
/.vscode
|
||||
/.zed
|
||||
|
||||
flamegraph/
|
||||
flamegraph.svg
|
||||
/profile.json
|
||||
|
||||
/inputs*/
|
||||
/in
|
||||
/outputs*/
|
||||
/out
|
||||
/snapshots*/
|
||||
/exports*/
|
||||
/imports*/
|
||||
benches
|
||||
|
||||
parser.log
|
||||
config.toml
|
||||
*\ copy*
|
||||
/.log
|
||||
@@ -1,27 +0,0 @@
|
||||
# Satonomics - Parser
|
||||
|
||||
## Description
|
||||
|
||||
The backbone of the project, it does most of the work by parsing and then computing datasets from the timechain
|
||||
|
||||
## Requirements
|
||||
|
||||
- `rustup`
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
./run.sh --datadir=$HOME/Developer/bitcoin
|
||||
```
|
||||
|
||||
## Limitations
|
||||
|
||||
- Needs to stop the node to parse the files (at least for now)
|
||||
- Needs a **LOT** a disk space for databases (~700 GB for data from 2009 to mid 2024)
|
||||
|
||||
## Guidelines
|
||||
|
||||
- Avoid floats as much as possible
|
||||
- Use structs like `WAmount` and `Price` for calculations
|
||||
- **Only** use `WAmount.to_btc()` when inserting or computing inside a dataset. It is **very** expensive.
|
||||
- No `Arc`, `Rc`, `Mutex` even from third party libraries, they're slower
|
||||
@@ -26,7 +26,7 @@ use crate::io::OUTPUTS_FOLDER_PATH;
|
||||
/// There is no `cached_gets` since it's much cheaper and faster to do a parallel search first using `unsafe_get` than caching gets along the way.
|
||||
pub struct Database<Key, Value>
|
||||
where
|
||||
Key: Ord + Clone + Debug + ?Sized + Storable,
|
||||
Key: Ord + Clone + Debug + Storable,
|
||||
Value: Storable + PartialEq,
|
||||
{
|
||||
pub cached_puts: BTreeMap<Key, Value>,
|
||||
@@ -42,7 +42,7 @@ const PAGE_SIZE: u64 = 4096;
|
||||
|
||||
impl<Key, Value> Database<Key, Value>
|
||||
where
|
||||
Key: Ord + Clone + Debug + ?Sized + Storable,
|
||||
Key: Ord + Clone + Debug + Storable,
|
||||
Value: Storable + PartialEq,
|
||||
{
|
||||
pub fn open(folder: &str, file: &str) -> color_eyre::Result<Self> {
|
||||
|
||||
Reference in New Issue
Block a user