Skip to content

Conversation

jasagredo
Copy link
Contributor

No description provided.

@jasagredo
Copy link
Contributor Author

jasagredo commented Sep 1, 2025

Comment on lines +327 to +331
-- | The only purpose of this type is to modify the MemPack instance to use big
-- endian serialization. This is necessary to ensure streaming functions of the
-- UTxO set preserve the order of the entries, as otherwise we would get
-- different sortings if sorting via the Serialized form and the Haskell Ord
-- instance.
Copy link
Contributor

Choose a reason for hiding this comment

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

if we're explicitly only using this to ensure that the sorting is consistent between the serialized and unserialized versions, should there be a property test to ensure that this remains accurate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very good point. I will add a test.

Copy link
Member

Choose a reason for hiding this comment

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

FTR: As discussed today, this test will eventually be removed again, once we change the encoding for the benefit of the LSM compact index. Then, the test will actually start failing, which seems like a nice prompt to also remove this comment (instead explaining why it is fine that the Ord order and the serialization-implied order differ).

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