Skip to content

Conversation

Jimbo4350
Copy link
Contributor

Changelog

- description: |
    Implement experimental `estimateBalancedTxBody`

  type:
  - feature      
  - compatible    

Context

Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.

How to trust this PR

Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@Jimbo4350 Jimbo4350 force-pushed the jordan/implement-experimental-estimateBalancedTxBody branch 2 times, most recently from 8a27422 to d5f6785 Compare July 2, 2025 20:12
@Jimbo4350 Jimbo4350 force-pushed the jordan/implement-experimental-estimateBalancedTxBody branch from d5f6785 to 0d7851a Compare August 27, 2025 20:01
@Jimbo4350 Jimbo4350 force-pushed the jordan/implement-experimental-estimateBalancedTxBody branch 5 times, most recently from 4699948 to 2afafe7 Compare September 4, 2025 20:54
@Jimbo4350 Jimbo4350 marked this pull request as ready for review September 4, 2025 20:54
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Despite the fact that it's needed only for experimental API, we should keep orphans in as small number of places as possible. I think this should go to one of the already existing orphans module, so it'll be easier to propagate orphans through cardano-api.

@Jimbo4350 Jimbo4350 force-pushed the jordan/implement-experimental-estimateBalancedTxBody branch from 2afafe7 to e112e36 Compare September 5, 2025 13:40
-> Either
CBOR.DecoderError
[AnyIndexedPlutusScriptWitness (LedgerEra era)]
extractAllIndexedPlutusScriptWitnesses era b = do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
extractAllIndexedPlutusScriptWitnesses era b = do
extractAllIndexedPlutusScriptWitnesses era b = obtainEraCommonConstraints era $ do

shelleyLedgerEraToLedgerEra can be then removed. We shouldn't add more era matching functions unless they're really needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, I forgot the transformation ShelleyLedgerEra era ~ LedgerEra era is provided with obtainCommonConstraints.

@Jimbo4350 Jimbo4350 force-pushed the jordan/implement-experimental-estimateBalancedTxBody branch 6 times, most recently from 4e45c1b to 676b334 Compare September 9, 2025 17:51
@Jimbo4350 Jimbo4350 force-pushed the jordan/implement-experimental-estimateBalancedTxBody branch from 676b334 to 7b92a5e Compare September 9, 2025 17:55
@Jimbo4350 Jimbo4350 force-pushed the jordan/implement-experimental-estimateBalancedTxBody branch from 7b92a5e to d567415 Compare September 9, 2025 18:03
Comment on lines 165 to 166
& setTxProposalProcedures Nothing
& setTxMintValue mempty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels kind of redundant, because those fields are set again in L173-177

Copy link
Contributor Author

@Jimbo4350 Jimbo4350 Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not. If I don't set the fields to empty the test will fail because there will be a different number of script witnesses.

I was measuring all script witnesses earlier, so yes it's redundant 👍

)
]
fromLegacyMintWitness aeon = do
legacyWitnessConversion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that's outside of the scope of this PR, but legacyWitnessConversion should be a verb, not a noun.

@Jimbo4350 Jimbo4350 force-pushed the jordan/implement-experimental-estimateBalancedTxBody branch from d567415 to 079de21 Compare September 10, 2025 11:45
@Jimbo4350 Jimbo4350 enabled auto-merge September 10, 2025 11:45
@Jimbo4350 Jimbo4350 added this pull request to the merge queue Sep 10, 2025
Merged via the queue into master with commit a795554 Sep 10, 2025
29 checks passed
@Jimbo4350 Jimbo4350 deleted the jordan/implement-experimental-estimateBalancedTxBody branch September 10, 2025 14:02
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.

2 participants