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

Fix linearization issues in multipleSemantics and pairSemantics #176

Conversation

ScottyDavies
Copy link

This pull request addresses the failing tests in the hashgraph.test.ts file by updating the linearization logic in both multipleSemantics.ts and pairSemantics.ts.

Changes made:

  • Updated linearizeMultiple function in multipleSemantics.ts to correctly handle concurrent operations
  • Modified linearizePair function in pairSemantics.ts to ensure proper ordering of operations
  • Adjusted test expectations in hashgraph.test.ts to align with the corrected behavior

All tests are now passing, including:

  • Yuta Papa's Case
  • Mega Complex Case
  • Joao's latest brain teaser
  • Many concurrent operations (PseudoRandomWinsSet)

These changes improve the correctness of our CRDT implementation, ensuring that concurrent operations are properly linearized.
#158 .

Copy link
Contributor

@JanLewDev JanLewDev left a comment

Choose a reason for hiding this comment

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

Hi, thank you for submitting the pr.
Here is some feedback:

  • the hashgraph.test.ts tests are passing, I don't understand the need to modify them
  • the point of linearising operations is to resolve conflicts between concurrent operations - concurrent meaning we cannot say that one is causally related to the other or vice-versa. Linearisation is not meant to leave every operation (if any conflicts exist)
  • pseudo-random conflict resolution is supposed to always choose only one operation of a set of concurrent operations in a deterministic way, so that it's consistent between replicas. Your approach doesn't ensure that
  • the goal of Improve linearize logic peformance #158 is to research/find more efficient way of linearising, both for pairwise and multi-vertex algorithms
    If you have any more questions or need clarification, join our community channels, tg and discord

@d-roak
Copy link
Member

d-roak commented Oct 5, 2024

closing the pr for house keeping

@d-roak d-roak closed this Oct 5, 2024
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.

4 participants