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(rust): allow to move G1 and G2 elements between threads #87

Merged
merged 6 commits into from
Feb 15, 2024

Conversation

shumkov
Copy link
Member

@shumkov shumkov commented Feb 10, 2024

In Drive ABCI we would like to move elements between threads since they are part of validators set abstraction.
After the code expection it seems to me that we are safe to do that since G1 and G2 elements are immutable and we do not change internal state and do not keep refs in the other abstractions

@shumkov shumkov marked this pull request as draft February 10, 2024 20:43
@shumkov shumkov changed the title feat: thread-safe elements feat: allow to move G1 and G2 elements between threads Feb 12, 2024
@shumkov shumkov changed the title feat: allow to move G1 and G2 elements between threads feat(rust): allow to move G1 and G2 elements between threads Feb 12, 2024
@shumkov shumkov marked this pull request as ready for review February 12, 2024 12:19
ogabrielides
ogabrielides previously approved these changes Feb 12, 2024
Copy link
Collaborator

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

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

utACK.
We should be fine, as immutability patterns on G1/G2Element seem to be used.

UdjinM6
UdjinM6 previously approved these changes Feb 13, 2024
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

"C part not affected"-utACK 🤷‍♂️

@shumkov shumkov dismissed stale reviews from UdjinM6 and ogabrielides via de755f7 February 14, 2024 06:18
Copy link
Collaborator

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

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

re-utACK

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

🤷‍♂️

@shumkov shumkov merged commit 1c2fc79 into develop Feb 15, 2024
27 checks passed
@shumkov shumkov deleted the rust-bindings-atomic-elements branch February 15, 2024 05:59
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.

None yet

3 participants