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

A0-4006: Unit reconstruction refactor #418

Merged
merged 6 commits into from
Mar 11, 2024

Conversation

timorleph
Copy link
Contributor

Reconstructing the explicit structure of the Dag from the, somewhat compressed, is now handled by a component named "reconstruction" rather than the cryptic "terminal". Internally it also consists of two separate pieces of logic – reconstructing the explicit hashes of parents and ensuring the order of units being added to the Dag.

This leaves a couple awkward points, which will hopefully be ironed out by further refactors around runway.

A big part of the motivation for this refactor is making the upcoming change to differently defined parents simpler to implement.

Copy link

Please make sure the following happened

  • Appropriate tests created
  • Infrastructure updated accordingly
  • Updated existing documentation
  • New documentation created
  • Version bumped if breaking changes

@timorleph timorleph requested a review from woocash2 February 28, 2024 14:14
Copy link
Contributor

@fixxxedpoint fixxxedpoint left a comment

Choose a reason for hiding this comment

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

Great work!

consensus/src/consensus.rs Outdated Show resolved Hide resolved
consensus/src/reconstruction/mod.rs Outdated Show resolved Hide resolved
consensus/src/reconstruction/dag.rs Outdated Show resolved Hide resolved
consensus/src/reconstruction/parents.rs Outdated Show resolved Hide resolved
consensus/src/reconstruction/parents.rs Outdated Show resolved Hide resolved
consensus/src/reconstruction/parents.rs Show resolved Hide resolved
@timorleph
Copy link
Contributor Author

Added a small change, since DAG reconstruction does not actually need unit copies, and it likely won't be the component finally holding them; we will see in the next PRs though.

Copy link
Contributor

@woocash2 woocash2 left a comment

Choose a reason for hiding this comment

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

Very nice and clean, I've got nothing to add tbh.

@timorleph timorleph merged commit ad8a26c into Cardinal-Cryptography:main Mar 11, 2024
7 checks passed
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