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

Preprocessing callback is executed prematurely #245

Open
gutjuri opened this issue Feb 28, 2023 · 0 comments
Open

Preprocessing callback is executed prematurely #245

gutjuri opened this issue Feb 28, 2023 · 0 comments
Assignees

Comments

@gutjuri
Copy link

gutjuri commented Feb 28, 2023

Consider the following piece of code:

console.log("queueing preprocessing");
var t_start_pp = process.hrtime.bigint();
jiffClient
  .preprocessing("cdiv", 6, null, null, compute_parties, compute_parties)
  .then(console.log("finished preprocessing for cdiv"));
jiffClient.executePreprocessing(() => {
  var t_end_pp = process.hrtime.bigint();
  console.log(
    `performed preprocessing in ${
      Number(t_end_pp - t_start_pp) / 1000000
    } ms`
  );
  compute.bind(null, jiffClient)();
});

As the documentation states that the return value is "a promise that is resolved when preprocessing is completed, null if this is called by a party that is neither a compute nor receiver party", one would expect that the programme would print finished preprocessing for cdiv after all preprocessing is finished.
However, when executing the programme I observe that finished preprocessing for cdiv is printed almost immediately, while preprocessing continues.
The next log message performed preprocessing in [...] is only printed after preprocessing is actually finished, which is several minutes later.

Expected behaviour:

finished preprocessing for cdiv should be printed after all preprocessing is completed, i.e. the promise returned by preprocessing() should resolve after all preprocessing operations triggered by the corresponding call to preprocessing() are completed.

@gregfrasco gregfrasco added this to Jiff Mar 8, 2024
@Snafkin547 Snafkin547 moved this to In progress in Jiff May 23, 2024
@Snafkin547 Snafkin547 moved this from In progress to In review in Jiff May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In review
Development

No branches or pull requests

2 participants