WIP: gRPC: Add gRPC interface to cardano-node with tests in cardano-testnet#6273
WIP: gRPC: Add gRPC interface to cardano-node with tests in cardano-testnet#6273carbolymer wants to merge 8 commits intomasterfrom
Conversation
864cf20 to
12bae80
Compare
0004d02 to
2c89086
Compare
aaab28c to
eab2ed1
Compare
4d19d4c to
98d8073
Compare
12d7ab5 to
73c37e6
Compare
8cbf3f2 to
0ec9ea7
Compare
7c29f29 to
ebf5f8b
Compare
a8564a9 to
5d772e5
Compare
5d772e5 to
450a849
Compare
eb845fe to
ecc60aa
Compare
.github/workflows/haskell.yml
Outdated
| - name: Cache Cabal store | ||
| uses: actions/cache/save@v4 | ||
| - name: Cache and install Cabal dependencies | ||
| # TODO pin this action version |
There was a problem hiding this comment.
| # TODO pin this action version |
|
|
||
| allow-newer: | ||
| , katip:Win32 | ||
| , cardano-cli:cardano-api |
There was a problem hiding this comment.
| , cardano-cli:cardano-api |
86ec635 to
9984a35
Compare
There was a problem hiding this comment.
Pull request overview
Adds experimental gRPC (UTXORPC) support to cardano-node, wires it into cardano-testnet, and introduces integration tests to exercise Query/Submit over gRPC, along with build/CI updates to support the new dependency stack.
Changes:
- Add gRPC runtime + tracing plumbing to
cardano-nodeand configuration/CLI parsing for enabling it. - Add
cardano-testnetflag/support for enabling node gRPC and add RPC integration tests. - Update Nix/Cabal/CI inputs to build
cardano-rpc/proto-lens and gRPC dependencies across platforms.
Reviewed changes
Copilot reviewed 36 out of 37 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| nix/haskell.nix | Nix tooling tweaks; add protobuf build tools and proto-lens override. |
| nix/cardanolib-py/default.nix | Switch Python packaging to pyproject/setuptools build system. |
| flake.nix | Add Windows overlay tweak for abseil-cpp pthreads dependency. |
| flake.lock | Bump/pin flake inputs (haskell.nix, nixpkgs, HLS, etc.). |
| cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs | Register new RPC test groups. |
| cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Transaction.hs | New gRPC SubmitTx integration test. |
| cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Query.hs | New gRPC readParams/readUtxos integration test. |
| cardano-testnet/test/cardano-testnet-golden/files/golden/help/create-env.cli | Update help output for renamed flag + new --enable-grpc. |
| cardano-testnet/test/cardano-testnet-golden/files/golden/help/cardano.cli | Update help output for renamed flag + new --enable-grpc. |
| cardano-testnet/test/cardano-testnet-golden/files/golden/help.cli | Update top-level help output for renamed flag + new --enable-grpc. |
| cardano-testnet/src/Testnet/Types.hs | Add nodeRpcSocketPath helper. |
| cardano-testnet/src/Testnet/Start/Types.hs | Add cardanoEnableRpc option; improve logging-format pretty printing. |
| cardano-testnet/src/Testnet/Start/Cardano.hs | Pass --grpc-enable through to nodes when enabled. |
| cardano-testnet/src/Testnet/Runtime.hs | Minor list concatenation cleanup for node args. |
| cardano-testnet/src/Testnet/Defaults.hs | Refactor TraceOptions value; add commented guidance for prometheus. |
| cardano-testnet/src/Parsers/Cardano.hs | CLI: rename logging-format flag, add --enable-grpc switch. |
| cardano-testnet/src/Cardano/Testnet.hs | Re-export nodeRpcSocketPath. |
| cardano-testnet/changelog.d/20260220_120000_mgalazyn_add_grpc_interface.md | Changelog entry for testnet gRPC enablement + tests. |
| cardano-testnet/cardano-testnet.cabal | Add cardano-rpc deps; include new test modules. |
| cardano-submit-api/cardano-submit-api.cabal | Bump cardano-api bound to 10.24. |
| cardano-node/test/Test/Cardano/Node/POM.hs | Extend expected node config with RPC config field. |
| cardano-node/test/Test/Cardano/Node/FilePermissions.hs | Minor import/namespace adjustments in tests. |
| cardano-node/src/Cardano/Tracing/Tracers.hs | Add rpcTracer wiring to tracer set. |
| cardano-node/src/Cardano/Node/Types.hs | Add AdjustFilePaths support for RPC config and File. |
| cardano-node/src/Cardano/Node/Tracing/Tracers/Rpc.hs | New logging/metrics instances for RPC tracing. |
| cardano-node/src/Cardano/Node/Tracing/Tracers.hs | Create/configure RPC tracer and attach into Tracers. |
| cardano-node/src/Cardano/Node/Tracing/Documentation.hs | Include RPC tracer in generated tracing docs. |
| cardano-node/src/Cardano/Node/Tracing.hs | Extend Tracers record with rpcTracer. |
| cardano-node/src/Cardano/Node/Run.hs | Start RPC server alongside node; restructure config building. |
| cardano-node/src/Cardano/Node/Parsers.hs | Add gRPC CLI parsing into PartialNodeConfiguration. |
| cardano-node/src/Cardano/Node/Configuration/POM.hs | Add RPC config to node config and YAML parsing/merging. |
| cardano-node/cardano-node.cabal | Add cardano-rpc dependency + include new tracer module. |
| cabal.project | Add SRPs for unreleased cardano-rpc/cardano-cli and proto-lens; adjust bounds. |
| bench/tx-generator/tx-generator.cabal | Bump cardano-api bound to 10.24. |
| bench/plutus-scripts-bench/plutus-scripts-bench.cabal | Bump cardano-api and plutus bounds. |
| .github/workflows/haskell.yml | CI: add GHC 9.10, update cabal, add gRPC deps + new cache action. |
| .github/ISSUE_TEMPLATE/config.yml | Add “Cardano gRPC Issues” contact link. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| , resourcet | ||
| , rio | ||
| , regex-compat | ||
| , rio |
There was a problem hiding this comment.
The build-depends list for the cardano-testnet-test suite includes rio twice. Duplicated dependencies make the cabal file noisier and can trigger cabal check warnings; please keep each dependency listed once.
| , rio |
| H.note_ $ "Enxure that there are 2 UTXOs in the address " <> show addrTxt1 | ||
| utxosForAddress <- H.noteShowM . flip filterM (utxos ^. U5c.items) $ \utxo -> do |
There was a problem hiding this comment.
Spelling: the note says "Enxure". Please correct to "Ensure" so test output/messages are professional and searchable.
cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Rpc/Query.hs
Show resolved
Hide resolved
6aa34ba to
7b30930
Compare
7b30930 to
8e67434
Compare
Description
This PR adds an experimental gRPC endpoint to
cardano-node. The gRPC endpoint implements UTXORPC schema. For now the following methods are supported:The gRPC endpoint is disabled by default, can be enabled by CLI flag or by configuration option.
Support for enabling gRPC endpoint is added into cardano-testnet.
Things necessary to do before the merge:
cardano-clito remove SRPcardano-rpcto remove SRPChecklist
See Runnings tests for more details
CHANGELOG.mdfor affected package.cabalfiles are updatedhlint. See.github/workflows/check-hlint.ymlto get thehlintversionstylish-haskell. See.github/workflows/stylish-haskell.ymlto get thestylish-haskellversionghc-9.6andghc-9.12Note on CI
If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.