Skip to content

Commit

Permalink
fix: additional logging for da blob.
Browse files Browse the repository at this point in the history
  • Loading branch information
l-monninger committed Feb 23, 2025
1 parent 4064b6b commit 209bf3a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ use serde::{Deserialize, Serialize};
pub struct Config {
#[serde(default = "default_da_db_path")]
pub da_db_path: String,
#[serde(default = "default_start_sync_height")]
pub start_sync_height: u64,
}

impl Default for Config {
fn default() -> Self {
Self { da_db_path: default_da_db_path() }
Self { da_db_path: default_da_db_path(), start_sync_height: default_start_sync_height() }
}
}

env_default!(default_da_db_path, "SUZUKA_DA_DB_PATH", String, "movement-da-db".to_string());
env_default!(default_start_sync_height, "MOVEMENT_START_SYNC_HEIGHT", u64, 0);
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ where
{
pub async fn run(mut self) -> anyhow::Result<()> {
let synced_height = self.da_db.get_synced_height().await?;
info!("Synced height: {:?}", synced_height);
info!("DA synced height: {:?}", synced_height);
let mut blocks_from_da = self
.da_light_node_client
.stream_read_from_height(StreamReadFromHeightRequest { height: synced_height })
Expand Down
2 changes: 2 additions & 0 deletions protocol-units/da/movement/providers/celestia/src/da/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ where
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<DaBlob<C>>, DaError>> + Send + '_>> {
Box::pin(async move {
debug!("getting blobs at height {height}");
let height = if height == 0 { 1 } else { height };

match self.default_client.blob_get_all(height, &[self.celestia_namespace]).await {
Expand All @@ -104,6 +105,7 @@ where
format!("failed to convert blob: {e}").into(),
)
})?;
debug!("got blob {da_blob:?}");
da_blobs.push(da_blob);
}

Expand Down

0 comments on commit 209bf3a

Please sign in to comment.