Skip to content

Commit

Permalink
rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Dec 16, 2024
1 parent c9b7caa commit ff0a29b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
1 change: 0 additions & 1 deletion yarn-project/blob-sink/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const blobSinkConfigMappings: ConfigMappingsType<BlobSinkConfig> = {
// },
};


/**
* Returns the blob sink configuration from the environment variables.
* Note: If an environment variable is not set, the default value is used.
Expand Down
14 changes: 6 additions & 8 deletions yarn-project/blob-sink/src/run.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
// Run a standalone blob sink server
import { createLogger } from '@aztec/foundation/log';

import { createDebugLogger } from "@aztec/foundation/log";
import { BlobSinkServer } from "./server.js";
import { getBlobSinkConfigFromEnv } from "./config.js";
import { getBlobSinkConfigFromEnv } from './config.js';
import { BlobSinkServer } from './server.js';


const logger = createDebugLogger('aztec:blob-sink');
const logger = createLogger('aztec:blob-sink');

async function main() {

const config = getBlobSinkConfigFromEnv();
const blobSinkServer = new BlobSinkServer(config);

await blobSinkServer.start();

const stop = async () => {
logger.debug('Stopping bootstrap node...');
logger.debug('Stopping Blob Sink...');
await blobSinkServer.stop();
logger.info('Node stopped');
process.exit(0);
Expand All @@ -24,4 +22,4 @@ async function main() {
process.on('SIGINT', stop);
}

main();
void main();
6 changes: 5 additions & 1 deletion yarn-project/blob-sink/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export class BlobSinkServer {
private metrics: BlobSinkMetrics;
private log: Logger = createLogger('aztec:blob-sink');

constructor(config?: Partial<BlobSinkConfig>, store?: AztecKVStore, telemetry: TelemetryClient = new NoopTelemetryClient()) {
constructor(
config?: Partial<BlobSinkConfig>,
store?: AztecKVStore,
telemetry: TelemetryClient = new NoopTelemetryClient(),
) {
this.port = config?.port ?? 5052; // 5052 is beacon chain default http port
this.app = express();

Expand Down
12 changes: 4 additions & 8 deletions yarn-project/end-to-end/src/fixtures/snapshot_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,8 @@ async function setupFromFresh(
// Setup blob sink service
const blobSink = await createBlobSinkServer({
port: blobSinkPort,
dataStoreConfig: {
dataDirectory: statePath,
dataStoreMapSizeKB: aztecNodeConfig.dataStoreMapSizeKB,
},
dataDirectory: statePath,
dataStoreMapSizeKB: aztecNodeConfig.dataStoreMapSizeKB,
});
await blobSink.start();

Expand Down Expand Up @@ -430,10 +428,8 @@ async function setupFromState(statePath: string, logger: Logger): Promise<Subsys

const blobSink = await createBlobSinkServer({
port: blobSinkPort,
dataStoreConfig: {
dataDirectory: statePath,
dataStoreMapSizeKB: aztecNodeConfig.dataStoreMapSizeKB,
},
dataDirectory: statePath,
dataStoreMapSizeKB: aztecNodeConfig.dataStoreMapSizeKB,
});
await blobSink.start();

Expand Down
6 changes: 5 additions & 1 deletion yarn-project/end-to-end/src/fixtures/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,11 @@ export async function setup(

// Blob sink service - blobs get posted here and served from here
const blobSinkPort = await getPort();
const blobSink = await createBlobSinkServer({ port: blobSinkPort });
const blobSink = await createBlobSinkServer({
port: blobSinkPort,
dataDirectory: undefined,
dataStoreMapSizeKB: 1, // will be unused, set as default
});
config.blobSinkUrl = `http://127.0.0.1:${blobSinkPort}`;

const deployL1ContractsValues =
Expand Down

0 comments on commit ff0a29b

Please sign in to comment.