Repository navigation
Fix/input processing too much memory - #807
Open
renatomaia wants to merge 8 commits into
Open
renatomaia wants to merge 8 commits into
renatomaia wants to merge 8 commits into
Conversation
renatomaia
force-pushed
the
fix/InputProcessingTooMuchMemory
branch
2 times, most recently
from
October 27, 2026 12:47
51730c5 to
ecf8027
Compare
renatomaia
requested review from
mpolitzer and
vfusco
and removed request for
vfusco
October 27, 2026 12:49
renatomaia
marked this pull request as ready for review
October 27, 2026 12:50
renatomaia
force-pushed
the
fix/InputProcessingTooMuchMemory
branch
from
October 27, 2026 19:10
ecf8027 to
32779b1
Compare
…sed by each application
renatomaia
force-pushed
the
fix/InputProcessingTooMuchMemory
branch
from
November 13, 2026 03:16
32779b1 to
1f33c0f
Compare
…avoid too big Ethereum calls
Sample managed node service RSS every 10 ms while ingesting a dense input block. Log baseline and sampled peak memory, and enforce a configurable growth limit that defaults to 256 MiB. Cover procfs RSS reads and missing processes. Verify RSS reader tests with the race detector and compile the end-to-end suite; the full stress scenario was not run.
renatomaia
force-pushed
the
fix/InputProcessingTooMuchMemory
branch
from
November 13, 2026 03:36
1f33c0f to
6f10d81
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR bounds memory use when reading inputs from the chain by introducing a shared per-tick input budget across applications and open/sealed epochs. Blocks containing more inputs than the remaining budget are processed across multiple ticks, with persisted progress allowing ingestion to resume without skipping or reinserting inputs. Applications receive priority in rotation to prevent starvation.
The reader uses FilterQuery topic filtering (see here) to request only the required application and input indices—for example, `appContract = DAppAddr1 AND (index = 100 OR index = 101 OR index = 102)``. This bounds the inputs returned by each query, even when many inputs share a single block.
CARTESI_EVM_READER_MAX_INPUTS_PER_STEPdefaults to 500 and accepts values from 1 to 1,000, keeping index-topic alternatives within Geth’s default limit (see here). Regression tests cover partial-block resumption, epoch transitions, shared-budget enforcement, and scheduling fairness. A same-block integration stress test also measures sampled RSS growth against a configurable limit.