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

[Refactor] Move parts of AddAnonInputs into helper functions. #978

Merged
merged 1 commit into from
Mar 20, 2022

Conversation

Zannick
Copy link
Collaborator

@Zannick Zannick commented Dec 2, 2021

Rearranges part of AddAnonInputs_Inner into separate helper functions so it's easier to understand and also to reuse the code elsewhere. I'm not sure I fully understood the code enough to properly name the helper functions, but here they are:

  • ArrangeBlinds
    • Places the real inputs and creates dummy entries for the ring.
    • Optionally adds temporary dummy sigs.
  • GetKeyImage
    • Attaches the key image for a real input.
    • I made this take one at a time for ease of calling from elsewhere.
  • SetBlinds
    • Does some further stuff to the blinds.

@Zannick Zannick self-assigned this Dec 2, 2021
@Zannick Zannick added Coin Type: RingCT Specifically related to RingCT transactions Tag: Waiting For Code Review Waiting for code review from a core developer labels Dec 2, 2021
@WetOne
Copy link
Collaborator

WetOne commented Dec 4, 2021

utACK 42dfa73

@Zannick
Copy link
Collaborator Author

Zannick commented Mar 12, 2022

Fixed the following:

  • SetBlinds was called with nSigRingSize, nSigInputs reversed, causing a segfault.
  • SetBlinds was accepting some vector arguments by value; now all vectors are correctly passed by reference.
  • I had moved some vectors into SetBlinds cause they appeared otherwise unused, but they were storing data for other vectors and so needed to still be scoped to a longer lifetime than the others.

Copy link
Collaborator

@codeofalltrades codeofalltrades left a comment

Choose a reason for hiding this comment

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

ACK 91e7f97

@codeofalltrades codeofalltrades merged commit f7dc817 into Veil-Project:master Mar 20, 2022
@Zannick Zannick deleted the refactor branch March 20, 2022 16:49
@Zannick Zannick removed the Tag: Waiting For Code Review Waiting for code review from a core developer label Mar 20, 2022
@Zannick Zannick added this to Done in RingCT Staking Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Coin Type: RingCT Specifically related to RingCT transactions
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants