Skip to content

Commit

Permalink
feat(proof_upgrade): Perform update if SingleProof-capable
Browse files Browse the repository at this point in the history
Getting a transaction mined with our current hardware and a 10 minute
block interval is proving a challenge. So the machines that are setup as
proof upgraders now also runs the `Update` program in order to make
other mempools (preferably that of composers) accept the transaction.
  • Loading branch information
Sword-Smith committed Nov 28, 2024
1 parent ae08f7b commit 8796fed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/main_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,8 @@ impl MainLoopHandler {
// a long time (minutes), so we spawn a task for this such that we do
// not block the main loop.
let vm_job_queue = self.global_state_lock.vm_job_queue().clone();
let perform_ms_update_if_needed = false;
let perform_ms_update_if_needed =
self.global_state_lock.cli().proving_capability() == TxProvingCapability::SingleProof;

let global_state_lock_clone = self.global_state_lock.clone();
let main_to_peer_broadcast_tx_clone = self.main_to_peer_broadcast_tx.clone();
Expand Down
10 changes: 5 additions & 5 deletions src/main_loop/proof_upgrader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ impl UpgradeJob {
proof_job_options,
)
.await?;
info!("Proof-upgrader: Done");
info!("Proof-upgrader, to single proof: Done");

Ok(Transaction {
kernel: kernel.to_owned(),
Expand Down Expand Up @@ -344,7 +344,7 @@ impl UpgradeJob {
proof_job_options,
)
.await?;
info!("Proof-upgrader: Done");
info!("Proof-upgrader, merge: Done");

Ok(ret)
}
Expand All @@ -355,7 +355,7 @@ impl UpgradeJob {
let proof_collection =
ProofCollection::produce(&witness, triton_vm_job_queue, proof_job_options)
.await?;
info!("Proof-upgrader: Done");
info!("Proof-upgrader, proof collection: Done");
Ok(Transaction {
kernel: witness.kernel,
proof: TransactionProof::ProofCollection(proof_collection),
Expand All @@ -367,7 +367,7 @@ impl UpgradeJob {
info!("Proof-upgrader: Start producing single proof");
let proof =
SingleProof::produce(&witness, triton_vm_job_queue, proof_job_options).await?;
info!("Proof-upgrader: Done");
info!("Proof-upgrader, single proof: Done");
Ok(Transaction {
kernel: witness.kernel,
proof: TransactionProof::SingleProof(proof),
Expand All @@ -389,7 +389,7 @@ impl UpgradeJob {
proof_job_options,
)
.await?;
info!("Proof-upgrader: Done");
info!("Proof-upgrader, update: Done");

Ok(ret)
}
Expand Down

0 comments on commit 8796fed

Please sign in to comment.