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

Don't export coerceKeyRole, export RewardAccount #708

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Dec 12, 2024

Changelog

- description: |
    Don't export the ledger's `coerceKeyRole` function anymore, export RewardAccount
# 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

Not marking this one as breaking, because it actually reverts #699. Since there was no release since 699, overall it's not going to be a breaking change.

Edit: There was 10.4.0.0 release, so marking it as breaking

How to trust this PR

The new export only concerns a data structure, nothing controversial

Checklist

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

@smelc smelc force-pushed the smelc/exports-for-augmented-spo-stake-distribution branch from f0165bd to 3590176 Compare December 12, 2024 13:20
Copy link
Contributor

@palas palas left a comment

Choose a reason for hiding this comment

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

Looks good, but it does seem breaking. It would need to be noted in the changelog

@smelc smelc added this pull request to the merge queue Dec 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 12, 2024
@smelc smelc merged commit a429ac2 into master Dec 12, 2024
30 checks passed
@smelc smelc deleted the smelc/exports-for-augmented-spo-stake-distribution branch December 12, 2024 15:37
@smelc
Copy link
Contributor Author

smelc commented Dec 12, 2024

@Jimbo4350> confirmed with lehins that the only valid use of coercing key roles is for the Witness role. But even then, Alexei strongly supports not exporting it:

That is the whole point of the key roles. It should not be needed and usually when people try to do it, that means that they are doing something wrong.

In other words by exposing such casting we would promote people making mistakes

@CarlosLopezDeLara
Copy link
Contributor

CarlosLopezDeLara commented Dec 19, 2024

There was a 10.4.0.0 release between #699 and #708 therefore this is a breaking change.

cardano-api on  master [$] via λ 9.10.1 
❯ git log --oneline
a429ac21a (HEAD -> master, origin/master, origin/HEAD) Merge pull request #708 from IntersectMBO/smelc/exports-for-augmented-spo-stake-distribution
359017665 Expose the ledger's RewardAccount
cfc8ceac8 Revert "Export HasKeyRole's coerceKeyRole function"
8a91df50c Merge pull request #706 from locallycompact/lc/mint-modifiers
1d627a186 Add modifier functions for modifiable fields in TxBodyContent up to Babbage
8fc8660cb Add TxMintValue modifier functions
76fba1ca2 Merge pull request #704 from locallycompact/lc/extra-modifier-functions
1307d2af0 Add modifier functions for TxInsCollateral, TxInsReference, TxExtraKeyWits to Cardano.Api.Tx.Body
d6a956f91 Merge pull request #700 from IntersectMBO/release/cardano-api-10.4.0.0 <----RELEASE HERE
c21fad9c4 (tag: cardano-api-10.4.0.0) Release 10.4.0.0
6a42210d8 Merge pull request #684 from IntersectMBO/cl/queryProposals
b2c04da81 Implement "query proposals"
4396ad1fa Merge pull request #699 from IntersectMBO/smelc/additional-exports <--- 699 HERE

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