-
Notifications
You must be signed in to change notification settings - Fork 21
refactor: compatibility w/ utxorpc spec 0.18.1 #1223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wolf31o2
wants to merge
1
commit into
main
Choose a base branch
from
chore/deps-utxorpc-0.18.1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify utxorpc/go-codegen v0.18.1 doesn't introduce breaking changes.
This is a minor version bump (v0.17.0 → v0.18.1). While generally safe under semantic versioning, code generation tools can have subtle breaking changes.
Please confirm:
🌐 Web query:
💡 Result:
I couldn't find a release named v0.18.1 for utxorpc/go-codegen. The repository's Releases list shows v0.17.0 as the latest (tagged Jul 7, 2025). [1][2]
If you meant a different tag/branch or a pre-release, tell me the exact tag or paste the release link and I’ll inspect it for breaking-change notes.
Sources:
Dependency version v0.18.1 does not exist in utxorpc/go-codegen repository.
The latest release in the utxorpc/go-codegen repository is v0.17.0, but the PR updates go.mod to v0.18.1. This version does not appear to exist. Verify the intended target version and correct go.mod accordingly—either revert to v0.17.0 or use the correct version number if this is a typo.
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect. That version was released this morning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
💡 Result:
Yes — utxorpc/go-codegen v0.18.1 was released on November 3, 2025. Changes are primarily dependency bumps (google.golang.org/protobuf and connectrpc/connect via dependabot). [1][2]
Sources:
@wolf31o2, you're absolutely right—I apologize for the incorrect information. v0.18.1 was indeed released on November 3, 2025, and the changes are primarily dependency bumps for google.golang.org/protobuf and connectrpc/connect.
The version bump looks good, and since it's a maintenance release with dependency updates, there shouldn't be any breaking changes to worry about. Thank you for the correction!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests are failing. Some changes may be necessary in the ledger/common package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 230971
🏁 Script executed:
Length of output: 3911
🏁 Script executed:
Length of output: 3780
🏁 Script executed:
Length of output: 4301
@wolf31o2, I've identified the test failures. The utxorpc/go-codegen v0.18.1 update changed several numeric fields from
uint64/int64to*cardano.BigIntpointers. Here are the specific changes needed in theledger/commonpackage:Required Changes
File:
ledger/common/certs.goLines 592-593 (PoolRegistrationCert):
Line 763 (MirCert):
File:
ledger/common/tx.goLine 239 (Tx):
Optional: Helper Function
For cleaner code, you could add a helper function at the top of
ledger/common/certs.go:Then use it like:
The changes are straightforward - the protobuf schema now uses
BigIntto support arbitrarily large numbers, but for Cardano's typical values, they fit comfortably inint64, so we use theBigInt_Intvariant.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After making the requested changes, the tests are still failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 21312
🏁 Script executed:
Length of output: 1674
🏁 Script executed:
Length of output: 8595
@wolf31o2, I see the issue now. The
ledger/commonpackage tests pass, but the test files in all the ledger era packages (allegra, alonzo, babbage, byron, conway, mary, shelley) need to be updated to work with the new*cardano.BigInttype. Here's what needs to be done:Required Test File Updates
The errors fall into two categories:
1. Creating BigInt values in test structs
When creating test
PParamsorTxstructs, integer literals need to be wrapped:Pattern to find and replace:
2. Comparing BigInt values in assertions
Pattern to find and replace:
3. Helper function for tests (recommended)
Add this helper function at the top of each
*_test.gofile that needs it:Then use them like:
Affected Files
Based on the errors, you need to update these test files:
ledger/allegra/pparams_test.go(lines 96, 97, 101, 102, 174, 236)ledger/alonzo/pparams_test.go(lines 377, 379, 380, 383, 384, 399, 479, 531, 547, 594+)ledger/babbage/pparams_test.go(lines 484, 486, 487, 490, 491, 506, 603, 645, 654, 690+)ledger/byron/byron_test.go(lines 66, 103)ledger/conway/pparams_test.go(lines 529, 531, 532, 535, 536, 551, 665, 674, 742, 751+)ledger/mary/pparams_test.go(lines 99, 100, 104, 105, 181, 223, 232, 271, 280, 480+)ledger/shelley/pparams_test.go(lines 131, 132, 135, 136, 223, 281, 349)Would you like me to generate the specific fixes for these files, or would you prefer to apply the patterns systematically yourself?
Note: The
protocol/localstatequerytest failure is unrelated to this PR—it's missing a test fixture file and appears to be a pre-existing issue.