Skip to content
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

Local Run Errors #736

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions protocol-units/da/m1/light-node/src/v1/passthrough.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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?;
}
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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,
Expand Down
16 changes: 13 additions & 3 deletions protocol-units/execution/opt-executor/src/transaction_pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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)? {
Expand Down Expand Up @@ -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);

Expand Down