From 8d9bd97b584d8aa58251a31dfaacc3cfbff807fb Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Fri, 17 Jan 2025 20:11:43 +0000 Subject: [PATCH] fix --- scripts/run_native_testnet.sh | 2 +- yarn-project/blob-sink/src/client/http.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/run_native_testnet.sh b/scripts/run_native_testnet.sh index c19a363e02fc..c3f596dd00b7 100755 --- a/scripts/run_native_testnet.sh +++ b/scripts/run_native_testnet.sh @@ -143,7 +143,7 @@ if $L1_CONSENSUS_HOST_URL; then fi # If an ethereum url has been provided, do not run the ethereum.sh script -if $ETHEREUM_HOST && $L1_CONSENSUS_HOST_URL; then +if [ -n "$ETHEREUM_HOST" ]; then ETHEREUM_SCRIPT="" else ETHEREUM_SCRIPT="./ethereum.sh" diff --git a/yarn-project/blob-sink/src/client/http.ts b/yarn-project/blob-sink/src/client/http.ts index dd2c0996a47c..ece4ad85b5b7 100644 --- a/yarn-project/blob-sink/src/client/http.ts +++ b/yarn-project/blob-sink/src/client/http.ts @@ -70,16 +70,19 @@ export class HttpBlobSinkClient implements BlobSinkClientInterface { this.log.debug('Getting blob sidecar from blob sink'); const blobs = await this.getBlobSidecarFrom(this.config.blobSinkUrl, blockHash, indices); if (blobs.length > 0) { + this.log.debug(`Got ${blobs.length} blobs from blob sink`); return blobs; } } if (this.config.l1ConsensusHostUrl) { // The beacon api can query by slot number, so we get that first + this.log.debug('Getting slot number from consensus host'); const slotNumber = await this.getSlotNumber(blockHash); if (slotNumber) { const blobs = await this.getBlobSidecarFrom(this.config.l1ConsensusHostUrl, slotNumber, indices); if (blobs.length > 0) { + this.log.debug(`Got ${blobs.length} blobs from consensus host`); return blobs; } } @@ -94,6 +97,7 @@ export class HttpBlobSinkClient implements BlobSinkClientInterface { blockHashOrSlot: string | number, indices?: number[], ): Promise { + // TODO(md): right now we assume all blobs are ours, this will not yet work on sepolia try { let url = `${hostUrl}/eth/v1/beacon/blob_sidecars/${blockHashOrSlot}`; if (indices && indices.length > 0) { @@ -104,7 +108,6 @@ export class HttpBlobSinkClient implements BlobSinkClientInterface { if (res.ok) { const body = await res.json(); - this.log.debug(`Blob sidecar for block ${blockHashOrSlot} is ${body}`); const blobs = body.data.map((b: BlobJson) => Blob.fromJson(b)); return blobs; }