From 66feb36b4ef2c79415ca8ea765d8235d48dfa8f8 Mon Sep 17 00:00:00 2001 From: Omar Date: Tue, 25 Nov 2025 15:06:07 +0300 Subject: [PATCH] Update the number of cached blocks (#215) * Update the commit hash of the tests * Update the number of cached blocks in revive-dev-node --- crates/node/src/node_implementations/substrate.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/node/src/node_implementations/substrate.rs b/crates/node/src/node_implementations/substrate.rs index 627aa24..1dce305 100644 --- a/crates/node/src/node_implementations/substrate.rs +++ b/crates/node/src/node_implementations/substrate.rs @@ -57,6 +57,9 @@ use crate::{ static NODE_COUNT: AtomicU32 = AtomicU32::new(0); +/// The number of blocks that should be cached by the revive-dev-node and the eth-rpc. +const NUMBER_OF_CACHED_BLOCKS: u32 = 100_000; + /// A node implementation for Substrate based chains. Currently, this supports either substrate /// or the revive-dev-node which is done by changing the path and some of the other arguments passed /// to the command. @@ -212,6 +215,8 @@ impl SubstrateNode { .arg(u32::MAX.to_string()) .arg("--pool-kbytes") .arg(u32::MAX.to_string()) + .arg("--state-pruning") + .arg(NUMBER_OF_CACHED_BLOCKS.to_string()) .env("RUST_LOG", Self::SUBSTRATE_LOG_ENV) .stdout(stdout_file) .stderr(stderr_file); @@ -252,9 +257,9 @@ impl SubstrateNode { .arg("--rpc-max-connections") .arg(u32::MAX.to_string()) .arg("--index-last-n-blocks") - .arg(1_000u32.to_string()) + .arg(NUMBER_OF_CACHED_BLOCKS.to_string()) .arg("--cache-size") - .arg(1_000u32.to_string()) + .arg(NUMBER_OF_CACHED_BLOCKS.to_string()) .env("RUST_LOG", Self::PROXY_LOG_ENV) .stdout(stdout_file) .stderr(stderr_file);