Skip to content
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
74b2d2b
Upgraded lerna
rpanic Feb 5, 2026
e8c94d5
.nx gitignore
rpanic Feb 5, 2026
5a94507
Removed --no-verify-access
rpanic Feb 5, 2026
fb121dd
versions
rpanic Feb 5, 2026
a8fa945
bump git head
rpanic Feb 5, 2026
bde3149
Merge branch 'develop' into release/canary-pre-devnet
rpanic Feb 5, 2026
5d967a3
package-lock
rpanic Feb 5, 2026
99e0289
Merge branch 'develop' into release/canary-pre-devnet
rpanic Feb 5, 2026
af934eb
package-lock 2
rpanic Feb 5, 2026
4ebe9ab
fix: add BridgingModule to appchain and fix network urls
4ytuncs Feb 5, 2026
5654998
chore(debug): add debug logs for method id registration
4ytuncs Feb 6, 2026
9143ce5
style: run lint fix
4ytuncs Feb 6, 2026
73a393f
Fixed linting in cli
rpanic Feb 9, 2026
9614cf4
Fixed and skipped test
rpanic Feb 9, 2026
e103b2d
refactor: separate TestBalances as utils
4ytuncs Feb 9, 2026
97a70cc
fix: add bridging module for deposit and redeem
4ytuncs Feb 9, 2026
0737f85
style: run lint fix
4ytuncs Feb 9, 2026
66817b9
Merge branch 'fix/fix-deploy-command' into release/canary-pre-devnet
rpanic Feb 9, 2026
b799f6a
refactor: move BridgingModule to settlementScript
4ytuncs Feb 9, 2026
3005eae
style: run lint fix
4ytuncs Feb 9, 2026
ca4b2bb
refactor: remove debug logs
4ytuncs Feb 9, 2026
8af4bf7
Fixed configurations
rpanic Feb 9, 2026
50abed0
Merge branch 'fix/fix-deploy-command' into release/canary-pre-devnet
rpanic Feb 9, 2026
138737b
style: run lint fix
4ytuncs Feb 9, 2026
1329ecb
refactor: move TestBalances to a helpers folder in src
4ytuncs Feb 9, 2026
b08726a
rebase to canary release
4ytuncs Feb 9, 2026
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
1 change: 1 addition & 0 deletions packages/cli/src/scripts/settlement/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Sequencer,
SettlementModule,
AppChain,
BridgingModule,
} from "@proto-kit/sequencer";
import { Provable, PublicKey } from "o1js";
import "reflect-metadata";
Expand Down
5 changes: 5 additions & 0 deletions packages/module/src/runtime/MethodIdResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export class MethodIdResolver {
this.runtime.assertIsValidModuleName(moduleName);

runtime.resolve(moduleName).runtimeMethodNames.forEach((methodName) => {
const methodId = this.getMethodId(moduleName, methodName).toString();
console.log(
`[MethodIdResolver] Registering ${moduleName}.${methodName} -> ${methodId}`
);

dict[this.getMethodId(moduleName, methodName).toString()] = {
moduleName,
methodName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ export class TransactionTracingService {
public async getTransactionData(
transaction: PendingTransaction
): Promise<TransactionProverTransactionArguments> {
console.log(
`[TransactionTracing] Getting transaction data for methodId: ${transaction.methodId.toBigInt()}`
);
console.log(
`[TransactionTracing] Transaction nonce: ${transaction.nonce.toString()}, isMessage: ${transaction.isMessage}`
);
const verificationKeyAttestation =
this.verificationKeyService.getAttestation(
transaction.methodId.toBigInt()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,20 @@ export class VerificationKeyService extends ConfigurableModule<{}> {
}

public async initializeVKTree(artifacts: Record<string, CompileArtifact>) {
console.log(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these logs pls

"[VKService] Initializing VK Tree with artifacts:",
Object.keys(artifacts)
);
const mappings = await mapSequential(
this.runtime.zkProgrammable.zkProgram,
async (program) => {
const artifact = artifacts[program.name];
console.log(
"[VKService] Processing program:",
program.name,
"methods:",
Object.keys(program.methods)
);

if (artifact === undefined) {
throw new Error(
Expand All @@ -80,6 +90,9 @@ export class VerificationKeyService extends ConfigurableModule<{}> {
moduleName,
methodName
);
console.log(
`[VKService] Registering method: ${moduleName}.${methodName} -> methodId: ${methodId.toString()}`
);
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
return [
methodId.toString(),
Expand Down Expand Up @@ -132,8 +145,11 @@ export class VerificationKeyService extends ConfigurableModule<{}> {
}

public getAttestation(methodId: bigint) {
const verificationKey = this.getVkRecord()[methodId.toString()];
const vkRecord = this.getVkRecord();
const verificationKey = vkRecord[methodId.toString()];
if (verificationKey === undefined) {
console.error(`[VKService] MethodId not found: ${methodId}`);
console.error("[VKService] Registered methodIds:", Object.keys(vkRecord));
throw new Error(
`MethodId not registered in VerificationKeyService (${methodId})`
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ export class MinaTransactionSimulator {
const feePayerAccount = accounts[this.cacheKey(feePayer.body.publicKey)];

if (!this.checkFeePayer(feePayerAccount, feePayer)) {
throw new Error("Feepayer invalid");
throw new Error(
`Feepayer invalid${feePayerAccount.publicKey.toBase58()} : ${feePayerAccount.balance.toString()} , ${feePayer.body.publicKey.toBase58()}`
);
}
this.applyFeepayer(feePayerAccount, feePayer);

Expand Down
17 changes: 7 additions & 10 deletions packages/stack/src/presets/modules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
LocalTaskQueue,
AppChainModulesRecord,
InMemoryMinaSigner,
BridgingModule,
} from "@proto-kit/sequencer";
import {
IndexerNotifier,
Expand Down Expand Up @@ -194,6 +195,7 @@ export class DefaultModules {
Mempool: PrivateMempool,
TaskQueue: LocalTaskQueue,
SequencerStartupModule,
BridgingModule: BridgingModule
} satisfies SequencerModulesRecord;
}
}
Expand Down Expand Up @@ -375,18 +377,12 @@ export class DefaultConfigs {
BaseLayer: {
network: {
type: "lightnet" as const,
graphql: config.minaNodeGraphqlHost,
archive: config.minaArchiveGraphqlHost,
accountManager: config.minaAccountManagerHost,
},
},
SettlementModule: {
addresses: {
SettlementContract: PrivateKey.fromBase58(
config.settlementContractPrivateKey
).toPublicKey(),
graphql: `${config.minaNodeGraphqlHost}:${config.minaNodeGraphqlPort}/graphql`,
archive: `${config.minaArchiveGraphqlHost}:${config.minaArchiveGraphqlPort}/graphql`,
accountManager: `${config.minaAccountManagerHost}:${config.minaAccountManagerPort}`,
},
},
SettlementModule: {},
SettlementSigner: {
feepayer: PrivateKey.fromBase58(config.sequencerPrivateKey),
contractKeys: [
Expand Down Expand Up @@ -527,6 +523,7 @@ export class DefaultConfigs {
simulatedDuration: 0,
},
Mempool: {},
BridgingModule: {}
};
}
}
46 changes: 4 additions & 42 deletions packages/stack/test/graphql/graphql-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ import {
StateServiceQueryModule,
InMemoryBlockExplorer,
} from "@proto-kit/sdk";
import { PrivateKey, PublicKey } from "o1js";
import { Runtime, runtimeMethod, runtimeModule } from "@proto-kit/module";
import { Protocol, State, state } from "@proto-kit/protocol";
import { PrivateKey } from "o1js";
import { Runtime } from "@proto-kit/module";
import { Protocol } from "@proto-kit/protocol";
import {
Balance,
Balances,
BalancesKey,
TokenId,
VanillaProtocolModules,
VanillaRuntimeModules,
Expand Down Expand Up @@ -44,42 +41,7 @@ import {
} from "@proto-kit/api";
import { container } from "tsyringe";

@runtimeModule()
export class TestBalances extends Balances {
/**
* We use `satisfies` here in order to be able to access
* presets by key in a type safe way.
*/
// public static presets = {} satisfies Presets<object>;

@state() public totalSupply = State.from<UInt64>(UInt64);

@runtimeMethod()
public async getBalanceForUser(
tokenId: TokenId,
address: PublicKey
): Promise<Balance> {
return await super.getBalance(tokenId, address);
}

@runtimeMethod()
public async addBalance(
tokenId: TokenId,
address: PublicKey,
balance: UInt64
) {
const totalSupply = await this.totalSupply.get();
await this.totalSupply.set(totalSupply.orElse(UInt64.zero).add(balance));

const previous = await this.balances.get(
new BalancesKey({ tokenId, address })
);
await this.balances.set(
new BalancesKey({ tokenId, address }),
previous.orElse(UInt64.zero).add(balance)
);
}
}
import { TestBalances } from "./utils";

export async function startGraphqlServer() {
log.setLevel("DEBUG");
Expand Down
3 changes: 2 additions & 1 deletion packages/stack/test/graphql/graphql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import {
import { beforeAll } from "@jest/globals";
import { container } from "tsyringe";

import { startGraphqlServer, TestBalances } from "./graphql-server";
import { startGraphqlServer } from "./graphql-server";
import { TestBalances } from "./utils";

const pk = PrivateKey.random();

Expand Down
47 changes: 47 additions & 0 deletions packages/stack/test/graphql/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { PublicKey } from "o1js";
import { runtimeMethod, runtimeModule } from "@proto-kit/module";
import { State, state } from "@proto-kit/protocol";
import {
Balance,
Balances,
BalancesKey,
TokenId,
UInt64,
} from "@proto-kit/library";

@runtimeModule()
export class TestBalances extends Balances {
/**
* We use `satisfies` here in order to be able to access
* presets by key in a type safe way.
*/
// public static presets = {} satisfies Presets<object>;

@state() public totalSupply = State.from<UInt64>(UInt64);

@runtimeMethod()
public async getBalanceForUser(
tokenId: TokenId,
address: PublicKey
): Promise<Balance> {
return await super.getBalance(tokenId, address);
}

@runtimeMethod()
public async addBalance(
tokenId: TokenId,
address: PublicKey,
balance: UInt64
) {
const totalSupply = await this.totalSupply.get();
await this.totalSupply.set(totalSupply.orElse(UInt64.zero).add(balance));

const previous = await this.balances.get(
new BalancesKey({ tokenId, address })
);
await this.balances.set(
new BalancesKey({ tokenId, address }),
previous.orElse(UInt64.zero).add(balance)
);
}
}
Loading