feat: Support testnet sync

- Add testnet S3 bucket
- Use testnet RPC properly
- Use testnet chainspec on pseudo peer
This commit is contained in:
sprites0
2025-08-22 10:40:33 -04:00
parent 7daf203bc2
commit b6d5031865
7 changed files with 46 additions and 37 deletions

View File

@ -245,7 +245,7 @@ where
ctx.task_executor().spawn_critical("pseudo peer", async move {
let block_source =
block_source_config.create_cached_block_source(next_block_number).await;
block_source_config.create_cached_block_source((&*chain_spec).clone(), next_block_number).await;
start_pseudo_peer(chain_spec, local_node_record.to_string(), block_source)
.await
.unwrap();

View File

@ -7,7 +7,7 @@ use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable};
use bytes::BufMut;
use serde::{Deserialize, Serialize};
use crate::{chainspec::MAINNET_CHAIN_ID, HlBlock};
use crate::HlBlock;
pub type ReadPrecompileCall = (Address, Vec<(ReadPrecompileInput, ReadPrecompileResult)>);
@ -50,13 +50,13 @@ pub struct BlockAndReceipts {
}
impl BlockAndReceipts {
pub fn to_reth_block(self) -> HlBlock {
pub fn to_reth_block(self, chain_id: u64) -> HlBlock {
let EvmBlock::Reth115(block) = self.block;
block.to_reth_block(
self.read_precompile_calls.clone(),
self.highest_precompile_address,
self.system_txs.clone(),
MAINNET_CHAIN_ID,
chain_id,
)
}