gRPC: add evalTx - #1193
Merged
Merged
Conversation
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
9 times, most recently
from
May 5, 2026 13:57
3239df4 to
547f698
Compare
9 tasks
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
5 times, most recently
from
May 8, 2026 14:42
f87c689 to
8182bc4
Compare
carbolymer
marked this pull request as ready for review
May 8, 2026 17:43
carbolymer
requested review from
CarlosLopezDeLara,
Jimbo4350,
disassembler,
erikd and
palas
as code owners
May 8, 2026 17:43
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
from
May 8, 2026 17:45
8182bc4 to
4d32553
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an EvalTx gRPC endpoint to cardano-rpc’s UTxO RPC SubmitService, enabling evaluation of a CBOR-serialised transaction against the current ledger state (without submission) and returning fee, execution units, traces, and per-redeemer errors.
Changes:
- Extend SubmitService protobuf service with
EvalTxand regenerate the Submit service bindings. - Implement eval handler + supporting conversion utilities for redeemers, errors, traces, and PlutusData roundtrips.
- Add Hedgehog/Tasty-Discover tests covering new conversion and assembly logic; update docs to reflect spec coverage.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
PLAN-evaltx.md |
Implementation plan / design notes for EvalTx. |
cardano-rpc/test/cardano-rpc-test/Test/Cardano/Rpc/Type.hs |
Adds PlutusData roundtrip property using new inverse conversion. |
cardano-rpc/test/cardano-rpc-test/Test/Cardano/Rpc/Eval.hs |
New test module for redeemer purpose mapping, redeemer assembly, TxEval assembly, and error reporting. |
cardano-rpc/src/Cardano/Rpc/Server/Internal/UtxoRpc/Type.hs |
Adds PlutusData inverse conversion and helpers to build EvalTx proto structures. |
cardano-rpc/src/Cardano/Rpc/Server/Internal/UtxoRpc/Eval.hs |
New evalTxMethod implementation: decode tx, query node, evaluate, compute fee, assemble response. |
cardano-rpc/src/Cardano/Rpc/Server/Internal/Tracing.hs |
Adds tracing constructors for eval span + decoding failures. |
cardano-rpc/src/Cardano/Rpc/Server/Internal/Orphans.hs |
Minor cleanup (removes stray comment). |
cardano-rpc/src/Cardano/Rpc/Server.hs |
Registers EvalTx in the SubmitService method table and improves top-level comments. |
cardano-rpc/src/Cardano/Rpc/Proto/Api/UtxoRpc/Submit.hs |
Adjusts hidden field imports to expose cardano lenses needed by new response assembly. |
cardano-rpc/README.md |
Documents UTxO RPC v1beta method coverage and updates build prerequisites text. |
cardano-rpc/proto/utxorpc/v1beta/submit/submit.proto |
Adds EvalTx RPC method to SubmitService. |
cardano-rpc/proto/utxorpc/v1beta/cardano/cardano.proto |
Reworks evaluation reporting schema (EvalReport, updated TxEval fields). |
cardano-rpc/gen/Proto/Utxorpc/V1beta/Submit/Submit.hs |
Regenerated service bindings to include EvalTx. |
cardano-rpc/gen/Proto/Utxorpc/V1beta/Cardano/Cardano.hs |
Regenerated code reflecting evaluation schema changes. |
cardano-rpc/cardano-rpc.cabal |
Exposes new eval module; adds new test module and required deps. |
cardano-api/src/Cardano/Api/Experimental.hs |
Exports evaluateTransactionExecutionUnits from Cardano.Api.Experimental. |
.changes/20260508_cardano_rpc_evaltx.yml |
Changelog fragment for cardano-rpc EvalTx addition. |
.changes/20260508_cardano_api_export_evaluateTransactionExecutionUnits.yml |
Changelog fragment for cardano-api experimental export. |
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
3 times, most recently
from
May 11, 2026 08:13
5d722bd to
02e1a24
Compare
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
from
May 11, 2026 08:26
02e1a24 to
038aa1b
Compare
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
from
May 11, 2026 09:01
038aa1b to
6514885
Compare
Jimbo4350
reviewed
May 11, 2026
Jimbo4350
left a comment
Contributor
There was a problem hiding this comment.
evalTxMethod does not check that the tx is balanced. Is this intentional?
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
from
May 13, 2026 08:39
212a289 to
339a8e6
Compare
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
2 times, most recently
from
May 13, 2026 08:54
8d190de to
9a87092
Compare
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
2 times, most recently
from
May 13, 2026 09:15
c220732 to
792c94d
Compare
Jimbo4350
approved these changes
May 13, 2026
Jimbo4350
left a comment
Contributor
There was a problem hiding this comment.
LGTM. You should extract the logic of evalTxMethod as it differs from our tx balancing functionality in that we don't add a change output. It would be a useful addition I think to cardano-api.
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
from
May 14, 2026 06:53
792c94d to
7660e27
Compare
carbolymer
enabled auto-merge
May 14, 2026 06:53
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
2 times, most recently
from
May 14, 2026 07:14
37a6c6f to
14fe060
Compare
carbolymer
force-pushed
the
mgalazyn/feature/evaltx
branch
from
May 14, 2026 07:35
14fe060 to
2bfc2b4
Compare
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.
Context
This PR adds an implementation of evalTx query.
Upstreamed changes to proto files:
Test in cardano-testnet:
Checklist
.changes/