-
Notifications
You must be signed in to change notification settings - Fork 29
Add +rpc cabal flag to gate gRPC dependencies #1167
Copy link
Copy link
Open
Description
Summary
The cardano-rpc package introduces new dependencies (grapesy, grpc-spec, proto-lens) that are currently linked into all cardano-node builds, including block producers that will never enable the RPC feature.
A cabal flag (+rpc, off by default) should gate these dependencies so that builds without the flag exclude them entirely.
Motivation
- Block producer builds should not carry unnecessary dependencies that increase the attack surface and binary size.
- Operators who want the RPC interface opt in explicitly at build time.
- This was requested during ADR-018 review.
Proposed approach
- Add a
flag rpc(default:False, manual:True) tocardano-node.cabal. - Make
build-depends: cardano-rpcconditional onflag(rpc). - Guard RPC server startup code in
cardano-nodebehind a CPP conditional (e.g.#ifdef RPC). - Document the flag in the README and in ADR-018.
Acceptance criteria
-
cabal build cardano-node(without the flag) does not pull ingrapesy,grpc-spec,proto-lens, orcardano-rpc. -
cabal build cardano-node -f +rpcbuilds with full RPC support. - CI runs builds with and without the flag.
🤖 Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels