From 289cff7d877b61cbedf679c5f5df60d37d02f398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Yaz=C4=B1c=C4=B1?= <75089142+yaziciahmet@users.noreply.github.com> Date: Wed, 21 Aug 2024 21:07:12 +0300 Subject: [PATCH] Fix prover commitment serialization (#1031) * Convert to debug log * Serialize DaData --- crates/bitcoin-da/src/service.rs | 11 ++--------- crates/prover/src/prover_service/parallel/mod.rs | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/crates/bitcoin-da/src/service.rs b/crates/bitcoin-da/src/service.rs index 1bd835a95..cea6326b1 100644 --- a/crates/bitcoin-da/src/service.rs +++ b/crates/bitcoin-da/src/service.rs @@ -308,15 +308,7 @@ impl BitcoinService { let rollup_name = self.rollup_name.clone(); let da_private_key = self.da_private_key.expect("No private key set"); - let blob = match da_data { - DaData::ZKProof(proof) => { - let blob = borsh::to_vec(&proof).expect("Should serialize"); - compress_blob(&blob) - } - DaData::SequencerCommitment(commitment) => { - borsh::to_vec(&commitment).expect("Should serialize") - } - }; + let blob = borsh::to_vec(da_data).expect("DaData serialize must not fail"); // get all available utxos let utxos = self.get_utxos().await?; @@ -331,6 +323,7 @@ impl BitcoinService { match da_data { DaData::ZKProof(_) => { + let blob = compress_blob(&blob); // create inscribe transactions let inscription_txs = create_zkproof_transactions( &rollup_name, diff --git a/crates/prover/src/prover_service/parallel/mod.rs b/crates/prover/src/prover_service/parallel/mod.rs index de4f8704d..b471a57f1 100644 --- a/crates/prover/src/prover_service/parallel/mod.rs +++ b/crates/prover/src/prover_service/parallel/mod.rs @@ -215,7 +215,7 @@ where &self, da_service: &Arc, ) -> Result::TransactionId, Proof)>, anyhow::Error> { - tracing::info!("Checking if ongoing bonsai session exists"); + tracing::debug!("Checking if ongoing bonsai session exists"); let vm = self.vm.clone(); let proofs = vm.recover_proving_sessions()?;