Skip to content

Conversation

fedacking
Copy link
Contributor

@fedacking fedacking commented Oct 8, 2025

Motivation

Snap sync generates some intermediate files to limit the amount of memory used during the process. These are filled with the leaves downloaded during the first step of snap sync, before healing. These are large files that remain after the node is done using them. This pr aims to delete them, and to not launch a run if the previous files are in disk.

Description

  • Deletes snapshot files for account state, storage slots and the temporary rocksdb db used for faster insert.
  • Exits the process if we find the files in disk. Example of the log in that scenario.\

ERROR ethrex_p2p::sync: One of the folders used for temporary leaves during snap is still used. Delete them in /home/admin/.local/share/ethrex

@github-actions github-actions bot added the L1 Ethereum client label Oct 8, 2025
Copy link

github-actions bot commented Oct 8, 2025

Lines of code report

Total lines added: 36
Total lines removed: 0
Total lines changed: 36

Detailed view
+---------------------------------------+-------+------+
| File                                  | Lines | Diff |
+---------------------------------------+-------+------+
| ethrex/crates/networking/p2p/sync.rs  | 1510  | +23  |
+---------------------------------------+-------+------+
| ethrex/crates/networking/p2p/utils.rs | 275   | +13  |
+---------------------------------------+-------+------+

@fedacking fedacking marked this pull request as ready for review October 13, 2025 21:58
@fedacking fedacking requested a review from a team as a code owner October 13, 2025 21:58
@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

4 participants