Skip to content

Conversation

@SDartayet
Copy link
Contributor

Motivation

Properly complying with the block building spec.

Description

As outlined in #4997, we should be bulding an initial empty block before filling it with transactions. This PR fixes that.

Closes #4997

@github-actions github-actions bot added the L1 Ethereum client label Nov 5, 2025
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Lines of code report

Total lines added: 13
Total lines removed: 0
Total lines changed: 13

Detailed view
+----------------------------------------+-------+------+
| File                                   | Lines | Diff |
+----------------------------------------+-------+------+
| ethrex/crates/blockchain/payload.rs    | 688   | +12  |
+----------------------------------------+-------+------+
| ethrex/tooling/reorgs/src/simulator.rs | 466   | +1   |
+----------------------------------------+-------+------+

let start = Instant::now();
const SECONDS_PER_SLOT: Duration = Duration::from_secs(12);
// Attempt to rebuild the payload as many times within the given timeframe to maximize fee revenue
// TODO(#4997): start with an empty block
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this TODO be dropped now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, fixed!

@github-project-automation github-project-automation bot moved this to In Review in ethrex_l1 Nov 10, 2025
@SDartayet SDartayet marked this pull request as ready for review November 10, 2025 19:28
@SDartayet SDartayet requested a review from a team as a code owner November 10, 2025 19:28
@SDartayet SDartayet enabled auto-merge November 10, 2025 19:31
@SDartayet SDartayet added this pull request to the merge queue Nov 10, 2025
Merged via the queue into main with commit 45a9871 Nov 10, 2025
43 checks passed
@SDartayet SDartayet deleted the build-empty-block branch November 10, 2025 20:00
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Nov 10, 2025
ilitteri pushed a commit that referenced this pull request Nov 10, 2025
SDartayet added a commit that referenced this pull request Nov 10, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 10, 2025
…5257)

**Description**

Reverts #5205, which was breaking L1 devnet (and therefore all L2
workflows)
xqft pushed a commit that referenced this pull request Nov 11, 2025
**Motivation**

Properly complying with the block building spec.

**Description**

As outlined in #4997, we should be bulding an initial empty block before
filling it with transactions. This PR fixes that.

Closes #4997
xqft pushed a commit that referenced this pull request Nov 11, 2025
…5257)

**Description**

Reverts #5205, which was breaking L1 devnet (and therefore all L2
workflows)
SDartayet added a commit that referenced this pull request Nov 13, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 13, 2025
**Description**

This commit reverts the revert of #5205 done in #5257. 
As of #5310, the dev mode block producer now waits for the configured
amount of time after initiating the payload build process and before
retrieving the built payload, rather than after payload validation. This
solves the issue we were having after merging #5205 where empty payloads
were retrieved because the `engine_getPayload` call was immediately done
after the `engine_forkChoiceUpdate`.
lakshya-sky pushed a commit to lakshya-sky/ethrex that referenced this pull request Nov 17, 2025
**Description**

This commit reverts the revert of lambdaclass#5205 done in lambdaclass#5257. 
As of lambdaclass#5310, the dev mode block producer now waits for the configured
amount of time after initiating the payload build process and before
retrieving the built payload, rather than after payload validation. This
solves the issue we were having after merging lambdaclass#5205 where empty payloads
were retrieved because the `engine_getPayload` call was immediately done
after the `engine_forkChoiceUpdate`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Start block building process with an empty block

4 participants