diff --git a/README.md b/README.md index 954921ceb..b622cde76 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Please open an issue if you want to add another instance ### Requirements -- At least 8 GB of RAM +- At least 16 GB of RAM - 1 TB of free space (will use 60-80% of that) - A running instance of bitcoin-core with: - `-txindex=1` diff --git a/parser/src/actions/iter_blocks.rs b/parser/src/actions/iter_blocks.rs index 8b4e19938..b5a9b5a90 100644 --- a/parser/src/actions/iter_blocks.rs +++ b/parser/src/actions/iter_blocks.rs @@ -12,7 +12,7 @@ use crate::{ datasets::{AllDatasets, ComputeData}, io::OUTPUTS_FOLDER_PATH, states::{AddressCohortsDurableStates, States, UTXOCohortsDurableStates}, - structs::{DateData, MapKey, Timestamp, RAM}, + structs::{DateData, MapKey, Timestamp}, utils::{generate_allocation_files, log, time}, Config, Exit, Height, }; @@ -57,8 +57,6 @@ pub fn iter_blocks( let mut block_iter = block_receiver.iter(); - let ram = RAM::new(); - 'parsing: loop { let instant = Instant::now(); @@ -175,14 +173,11 @@ pub fn iter_blocks( if is_date_last_block { height += blocks_loop_i; - let is_check_point = next_block_date.as_ref().map_or(true, |date| { - date.is_first_of_january() || date.is_first_of_june() - }); + let is_check_point = next_block_date + .as_ref() + .map_or(true, |date| date.is_first_of_month()); - if is_check_point - || ram.max_exceeded(config) - || height.is_close_to_end(approx_block_count) - { + if is_check_point || height.is_close_to_end(approx_block_count) { break 'days; } diff --git a/parser/src/structs/date.rs b/parser/src/structs/date.rs index ef9c619f2..ec36f4c52 100644 --- a/parser/src/structs/date.rs +++ b/parser/src/structs/date.rs @@ -74,12 +74,16 @@ impl Date { } } + pub fn is_first_of_month(&self) -> bool { + self.day() == 1 + } + pub fn is_first_of_january(&self) -> bool { - self.day() == 1 && self.month() == 1 + self.is_first_of_month() && self.month() == 1 } pub fn is_first_of_june(&self) -> bool { - self.day() == 1 && self.month() == 6 + self.is_first_of_month() && self.month() == 6 } } diff --git a/parser/src/structs/mod.rs b/parser/src/structs/mod.rs index 7104b51f0..5ae4e98ed 100644 --- a/parser/src/structs/mod.rs +++ b/parser/src/structs/mod.rs @@ -27,7 +27,6 @@ mod liquidity; mod map_value; mod partial_txout_data; mod price; -mod ram; mod sent_data; mod serialized_btreemap; mod serialized_vec; @@ -64,7 +63,6 @@ pub use liquidity::*; pub use map_value::*; pub use partial_txout_data::*; pub use price::*; -pub use ram::*; pub use sent_data::*; pub use serialized_btreemap::*; pub use serialized_vec::*;