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

Fixes #1779 so that sending to multiple zaddrs no longer fails. #1790

Merged
merged 2 commits into from Nov 6, 2016

Conversation

Projects
None yet
6 participants
@bitcartel
Contributor

bitcartel commented Nov 5, 2016

Closes #1779

Commit 2eeb6b randomized the order of input and output notes,
but this is now known to prevent the chaining of multiple joinsplits
in a single transaction. The root cause has yet to be determined.

This patch is a temporary fix and disables the shuffling of input
and output notes. It also adds a chained joinsplit test to the
python qa test suite.

Fixes #1779 so that sending to multiple zaddrs no longer fails.
Commit 2eeb6b randomized the order of input and output notes,
but this is now known to prevent the chaining of multiple joinsplits
in a single transaction.  The root cause has yet to be determined.

This patch is a temporary fix and disables the shuffling of input
and output notes.  It also adds a chained joinsplit test to the
python qa test suite.
@ebfull

This comment has been minimized.

Show comment
Hide comment
@ebfull

ebfull Nov 5, 2016

Contributor

What was passed in for gen to Randomized before? Is there some default value in the header file?

Anyway, ACK.

Contributor

ebfull commented Nov 5, 2016

What was passed in for gen to Randomized before? Is there some default value in the header file?

Anyway, ACK.

@bitcartel

This comment has been minimized.

Show comment
Hide comment
@bitcartel

bitcartel Nov 5, 2016

Contributor

Default in transaction.h is GetRandInt.

Contributor

bitcartel commented Nov 5, 2016

Default in transaction.h is GetRandInt.

@str4d

ACK after comments addressed.

Show outdated Hide outdated src/primitives/transaction.cpp
Show outdated Hide outdated src/wallet/asyncrpcoperation_sendmany.cpp
@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Nov 5, 2016

Contributor

As far as creating the desired outcome goes, this PR is good as-is. But I'm not comfortable changing the semantics of JSDescription::Randomized such that it doesn't do what it says it does in non-obvious circumstances, because I worry that we will forget to revert those changes when we figure out the actual fix, and then the altered behaviour will remain. However, I won't block on this if another engineer sides with @bitcartel after reviewing my reasoning.

Contributor

str4d commented Nov 5, 2016

As far as creating the desired outcome goes, this PR is good as-is. But I'm not comfortable changing the semantics of JSDescription::Randomized such that it doesn't do what it says it does in non-obvious circumstances, because I worry that we will forget to revert those changes when we figure out the actual fix, and then the altered behaviour will remain. However, I won't block on this if another engineer sides with @bitcartel after reviewing my reasoning.

@ebfull

This comment has been minimized.

Show comment
Hide comment
@ebfull

ebfull Nov 5, 2016

Contributor

I want to investigate the root source, and then revert this commit when it's been fixed. If you agree, ACK and r+ this.

Contributor

ebfull commented Nov 5, 2016

I want to investigate the root source, and then revert this commit when it's been fixed. If you agree, ACK and r+ this.

@bitcartel

This comment has been minimized.

Show comment
Hide comment
@bitcartel

bitcartel Nov 5, 2016

Contributor

Here is an alternate solution in PR #1796 - it reverts changes made to z_sendmany related to note randomization and adds the same chained joinsplit test.

Contributor

bitcartel commented Nov 5, 2016

Here is an alternate solution in PR #1796 - it reverts changes made to z_sendmany related to note randomization and adds the same chained joinsplit test.

@bitcartel

This comment has been minimized.

Show comment
Hide comment
@bitcartel

bitcartel Nov 5, 2016

Contributor

@ebfull @str4d Can you review #1796 ? Maybe that is preferable. Thanks.

Contributor

bitcartel commented Nov 5, 2016

@ebfull @str4d Can you review #1796 ? Maybe that is preferable. Thanks.

@nathan-at-least

This comment has been minimized.

Show comment
Hide comment
@nathan-at-least

nathan-at-least Nov 5, 2016

Contributor

I've read the comments, and I'm looking into #1796 now.

Contributor

nathan-at-least commented Nov 5, 2016

I've read the comments, and I'm looking into #1796 now.

@nathan-at-least

This comment has been minimized.

Show comment
Hide comment
@nathan-at-least

nathan-at-least Nov 5, 2016

Contributor

utACK, although I have the same "taste" as @str4d where I like the inside of a function to have less complexity (fewer branches), and instead to express special cases with special arguments, when possible. This isn't a blocking concern for me, though.

Off to test...

Contributor

nathan-at-least commented Nov 5, 2016

utACK, although I have the same "taste" as @str4d where I like the inside of a function to have less complexity (fewer branches), and instead to express special cases with special arguments, when possible. This isn't a blocking concern for me, though.

Off to test...

@nathan-at-least

This comment has been minimized.

Show comment
Hide comment
@nathan-at-least

nathan-at-least Nov 5, 2016

Contributor

NACK:

Actually, coming back to this, I agree with @str4d: Let's define a well-known "identity permutation" that's part of the MappedShuffle API definition. Then, let's pass that into JSDescription::Randomized.

My reasoning is two-fold:

  • JSDescription::Randomized will have one branch removed from the current PR. (I want to reduce "modes of operation" so we stop running into "mainnet only bugs" and other kinds of problems due to "modal code".)
  • The resulting code will exercise all of MappedShuffle instead of shipping with inert code, so tests and live users will be exercising this code which we'll continue to use once we fix the chaining bug.
Contributor

nathan-at-least commented Nov 5, 2016

NACK:

Actually, coming back to this, I agree with @str4d: Let's define a well-known "identity permutation" that's part of the MappedShuffle API definition. Then, let's pass that into JSDescription::Randomized.

My reasoning is two-fold:

  • JSDescription::Randomized will have one branch removed from the current PR. (I want to reduce "modes of operation" so we stop running into "mainnet only bugs" and other kinds of problems due to "modal code".)
  • The resulting code will exercise all of MappedShuffle instead of shipping with inert code, so tests and live users will be exercising this code which we'll continue to use once we fix the chaining bug.
Add GenIdentity, an identity function for MappedShuffle.
We use this function in z_sendmany as part of the fix for #1779.
@bitcartel

This comment has been minimized.

Show comment
Hide comment
@bitcartel

bitcartel Nov 5, 2016

Contributor

Added changes. I think #1796 is safer, but this PR with or without the identity function passes all tests too. I'll be offline for a bit (so if you need to make changes, please merge into this PR or create a new one) and I don't mind which PR you go with.

Contributor

bitcartel commented Nov 5, 2016

Added changes. I think #1796 is safer, but this PR with or without the identity function passes all tests too. I'll be offline for a bit (so if you need to make changes, please merge into this PR or create a new one) and I don't mind which PR you go with.

@str4d

This comment has been minimized.

Show comment
Hide comment
@str4d

str4d Nov 5, 2016

Contributor

utACK, if we decide to go with this PR.

Contributor

str4d commented Nov 5, 2016

utACK, if we decide to go with this PR.

@str4d str4d modified the milestones: 1.0.3, 1.0.2 Nov 5, 2016

@bitcartel

This comment has been minimized.

Show comment
Hide comment
@bitcartel

bitcartel Nov 6, 2016

Contributor

Ping @nathan-at-least NACK -> ACK?

Contributor

bitcartel commented Nov 6, 2016

Ping @nathan-at-least NACK -> ACK?

@bitcartel

This comment has been minimized.

Show comment
Hide comment
@bitcartel

bitcartel Nov 6, 2016

Contributor

ACK from @ebfull @str4d above and @nathan-at-least (out-of-band)

Contributor

bitcartel commented Nov 6, 2016

ACK from @ebfull @str4d above and @nathan-at-least (out-of-band)

@bitcartel

This comment has been minimized.

Show comment
Hide comment
@bitcartel

bitcartel Nov 6, 2016

Contributor

@zkbot r+

Contributor

bitcartel commented Nov 6, 2016

@zkbot r+

@zkbot

This comment has been minimized.

Show comment
Hide comment
@zkbot

zkbot Nov 6, 2016

Contributor

📌 Commit 38276c6 has been approved by bitcartel

Contributor

zkbot commented Nov 6, 2016

📌 Commit 38276c6 has been approved by bitcartel

@zkbot

This comment has been minimized.

Show comment
Hide comment
@zkbot

zkbot Nov 6, 2016

Contributor

⌛️ Testing commit 38276c6 with merge fbc69d3...

Contributor

zkbot commented Nov 6, 2016

⌛️ Testing commit 38276c6 with merge fbc69d3...

zkbot pushed a commit that referenced this pull request Nov 6, 2016

zkbot
Auto merge of #1790 - bitcartel:1779_send_multiple_zaddrs_logic_error…
…, r=bitcartel

Fixes #1779 so that sending to multiple zaddrs no longer fails.

Closes #1779

Commit 2eeb6b randomized the order of input and output notes,
but this is now known to prevent the chaining of multiple joinsplits
in a single transaction.  The root cause has yet to be determined.

This patch is a temporary fix and disables the shuffling of input
and output notes.  It also adds a chained joinsplit test to the
python qa test suite.

@str4d has utACK'ed above

@zkbot

This comment has been minimized.

Show comment
Hide comment
@zkbot

zkbot Nov 6, 2016

Contributor

☀️ Test successful - zcash

Contributor

zkbot commented Nov 6, 2016

☀️ Test successful - zcash

@zkbot zkbot merged commit 38276c6 into zcash:master Nov 6, 2016

1 check passed

homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment