Skip to content

Conversation

mkazlauskas
Copy link
Member

Context

OutputValidator.validateOutput returns incorrect minimum coin quantity for outputs to Byron address

LW-13214

Proposed Solution

See commit messages

Important Changes Introduced

…OutputValidator

minimum coin quantity depends on type of address (Byron addresses are larger)

validating a Value without knowing an address is prone to bugs, where one might
assume that it's a Shelley address. If that is in fact what is needed, then it's
better to explicitly use some stub address.
… 'describe'

in order to make tests more readable,
e.g. 'it validates' vs 'it output validator validates'
…tion param

OutputValidator.validateOutput used a stub shelley address, which computed
an invalid minimum coin quantity for outputs to Byron address that are
larger in bytes, therefore actually requiring more coins than computed
@mkazlauskas mkazlauskas requested a review from a team July 4, 2025 02:58
Copy link
Collaborator

@mirceahasegan mirceahasegan left a comment

Choose a reason for hiding this comment

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

Fantastic work @mkazlauskas 🚀

Copy link
Collaborator

@iccicci iccicci left a comment

Choose a reason for hiding this comment

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

Excellent!

@mkazlauskas mkazlauskas merged commit 855ba79 into master Jul 4, 2025
10 of 11 checks passed
@mkazlauskas mkazlauskas deleted the fix/use-actual-address-size-for-min-value branch July 4, 2025 08:32
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