feat(config): rework FiberDAConfig for correct gRPC/JSON-RPC wiring#3285
Closed
walldiss wants to merge 1 commit intoevstack:julien/fiberfrom
Closed
feat(config): rework FiberDAConfig for correct gRPC/JSON-RPC wiring#3285walldiss wants to merge 1 commit intoevstack:julien/fiberfrom
walldiss wants to merge 1 commit intoevstack:julien/fiberfrom
Conversation
Addresses an audit of the Fiber DA config surface against
celestia-node/api/client. Splits the fields so each of the two
physical endpoints — consensus gRPC and bridge JSON-RPC — has its
own address, TLS, and auth token, and exposes the appfibre
concurrency tuning that was hinted at by a dangling comment.
Field changes on FiberDAConfig:
Renamed:
StateAddress → ConsensusAddress
(same string, clearer intent: this is the consensus gRPC
endpoint, used for both the shared TxClient/CoreAccessor conn
and appfibre.Client's state-client conn. They target the same
host — one consensus node.)
Added:
ConsensusTLS — TLS for consensus gRPC (CoreGRPCConfig.TLSEnabled)
ConsensusAuthToken — x-token for consensus gRPC (separate from bridge JWT)
BridgeAuthToken — JWT for the celestia-node bridge
(Authorization: Bearer). Kept distinct from the
existing DA.AuthToken so operators can feed
different credentials to each endpoint.
UploadConcurrency — caps concurrent FSP uploads; 0 keeps the
appfibre.Client protocol default.
DownloadConcurrency — caps concurrent FSP downloads; 0 keeps the
appfibre.Client protocol default.
Cleanup:
Removed the dangling "// UploadConcurrency ..." comment that had
no field underneath — now a real field as documented above.
Flags registered accordingly:
evnode.da.fiber.consensus_address
evnode.da.fiber.consensus_tls
evnode.da.fiber.consensus_auth_token
evnode.da.fiber.bridge_address
evnode.da.fiber.bridge_auth_token
evnode.da.fiber.upload_concurrency
evnode.da.fiber.download_concurrency
(plus the pre-existing evnode.da.fiber.enabled, evnode.da.fiber.key_name)
Validation: FiberDAConfig.Validate surfaces misconfigs at startup
rather than at first Fibre op:
- consensus_address and bridge_address are required when enabled
- bridge_address URL must use ws:// or wss:// scheme —
blob.Subscribe is channel-returning and only works over
WebSocket; plain HTTP JSON-RPC returns "no out channel support"
and Listen silently breaks
- non-negative concurrency values
Wired into Config.Validate alongside Raft/Pruning.
Consumer side: risotto's evolve/cmd/run.go currently wires
CoreGRPCConfig.Addr = Fiber.BridgeAddress — that's a mis-plumbing
(the two fields target different physical endpoints). A paired
risotto PR consumes the reworked shape and fixes that bug.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audit of the Fiber DA config surface against how `celestia-node/api/client` actually uses the values surfaced a few problems:
Changes to `FiberDAConfig`
Renamed:
Added:
Cleanup:
New flags (same prefix scheme)
```
evnode.da.fiber.consensus_address
evnode.da.fiber.consensus_tls
evnode.da.fiber.consensus_auth_token
evnode.da.fiber.bridge_address (pre-existing, doc updated)
evnode.da.fiber.bridge_auth_token
evnode.da.fiber.upload_concurrency
evnode.da.fiber.download_concurrency
```
Plus `evnode.da.fiber.enabled` and `evnode.da.fiber.key_name` as before.
Validation
`FiberDAConfig.Validate` surfaces misconfigs at startup instead of at first Fibre op. When `Enabled=true`:
Wired into `Config.Validate` alongside Raft / Pruning.
Not addressed here (called out for a follow-up)
Paired risotto change
risotto's `evolve/cmd/run.go` currently wires `CoreGRPCConfig.Addr = Fiber.BridgeAddress` — a mis-plumbing because the two fields target different physical endpoints. Once this PR lands, a paired risotto PR consumes the reworked shape, fixes the bug, and wires TLS + separate auth + concurrency.
Test plan
🤖 Generated with Claude Code