Skip to content
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
39 changes: 0 additions & 39 deletions cli/src/commands/test-validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,35 +75,6 @@ class SetupCommand extends Command {
default: 3001,
exclusive: ["skip-prover"],
}),
"prover-run-mode": Flags.string({
description:
"Specify the running mode for the prover (local-rpc, forester, forester-test, rpc, or full). Default: local-rpc",
options: [
"local-rpc",
"rpc",
"forester",
"forester-test",
"full",
"full-test",
] as const,
required: false,
exclusive: ["skip-prover"],
}),
circuit: Flags.string({
description: "Specify individual circuits to enable.",
options: [
"inclusion",
"non-inclusion",
"combined",
"append",
"update",
"append-test",
"update-test",
],
multiple: true,
required: false,
exclusive: ["skip-prover"],
}),
"limit-ledger-size": Flags.integer({
description: "Keep this amount of shreds in root slots.",
required: false,
Expand Down Expand Up @@ -226,16 +197,6 @@ class SetupCommand extends Command {
proverPort: flags["prover-port"],
prover: !flags["skip-prover"],
skipSystemAccounts: flags["skip-system-accounts"],
proverRunMode: flags["prover-run-mode"] as
| "inclusion"
| "non-inclusion"
| "forester"
| "forester-test"
| "rpc"
| "full"
| "full-test"
| undefined,
circuits: flags["circuit"],
geyserConfig: flags["geyser-config"],
validatorArgs: flags["validator-args"],
});
Expand Down
12 changes: 0 additions & 12 deletions cli/src/utils/initTestEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ export async function initTestEnv({
checkPhotonVersion = true,
photonDatabaseUrl,
limitLedgerSize,
proverRunMode,
circuits,
geyserConfig,
validatorArgs,
}: {
Expand All @@ -108,16 +106,6 @@ export async function initTestEnv({
checkPhotonVersion?: boolean;
photonDatabaseUrl?: string;
limitLedgerSize?: number;
proverRunMode?:
| "local-rpc"
| "inclusion"
| "non-inclusion"
| "forester"
| "forester-test"
| "rpc"
| "full"
| "full-test";
circuits?: string[];
validatorArgs?: string;
geyserConfig?: string;
}) {
Expand Down
71 changes: 0 additions & 71 deletions cli/src/utils/processProverServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
waitForServers,
} from "./process";
import { LIGHT_PROVER_PROCESS_NAME, BASE_PATH } from "./constants";
import find from "find-process";
import { downloadProverBinary } from "./downloadProverBinary";

const KEYS_DIR = "proving-keys/";
Expand All @@ -17,76 +16,6 @@ export async function killProver() {
await killProcess(LIGHT_PROVER_PROCESS_NAME);
}

export async function isProverRunningWithFlags(
runMode?: string,
circuits?: string[],
proverPort?: number,
redisUrl?: string,
): Promise<boolean> {
// Use find-process to get prover processes by name pattern
const proverProcesses = await find("name", "prover-");

const expectedArgs = [];
if (runMode) {
expectedArgs.push("--run-mode", runMode);
}
if (Array.isArray(circuits)) {
for (const c of circuits) {
expectedArgs.push("--circuit", c);
}
}
if (proverPort) {
expectedArgs.push("--prover-address", `0.0.0.0:${proverPort}`);
}
if (redisUrl) {
expectedArgs.push("--redis-url", redisUrl);
}

let found = false;
for (const proc of proverProcesses) {
if (
proc.cmd &&
(proc.cmd.includes("prover-") || proc.name.startsWith("prover-"))
) {
console.log("\n[Prover Process Detected]");
console.log(` PID: ${proc.pid}`);
console.log(` Command: ${proc.cmd}`);
let matches = true;
for (const arg of expectedArgs) {
if (!proc.cmd.includes(arg)) {
matches = false;
break;
}
}
if (matches) {
found = true;
console.log(
"\x1b[32m✔ Prover is already running with the same configuration.\x1b[0m",
);
console.log(
" To restart the prover, stop the process above or use the --force flag.\n",
);
break;
} else {
const missing = proc.cmd
? expectedArgs.filter((arg) => !proc.cmd!.includes(arg))
: [];
if (missing.length > 0) {
console.log(
` (Not a match for current request. Missing args: ${missing.join(", ")})`,
);
}
}
}
}
if (!found) {
console.log(
"\x1b[33mNo running prover found with the requested configuration.\x1b[0m",
);
}
return found;
}

/**
* Ensures the prover binary exists, downloading it if necessary
*/
Expand Down
8 changes: 6 additions & 2 deletions js/compressed-token/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,14 @@
]
},
"build-ci": {
"dependsOn": ["@lightprotocol/stateless.js:build-ci"]
"dependsOn": [
"@lightprotocol/stateless.js:build-ci"
]
},
"test-ci": {
"dependsOn": ["@lightprotocol/stateless.js:test-ci"]
"dependsOn": [
"@lightprotocol/stateless.js:test-ci"
]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion prover/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ COPY --chown=nonroot:nonroot ./proving-keys/v2_* /proving-keys/
WORKDIR /

ENTRYPOINT [ "light-prover" ]
CMD [ "start", "--run-mode", "rpc", "--keys-dir", "/proving-keys/" ]
CMD [ "start", "--preload-keys", "rpc", "--keys-dir", "/proving-keys/" ]
2 changes: 1 addition & 1 deletion prover/server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- ./proving-keys:/proving-keys/:ro
command: >
start
--run-mode forester-test
--preload-keys forester-test
--redis-url=redis://redis:6379
depends_on:
- redis
Expand Down
4 changes: 0 additions & 4 deletions prover/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,6 @@ func runCli() {
Name: "circuit",
Usage: "Specify the circuits to enable (inclusion, non-inclusion, combined, append, update, append-test, update-test, address-append, address-append-test)",
},
&cli.StringFlag{
Name: "run-mode",
Usage: "Specify the running mode (rpc, forester, forester-test, full, or full-test)",
},
&cli.StringFlag{
Name: "preload-keys",
Usage: "Preload keys: none (lazy load all), all (preload everything), or a run mode (rpc, forester, forester-test, full, full-test, local-rpc)",
Expand Down
Loading