Skip to content

core: use now for DA check instead of chasingHead.time - #3645

Merged
allformless merged 1 commit into
bnb-chain:developfrom
allformless:remove-ChasingHead-for-DA
Apr 16, 2026
Merged

allformless merged 1 commit into
bnb-chain:developfrom
allformless:remove-ChasingHead-for-DA

Conversation

@allformless

@allformless allformless commented Apr 16, 2026 •

Copy link
Copy Markdown
Collaborator

Description

core: use now for DA check instead of chasingHead.time

Rationale

this PR will replace core: reject future chasing heads for DA checks

The previous DA skip condition compared block time against ChasingHead.Time — a
best-known remote head populated from peer sync state via the downloader. This introduced
two problems:

  1. Security risk: a malicious peer could advertise a far-future head timestamp to
    suppress DA validation on recent blocks, bypassing blob sidecar checks. A future-time
    guard was added as a mitigation, but it only partially addressed the issue.

  2. Unnecessary complexity: ChasingHead was the only consumer of this
    peer-provided head state. The blob retention window (MinTimeDurationForBlobRequests = 18.2 days) is defined in wall-clock time, so the correct reference point is
    time.Now(), not a peer-derived value.

Example

add an example CLI or API response...

Changes

Replace the skip condition:

// before
if block.Time()+MinTimeDurationForBlobRequests < chasingHead.Time { ... }

// after
if block.Time()+MinTimeDurationForBlobRequests < time.Now().Unix() { ... }

@allformless
allformless force-pushed the remove-ChasingHead-for-DA branch from 1501de3 to 6144547 Compare April 16, 2026 02:26
@allformless allformless changed the title core: remove chasingHead for DA check core: use now for DA check instead of chasingHead.time Apr 16, 2026
@allformless allformless added this to the 1.7.3 milestone Apr 16, 2026
@allformless
allformless merged commit 0dad242 into bnb-chain:develop Apr 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants