Skip to content

Commit 0c6705e

Browse files
authored
migrate sync test to using s3 for blobs (#375)
1 parent 4b1d4d5 commit 0c6705e

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

crates/node/tests/sync.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ async fn test_should_consolidate_to_block_15k() -> eyre::Result<()> {
6161
..Default::default()
6262
},
6363
blob_provider_args: BlobProviderArgs {
64-
beacon_node_urls: Some(vec![Url::parse("https://eth-beacon-chain.drpc.org/rest/")?]),
64+
s3_url: Some(Url::parse(
65+
"https://scroll-sepolia-blob-data.s3.us-west-2.amazonaws.com/",
66+
)?),
6567
compute_units_per_second: 100,
6668
max_retries: 10,
6769
initial_backoff: 100,

crates/providers/src/l1/blob/client.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ impl BeaconClientProvider {
9696
base: &str,
9797
client: &Client,
9898
) -> Result<APIResponse<ReducedConfigData>, reqwest::Error> {
99-
let first = client.get(format!("{}/{}", base, Self::SPEC_METHOD)).send().await?;
99+
let first = client
100+
.get(format!("{}/{}", base, Self::SPEC_METHOD))
101+
.send()
102+
.await?
103+
.error_for_status()?;
100104
first.json::<APIResponse<ReducedConfigData>>().await
101105
}
102106

@@ -105,7 +109,11 @@ impl BeaconClientProvider {
105109
base: &str,
106110
client: &Client,
107111
) -> Result<APIResponse<ReducedGenesisData>, reqwest::Error> {
108-
let first = client.get(format!("{}/{}", base, Self::GENESIS_METHOD)).send().await?;
112+
let first = client
113+
.get(format!("{}/{}", base, Self::GENESIS_METHOD))
114+
.send()
115+
.await?
116+
.error_for_status()?;
109117
first.json::<APIResponse<ReducedGenesisData>>().await
110118
}
111119

0 commit comments

Comments
 (0)