Skip to content

perf(l1,l2): remove latest_block_header lock#5050

Merged
jrchatruc merged 12 commits into
mainfrom
perf/remove_latest_header_lock
Oct 31, 2025
Merged

perf(l1,l2): remove latest_block_header lock#5050
jrchatruc merged 12 commits into
mainfrom
perf/remove_latest_header_lock

Conversation

@Oppen

@Oppen Oppen commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

chain_config is a matter of initialization with mutable stores, while
latest_block_header is replaced by an ArcSwap to allow lock-free
swapping with new values.

Motivation

Description

Closes #issue_number

chain_config is a matter of initialization with mutable stores, while
latest_block_header is replaced by an ArcSwap to allow lock-free
swapping with new values.
@github-actions github-actions Bot added L1 Ethereum client L2 Rollup client performance Block execution throughput and performance in general labels Oct 24, 2025
@github-actions

github-actions Bot commented Oct 24, 2025

Copy link
Copy Markdown

Lines of code report

Total lines added: 0
Total lines removed: 20
Total lines changed: 20

Detailed view
+--------------------------------+-------+------+
| File                           | Lines | Diff |
+--------------------------------+-------+------+
| ethrex/crates/storage/store.rs | 1513  | -20  |
+--------------------------------+-------+------+

@github-actions

github-actions Bot commented Oct 28, 2025

Copy link
Copy Markdown

Benchmark Block Execution Results Comparison Against Main

Command Mean [s] Min [s] Max [s] Relative
base 73.954 ± 0.104 73.822 74.114 1.00
head 74.143 ± 0.216 73.853 74.554 1.00 ± 0.00

@jrchatruc jrchatruc changed the title perf(l1,l2): remove latest_block_header and chain_config locks perf(l1,l2): remove latest_block_header lock Oct 28, 2025
@jrchatruc
jrchatruc marked this pull request as ready for review October 28, 2025 20:12
@jrchatruc
jrchatruc requested a review from a team as a code owner October 28, 2025 20:12
Copilot AI review requested due to automatic review settings October 28, 2025 20:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@pablodeymo pablodeymo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's bettet to find an altenative of https://crates.io/crates/arc-swap

@github-project-automation github-project-automation Bot moved this to In Progress in ethrex_l1 Oct 30, 2025
@github-project-automation github-project-automation Bot moved this to Requires Changes in ethrex_l2 Oct 30, 2025

@pablodeymo pablodeymo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation Bot moved this from In Progress to In Review in ethrex_l1 Oct 31, 2025
@jrchatruc
jrchatruc enabled auto-merge October 31, 2025 16:08
@jrchatruc
jrchatruc added this pull request to the merge queue Oct 31, 2025
Merged via the queue into main with commit 4d2fa0b Oct 31, 2025
42 checks passed
@jrchatruc
jrchatruc deleted the perf/remove_latest_header_lock branch October 31, 2025 17:03
@github-project-automation github-project-automation Bot moved this from Requires Changes to Done in ethrex_l2 Oct 31, 2025
@github-project-automation github-project-automation Bot moved this from Todo to Done in ethrex_performance Oct 31, 2025
@github-project-automation github-project-automation Bot moved this from In Review to Done in ethrex_l1 Oct 31, 2025
xqft pushed a commit that referenced this pull request Nov 11, 2025
chain_config is a matter of initialization with mutable stores, while
latest_block_header is replaced by an ArcSwap to allow lock-free
swapping with new values.

**Motivation**

<!-- Why does this pull request exist? What are its goals? -->

**Description**

<!-- A clear and concise general description of the changes this PR
introduces -->

<!-- Link to issues: Resolves #111, Resolves #222 -->

Closes #issue_number

---------

Co-authored-by: Lucas Fiegl <iovoid@users.noreply.github.com>
Co-authored-by: Javier Rodríguez Chatruc <49622509+jrchatruc@users.noreply.github.com>
Co-authored-by: Javier Chatruc <jrchatruc@gmail.com>
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 performance Block execution throughput and performance in general

Projects

Status: Done
Status: Done
Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants