Skip to content

Commit 95b9a45

Browse files
committed
[dbsp] Fix CircuitHandle::is_replay_complete.
Bootstrapping is considered completed when all replay sources are complete and the bootstrapping transaction has committed. The latter condition was missing. This did not cause any issues because we only called this function between transactions. Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
1 parent bce774d commit 95b9a45

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

crates/dbsp/src/circuit/circuit_builder.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7545,10 +7545,16 @@ impl CircuitHandle {
75457545
return true;
75467546
};
75477547

7548-
replay_info.replay_sources.keys().all(|node_id| {
7548+
// Bootstrapping is finished when all replay sources have completed their replay and the
7549+
// transaction has been committed.
7550+
7551+
let all_complete = replay_info.replay_sources.keys().all(|node_id| {
75497552
self.circuit
75507553
.map_local_node_mut(*node_id, &mut |node| node.is_replay_complete())
7551-
})
7554+
});
7555+
7556+
all_complete && self.is_commit_complete()
7557+
75527558
}
75537559

75547560
/// Finalize the replay phase of the circuit.

0 commit comments

Comments
 (0)