api/client: New fails with a TLS core endpoint because the fibre state client dials insecurely

Open
#5,267 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #5268 by @0xShadowX — closed without merging

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go, grpc

Research direction

Start at api/client.New and trace initTxClient, especially where appFibreCfg.StateAddress is set and the local Fibre client starts. Compare that connection with conn used by the tx client and CoreAccessor, including TLS credentials and the x-token interceptor. Done means api/client.New succeeds against a TLS, token-protected core endpoint and Blob.Submit and State remain usable.

Written by the indexing model from the issue text.

Description

external needs:triage

Version: main (3b16e0d4)

api/client.New with a submit config fails when the core gRPC endpoint uses TLS:

starting fibre client: detect chain ID: rpc error: code = Unavailable desc = connection error: desc = "error reading server preface: EOF"

initTxClient builds the local Fibre client with appFibreCfg.StateAddress = conn.Target(). celestia-app's default fibre state client dials that address on its own connection with insecure credentials and without the x-token interceptor, while the tx client and CoreAccessor use conn, which has TLS and the token configured. The fibre client can't reach the endpoint, and since its Start error is returned from initTxClient, the whole client fails to build, including Blob.Submit and State.

Expected: api/client.New works against a TLS (and token-protected) core endpoint.

Dominant language
Go
Stars
1k
Forks
1.1k
Avg merge
1d 22h
Merged PRs (30d)
55

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from celestiaorg/celestia-node

All issues in celestiaorg/celestia-node

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.