Skip to content

Commit

Permalink
merge : main into self
Browse files Browse the repository at this point in the history
  • Loading branch information
ocdbytes committed Jul 22, 2024
1 parent b0979bc commit c323b80
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
10 changes: 2 additions & 8 deletions crates/da-clients/ethereum/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use std::str::FromStr;
use std::{env, path::Path};

use alloy::signers::wallet::LocalWallet;
use alloy::{network::Ethereum, providers::ProviderBuilder, rpc::client::RpcClient};
use async_trait::async_trait;
use c_kzg::KzgSettings;
use da_client_interface::DaConfig;
use url::Url;
use utils::env_utils::get_env_var_or_panic;
Expand All @@ -31,10 +28,7 @@ impl DaConfig<EthereumDaClient> for EthereumDaConfig {
let client =
RpcClient::new_http(Url::from_str(self.rpc_url.as_str()).expect("Failed to parse ETHEREUM_RPC_URL"));
let provider = ProviderBuilder::<_, Ethereum>::new().on_client(client);
let wallet: LocalWallet = env::var("PK").expect("PK must be set").parse().expect("issue while parsing");
// let wallet: LocalWallet = config.private_key.as_str().parse();
let trusted_setup = KzgSettings::load_trusted_setup_file(Path::new("./trusted_setup.txt"))
.expect("issue while loading the trusted setup");
EthereumDaClient { provider, wallet, trusted_setup }

EthereumDaClient { provider }
}
}
3 changes: 1 addition & 2 deletions crates/da-clients/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#![allow(missing_docs)]
#![allow(clippy::missing_docs_in_private_items)]
use std::str::FromStr;

use alloy::network::Ethereum;
use alloy::providers::{RootProvider};
use alloy::providers::RootProvider;
use alloy::transports::http::Http;
use async_trait::async_trait;
use color_eyre::Result;
Expand Down
4 changes: 2 additions & 2 deletions crates/orchestrator/src/jobs/state_update_job/kzg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ pub async fn fetch_blob_data_for_block(block_number: u64) -> color_eyre::Result<
let storage_client = config.storage();
let key = block_number.to_string() + "/" + BLOB_DATA_FILE_NAME;
let blob_data = storage_client.get_data(&key).await?;
let blob_vec_data: Vec<Vec<u8>> = bincode::deserialize(&blob_data)
.expect("Not able to convert Vec<u8> to Vec<Vec<u8>> during deserialization.");
let blob_vec_data: Vec<Vec<u8>> =
bincode::deserialize(&blob_data).expect("Not able to convert Vec<u8> to Vec<Vec<u8>> during deserialization.");
Ok(blob_vec_data)
}

Expand Down

0 comments on commit c323b80

Please sign in to comment.