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.

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

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