From 23ceeaf387ac4b07ffebd0f8f5437d3d8b740941 Mon Sep 17 00:00:00 2001 From: Raphael Panic Date: Thu, 26 Mar 2026 18:52:21 +0100 Subject: [PATCH 1/8] Changed network env variables to single string --- packages/cli/src/commands/lightnet/initialize.ts | 2 +- packages/cli/src/commands/lightnet/waitForNetwork.ts | 3 +-- packages/cli/src/scripts/lightnet/faucet.ts | 6 +++--- packages/cli/src/scripts/lightnet/wait-for-network.ts | 2 +- packages/cli/src/scripts/settlement/deploy.ts | 10 ++++------ 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/packages/cli/src/commands/lightnet/initialize.ts b/packages/cli/src/commands/lightnet/initialize.ts index 3adfd8578..f0b6ceb10 100644 --- a/packages/cli/src/commands/lightnet/initialize.ts +++ b/packages/cli/src/commands/lightnet/initialize.ts @@ -11,7 +11,7 @@ interface InitializeArgs { export const initializeCommand: CommandModule<{}, InitializeArgs> = { command: "initialize", describe: - "Initialize lightnet: wait for network, fund accounts, and deploy settlement\n\nRequires: MINA_NODE_GRAPHQL_HOST, MINA_NODE_GRAPHQL_PORT, MINA_ARCHIVE_GRAPHQL_HOST, MINA_ARCHIVE_GRAPHQL_PORT, MINA_ACCOUNT_MANAGER_HOST, MINA_ACCOUNT_MANAGER_PORT, PROTOKIT_SETTLEMENT_CONTRACT_PRIVATE_KEY, PROTOKIT_DISPATCHER_CONTRACT_PRIVATE_KEY, PROTOKIT_MINA_BRIDGE_CONTRACT_PRIVATE_KEY", + "Initialize lightnet: wait for network, fund accounts, and deploy settlement\n\nRequires: MINA_NODE_GRAPHQL, MINA_ARCHIVE_GRAPHQL, MINA_ACCOUNT_MANAGER_URL, PROTOKIT_SETTLEMENT_CONTRACT_PRIVATE_KEY, PROTOKIT_DISPATCHER_CONTRACT_PRIVATE_KEY, PROTOKIT_MINA_BRIDGE_CONTRACT_PRIVATE_KEY", builder: (yarg) => addEnvironmentOptions(yarg), handler: async (args) => { try { diff --git a/packages/cli/src/commands/lightnet/waitForNetwork.ts b/packages/cli/src/commands/lightnet/waitForNetwork.ts index cab9eba7e..7fb5bb59f 100644 --- a/packages/cli/src/commands/lightnet/waitForNetwork.ts +++ b/packages/cli/src/commands/lightnet/waitForNetwork.ts @@ -10,8 +10,7 @@ interface WaitForNetworkArgs { export const waitForNetworkCommand: CommandModule<{}, WaitForNetworkArgs> = { command: "wait", - describe: - "Wait for network to be ready\n\nRequires: MINA_NODE_GRAPHQL_HOST, MINA_NODE_GRAPHQL_PORT", + describe: "Wait for network to be ready\n\nRequires: MINA_NODE_GRAPHQL", builder: (yarg) => addEnvironmentOptions(yarg), handler: async (args) => { try { diff --git a/packages/cli/src/scripts/lightnet/faucet.ts b/packages/cli/src/scripts/lightnet/faucet.ts index e24a07c11..b6c10ddf9 100644 --- a/packages/cli/src/scripts/lightnet/faucet.ts +++ b/packages/cli/src/scripts/lightnet/faucet.ts @@ -9,9 +9,9 @@ export default async function (publicKey: string) { const fundingAmount = 1000 * 1e9; const net = Mina.Network({ - mina: `${getRequiredEnv("MINA_NODE_GRAPHQL_HOST")}:${getRequiredEnv("MINA_NODE_GRAPHQL_PORT")}/graphql`, - archive: `${getRequiredEnv("MINA_ARCHIVE_GRAPHQL_HOST")}:${getRequiredEnv("MINA_ARCHIVE_GRAPHQL_PORT")}/graphql`, - lightnetAccountManager: `${getRequiredEnv("MINA_ACCOUNT_MANAGER_HOST")}:${getRequiredEnv("MINA_ACCOUNT_MANAGER_PORT")}`, + mina: getRequiredEnv("MINA_NODE_GRAPHQL"), + archive: getRequiredEnv("MINA_ARCHIVE_GRAPHQL"), + lightnetAccountManager: getRequiredEnv("MINA_ACCOUNT_MANAGER_URL"), }); Mina.setActiveInstance(net); diff --git a/packages/cli/src/scripts/lightnet/wait-for-network.ts b/packages/cli/src/scripts/lightnet/wait-for-network.ts index 54bd8809a..e054b8659 100644 --- a/packages/cli/src/scripts/lightnet/wait-for-network.ts +++ b/packages/cli/src/scripts/lightnet/wait-for-network.ts @@ -9,7 +9,7 @@ export default async function (options: LoadEnvOptions) { const { sleep } = await import("@proto-kit/common"); const { fetchLastBlock, Provable } = await import("o1js"); loadEnvironmentVariables(options); - const graphqlEndpoint = `${getRequiredEnv("MINA_NODE_GRAPHQL_HOST")}:${getRequiredEnv("MINA_NODE_GRAPHQL_PORT")}/graphql`; + const graphqlEndpoint = getRequiredEnv("MINA_NODE_GRAPHQL"); let lastBlock; let attempt = 0; console.log("Waiting for network to be ready..."); diff --git a/packages/cli/src/scripts/settlement/deploy.ts b/packages/cli/src/scripts/settlement/deploy.ts index 14e49c581..21c69a849 100644 --- a/packages/cli/src/scripts/settlement/deploy.ts +++ b/packages/cli/src/scripts/settlement/deploy.ts @@ -26,7 +26,7 @@ export default async function (options: LoadEnvOptions) { MinaBaseLayer, PrivateMempool, LocalTaskQueue, - LocalTaskWorkerModule, + WorkerModule, VanillaTaskWorkerModules, SequencerStartupModule, } = await import("@proto-kit/sequencer"); @@ -49,9 +49,7 @@ export default async function (options: LoadEnvOptions) { BridgingModule, Mempool: PrivateMempool, TaskQueue: LocalTaskQueue, - LocalTaskWorker: LocalTaskWorkerModule.from( - VanillaTaskWorkerModules.allTasks() - ), + WorkerModule: WorkerModule.from(VanillaTaskWorkerModules.allTasks()), SequencerStartupModule, }), }); @@ -71,7 +69,7 @@ export default async function (options: LoadEnvOptions) { type: process.env.MINA_NETWORK as any, graphql: process.env.MINA_NODE_GRAPHQL!, archive: process.env.MINA_ARCHIVE_GRAPHQL!, - accountManager: process.env.MINA_ACCOUNT_MANAGER!, + accountManager: process.env.MINA_ACCOUNT_MANAGER_URL!, }, }, SettlementSigner: { @@ -102,7 +100,7 @@ export default async function (options: LoadEnvOptions) { TaskQueue: { simulatedDuration: 0, }, - LocalTaskWorker: VanillaTaskWorkerModules.defaultConfig(), + WorkerModule: VanillaTaskWorkerModules.defaultConfig(), Mempool: {}, }, }); From e361fc021255155f9abc88630d9286abb8332b85 Mon Sep 17 00:00:00 2001 From: Raphael Panic Date: Fri, 27 Mar 2026 18:42:06 +0100 Subject: [PATCH 2/8] Fixed graphqlsequencermodule typing --- packages/api/src/graphql/GraphqlSequencerModule.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/api/src/graphql/GraphqlSequencerModule.ts b/packages/api/src/graphql/GraphqlSequencerModule.ts index 2aaadf248..9fe11999b 100644 --- a/packages/api/src/graphql/GraphqlSequencerModule.ts +++ b/packages/api/src/graphql/GraphqlSequencerModule.ts @@ -48,7 +48,11 @@ function assertArrayIsNotEmpty( @closeable() export class GraphqlSequencerModule extends ModuleContainer - implements Configurable, SequencerModule, Closeable + implements + SequencerModule< + CombinedModuleContainerConfig + >, + Closeable { private readonly modules: TypedClass>[] = []; From a104516dc99524f708700d63f219526e4f15386e Mon Sep 17 00:00:00 2001 From: Raphael Panic Date: Fri, 27 Mar 2026 18:42:22 +0100 Subject: [PATCH 3/8] Small adaptations --- .../src/protocol/baselayer/MinaBaseLayer.ts | 29 ++++++++++------- .../tasks/compile/SettlementCompileTask.ts | 7 ++-- .../src/sequencer/SequencerCoreModule.ts | 32 ++++++++++++++----- .../src/settlement/SettlementModule.ts | 4 +-- 4 files changed, 47 insertions(+), 25 deletions(-) diff --git a/packages/sequencer/src/protocol/baselayer/MinaBaseLayer.ts b/packages/sequencer/src/protocol/baselayer/MinaBaseLayer.ts index 046f7c2a8..c81103e41 100644 --- a/packages/sequencer/src/protocol/baselayer/MinaBaseLayer.ts +++ b/packages/sequencer/src/protocol/baselayer/MinaBaseLayer.ts @@ -2,6 +2,7 @@ import { AreProofsEnabled, dependencyFactory, DependencyRecord, + log, ModuleContainerLike, } from "@proto-kit/common"; import { Mina } from "o1js"; @@ -122,13 +123,12 @@ export class MinaBaseLayer this.originalNetwork = Mina.activeInstance; const Network = await match(network) - .with( - { type: "local" }, - async () => - await Mina.LocalBlockchain({ - proofsEnabled: this.areProofsEnabled.areProofsEnabled, - }) - ) + .with({ type: "local" }, async () => { + log.info("Creating local mina blockchain"); + return await Mina.LocalBlockchain({ + proofsEnabled: this.areProofsEnabled.areProofsEnabled, + }); + }) .with({ type: "lightnet" }, async (lightnet) => { const net = Mina.Network({ mina: lightnet.graphql, @@ -136,17 +136,24 @@ export class MinaBaseLayer lightnetAccountManager: lightnet.accountManager, }); net.proofsEnabled = this.areProofsEnabled.areProofsEnabled; + log.info( + `Connecting to Mina network at ${lightnet.graphql} (archive ${lightnet.archive}, accountmanager: ${lightnet.accountManager})` + ); return net; }) - .with({ type: "remote" }, async (remote) => - Mina.Network({ + .with({ type: "remote" }, async (remote) => { + log.info( + `Connecting to Mina network at ${remote.graphql} (archive ${remote.archive})` + ); + return Mina.Network({ mina: remote.graphql, archive: remote.archive, - }) - ) + }); + }) .exhaustive(); Mina.setActiveInstance(Network); + this.network = Network; } } diff --git a/packages/sequencer/src/protocol/production/tasks/compile/SettlementCompileTask.ts b/packages/sequencer/src/protocol/production/tasks/compile/SettlementCompileTask.ts index b139a95d1..189c33abe 100644 --- a/packages/sequencer/src/protocol/production/tasks/compile/SettlementCompileTask.ts +++ b/packages/sequencer/src/protocol/production/tasks/compile/SettlementCompileTask.ts @@ -20,6 +20,7 @@ import { BatchProducerModule } from "../../BatchProducerModule"; import { task } from "../../../../worker/worker/TaskWorkerModule"; import { CircuitCompileTask } from "./CircuitCompileTask"; +import { BlockProducerModule } from "../../sequencing/BlockProducerModule"; @injectable() @scoped(Lifecycle.ContainerScoped) @@ -32,8 +33,8 @@ export class SettlementCompileTask extends CircuitCompileTask { protocol: Protocol, compileRegistry: CompileRegistry, contractArgsRegistry: ContractArgsRegistry, - @inject("BatchProducerModule", { isOptional: true }) - batchProducerModule: BatchProducerModule | undefined + @inject("BlockProducerModule", { isOptional: true }) + blockProducerModule: BlockProducerModule | undefined ) { super(protocol, compileRegistry, contractArgsRegistry); @@ -41,7 +42,7 @@ export class SettlementCompileTask extends CircuitCompileTask { if ( !container.isRegistered("SettlementContractModule") && // Disable this check for the sequencer - batchProducerModule === undefined + blockProducerModule === undefined ) { throw new Error( "SettlementContractModule not configured but SettlementCompilerTask is - fix the configuration" diff --git a/packages/sequencer/src/sequencer/SequencerCoreModule.ts b/packages/sequencer/src/sequencer/SequencerCoreModule.ts index 6ac7802aa..9e3f1858f 100644 --- a/packages/sequencer/src/sequencer/SequencerCoreModule.ts +++ b/packages/sequencer/src/sequencer/SequencerCoreModule.ts @@ -43,14 +43,20 @@ export interface SequencerCoreDependencies extends DependencyRecord; + @sequencerModule() @closeable() @dependencyFactory() @@ -76,8 +82,12 @@ export class LocalSequencerCoreModule extends SequencerModule { @@ -119,9 +129,15 @@ export class SequencerCoreModule extends SequencerModule { } public create() { - this.sequencerStartupModule.config = this.config.SequencerStartupModule; - this.blockProducerModule.config = this.config.BlockProducerModule; - this.batchProducerModule.config = this.config.BatchProducerModule; + this.sequencerStartupModule.config = + this.config.SequencerStartupModule ?? + childConfigDefaults.SequencerStartupModule; + this.blockProducerModule.config = + this.config.BlockProducerModule ?? + childConfigDefaults.BlockProducerModule; + this.batchProducerModule.config = + this.config.BatchProducerModule ?? + childConfigDefaults.BatchProducerModule; } public async start(): Promise { diff --git a/packages/sequencer/src/settlement/SettlementModule.ts b/packages/sequencer/src/settlement/SettlementModule.ts index b5741080c..45f540527 100644 --- a/packages/sequencer/src/settlement/SettlementModule.ts +++ b/packages/sequencer/src/settlement/SettlementModule.ts @@ -256,9 +256,7 @@ export class SettlementModule const errorList = missing .map((m) => ` ${m.address}: ${m.error}`) .join("\n"); - throw new Error(` - Missing contracts:\n${errorList} - `); + throw new Error(`Missing contracts:\n${errorList} `); } } } From f62eff12a1e63250e934e9e16853ecc9907bf643 Mon Sep 17 00:00:00 2001 From: Raphael Panic Date: Fri, 27 Mar 2026 18:43:49 +0100 Subject: [PATCH 4/8] Increased L1 tx wait timeout --- .../src/settlement/transactions/MinaTransactionSender.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/sequencer/src/settlement/transactions/MinaTransactionSender.ts b/packages/sequencer/src/settlement/transactions/MinaTransactionSender.ts index 32c59ea8a..27e715330 100644 --- a/packages/sequencer/src/settlement/transactions/MinaTransactionSender.ts +++ b/packages/sequencer/src/settlement/transactions/MinaTransactionSender.ts @@ -71,7 +71,8 @@ export class MinaTransactionSender { log.info(`Sent L1 transaction ${txId.hash}`); statusEmitter.emit("sent", { hash: txId.hash }); - txId.wait().then( + // 360 * 20s = 2h + txId.wait({ maxAttempts: 360, interval: 20_000 }).then( (included) => { log.info(`L1 transaction ${included.hash} has been included`); statusEmitter.emit("included", { hash: included.hash }); From 716341990d0d78afc4ddaf81353a203b63754f9a Mon Sep 17 00:00:00 2001 From: Raphael Panic Date: Fri, 27 Mar 2026 20:20:56 +0100 Subject: [PATCH 5/8] Added missing @task() to indexer tasks --- packages/indexer/src/tasks/IndexBatchTask.ts | 5 ++- packages/indexer/src/tasks/IndexBlockTask.ts | 35 +++++++++++++++++-- .../indexer/src/tasks/IndexPendingTxTask.ts | 2 ++ .../indexer/src/tasks/IndexSettlementTask.ts | 4 +++ 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/packages/indexer/src/tasks/IndexBatchTask.ts b/packages/indexer/src/tasks/IndexBatchTask.ts index 2492edc3a..51e73eb38 100644 --- a/packages/indexer/src/tasks/IndexBatchTask.ts +++ b/packages/indexer/src/tasks/IndexBatchTask.ts @@ -4,11 +4,13 @@ import { TaskWorkerModule, Batch, BatchStorage, + task, } from "@proto-kit/sequencer"; import { inject, injectable } from "tsyringe"; import { log } from "@proto-kit/common"; @injectable() +@task() export class IndexBatchTask extends TaskWorkerModule implements Task @@ -28,10 +30,11 @@ export class IndexBatchTask public async compute(input: Batch): Promise { try { await this.batchStorage.pushBatch(input); + + log.info(`Batch ${input.height} indexed successfully`); return ""; } catch (err) { log.error("Failed to process settlement task", err); - return undefined; } } diff --git a/packages/indexer/src/tasks/IndexBlockTask.ts b/packages/indexer/src/tasks/IndexBlockTask.ts index 6e7bdc5ba..bd8efc12a 100644 --- a/packages/indexer/src/tasks/IndexBlockTask.ts +++ b/packages/indexer/src/tasks/IndexBlockTask.ts @@ -1,9 +1,11 @@ import { + Block, BlockQueue, task, Task, TaskSerializer, TaskWorkerModule, + TransactionStorage, } from "@proto-kit/sequencer"; import { log } from "@proto-kit/common"; import { inject, injectable } from "tsyringe"; @@ -24,7 +26,9 @@ export class IndexBlockTask public constructor( public taskSerializer: IndexBlockTaskParametersSerializer, @inject("BlockQueue") - public blockStorage: BlockQueue + public blockStorage: BlockQueue, + @inject("TransactionStorage") + public transactionStorage: TransactionStorage ) { super(); } @@ -32,10 +36,37 @@ export class IndexBlockTask // eslint-disable-next-line @typescript-eslint/no-empty-function public async prepare(): Promise {} + private async syncTransactions(block: Block) { + const results = await Promise.all( + block.transactions.map(async ({ tx }) => { + return [ + tx, + await this.transactionStorage.findTransaction(tx.hash().toString()), + ] as const; + }) + ); + + const missingTxs = results + .filter(([, result]) => result === undefined) + .map(([tx]) => tx); + + const pushResults = await Promise.all( + missingTxs.map( + async (tx) => await this.transactionStorage.pushUserTransaction(tx, 0) + ) + ); + if (pushResults.some((x) => x)) { + log.error( + "Some transactions haven't been pushed, this will lead to constraint errors!" + ); + } + } + public async compute( input: IndexBlockTaskParameters ): Promise { try { + await this.syncTransactions(input.block); await this.blockStorage.pushBlock(input.block); await this.blockStorage.pushResult(input.result); } catch (error) { @@ -43,7 +74,7 @@ export class IndexBlockTask return undefined; } - log.info(`Block ${input.block.height.toBigInt()} indexed sucessfully`); + log.info(`Block ${input.block.height.toBigInt()} indexed successfully`); return ""; } diff --git a/packages/indexer/src/tasks/IndexPendingTxTask.ts b/packages/indexer/src/tasks/IndexPendingTxTask.ts index 9d448c6a7..8057672c7 100644 --- a/packages/indexer/src/tasks/IndexPendingTxTask.ts +++ b/packages/indexer/src/tasks/IndexPendingTxTask.ts @@ -1,5 +1,6 @@ import { PendingTransaction, + task, Task, TaskSerializer, TaskWorkerModule, @@ -11,6 +12,7 @@ import { inject, injectable } from "tsyringe"; import { IndexPendingTxTaskParametersSerializer } from "./IndexPendingTxTaskParameters"; @injectable() +@task() export class IndexPendingTxTask extends TaskWorkerModule implements Task diff --git a/packages/indexer/src/tasks/IndexSettlementTask.ts b/packages/indexer/src/tasks/IndexSettlementTask.ts index 8f325a46a..87aca62ff 100644 --- a/packages/indexer/src/tasks/IndexSettlementTask.ts +++ b/packages/indexer/src/tasks/IndexSettlementTask.ts @@ -4,11 +4,13 @@ import { TaskWorkerModule, Settlement, SettlementStorage, + task, } from "@proto-kit/sequencer"; import { inject, injectable } from "tsyringe"; import { log } from "@proto-kit/common"; @injectable() +@task() export class IndexSettlementTask extends TaskWorkerModule implements Task @@ -28,6 +30,8 @@ export class IndexSettlementTask public async compute(input: Settlement): Promise { try { await this.settlementStorage.pushSettlement(input); + + log.info(`Settlement ${input.batches.at(-1)!} indexed successfully`); return ""; } catch (err) { log.error("Failed to process settlement task", err); From 939f5696403d40ecbb6fe3cce574688b1799bf76 Mon Sep 17 00:00:00 2001 From: Raphael Panic Date: Fri, 27 Mar 2026 21:50:31 +0100 Subject: [PATCH 6/8] Removed native dependency from everything but stack --- packages/api/package.json | 1 - packages/cli/package.json | 1 - packages/common/package.json | 1 - packages/deployment/package.json | 1 - packages/indexer/package.json | 1 - packages/library/package.json | 1 - packages/module/package.json | 1 - packages/persistance/package.json | 1 - packages/processor/package.json | 1 - packages/protocol/package.json | 1 - packages/sdk/package.json | 1 - packages/sequencer/package.json | 1 - packages/sequencer/test-integration/workers/worker.ts | 2 +- packages/sequencer/test-proven/Proven.test.ts | 4 ++-- 14 files changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/api/package.json b/packages/api/package.json index 91a97800b..be2cf87b7 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -50,7 +50,6 @@ "@proto-kit/protocol": "*", "@proto-kit/sequencer": "*", "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0" }, "devDependencies": { diff --git a/packages/cli/package.json b/packages/cli/package.json index 1077d5767..d50ece969 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -42,7 +42,6 @@ "@proto-kit/stack": "*", "@proto-kit/indexer": "*", "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0" }, "devDependencies": { diff --git a/packages/common/package.json b/packages/common/package.json index ab3af1498..289236fd0 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -27,7 +27,6 @@ }, "peerDependencies": { "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0" }, "devDependencies": { diff --git a/packages/deployment/package.json b/packages/deployment/package.json index e96d79144..df6525291 100644 --- a/packages/deployment/package.json +++ b/packages/deployment/package.json @@ -34,7 +34,6 @@ "@proto-kit/sequencer": "*", "bullmq": "^4.18.3", "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0" }, "devDependencies": { diff --git a/packages/indexer/package.json b/packages/indexer/package.json index 2ec921fa8..b57bf0c4d 100644 --- a/packages/indexer/package.json +++ b/packages/indexer/package.json @@ -44,7 +44,6 @@ "@proto-kit/sequencer": "*", "koa": "^2.14.2", "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0", "type-graphql": "2.0.0-rc.2", "typegraphql-prisma": "0.28" diff --git a/packages/library/package.json b/packages/library/package.json index c8d8f6feb..87bfac546 100644 --- a/packages/library/package.json +++ b/packages/library/package.json @@ -29,7 +29,6 @@ "@proto-kit/protocol": "*", "@proto-kit/sequencer": "*", "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0" }, "devDependencies": { diff --git a/packages/module/package.json b/packages/module/package.json index a0a793dbb..4775f85ec 100644 --- a/packages/module/package.json +++ b/packages/module/package.json @@ -30,7 +30,6 @@ "@proto-kit/common": "*", "@proto-kit/protocol": "*", "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0" }, "gitHead": "8a7eca319272a15162dc4ad04bdc134b1017716d" diff --git a/packages/persistance/package.json b/packages/persistance/package.json index ced11f26c..dda4d383f 100644 --- a/packages/persistance/package.json +++ b/packages/persistance/package.json @@ -33,7 +33,6 @@ "@proto-kit/protocol": "*", "@proto-kit/sequencer": "*", "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0" }, "devDependencies": { diff --git a/packages/processor/package.json b/packages/processor/package.json index f3de2b126..617bd6e7a 100644 --- a/packages/processor/package.json +++ b/packages/processor/package.json @@ -46,7 +46,6 @@ "@proto-kit/sdk": "*", "@proto-kit/sequencer": "*", "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0", "type-graphql": "2.0.0-rc.2", "typegraphql-prisma": "^0.28" diff --git a/packages/protocol/package.json b/packages/protocol/package.json index 96501819e..3b6bdf832 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -26,7 +26,6 @@ "peerDependencies": { "@proto-kit/common": "*", "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "ts-pattern": "^4.3.0", "tsyringe": "^4.10.0" }, diff --git a/packages/sdk/package.json b/packages/sdk/package.json index a20846755..f3f74d877 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -31,7 +31,6 @@ "@proto-kit/protocol": "*", "@proto-kit/sequencer": "*", "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0" }, "devDependencies": { diff --git a/packages/sequencer/package.json b/packages/sequencer/package.json index 22d73a37d..af2afdef8 100644 --- a/packages/sequencer/package.json +++ b/packages/sequencer/package.json @@ -24,7 +24,6 @@ "@proto-kit/module": "*", "@proto-kit/protocol": "*", "o1js": "2.10.0-dev.6d3a3", - "@o1js/native": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0" }, "devDependencies": { diff --git a/packages/sequencer/test-integration/workers/worker.ts b/packages/sequencer/test-integration/workers/worker.ts index 999012cf6..55e787caf 100644 --- a/packages/sequencer/test-integration/workers/worker.ts +++ b/packages/sequencer/test-integration/workers/worker.ts @@ -21,7 +21,7 @@ import { } from "./modules"; import { MinimumWorkerModules } from "./WorkerModules"; -setBackend("native"); +// setBackend("native"); /* eslint-disable no-console */ async function main() { diff --git a/packages/sequencer/test-proven/Proven.test.ts b/packages/sequencer/test-proven/Proven.test.ts index e1e09cc37..d081fac7b 100644 --- a/packages/sequencer/test-proven/Proven.test.ts +++ b/packages/sequencer/test-proven/Proven.test.ts @@ -18,7 +18,7 @@ import { } from "@proto-kit/protocol"; import { VanillaProtocolModules } from "@proto-kit/library"; import { container } from "tsyringe"; -import { PrivateKey, UInt64, setBackend } from "o1js"; +import { PrivateKey, UInt64 } from "o1js"; import { testingSequencerModules } from "../test/TestingSequencer"; import { @@ -35,7 +35,7 @@ import { ProvenBalance } from "../test/integration/mocks/ProvenBalance"; const timeout = 300000; -setBackend("native"); +// setBackend("native"); describe("Proven", () => { let test: BlockTestService; From 87c63ad626699d2ad58a83f8365794baf8085989 Mon Sep 17 00:00:00 2001 From: Raphael Panic Date: Tue, 31 Mar 2026 15:44:43 +0200 Subject: [PATCH 7/8] Linting --- package-lock.json | 12 ------------ packages/api/src/graphql/GraphqlSequencerModule.ts | 1 - packages/indexer/prisma/schema.prisma | 2 -- packages/indexer/src/tasks/IndexBatchTask.ts | 1 + .../tasks/compile/SettlementCompileTask.ts | 3 +-- .../sequencer/test-integration/workers/worker.ts | 2 +- 6 files changed, 3 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7c88b0186..f0c2705d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28542,7 +28542,6 @@ "@types/ws": "^8.5.4" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "@proto-kit/common": "*", "@proto-kit/module": "*", "@proto-kit/protocol": "*", @@ -28575,7 +28574,6 @@ "@types/yargs": "17.0.32" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "@proto-kit/api": "*", "@proto-kit/common": "*", "@proto-kit/indexer": "*", @@ -28722,7 +28720,6 @@ "@types/lodash": "^4.14.194" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "o1js": "2.10.0-dev.6d3a3", "tsyringe": "^4.10.0" } @@ -28754,7 +28751,6 @@ "cachedir": "^2.4.0" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "@proto-kit/common": "*", "@proto-kit/persistance": "*", "@proto-kit/sdk": "*", @@ -28808,7 +28804,6 @@ "@types/ws": "^8.5.4" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "@proto-kit/api": "*", "@proto-kit/common": "*", "@proto-kit/library": "*", @@ -28839,7 +28834,6 @@ "@types/lodash": "^4.14.194" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "@proto-kit/common": "*", "@proto-kit/module": "*", "@proto-kit/protocol": "*", @@ -28862,7 +28856,6 @@ "@types/lodash": "^4.14.194" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "@proto-kit/common": "*", "@proto-kit/protocol": "*", "o1js": "2.10.0-dev.6d3a3", @@ -28885,7 +28878,6 @@ "@types/lodash": "^4.14.194" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "@proto-kit/common": "*", "@proto-kit/module": "*", "@proto-kit/protocol": "*", @@ -28925,7 +28917,6 @@ "@types/node": "^20.8.10" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "@proto-kit/api": "*", "@proto-kit/common": "*", "@proto-kit/library": "*", @@ -28955,7 +28946,6 @@ "@types/lodash": "^4.14.194" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "@proto-kit/common": "*", "o1js": "2.10.0-dev.6d3a3", "ts-pattern": "^4.3.0", @@ -28978,7 +28968,6 @@ "@types/lodash": "^4.14.194" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "@proto-kit/common": "*", "@proto-kit/library": "*", "@proto-kit/module": "*", @@ -29008,7 +28997,6 @@ "@types/node": "^20.2.5" }, "peerDependencies": { - "@o1js/native": "2.10.0-dev.6d3a3", "@proto-kit/common": "*", "@proto-kit/module": "*", "@proto-kit/protocol": "*", diff --git a/packages/api/src/graphql/GraphqlSequencerModule.ts b/packages/api/src/graphql/GraphqlSequencerModule.ts index 9fe11999b..812684b8f 100644 --- a/packages/api/src/graphql/GraphqlSequencerModule.ts +++ b/packages/api/src/graphql/GraphqlSequencerModule.ts @@ -2,7 +2,6 @@ import { buildSchemaSync, NonEmptyArray } from "type-graphql"; import { Closeable, closeable, SequencerModule } from "@proto-kit/sequencer"; import { ChildContainerProvider, - Configurable, CombinedModuleContainerConfig, log, ModuleContainer, diff --git a/packages/indexer/prisma/schema.prisma b/packages/indexer/prisma/schema.prisma index 557665db9..d7351a595 100644 --- a/packages/indexer/prisma/schema.prisma +++ b/packages/indexer/prisma/schema.prisma @@ -90,8 +90,6 @@ model Block { beforeBlockStateTransitions Json @db.Json parentHash String? @unique - parent Block? @relation("Parent", fields: [parentHash], references: [hash]) - successor Block? @relation("Parent") transactions TransactionExecutionResult[] result BlockResult? diff --git a/packages/indexer/src/tasks/IndexBatchTask.ts b/packages/indexer/src/tasks/IndexBatchTask.ts index 51e73eb38..04c1c87fb 100644 --- a/packages/indexer/src/tasks/IndexBatchTask.ts +++ b/packages/indexer/src/tasks/IndexBatchTask.ts @@ -36,6 +36,7 @@ export class IndexBatchTask } catch (err) { log.error("Failed to process settlement task", err); } + return undefined; } public inputSerializer(): TaskSerializer { diff --git a/packages/sequencer/src/protocol/production/tasks/compile/SettlementCompileTask.ts b/packages/sequencer/src/protocol/production/tasks/compile/SettlementCompileTask.ts index 189c33abe..bab675e17 100644 --- a/packages/sequencer/src/protocol/production/tasks/compile/SettlementCompileTask.ts +++ b/packages/sequencer/src/protocol/production/tasks/compile/SettlementCompileTask.ts @@ -16,11 +16,10 @@ import { SettlementModulesRecord, } from "@proto-kit/protocol"; -import { BatchProducerModule } from "../../BatchProducerModule"; import { task } from "../../../../worker/worker/TaskWorkerModule"; +import { BlockProducerModule } from "../../sequencing/BlockProducerModule"; import { CircuitCompileTask } from "./CircuitCompileTask"; -import { BlockProducerModule } from "../../sequencing/BlockProducerModule"; @injectable() @scoped(Lifecycle.ContainerScoped) diff --git a/packages/sequencer/test-integration/workers/worker.ts b/packages/sequencer/test-integration/workers/worker.ts index 55e787caf..7549ea86e 100644 --- a/packages/sequencer/test-integration/workers/worker.ts +++ b/packages/sequencer/test-integration/workers/worker.ts @@ -1,6 +1,6 @@ import "reflect-metadata"; -import { setBackend } from "o1js"; +// import { setBackend } from "o1js"; // eslint-disable-next-line import/no-extraneous-dependencies import { BullQueue } from "@proto-kit/deployment"; import { container } from "tsyringe"; From f84e983217ea8051f503f0585220f170446a854f Mon Sep 17 00:00:00 2001 From: Raphael Panic Date: Mon, 13 Apr 2026 16:47:10 +0200 Subject: [PATCH 8/8] Fixed PR comments --- packages/indexer/prisma/schema.prisma | 2 ++ packages/indexer/src/tasks/IndexBlockTask.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/indexer/prisma/schema.prisma b/packages/indexer/prisma/schema.prisma index d7351a595..557665db9 100644 --- a/packages/indexer/prisma/schema.prisma +++ b/packages/indexer/prisma/schema.prisma @@ -90,6 +90,8 @@ model Block { beforeBlockStateTransitions Json @db.Json parentHash String? @unique + parent Block? @relation("Parent", fields: [parentHash], references: [hash]) + successor Block? @relation("Parent") transactions TransactionExecutionResult[] result BlockResult? diff --git a/packages/indexer/src/tasks/IndexBlockTask.ts b/packages/indexer/src/tasks/IndexBlockTask.ts index bd8efc12a..b2232bd65 100644 --- a/packages/indexer/src/tasks/IndexBlockTask.ts +++ b/packages/indexer/src/tasks/IndexBlockTask.ts @@ -55,7 +55,7 @@ export class IndexBlockTask async (tx) => await this.transactionStorage.pushUserTransaction(tx, 0) ) ); - if (pushResults.some((x) => x)) { + if (pushResults.some((x) => !x)) { log.error( "Some transactions haven't been pushed, this will lead to constraint errors!" );