Skip to content

Conversation

SDartayet
Copy link
Contributor

Motivation

Removing clones from our codebase

Description

This PR removes the cloning of the block being added when it's stored. To avoid this, the ownership of the block struct is passed down from each function calling subsequent ones.

Part of #4668

@github-actions github-actions bot added L1 Ethereum client L2 Rollup client labels Oct 3, 2025
Copy link

github-actions bot commented Oct 3, 2025

Lines of code report

Total lines added: 26
Total lines removed: 0
Total lines changed: 26

Detailed view
+-------------------------------------------------------+-------+------+
| File                                                  | Lines | Diff |
+-------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/blockchain.rs                | 885   | +19  |
+-------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/block_producer.rs          | 226   | +3   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/l2/l2_connection.rs | 431   | +2   |
+-------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/sync.rs                  | 1297  | +1   |
+-------------------------------------------------------+-------+------+
| ethrex/tooling/migrations/src/cli.rs                  | 122   | +1   |
+-------------------------------------------------------+-------+------+

@SDartayet SDartayet marked this pull request as ready for review October 3, 2025 15:13
@SDartayet SDartayet requested a review from a team as a code owner October 3, 2025 15:13
@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Oct 3, 2025
@ilitteri ilitteri requested review from Oppen and pablodeymo October 3, 2025 19:00
@SDartayet SDartayet added this pull request to the merge queue Oct 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Oct 3, 2025
@SDartayet SDartayet enabled auto-merge October 6, 2025 15:54
@SDartayet SDartayet added this pull request to the merge queue Oct 6, 2025
Merged via the queue into main with commit 05e0de5 Oct 6, 2025
43 checks passed
@SDartayet SDartayet deleted the remove-block-clones branch October 6, 2025 17:13
@github-project-automation github-project-automation bot moved this to Done in ethrex_l2 Oct 6, 2025
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Oct 6, 2025
Peponks9 pushed a commit to Peponks9/ethrex that referenced this pull request Oct 7, 2025
…4759)

**Motivation**

Removing clones from our codebase

**Description**

This PR removes the cloning of the block being added when it's stored.
To avoid this, the ownership of the block struct is passed down from
each function calling subsequent ones.

Part of lambdaclass#4668
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client L2 Rollup client

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants