You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use sbv_utils::{rpc::ProviderExt, witness::WitnessBuilder};
64
-
use alloy::network::primitives::BlockTransactionsKind;
65
54
usecrate::types::ChunkTaskDetail;
55
+
use alloy::network::primitives::BlockTransactionsKind;
56
+
use sbv_utils::{rpc::ProviderExt, witness::WitnessBuilder};
66
57
use scroll_zkvm_prover_euclid::task::chunk::ChunkProvingTask;
67
58
68
-
let chunk_task:ChunkTaskDetail = serde_json::from_str(&input)?;
59
+
let chunk_task:ChunkTaskDetail = serde_json::from_str(&input)?;
69
60
70
61
let chain_id = self.provider.get_chain_id().await?;
71
62
72
-
// we need block number but only get hashes, which cause much extra cost for query the block number from hash
73
-
// according to https://github.com/scroll-tech/scroll/blob/932be72b88ba2ebb6f9457e8480ee08d612d35a7/coordinator/internal/orm/l2_block.go#L53
63
+
// we need block number but only get hashes, which cause much extra cost for query the block
64
+
// number from hash according to https://github.com/scroll-tech/scroll/blob/932be72b88ba2ebb6f9457e8480ee08d612d35a7/coordinator/internal/orm/l2_block.go#L53
74
65
// the hashes is ordered by ascending in block number so a heuristic way is applied
75
66
76
67
letmut block_witnesses = Vec::new();
77
68
78
69
for block_hash in chunk_task.block_hashes{
79
-
// grep `dump_block_witness` in sbv here,
70
+
// grep `dump_block_witness` in sbv here,
80
71
// TODO: we do not need to do that
81
72
// if we have block number or `dump_block_witness` support block hashes
82
-
let block = self.provider.get_block_by_hash(
83
-
block_hash,
84
-
BlockTransactionsKind::Full,
85
-
).await?
86
-
.ok_or_else(|| anyhow::anyhow!("Block not found"))?;
0 commit comments