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

feat(block-producer): arc transaction data #530

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

Mirko-von-Leipzig
Copy link
Contributor

@Mirko-von-Leipzig Mirko-von-Leipzig commented Oct 25, 2024

This PR reduces deep cloning of transaction data in the new block-producer by wrapping the core data in Arc.

In addition, this PR also changes the dependency graphs key bound from Clone -> Copy. This isn't strictly necessary, but does improve code readability as discussed here. Since our existing keys are Copy this doesn't actually have a further impact.

Completes a task from #519.

@Mirko-von-Leipzig Mirko-von-Leipzig marked this pull request as ready for review October 28, 2024 10:00
@bobbinth bobbinth self-requested a review October 28, 2024 17:51
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I left a couple of small comments inline. After these, we should be good to merge.

crates/block-producer/src/domain/transaction.rs Outdated Show resolved Hide resolved
@Mirko-von-Leipzig Mirko-von-Leipzig merged commit fd02092 into next-block-producer Oct 29, 2024
8 checks passed
@Mirko-von-Leipzig Mirko-von-Leipzig deleted the mirko-copy-the-clone branch October 29, 2024 07:35
Mirko-von-Leipzig added a commit that referenced this pull request Nov 3, 2024
This makes `AuthenticatedTransaction` much cheaper to clone and move around.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants