Skip to content

Commit

Permalink
code refine: clean warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
smtmfft committed Feb 13, 2025
1 parent 0e7b2e4 commit 76caceb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 19 deletions.
5 changes: 1 addition & 4 deletions core/src/preflight/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ pub async fn prepare_taiko_chain_batch_input(
let fork = taiko_chain_spec.active_fork(batch_blocks[0].number, batch_blocks[0].timestamp)?;
let provider_l1 = RpcBlockDataProvider::new(&l1_chain_spec.rpc, 0).await?;
// todo: duplicate code with parse_l1_batch_proposal_tx_for_pacaya_fork(), better to make these values fn parameters
let (l1_inclusion_height, batch_proposal_tx, batch_proposed_fork) =
let (l1_inclusion_height, _batch_proposal_tx, batch_proposed_fork) =
get_block_proposed_event_by_height(
provider_l1.provider(),
taiko_chain_spec.clone(),
Expand All @@ -328,10 +328,7 @@ pub async fn prepare_taiko_chain_batch_input(

if let BlockProposedFork::Pacaya(batch_proposed) = batch_proposed_fork {
let batch_info = &batch_proposed.info;
let batch_meta = &batch_proposed.meta;
let blob_hashes = batch_info.blobHashes.clone();
let blob_byte_offset = batch_info.blobByteOffset as usize;
let blob_byte_size = batch_info.blobByteSize as usize;
let blob_tx_buffers = get_batch_tx_data_with_proofs(
blob_hashes,
l1_inclusion_header.timestamp,
Expand Down
9 changes: 2 additions & 7 deletions host/src/server/api/v4/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@ use crate::{
metrics::{inc_current_req, inc_guest_req_count, inc_host_req_count},
server::{
api::{v2, v3::Status},
prove_aggregation,
utils::to_v3_status,
},
};
use axum::{extract::State, routing::post, Json, Router};
use raiko_core::{
interfaces::{AggregationRequest, ProofRequest, ProofRequestOpt},
provider::{get_batch_task_data, get_task_data},
};
use raiko_lib::proof_type;
use raiko_core::interfaces::ProofRequest;
use raiko_reqactor::Actor;
use raiko_reqpool::{
AggregationRequestEntity, AggregationRequestKey, BatchProofRequestEntity, BatchProofRequestKey,
Expand Down Expand Up @@ -41,7 +36,7 @@ use utoipa::OpenApi;
/// - risc0 - uses the risc0 prover
async fn proof_handler(
State(actor): State<Actor>,
Json(mut batch_request_opt): Json<Value>,
Json(batch_request_opt): Json<Value>,
) -> HostResult<Status> {
inc_current_req();

Expand Down
2 changes: 1 addition & 1 deletion host/src/server/handler.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use raiko_reqactor::{Action, Actor};
use raiko_reqpool::{
AggregationRequestEntity, AggregationRequestKey, RequestEntity, RequestKey,
SingleProofRequestEntity, SingleProofRequestKey, Status,
SingleProofRequestKey, Status,
};

// NOTE: HTTP handlers should not check the status of the request, but just send the request to the Actor. In
Expand Down
6 changes: 2 additions & 4 deletions lib/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::sync::Arc;

use crate::primitives::keccak::keccak;
use crate::primitives::mpt::StateAccount;
use crate::utils::{generate_transactions_for_batch_blocks, generate_transactions};
use crate::utils::{generate_transactions, generate_transactions_for_batch_blocks};
use crate::{
consts::{ChainSpec, MAX_BLOCK_HASH_AGE},
guest_mem_forget,
Expand All @@ -15,9 +15,7 @@ use anyhow::{bail, ensure, Result};
use reth_chainspec::{
ChainSpecBuilder, Hardfork, HOLESKY, MAINNET, TAIKO_A7, TAIKO_DEV, TAIKO_MAINNET,
};
use reth_evm::execute::{
self, BlockExecutionOutput, BlockValidationError, Executor, ProviderError,
};
use reth_evm::execute::{BlockExecutionOutput, BlockValidationError, Executor, ProviderError};
use reth_evm_ethereum::execute::{
validate_block_post_execution, Consensus, EthBeaconConsensus, EthExecutorProvider,
};
Expand Down
1 change: 0 additions & 1 deletion lib/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ impl BlockProposedFork {
BlockProposedFork::Hekla(block) => block.meta.blobHash,
BlockProposedFork::Ontake(block) => block.meta.blobHash,
// meaningless for pakaya
BlockProposedFork::Pacaya(batch) => B256::default(),
_ => B256::default(),
}
}
Expand Down
2 changes: 0 additions & 2 deletions lib/src/prover.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use reth_primitives::{ChainId, B256};
use serde::{Deserialize, Serialize};
use std::sync::Arc;
use std::sync::Mutex;
use utoipa::ToSchema;

use crate::input::{
Expand Down

0 comments on commit 76caceb

Please # to comment.