-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix: Seen circuits may be accepted again #167
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
The diff doesn't show it, so for reference: hashed_circs
was being sent without dropping the seen circs after the loop.
src/optimiser/taso.rs
Outdated
@@ -133,11 +133,11 @@ where | |||
let rewrites = self.rewriter.get_rewrites(&circ); | |||
for new_circ in self.strategy.apply_rewrites(rewrites, &circ) { | |||
let new_circ_hash = new_circ.circuit_hash(); | |||
circ_cnt += 1; | |||
logger.log_progress(circ_cnt, Some(pq.len()), seen_hashes.len()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the progress after the circuit_cnt
increase (otherwise this may cause duplicated logs if circ_cnt is a round number.
src/optimiser/taso.rs
Outdated
logger.log_progress(circ_cnt, None, seen_hashes.len()); | ||
circ_cnt += 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here,
logger.log_progress(circ_cnt, None, seen_hashes.len()); | |
circ_cnt += 1; | |
circ_cnt += 1; | |
logger.log_progress(circ_cnt, None, seen_hashes.len()); |
# Conflicts: # src/optimiser/taso.rs
Nvm, after merging in #156 this was fixed anyways. |
It seems I have found a bug in multi-threaded TASO. Maybe this helps explain the bad performance?
I have run a test on 4 cores, 15seconds timeout, the results are marginally better:
on main
this PR