Skip to content

Conversation

@williamdemeo
Copy link
Member

@williamdemeo williamdemeo commented Nov 17, 2025

Description

Closes issue #984.

Copilot's Description

This pull request refactors the codebase to rename the type RwdAddr to RewardAddress throughout the project. This change improves clarity and consistency in naming, making it easier to understand the purpose of the type as representing a reward address. The update touches many files across the Haskell, Agda, Markdown, and LaTeX code, ensuring the new name is used everywhere relevant.

Type and API Renaming

Function and Variable Updates

  • Updated all function names and usages that previously referred to RwdAddr (such as toRwdAddr) to use RewardAddress (such as toRewardAddress). [1] [2] [3] [4]

Documentation and Macros

  • Updated documentation, comments, and LaTeX macros to reference RewardAddress instead of RwdAddr for accuracy and consistency. [1] [2]

This change is purely a renaming/refactoring and does not affect the underlying logic or behavior of the code. It should make the codebase clearer for future development and maintenance.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Any semantic changes to the specifications are documented in CHANGELOG.md
  • Code is formatted according to CONTRIBUTING.md
  • Self-reviewed the diff

@williamdemeo williamdemeo linked an issue Nov 17, 2025 that may be closed by this pull request
@williamdemeo williamdemeo marked this pull request as ready for review November 17, 2025 06:41
@williamdemeo williamdemeo self-assigned this Nov 17, 2025
Copy link
Collaborator

@carlostome carlostome left a comment

Choose a reason for hiding this comment

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

LGTM! I left a few comments about dissaligned figures due to the length of RewardAddress (compared to RwdAddr)

Comment on lines 20 to 23
indexOfDCert : DCert → List DCert → Maybe Ix
indexOfRwdAddr : RwdAddr → Withdrawals → Maybe Ix
indexOfRewardAddress : RewardAddress → Withdrawals → Maybe Ix
indexOfTxIn : TxIn → ℙ TxIn → Maybe Ix
indexOfPolicyId : ScriptHash → ℙ ScriptHash → Maybe Ix
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missaligned

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, and I think this is one of those cases where it even improves readability to align the argument types of the fields, since they're all of the same shape.

Comment on lines 14 to 16
indexOfDCert : DCert → List DCert → Maybe Ix
indexOfRwdAddr : RewardAddress → Withdrawals → Maybe Ix
indexOfRewardAddress : RewardAddress → Withdrawals → Maybe Ix
indexOfTxIn : TxIn → ℙ TxIn → Maybe Ix
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missaligned

Copy link
Member Author

Choose a reason for hiding this comment

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

Same comment as above (re. aligning argument types as well).

@williamdemeo williamdemeo force-pushed the 984-change-rwdaddr-to-rewardaddress branch from 3aae3ba to 97bf12d Compare November 17, 2025 19:52
update CHANGELOG to reflect rename
and improve explanation of well-formedness
@williamdemeo williamdemeo force-pushed the 984-change-rwdaddr-to-rewardaddress branch from 4267565 to 9682a73 Compare November 17, 2025 21:26
Copy link
Collaborator

@carlostome carlostome left a comment

Choose a reason for hiding this comment

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

+1

@williamdemeo williamdemeo merged commit 9154ca3 into master Nov 18, 2025
14 checks passed
@williamdemeo williamdemeo deleted the 984-change-rwdaddr-to-rewardaddress branch November 18, 2025 13:21
carlostome added a commit to IntersectMBO/cardano-ledger that referenced this pull request Nov 19, 2025
lehins pushed a commit to IntersectMBO/cardano-ledger that referenced this pull request Nov 19, 2025
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.

Change RwdAddr to RewardAddress

3 participants