Skip to content
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

Add 'Convert Experimental.Era MaryEraOnwards' instance #701

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Dec 6, 2024

Changelog

- description: |
    Add 'Convert Experimental.Era MaryEraOnwards' instance
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Add instance required by CLI (see IntersectMBO/cardano-cli#988)

How to trust this PR

It's only an instance addition, and a legit one.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Self-reviewed the diff

@@ -201,6 +202,11 @@ instance Convert Era ShelleyBasedEra where
BabbageEra -> ShelleyBasedEraBabbage
ConwayEra -> ShelleyBasedEraConway

instance Convert Era MaryEraOnwards where
Copy link
Contributor

Choose a reason for hiding this comment

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

This is indicative of a deeper cardano-api issue. We should not be converting to the "old api".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, but this is required until we fully separate the old and new apis right?

And we already do that anyway (on master at the time I'm writing this):

instance Convert Era Api.CardanoEra where

Copy link
Contributor Author

@smelc smelc Dec 11, 2024

Choose a reason for hiding this comment

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

@Jimbo4350> The issue is as follows right now:

Here (within the implementation of transaction build-estimate): https://github.com/IntersectMBO/cardano-cli/blob/3c0af7a8088b7c885ddc3c5c03734f2a2d5577cb/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs#L509

We call API's estimateBalancedTxBody:

And the thing is that transaction build-estimate takes an experimental witness, whereas estimateBalancedTxBody expects a MaryEraOnwards witness.

So I'm not sure how you want to fix that?

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