Skip to content

[P0] Celestia GetBlockTimestamp ignores --celestia-token (all verifications fail with auth enabled) #35

Closed

Description

@auricom

Priority: P0 (bug) · Effort: S

Problem

internal/clients/celestia/client.go:229-284 (GetBlockTimestamp) sends header.GetByHeight with http.DefaultClient and no Authorization header. The --celestia-token value is passed to jsonrpc.NewClient but never stored on Client.

On a celestia-node with auth enabled (the default unless --rpc.skip-auth), this call returns 401. Every verifyAttempt then fails at verifier.go:304, every block exhausts its retries, and each one is reported as unsubmitted. The headline metric becomes false.

Proposed fix

  • Add a token string field to celestia.Client.
  • In GetBlockTimestamp, set req.Header.Set("Authorization", "Bearer "+c.token) when the token is non-empty.

Pros / Cons

  • ✅ ~3 lines; fixes verification against authenticated nodes.
  • ⚠️ None.

Acceptance criteria

  • Unit test with an httptest server asserting that the Authorization header is present when a token is configured and absent otherwise.

Activity

  1. auricom commented on Oct 20, 2026

    @auricom
    CollaboratorAuthor

    Related PR: #33 (ev-node v1.0.0 upgrade) rewrites internal/clients/celestia/client.go but does not fix this. CodeRabbit flagged the same bug on that PR. Suggested approach: add the 3-line token fix to #33 with Fixes #35, so the Celestia client changes land together.

  2. self-assigned this
    on Oct 20, 2026
  3. auricom commented on Oct 20, 2026

    @auricom
    CollaboratorAuthor

    Fixed on main by #55: GetBlockTimestamp now sends Authorization: Bearer <token>, with a test in internal/clients/celestia/client_test.go. #55 did not link this issue, so it is closed manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions