Skip to content

Conversation

rymnc
Copy link
Member

@rymnc rymnc commented Jun 5, 2025

Simple fix for the fuel-simulator for running integration tests. we ensure here that we don't have uncontrolled growth in memory. the blocks vec now holds a maximum of 10_000 blocks, so the max memory usage of this structure at peak is (10_000 * (128 + 28 + 4)) = 1.6 mb. (with the default block size set to 128 bytes)

@rymnc rymnc requested a review from a team as a code owner June 5, 2025 08:52
@rymnc rymnc mentioned this pull request Jun 5, 2025
40 tasks
@rymnc rymnc requested a review from Dentosal June 5, 2025 09:26
@rymnc rymnc added the eigen label Jun 5, 2025
//
/// Background block production – a new block is produced every second.
async fn produce_blocks(state: Arc<AppState>) {
const MAX_RETAINED_BLOCKS: usize = 10_000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should refactor it into some file specific for constants? Or make it configurable via some env var.

NOTE: But, since we plan to have a separate PR to take for this, we can just leave a TODO comment here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think its fine, this is just a simulator for fuel-core :/ doesn't exactly need env vars / more configuration.

what do you think?

@rymnc rymnc merged commit 3b96db3 into feat/eigenda-support Jun 5, 2025
12 checks passed
@rymnc rymnc deleted the fix/mem-growth-fuel-simulator branch June 5, 2025 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants