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

A possible problem on update caused by the update of 0.3.6 #1018

Closed
winnnnnny opened this issue May 10, 2023 · 2 comments
Closed

A possible problem on update caused by the update of 0.3.6 #1018

winnnnnny opened this issue May 10, 2023 · 2 comments

Comments

@winnnnnny
Copy link

Sorry for disturbing you!
I observed an unexpected update when I use version 0.3.6
Here is an example.

a = sint(0)
b = sint(1)
c = sint(2)
# a is updated with the value of b, but it creates an unexpected shallow copy here.
a.update(b)
# a and b share the same value 1 here
print_ln('b: %s', b.reveal())
print_ln('a: %s', a.reveal())
# a is updated with the value of c, but b is also updated, which is not expected
a.update(c)
# a and b share the same value 2 here but b is expected to be still 1.
print_ln('b: %s', b.reveal())
print_ln('a: %s', a.reveal())

The result is shown below.

./Scripts/mascot.sh test
Running /home/mp-spdz/Scripts/../mascot-party.x 0 test -pn 10909 -h localhost -N 2
Running /home/mp-spdz/Scripts/../mascot-party.x 1 test -pn 10909 -h localhost -N 2
Using security parameter 40
b: 1
a: 1
b: 2
a: 2
The following benchmarks are including preprocessing (offline phase).
Time = 0.00150634 seconds 
Data sent = 0.041596 MB in ~49 rounds (party 0 only; use '-v' for more details)
Global data sent = 0.083192 MB (all parties)

By the way, the result from 0.3.5 is also shown below.

./Scripts/mascot.sh test
Running /home/mp-spdz-0.3.5/Scripts/../mascot-party.x 0 test -pn 19733 -h localhost -N 2
Running /home/mp-spdz-0.3.5/Scripts/../mascot-party.x 1 test -pn 19733 -h localhost -N 2
Using security parameter 40
b: 1
a: 1
b: 1
a: 2
The following benchmarks are including preprocessing (offline phase).
Time = 0.00252492 seconds 
Data sent = 0.041596 MB in ~537 rounds (party 0; use '-v' for more details)
Global data sent = 0.083192 MB (all parties)

The behavior is different from versions 0.3.5 and 0.3.6. Is this a new property introduced in 0.3.6 or a bug?

@mkskeller
Copy link
Member

Thank you for raising this. You should find that 8e735da fixes it.

@winnnnnny
Copy link
Author

Thank you for repairing this!

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

No branches or pull requests

2 participants