Add +rpc cabal flag to gate gRPC dependencies
Maintainers usually reply within 2 days
@carbolymer is already working on this.
Since Mar 31, 2026.
Assessment
This issue has not been assessed yet.
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.
- Dominant language
- Haskell
- Stars
- 41
- Forks
- 33
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 15
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IntersectMBO/cardano-api
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
IntersectMBO/cardano-api#1434 ·
Maintainers usually reply within 2 days
-
`Prelude.maximum: empty list` crash in fee estimation for empty `RequireAnyOf` (`{"type": "any", "scripts": []}`) scriptsPossibly taken @Jimbo4350 claimed this 8 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
IntersectMBO/cardano-api#1424 ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 53/100
IntersectMBO/cardano-api#1431 ·
Maintainers usually reply within 2 days
-
type: enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
IntersectMBO/cardano-api#1423 ·
Maintainers usually reply within 2 days
-
Add a dedicated transaction viewing type to the experimental APIPossibly taken @palas claimed this 21 days ago. Opentype: enhancement
IntersectMBO/cardano-api#1416 · 1 assignee ·
Maintainers usually reply within 2 days
All issues in IntersectMBO/cardano-api
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
haskell/bytestring#730 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
seal-harness/seal-harness#399 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
fmidue/codeworld-tasks#124 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
reflex-frp/reflex#563 ·