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

Replace RegisterNextWire function calls in src/examples/benchmark #31

Open
rainiemi opened this issue Oct 18, 2022 · 2 comments
Open

Replace RegisterNextWire function calls in src/examples/benchmark #31

rainiemi opened this issue Oct 18, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@rainiemi
Copy link

The build gives the following errors when MOTION executable building is enabled (e.g., with the MOTION_BUILD_EXE option):

MOTION/src/examples/benchmark/common/benchmark.cpp: In function ‘encrypto::motion::ShareWrapper DummyArithmeticGmwShare(encrypto::motion::PartyPointer&, std::size_t, std::size_t)’:
MOTION/src/examples/benchmark/common/benchmark.cpp:54:21: error: ‘using element_type = class encrypto::motion::Register’ {aka ‘class encrypto::motion::Register’} has no member named ‘RegisterNextWire’; did you mean ‘RegisterWire’?
   54 |   register_pointer->RegisterNextWire(wires[0]);
      |                     ^~~~~~~~~~~~~~~~
      |                     RegisterWire
MOTION/src/examples/benchmark/common/benchmark.cpp: In function ‘encrypto::motion::ShareWrapper DummyBmrShare(encrypto::motion::PartyPointer&, std::size_t, std::size_t)’:
MOTION/src/examples/benchmark/common/benchmark.cpp:73:23: error: ‘using element_type = class encrypto::motion::Register’ {aka ‘class encrypto::motion::Register’} has no member named ‘RegisterNextWire’; did you mean ‘RegisterWire’?
   73 |     register_pointer->RegisterNextWire(bmr_wire);
      |                       ^~~~~~~~~~~~~~~~
      |                       RegisterWire
MOTION/src/examples/benchmark/common/benchmark.cpp: In function ‘encrypto::motion::ShareWrapper DummyBooleanGmwShare(encrypto::motion::PartyPointer&, std::size_t, std::size_t)’:
MOTION/src/examples/benchmark/common/benchmark.cpp:97:23: error: ‘using element_type = class encrypto::motion::Register’ {aka ‘class encrypto::motion::Register’} has no member named ‘RegisterNextWire’; did you mean ‘RegisterWire’?
   97 |     register_pointer->RegisterNextWire(w);
      |                       ^~~~~~~~~~~~~~~~
      |                       RegisterWire

Apparently, RegisterNextWire function was removed at some point but benchmark.cpp was not maintained accordingly. This is probably easy to fix, but better that the person who removed the original function also makes the fix for this.

In addition, I suggest that Travis CI configuration is modified to compile the MOTION example executables so that we can detect similar errors immediately in the future.

@rainiemi rainiemi added the bug Something isn't working label Oct 18, 2022
@rainiemi rainiemi changed the title Replace RegisterNextWire function calls from src/examples/benchmark Replace RegisterNextWire function calls in src/examples/benchmark Oct 18, 2022
@Oleksandr-Tkachenko
Copy link
Member

Thanks for figuring that out! If it's easy to fix, we would highly appreciate if you could make a PR - that would be great help.

@rainiemi
Copy link
Author

rainiemi commented Nov 8, 2022

Seems that in the dev branch (which is now the default branch), the whole src/examples/benchmark is deleted solving the problem.

Replacing RegisterNextWire with RegisterWire also seemed to solve the compilation issue (as suggested by the compiler), but I didn't want to make a PR because I have no idea why RegisterNextWire wasn't properly deprecated and I cannot be sure that RegisterWire is functioning similarly. Maybe the whole example was meant to be removed but was forgotten. Anyway, updating (or removing) the master branch is now probably the best "solution".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants