Skip to content

nodebuilder/header: Fix wasteful preemptive Head request #4748

@renaynay

Description

@renaynay

I have a latency monitor running against my BN's RPC that submits + retrieves blobs on a continuous loop (no listening to headers, no nothing, just submit --> resp --> retrieve --> resp --> submit.

Every call to blob.Get calls nodebuilder/header service implementation of retrieving header at given height results in wasteful "unrecent head" retrieval from core where BN considers its own head outdated if it's outdated by 1s or less:

2025-12-22T11:23:17.309Z        WARN    header/sync     sync/syncer_head.go:63  non recent subjective head      {"height": 9327244, "non_recent_for": "1.273323989s"}
2025-12-22T11:23:17.309Z        WARN    header/sync     sync/syncer_head.go:70  attempting to request the most recent network head...
2025-12-22T11:23:17.352Z        WARN    header/sync     sync/syncer_head.go:97  non recent head from trusted peers      {"height": 9327244, "non_recent_for": "1.316443369s"}
2025-12-22T11:23:17.352Z        ERROR   header/sync     sync/syncer_head.go:104 trusted peers are out of sync

If you have frequent + lots of blob submission happening against BN, this could result in wasteful roundtrips + unnecessary resources expended.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions