Skip to content

Conversation

@wolf31o2
Copy link
Member

@wolf31o2 wolf31o2 commented Nov 17, 2025

The submit module SubmitTx and EvalTx now take single transactions as arguments. This allows us to use gRPC errors for error handling vs implementing custom handling in the protocol itself.

Closes #1010
Closes #1022

Summary by CodeRabbit

  • Chores
    • Updated core dependencies to latest versions, including network client, code generation tools, and protocol buffer libraries for improved stability and compatibility.

Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
@wolf31o2 wolf31o2 requested a review from a team as a code owner November 17, 2025 18:54
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 17, 2025

📝 Walkthrough

Walkthrough

This pull request updates three Go module dependencies: blinklabs-io/gouroboros from v0.138.0 to v0.139.0, utxorpc/go-codegen from v0.17.0 to v0.18.1, and google.golang.org/protobuf from v1.36.9 to v1.36.10. The dependency updates drive API-level changes in utxorpc/submit.go, where SubmitTx and EvalTx handler functions are refactored from processing multiple transactions per request to handling a single transaction per request. This includes removal of transaction iteration loops, per-transaction error aggregation, and updates to BigInt encoding for fee representation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • go.mod changes: Straightforward dependency version bumps with no public API changes affecting this codebase
  • utxorpc/submit.go refactoring: Single-file logic changes representing a clear migration from multi-tx to single-tx processing pattern per the updated spec (v0.18.1)
  • Areas requiring extra attention:
    • Error handling flow in SubmitTx: immediate returns vs. prior aggregation pattern
    • Error handling flow in EvalTx: exception vs. success path construction
    • BigInt encoding logic for fees (integer vs. BigUInt selection based on value size)
    • Verification that the new imports (encoding/binary, math) are correctly utilized
    • Confirmation that single-transaction semantics correctly implement the updated API contract

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'chore(deps): upgrade gouroboros to 0.139.0' directly matches one of two main dependency upgrades in the changeset, but the PR also upgrades utxorpc go-codegen to 0.18.1 and google.golang.org/protobuf to 1.36.10; the title mentions only gouroboros, not the other significant updates.
Linked Issues check ✅ Passed All coding-related objectives from linked issues #1010 and #1022 are met: go-codegen upgraded to 0.18.1 (#1010), gouroboros upgraded to 0.139.0 (#1022), protobuf updated, and utxorpc/submit.go refactored for single-transaction handling compatible with the spec updates.
Out of Scope Changes check ✅ Passed All changes directly support the linked issue objectives: dependency version updates align with #1010 and #1022, and the utxorpc/submit.go refactoring implements single-transaction handling required by the gouroboros v0.139.0 compatibility work; no unrelated changes detected.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/deps-gouroboros-0.139.0

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7f437bf and 26abc44.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod (3 hunks)
  • utxorpc/submit.go (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
utxorpc/submit.go (1)
database/plugin/log.go (1)
  • Logger (18-27)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: go-test (1.25.x, ubuntu-latest)
  • GitHub Check: go-test (1.24.x, ubuntu-latest)
  • GitHub Check: go-test (1.25.x, macos-latest)
  • GitHub Check: go-test (1.24.x, macos-latest)
  • GitHub Check: nilaway
  • GitHub Check: docker (ubuntu-latest, amd64)
  • GitHub Check: lint
  • GitHub Check: Analyze (go)
🔇 Additional comments (4)
utxorpc/submit.go (2)

17-34: New imports for binary and math are appropriate for BigInt fee handling.

The additions of encoding/binary and math are consistent with the new cardano.BigInt fee encoding logic in EvalTx; no issues here.


43-75: Verify nil-safety of protobuf message field access and connect error adoption goal.

I cannot locate .proto files in the repository to validate whether req.Msg.GetTx() can return nil. However, I found that both SubmitTx (line 47) and EvalTx (line 140) follow the same pattern without defensive checks, suggesting either nil is not possible or a consistent pattern exists across handlers.

For the error handling suggestion: the codebase does not currently use connect.NewError anywhere. All handlers use plain fmt.Errorf, so the structured error codes suggestion represents a new pattern rather than an inconsistency.

Before implementing these suggestions:

  • Verify the .proto definition for SubmitTxRequest.Tx to confirm whether nil-safety is needed
  • Clarify whether the project intends to adopt structured connect error codes across all handlers
go.mod (2)

192-192: Protobuf bump verification not applicable—no generated .pb.go files found in repository.

The suggested verification step (checking for .pb.go diffs) cannot be performed because this repository does not maintain generated protobuf files. Confirm with your team where .pb.go generation happens:

  • If generated in CI only, no verification needed in-repo.
  • If generated locally, ensure your build/generation pipeline still works with v1.36.10 and utxorpc-go-codegen v0.18.1 (also bumped).
  • The patch-level protobuf bump (v1.36.9 → v1.36.10) is low-risk; the utxorpc-go-codegen minor bump (v0.17.0 → v0.18.1) warrants more attention if it drives code generation.

7-34: All verification checks passed; no remaining concerns.

The dependency bumps are correctly applied:

  • github.com/blinklabs-io/gouroboros → v0.139.0 ✓
  • github.com/utxorpc/go-codegen → v0.18.1 ✓
  • google.golang.org/protobuf → v1.36.10 ✓

Verification results:

  • go.sum is in consistent state (go mod tidy produced no changes)
  • No generated code artifacts exist in the repository, so there is no regeneration requirement

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@wolf31o2 wolf31o2 merged commit c2f8e0e into main Nov 17, 2025
13 checks passed
@wolf31o2 wolf31o2 deleted the chore/deps-gouroboros-0.139.0 branch November 17, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants