diff --git a/protocol-units/da/m1/light-node/src/v1/passthrough.rs b/protocol-units/da/m1/light-node/src/v1/passthrough.rs index cad3829f2..36b18fa9e 100644 --- a/protocol-units/da/m1/light-node/src/v1/passthrough.rs +++ b/protocol-units/da/m1/light-node/src/v1/passthrough.rs @@ -2,7 +2,7 @@ use m1_da_light_node_util::ir_blob::IntermediateBlobRepresentation; use std::fmt::{self, Debug, Formatter}; use std::sync::Arc; use tokio_stream::{Stream, StreamExt}; -use tracing::{error, info}; +use tracing::{debug, error, info}; use celestia_rpc::{BlobClient, Client, HeaderClient}; use celestia_types::{blob::GasPrice, nmt::Namespace, Blob as CelestiaBlob}; @@ -258,7 +258,7 @@ where while let Some(blob) = blob_stream.next().await { - info!("Stream got blob: {:?}", blob); + debug!("Stream got blob: {:?}", blob); yield blob?; } @@ -269,7 +269,7 @@ where let blobs = me.get_blobs_at_height(height).await?; for blob in blobs { - info!("Stream got blob: {:?}", blob); + debug!("Stream got blob: {:?}", blob); yield blob; } diff --git a/protocol-units/execution/opt-executor/src/gc_account_sequence_number.rs b/protocol-units/execution/opt-executor/src/gc_account_sequence_number.rs index 3fa2278b8..7c1efee43 100644 --- a/protocol-units/execution/opt-executor/src/gc_account_sequence_number.rs +++ b/protocol-units/execution/opt-executor/src/gc_account_sequence_number.rs @@ -1,6 +1,6 @@ use aptos_types::account_address::AccountAddress; use std::collections::{BTreeMap, HashMap}; -use tracing::info; +use tracing::debug; pub struct UsedSequenceNumberPool { /// The number of milliseconds a sequence number is valid for. @@ -83,7 +83,7 @@ impl UsedSequenceNumberPool { .cloned() .collect(); for slot in slots_to_remove { - println!( + debug!( "Garbage collecting sequence number slot {} with duration {} timestamp {}", slot, self.gc_slot_duration_ms, diff --git a/protocol-units/execution/opt-executor/src/transaction_pipe.rs b/protocol-units/execution/opt-executor/src/transaction_pipe.rs index b80c341b2..5f66137fc 100644 --- a/protocol-units/execution/opt-executor/src/transaction_pipe.rs +++ b/protocol-units/execution/opt-executor/src/transaction_pipe.rs @@ -154,7 +154,14 @@ impl TransactionPipe { let committed_sequence_number = vm_validator::get_account_sequence_number(&state_view, transaction.sender())?; - let min_sequence_number = (used_sequence_number + 1).max(committed_sequence_number); + debug!( + "Used sequence number: {:?} Committed sequence number: {:?}", + used_sequence_number, committed_sequence_number + ); + let min_used_sequence_number = + if used_sequence_number > 0 { used_sequence_number + 1 } else { 0 }; + + let min_sequence_number = (min_used_sequence_number).max(committed_sequence_number); let max_sequence_number = committed_sequence_number + TOO_NEW_TOLERANCE; @@ -211,9 +218,12 @@ impl TransactionPipe { match tx_result.status() { Some(_) => { let ms = MempoolStatus::new(MempoolStatusCode::VmError); + debug!("Transaction not accepted: {:?}", tx_result.status()); return Ok((ms, tx_result.status())); } - None => {} + None => { + debug!("Transaction accepted by VM: {:?}", transaction); + } } let sequence_number = match self.has_invalid_sequence_number(&transaction)? { @@ -478,7 +488,7 @@ mod tests { let (mut transaction_pipe, mut _mempool_client_sender, _tx_receiver) = setup(); // submit a transaction with a valid sequence number - let user_transaction = create_signed_transaction(1, &maptos_config); + let user_transaction = create_signed_transaction(0, &maptos_config); let (mempool_status, _) = transaction_pipe.submit_transaction(user_transaction).await?; assert_eq!(mempool_status.code, MempoolStatusCode::Accepted);