Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: trim last / from urls #93

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions crates/kona-providers/src/blob_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ impl LayeredBlobProvider {
let memory = Arc::new(Mutex::new(InnerBlobProvider::with_capacity(512)));

let online = OnlineBlobProviderBuilder::new()
.with_primary(beacon_client_url.to_string())
.with_fallback(blob_archiver_url.map(|url| url.to_string()))
.with_primary(beacon_client_url.as_str().trim_end_matches('/').to_string())
.with_fallback(
blob_archiver_url.map(|url| url.as_str().trim_end_matches('/').to_string()),
)
.build();

Self { memory, online }
Expand Down
10 changes: 7 additions & 3 deletions crates/rollup/src/driver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ impl Driver<StandaloneHeraContext, AlloyChainProvider, DurableBlobProvider> {
pub async fn standalone(args: HeraArgsExt, cfg: Arc<RollupConfig>) -> Result<Self> {
let chain_provider = AlloyChainProvider::new_http(args.l1_rpc_url.clone());
let blob_provider = OnlineBlobProviderBuilder::new()
.with_primary(args.l1_beacon_client_url.to_string())
.with_fallback(args.l1_blob_archiver_url.clone().map(|url| url.to_string()))
.with_primary(args.l1_beacon_client_url.as_str().trim_end_matches('/').to_string())
.with_fallback(
args.l1_blob_archiver_url
.clone()
.map(|url| url.as_str().trim_end_matches('/').to_string()),
)
.build();

// The Standalone Hera context is responsible for handling notifications from the node.
Expand Down Expand Up @@ -166,7 +170,7 @@ where
let l2_tip = self.cursor.tip();

match pipeline.step(l2_tip).await {
StepResult::PreparedAttributes => trace!("Perpared new attributes"),
StepResult::PreparedAttributes => trace!("Prepared new attributes"),
StepResult::AdvancedOrigin => trace!("Advanced origin"),
StepResult::OriginAdvanceErr(err) => warn!("Could not advance origin: {:?}", err),
StepResult::StepFailed(err) => match err {
Expand Down