diff --git a/README.md b/README.md index e62cfce..31cad3b 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,10 @@ You can learn more about the Protokit framework at the [official documentation]( - pnpm `v9.8.0` - nvm - (optional) For running with persistance / deploying on a server - - docker `>= 24.0` - - docker-compose `>= 2.22.0` + - docker `>= 24.0` + - docker-compose `>= 2.22.0` **Run the following commands to get started:** - ```zsh # clone the repository git clone https://github.com/proto-kit/starter-kit my-chain @@ -30,13 +29,11 @@ pnpm env:development prisma:generate # starts both the UI and the sequencer (file watcher / live reload enabled) pnpm env:inmemory dev ``` - Visit http://localhost:3000 to view the example UI, or http://localhost:8080/graphql to explore the sequencer's GraphQL APIs. ### Structural overview The starter kit contains the following files and folders: - ``` ├── apps │ └── web // example UI that connects to the app-chain's sequencer @@ -44,7 +41,7 @@ The starter kit contains the following files and folders: │ ├── containers // smart components ("containers") │ └── lib │ └── stores // data stores for interacting with the app-chain's sequencer -│ +│ ├── docker │ └── data // mounted as a volume for the docker containers │ @@ -56,7 +53,7 @@ The starter kit contains the following files and folders: │ │ └── processor // processor configuration (handlers, graphql resolvers, graphql server, ...) │ ├── protocol // protocol modules (transaction fees, ...) │ └── runtime // runtime modules (your app-chain's business logic) - │ └── modules + │ └── modules │ ├── balances.ts // built-in example runtime module for Balances, with a faucet │ └── withdrawals.ts // withdrawal functionality module └── test // tests for various app-chain components @@ -72,9 +69,8 @@ The starter-kit offers different environments to run you appchain. You can use those environments to configure the mode of operation for your appchain depending on which stage of development you are in. The starter kit comes with a set of pre-configured environments: - - `inmemory`: Runs everything in-memory without persisting the data. Useful for early stages of runtime development. -- `development`: Runs the sequencer locally and persists all state in databases running in docker. +- `development`: Runs the sequencer locally and persists all state in databases running in docker. - `sovereign`: Runs your appchain fully in docker (including the UI) for testnet deployments without settlement or bridging. Every command you execute should follow this pattern: @@ -117,7 +113,7 @@ pnpm env:development prisma:migrate #### Pruning data -Persisted data is stored under `docker/data`, you can delete this folder in case you're experiencing issues with persistence and need to reset your environment setup entirely. +Persisted data is stored under `docker/data`, you can delete this folder in case you're experiencing issues with persistence and need to reset your environment setup entirely. However to prune data during development, you should use the `--pruneOnStartup` CLI option [documented here](#cli-options) @@ -127,7 +123,7 @@ Ensure you've successfully started the dockerized dependencies, generated and mi #### With live reload -> ⚠️ Be aware, the dev command will automatically restart your application when your sources change. +> ⚠️ Be aware, the dev command will automatically restart your application when your sources change. > Please keep in mind that running the components below in `dev` mode (with live reload / watchersr) is advisable only when you're working on that specific component. In case you're experiencing issues with watches cross-triggering reload of different components, you can use the `start` command instead. ```zsh @@ -145,7 +141,6 @@ pnpm env:development sequencer:start --filter=chain Protokit has the ability to report metrics, logs and traces to a Grafana instance for visualisation. These can be configured by the following environment variables - ```zsh OPEN_TELEMETRY_TRACING_URL= OPEN_TELEMETRY_TRACING_ENABLED= @@ -153,8 +148,7 @@ OPEN_TELEMETRY_TRACING_ENABLED= OPEN_TELEMETRY_METRICS_URL= OPEN_TELEMETRY_METRICS_ENABLED= OPEN_TELEMETRY_METRICS_SCRAPING_FREQUENCY= -``` - +```` Note that the functionality is not configured for the `in-memory` mode. ### Running the UI @@ -165,6 +159,7 @@ pnpm env:development dev --filter=web > You can also build/start the UI as well, instead of using `dev` command with live-reload. + ### Running the indexer ⚠️ Indexer only runs with docker-enabled environments, therefore it is not available with the `inmemory` environment @@ -221,46 +216,38 @@ You can define which resolvers are available in `chain/src/processor/api/resolve At this point in time, the starter-kit offers settlement & bridging integration with lightnet (local mina network). You can enable these features by setting the `PROTOKIT_SETTLEMENT_ENABLED` environment variable to `true` in development .env file. Follow these steps to get the sequencer to settle & bridge: - - Initialize the lightnet process, fund the sequencer operator & deploy settlement+bridging contracts: - - ``` - pnpm env:development lightnet:start -d - pnpm protokit lightnet initialize --env development - ``` + ``` + pnpm env:development lightnet:start -d + pnpm protokit lightnet initialize + ``` - Run a worker, alongside with the sequencer in separate shell instances - - ``` - pnpm env:development worker:dev - pnpm env:development sequencer:dev - ``` + ``` + pnpm env:development worker:dev + pnpm env:development sequencer:dev + ``` - Fund a testing account on lightnet (defined in the .env file) - - ``` - pnpm protokit lightnet faucet B62qkVfEwyfkm5yucHEqrRjxbyx98pgdWz82pHv7LYq9Qigs812iWZ8 --env development - ``` + ``` + pnpm lightnet faucet B62qkVfEwyfkm5yucHEqrRjxbyx98pgdWz82pHv7LYq9Qigs812iWZ8 + ``` - Bridge the L1 $MINA to your app-chain, and observe your app-chain $MINA balance change after the next settlement lifecycle has been completed by the sequencer - > Token ID of MINA is `1` on both the L1 and app-chain - - ``` - pnpm protokit bridge deposit 1 TEST_ACCOUNT_1_PRIVATE_KEY TEST_ACCOUNT_1_PUBLIC_KEY 100 --env development - ``` + > Token ID of MINA is `1` on both the L1 and app-chain + ``` + pnpm protokit bridge deposit 1 TEST_ACCOUNT_1_PRIVATE_KEY TEST_ACCOUNT_1_PUBLIC_KEY 100 + ``` - Withdraw your app-chain $MINA tokens back to the L1 - - ``` - pnpm protokit bridge withdraw 1 TEST_ACCOUNT_1_PRIVATE_KEY 100 --env development - ``` - -For more detailed information about the protokit CLI commands used in this section, refer to the [Protokit CLI documentation](http://github.com/proto-kit/framework/tree/develop/packages/cli#proto-kit-cli). + ``` + pnpm protokit bridge withdraw 1 TEST_ACCOUNT_1_PRIVATE_KEY 100 + ``` ## Deployments (sovereign environment) -When deploying to a server, you should push your code along with your forked starter-kit to some repository, +When deploying to a server, you should push your code along with your forked starter-kit to some repository, then clone it on your remote server and execute it. > Don't forget to run `pnpm env:sovereign docker:build` to build the required images. @@ -275,7 +262,6 @@ UI will be accessible at `https://localhost` and GQL inspector will be available ### Configuration Go to `docker/proxy/Caddyfile` and replace the `*` matcher with your domain. - ``` yourdomain.com { ... @@ -295,8 +281,7 @@ The caddy reverse-proxy automatically uses https for all connections, use this g ### Monitoring -Protokit offers monitoring via three different kinds of data and a collection of preconfigured services: - +Protokit offers monitoring via three different kinds of data and a collection of preconfigured services: - Logs via Promtail and Loki - Metrics via OpenTelemetry and Prometheus - Traces via OpenTelemetry, OTel Collector and Tempo @@ -307,11 +292,10 @@ Protokit offers monitoring via three different kinds of data and a collection of In Development mode, monitoring is disabled by default. To enabled, edit the `development/.env` file in the following way: - 1. Add the monitoring profile to `COMPOSE_PROFILES` -2. Uncomment `...DefaultModules.metrics()` in the sequencer's module definition. - Important: This has to be in front of all other modules (i.e. has to be first in the modules record) -3. Uncomment `...DefaultConfigs.metrics()` in the configuration call. +2. Uncomment `...metricsSequencerModules` in the sequencer's module definition. +Important: This has to be in front of all other modules (i.e. has to be first in the modules record) +3. Uncomment `...metricsSequencerModulesConfig` in the configuration call. Then, run `pnpm env:development docker:up` like usual. This should start all the services needed for monitoring. Grafana is available at `localhost:3000`. @@ -328,10 +312,14 @@ If you want to remove the monitoring services, remove the docker profile `monito More information about monitoring can be found [here](https://github.com/proto-kit/framework/pull/272). +*Deploying contracts* + +`pnpm protokit lightnet initialize --env-path ./packages/chain/src/core/environments/sovereign/scripts.env` + ## Building the framework from source 1. Make sure the framework is located under ../framework from the starter-kit's location 2. Adapt your starter-kit's `packages/chain` and `apps/web` package.json to use the file:// references to framework, including - references to `o1js` and `tsyringe`. Important: Make sure to update references in both chain and web, otherwise the location of the node_modules will be different and lead to errors +references to `o1js` and `tsyringe`. Important: Make sure to update references in both chain and web, otherwise the location of the node_modules will be different and lead to errors 3. Go into the framework folder, and build a docker image containing the sources with `docker build -f ./packages/deployment/docker/development-base/Dockerfile -t protokit-base .` 4. Replace the first line of `docker/base/Dockerfile` and `docker/web/Dockerfile` to use `FROM protokit-base:latest` diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index 77d2d0e..c85b61c 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -1,8 +1,8 @@ # For regular deployment -# FROM node:18 +# FROM node:22 # For locally built and imported framework references -# Make sure you build the base-image first +# Make sure you build the base image first FROM protokit-base:latest WORKDIR /app @@ -37,4 +37,4 @@ RUN dos2unix ./entry.sh RUN chmod +x ./entry.sh # Migrate + execute -ENTRYPOINT ["./entry.sh"] \ No newline at end of file +ENTRYPOINT ["./entry.sh"] diff --git a/docker/base/entry.sh b/docker/base/entry.sh index 9134078..191261c 100644 --- a/docker/base/entry.sh +++ b/docker/base/entry.sh @@ -3,26 +3,28 @@ if [[ ${PROTOKIT_SHOULD_ATTEMPT_DB_MIGRATION} ]]; then echo "Migrating on ${DATABASE_URL}" cd packages/chain/node_modules/@proto-kit/persistance - pnpm dlx prisma migrate deploy + pnpx prisma@5.18.0 migrate deploy cd ../../../../.. fi if [[ ${PROTOKIT_SHOULD_ATTEMPT_INDEXER_DB_MIGRATION} ]]; then echo "Migrating on ${INDEXER_DATABASE_URL}" cd packages/chain/node_modules/@proto-kit/indexer - pnpm dlx prisma migrate deploy + pnpx prisma@5.18.0 migrate deploy cd ../../../../.. fi if [[ ${PROTOKIT_SHOULD_ATTEMPT_PROCESSOR_DB_MIGRATION} ]]; then echo "Migrating on ${PROCESSOR_DATABASE_URL}" cd packages/chain/src/processor - pnpm dlx prisma migrate deploy + pnpx prisma@5.18.0 migrate deploy cd ../../../../.. fi cd /app +cd packages/chain echo $@ + # We can't use start:headless here bcs that task hardcodes the .js file, we want it to be extensible -node --experimental-vm-modules --experimental-wasm-modules --es-module-specifier-resolution=node $@ \ No newline at end of file +node --loader ts-node/esm --experimental-vm-modules --experimental-wasm-modules --es-module-specifier-resolution=node --no-warnings $@ diff --git a/docker/indexer/docker-compose.yml b/docker/indexer/docker-compose.yml index c8dacf1..c6965f8 100644 --- a/docker/indexer/docker-compose.yml +++ b/docker/indexer/docker-compose.yml @@ -41,7 +41,7 @@ services: - 8081:8080 command: [ - "./packages/chain/dist/start.js start ./environments/${PROTOKIT_ENV_FOLDER}/indexer.config.js", + "./dist/start.js start ./core/environments/${PROTOKIT_ENV_FOLDER}/indexer.config.js", ] labels: logging: "promtail" diff --git a/docker/processor/docker-compose.yml b/docker/processor/docker-compose.yml index 820205a..1c4ca03 100644 --- a/docker/processor/docker-compose.yml +++ b/docker/processor/docker-compose.yml @@ -29,10 +29,10 @@ services: ports: - 8082:8080 working_dir: /app - command: ["./packages/chain/dist/start.js start ./environments/${PROTOKIT_ENV_FOLDER}/processor.config.js",] + command: ["./dist/start.js start ./core/environments/${PROTOKIT_ENV_FOLDER}/processor.config.js",] labels: logging: "promtail" logging_jobname: "processor" networks: - processor-net: \ No newline at end of file + processor-net: diff --git a/docker/sequencer/docker-compose.yml b/docker/sequencer/docker-compose.yml index 865adcf..bea62dc 100644 --- a/docker/sequencer/docker-compose.yml +++ b/docker/sequencer/docker-compose.yml @@ -39,6 +39,9 @@ services: - PROTOKIT_DISPATCHER_CONTRACT_PUBLIC_KEY=${PROTOKIT_DISPATCHER_CONTRACT_PUBLIC_KEY} - PROTOKIT_MINA_BRIDGE_CONTRACT_PRIVATE_KEY=${PROTOKIT_MINA_BRIDGE_CONTRACT_PRIVATE_KEY} - PROTOKIT_MINA_BRIDGE_CONTRACT_PUBLIC_KEY=${PROTOKIT_MINA_BRIDGE_CONTRACT_PUBLIC_KEY} + - PROTOKIT_PROOFS_ENABLED=${PROTOKIT_PROOFS_ENABLED} + - PROTOKIT_BLOCK_ARGUMENT_BATCH_SIZE=${PROTOKIT_BLOCK_ARGUMENT_BATCH_SIZE} + - PROTOKIT_STATE_TRANSITION_BATCH_SIZE=${PROTOKIT_STATE_TRANSITION_BATCH_SIZE} - OPEN_TELEMETRY_TRACING_ENABLED=${OPEN_TELEMETRY_TRACING_ENABLED} - OPEN_TELEMETRY_TRACING_URL=${OPEN_TELEMETRY_TRACING_URL} @@ -61,10 +64,10 @@ services: - lightnet-net ports: - 8080:8080 - command: ["./packages/chain/dist/start.js start ./environments/${PROTOKIT_ENV_FOLDER}/chain.config.js"] + command: ["./dist/start.js start ./core/environments/${PROTOKIT_ENV_FOLDER}/chain.config.js"] labels: logging: "promtail" logging_jobname: "sequencer" networks: - chain-net: \ No newline at end of file + chain-net: diff --git a/docker/worker/docker-compose.yml b/docker/worker/docker-compose.yml index 482f4fe..118b0db 100644 --- a/docker/worker/docker-compose.yml +++ b/docker/worker/docker-compose.yml @@ -10,7 +10,6 @@ services: - REDIS_PORT=${REDIS_PORT} - REDIS_PASSWORD=${REDIS_PASSWORD} - - PROTOKIT_TRANSACTION_FEE_RECIPIENT_PRIVATE_KEY=${PROTOKIT_TRANSACTION_FEE_RECIPIENT_PRIVATE_KEY} - PROTOKIT_TRANSACTION_FEE_RECIPIENT_PUBLIC_KEY=${PROTOKIT_TRANSACTION_FEE_RECIPIENT_PUBLIC_KEY} - PROTOKIT_LOG_LEVEL=${PROTOKIT_LOG_LEVEL} @@ -22,14 +21,59 @@ services: - PROTOKIT_DISPATCHER_CONTRACT_PUBLIC_KEY=${PROTOKIT_DISPATCHER_CONTRACT_PUBLIC_KEY} - PROTOKIT_MINA_BRIDGE_CONTRACT_PRIVATE_KEY=${PROTOKIT_MINA_BRIDGE_CONTRACT_PRIVATE_KEY} - PROTOKIT_MINA_BRIDGE_CONTRACT_PUBLIC_KEY=${PROTOKIT_MINA_BRIDGE_CONTRACT_PUBLIC_KEY} - - PROTOKIT_SETTLEMENT_INTERVAL=${PROTOKIT_SETTLEMENT_INTERVAL} - PROTOKIT_SETTLEMENT_ENABLED=${PROTOKIT_SETTLEMENT_ENABLED} + - PROTOKIT_PROOFS_ENABLED=${PROTOKIT_PROOFS_ENABLED} + - PROTOKIT_BLOCK_ARGUMENT_BATCH_SIZE=${PROTOKIT_BLOCK_ARGUMENT_BATCH_SIZE} + - PROTOKIT_STATE_TRANSITION_BATCH_SIZE=${PROTOKIT_STATE_TRANSITION_BATCH_SIZE} + - PROTOKIT_WORKER_VARIANT=${PROTOKIT_WORKER_VARIANT} profiles: - worker + - worker-specialized depends_on: redis: condition: service_healthy networks: - db-net - command: ["./packages/chain/dist/start.js start ./environments/${PROTOKIT_ENV_FOLDER}/worker.config.js"] + - lightnet-net + volumes: + - ${HOME}/.cache/o1js:/home/node/.cache/o1js + command: ["./dist/start.js start ./core/environments/${PROTOKIT_ENV_FOLDER}/worker.config.js"] + + worker-2: + image: starterkit-chain-base + build: + dockerfile: ./docker/base/Dockerfile + context: ../.. + container_name: starterkit-worker-2 + environment: + - REDIS_HOST=${REDIS_HOST} + - REDIS_PORT=${REDIS_PORT} + - REDIS_PASSWORD=${REDIS_PASSWORD} + - PROTOKIT_TRANSACTION_FEE_RECIPIENT_PRIVATE_KEY=${PROTOKIT_TRANSACTION_FEE_RECIPIENT_PRIVATE_KEY} + - PROTOKIT_TRANSACTION_FEE_RECIPIENT_PUBLIC_KEY=${PROTOKIT_TRANSACTION_FEE_RECIPIENT_PUBLIC_KEY} + - PROTOKIT_LOG_LEVEL=${PROTOKIT_LOG_LEVEL} + - PROTOKIT_SEQUENCER_PRIVATE_KEY=${PROTOKIT_SEQUENCER_PRIVATE_KEY} + - PROTOKIT_SEQUENCER_PUBLIC_KEY=${PROTOKIT_SEQUENCER_PUBLIC_KEY} + - PROTOKIT_SETTLEMENT_CONTRACT_PRIVATE_KEY=${PROTOKIT_SETTLEMENT_CONTRACT_PRIVATE_KEY} + - PROTOKIT_SETTLEMENT_CONTRACT_PUBLIC_KEY=${PROTOKIT_SETTLEMENT_CONTRACT_PUBLIC_KEY} + - PROTOKIT_DISPATCHER_CONTRACT_PRIVATE_KEY=${PROTOKIT_DISPATCHER_CONTRACT_PRIVATE_KEY} + - PROTOKIT_DISPATCHER_CONTRACT_PUBLIC_KEY=${PROTOKIT_DISPATCHER_CONTRACT_PUBLIC_KEY} + - PROTOKIT_MINA_BRIDGE_CONTRACT_PRIVATE_KEY=${PROTOKIT_MINA_BRIDGE_CONTRACT_PRIVATE_KEY} + - PROTOKIT_MINA_BRIDGE_CONTRACT_PUBLIC_KEY=${PROTOKIT_MINA_BRIDGE_CONTRACT_PUBLIC_KEY} + - PROTOKIT_SETTLEMENT_ENABLED=${PROTOKIT_SETTLEMENT_ENABLED} + - PROTOKIT_PROOFS_ENABLED=${PROTOKIT_PROOFS_ENABLED} + - PROTOKIT_BLOCK_ARGUMENT_BATCH_SIZE=${PROTOKIT_BLOCK_ARGUMENT_BATCH_SIZE} + - PROTOKIT_STATE_TRANSITION_BATCH_SIZE=${PROTOKIT_STATE_TRANSITION_BATCH_SIZE} + - PROTOKIT_WORKER_VARIANT=${PROTOKIT_WORKER_VARIANT_2} + profiles: + - worker-specialized + depends_on: + redis: + condition: service_healthy + networks: + - db-net + - lightnet-net + volumes: + - ${HOME}/.cache/o1js:/home/node/.cache/o1js + command: ["./dist/start.js start ./core/environments/${PROTOKIT_ENV_FOLDER}/worker.config.js"] diff --git a/package.json b/package.json index 0953158..636c63e 100644 --- a/package.json +++ b/package.json @@ -41,12 +41,13 @@ "turbo": "^2.1.2" }, "dependencies": { + "@proto-kit/cli": "../framework/packages/cli", "@types/graphql-fields": "^1.3.9", "chain": "^0.4.0", "dotenv-cli": "^7.4.2", "tslib": "^2.7.0", "type-graphql": "2.0.0-rc.2", - "@proto-kit/cli": "../framework/packages/cli" + "ts-node": "^10.9.2" }, "packageManager": "pnpm@9.8.0+sha256.56a9e76b51796ca7f73b85e44cf83712862091f4d498c0ce4d5b7ecdc6ba18f7", "name": "starter-kit" diff --git a/packages/chain/package.json b/packages/chain/package.json index 2dff613..1c47429 100644 --- a/packages/chain/package.json +++ b/packages/chain/package.json @@ -61,7 +61,7 @@ }, "devDependencies": { "@jest/globals": "^29.6.1", - "@prisma/client": "5.18", + "@prisma/client": "^5.18.0", "@types/jest": "^29.5.7", "@types/node": "^20.8.10", "@types/react-dom": "^18.2.7", @@ -83,7 +83,6 @@ "stream-browserify": "^3.0.0", "string_decoder": "^1.3.0", "ts-jest": "^29.1.1", - "ts-node": "^10.9.2", "tsconfig": "workspace:*", "typegraphql-prisma": "^0.28", "typescript": "5.4.5", diff --git a/packages/chain/src/core/environments/development/.env b/packages/chain/src/core/environments/development/.env index a4ff88a..e3fcf0f 100644 --- a/packages/chain/src/core/environments/development/.env +++ b/packages/chain/src/core/environments/development/.env @@ -1,6 +1,6 @@ COMPOSE_PROFILES=db,indexer-db,processor-db ; monitoring -COMPOSE_PROJECT_NAME=starter-kit +COMPOSE_PROJECT_NAME=starterkit POSTGRES_PASSWORD=password POSTGRES_USER=admin @@ -55,6 +55,11 @@ PROTOKIT_PROCESSOR_GRAPHIQL_ENABLED=true PROTOKIT_PROCESSOR_INDEXER_GRAPHQL_HOST=0.0.0.0 +PROTOKIT_WORKER_VARIANT=default + +PROTOKIT_BLOCK_ARGUMENT_BATCH_SIZE=40 +PROTOKIT_STATE_TRANSITION_BATCH_SIZE=25 + # expose graphql configuration to the client app-chain NEXT_PUBLIC_PROTOKIT_GRAPHQL_URL=http://localhost:8080/graphql NEXT_PUBLIC_PROTOKIT_INDEXER_GRAPHQL_URL=http://localhost:8081/graphql @@ -69,7 +74,7 @@ MINA_ARCHIVE_GRAPHQL_PORT=8085 PROTOKIT_TRANSACTION_FEE_RECIPIENT_PRIVATE_KEY=EKEssvj33MMBCg2tcybTzL32nTKbbwFHm6yUxd3JassdhL3J5aT8 PROTOKIT_TRANSACTION_FEE_RECIPIENT_PUBLIC_KEY=B62qk4sNnzZqqjHp8YQXZUV3dBpnjiNieJVnsuh7mD2bMJ9PdbskH5H -PROTOKIT_SETTLEMENT_ENABLED=true +PROTOKIT_SETTLEMENT_ENABLED=false PROTOKIT_SEQUENCER_PRIVATE_KEY=EKEdKhgUHMuDvwWJEg2TdCMCeiTSd9hh2HrEr6uYJfPVuwur1s43 PROTOKIT_SEQUENCER_PUBLIC_KEY=B62qizW6aroTxQorJz4ywVNZom4jA6W4QPPCK3wLeyhnJHtVStUNniL @@ -85,6 +90,7 @@ PROTOKIT_CUSTOM_TOKEN_ADMIN_PRIVATE_KEY=EKENQ2QRc4gAJkZjQXU86ZS9MDm1e7HFiNN6LgRJ PROTOKIT_CUSTOM_TOKEN_BRIDGE_PRIVATE_KEY=EKENQ2QRc4gAJkZjQXU86ZS9MDm1e7HFiNN6LgRJnniHJt1WXDn1 # lightnet only +MINA_NETWORK=lightnet MINA_ACCOUNT_MANAGER_HOST=http://localhost MINA_ACCOUNT_MANAGER_PORT=8084 MINA_EXPLORER_PORT=3001 @@ -104,4 +110,4 @@ OPEN_TELEMETRY_METRICS_HOST=0.0.0.0 OPEN_TELEMETRY_METRICS_SCRAPING_FREQUENCY=10 GF_SECURITY_ADMIN_USER=admin -GF_SECURITY_ADMIN_PASSWORD=grafana \ No newline at end of file +GF_SECURITY_ADMIN_PASSWORD=grafana diff --git a/packages/chain/src/core/environments/development/chain.config.ts b/packages/chain/src/core/environments/development/chain.config.ts index 00f8897..8a56cc6 100644 --- a/packages/chain/src/core/environments/development/chain.config.ts +++ b/packages/chain/src/core/environments/development/chain.config.ts @@ -1,6 +1,6 @@ import { Runtime } from "@proto-kit/module"; import { Protocol } from "@proto-kit/protocol"; -import { AppChain, Sequencer } from "@proto-kit/sequencer"; +import { AppChain, BatchProducerModule, Sequencer } from "@proto-kit/sequencer"; import runtime from "../../../runtime"; import * as protocol from "../../../protocol"; @@ -23,6 +23,7 @@ const appChain = AppChain.from({ ...DefaultModules.core({ settlementEnabled }), ...DefaultModules.redisTaskQueue(), ...DefaultModules.sequencerIndexer(), + BatchProducerModule, }), ...DefaultModules.appChainBase(), }); @@ -50,6 +51,7 @@ export default async (args: Arguments): Promise => { pruneOnStartup: args.pruneOnStartup, }, }), + BatchProducerModule: {}, }, ...DefaultConfigs.appChainBase(), }); diff --git a/packages/chain/src/core/environments/development/worker.config.ts b/packages/chain/src/core/environments/development/worker.config.ts index e894ceb..c1924f2 100644 --- a/packages/chain/src/core/environments/development/worker.config.ts +++ b/packages/chain/src/core/environments/development/worker.config.ts @@ -22,7 +22,7 @@ const appChain = AppChain.from({ ...(settlementEnabled ? protocol.settlementModules : {}), }), Sequencer: Sequencer.from({ - ...DefaultModules.worker(), + ...DefaultModules.remoteWorker(), ...(!settlementEnabled ? { LocalTaskWorkerModule: LocalTaskWorkerModule.from( diff --git a/packages/chain/src/core/environments/inmemory/.env b/packages/chain/src/core/environments/inmemory/.env index ef9ed19..b7c1f14 100644 --- a/packages/chain/src/core/environments/inmemory/.env +++ b/packages/chain/src/core/environments/inmemory/.env @@ -5,9 +5,11 @@ PROTOKIT_GRAPHQL_HOST=localhost PROTOKIT_GRAPHQL_PORT=8080 PROTOKIT_GRAPHIQL_ENABLED=true +PROTOKIT_TRANSACTION_FEE_RECIPIENT_PUBLIC_KEY=B62qk4sNnzZqqjHp8YQXZUV3dBpnjiNieJVnsuh7mD2bMJ9PdbskH5H + # expose graphql configuration to the client app-chain NEXT_PUBLIC_PROTOKIT_GRAPHQL_URL=http://localhost:8080/graphql FORCE_COLOR=3 TS_NODE_TRANSPILE_ONLY=true -PROTOKIT_ENV_FOLDER=inmemory \ No newline at end of file +PROTOKIT_ENV_FOLDER=inmemory diff --git a/packages/chain/src/core/environments/inmemory/chain.config.ts b/packages/chain/src/core/environments/inmemory/chain.config.ts index afe8bc7..b87ad05 100644 --- a/packages/chain/src/core/environments/inmemory/chain.config.ts +++ b/packages/chain/src/core/environments/inmemory/chain.config.ts @@ -13,11 +13,11 @@ const appChain = AppChain.from({ Runtime: Runtime.from(runtime.modules), Protocol: Protocol.from(protocol.modules), Sequencer: Sequencer.from({ + ...DefaultModules.localWorker({ settlementEnabled }), ...DefaultModules.inMemoryDatabase(), ...DefaultModules.core({ settlementEnabled, }), - ...DefaultModules.localTaskQueue(), }), ...DefaultModules.appChainBase(), }); @@ -26,11 +26,11 @@ export default async (): Promise => { Runtime: runtime.config, Protocol: protocol.config, Sequencer: { + ...DefaultConfigs.localWorker(), ...DefaultConfigs.core({ settlementEnabled, }), ...DefaultConfigs.inMemoryDatabase(), - ...DefaultConfigs.localTaskQueue(), }, ...DefaultConfigs.appChainBase(), }); diff --git a/packages/chain/src/core/environments/sovereign/.env b/packages/chain/src/core/environments/sovereign/.env index 41fec50..468bf68 100644 --- a/packages/chain/src/core/environments/sovereign/.env +++ b/packages/chain/src/core/environments/sovereign/.env @@ -1,6 +1,7 @@ -COMPOSE_PROFILES=db,indexer-db,monolithic-sequencer,monolithic-indexer,proxy,web,processor-db,monolithic-processor,worker,monitoring +# COMPOSE_PROFILES=db,indexer-db,monolithic-sequencer,monolithic-indexer,proxy,web,processor-db,monolithic-processor,worker-specialized,monitoring +COMPOSE_PROFILES=db,monolithic-sequencer,proxy,web,worker-specialized -COMPOSE_PROJECT_NAME=starter-kit +COMPOSE_PROJECT_NAME=starterkit POSTGRES_PASSWORD=password POSTGRES_USER=admin @@ -14,12 +15,17 @@ REDIS_PORT=6379 REDIS_PASSWORD=password PROTOKIT_SHOULD_ATTEMPT_DB_MIGRATION=true -PROTOKIT_PRUNE_ON_STARTUP=false +PROTOKIT_PRUNE_ON_STARTUP=true PROTOKIT_LOG_LEVEL=INFO -PROTOKIT_BLOCK_INTERVAL=10000 -PROTOKIT_SETTLEMENT_INTERVAL=30000 +PROTOKIT_BLOCK_INTERVAL=20000 +PROTOKIT_SETTLEMENT_INTERVAL=60000 + +PROTOKIT_PROOFS_ENABLED=false + PROTOKIT_SETTLEMENT_ENABLED=true +PROTOKIT_BLOCK_ARGUMENT_BATCH_SIZE=40 +PROTOKIT_STATE_TRANSITION_BATCH_SIZE=25 PROTOKIT_GRAPHQL_HOST=0.0.0.0 PROTOKIT_GRAPHQL_PORT=8080 @@ -35,20 +41,19 @@ INDEXER_POSTGRES_DB=protokit-indexer INDEXER_POSTGRES_HOST=indexer-postgres INDEXER_POSTGRES_PORT=5432 INDEXER_DATABASE_URL=postgresql://$INDEXER_POSTGRES_USER:$INDEXER_POSTGRES_PASSWORD@$INDEXER_POSTGRES_HOST:$INDEXER_POSTGRES_PORT/$INDEXER_POSTGRES_DB?schema=public -PROTOKIT_SHOULD_ATTEMPT_INDEXER_DB_MIGRATION=true +PROTOKIT_SHOULD_ATTEMPT_INDEXER_DB_MIGRATION=false PROTOKIT_INDEXER_GRAPHQL_HOST=0.0.0.0 PROTOKIT_INDEXER_GRAPHQL_PORT=8081 PROTOKIT_INDEXER_GRAPHIQL_ENABLED=true - PROCESSOR_POSTGRES_PASSWORD=password PROCESSOR_POSTGRES_USER=admin PROCESSOR_POSTGRES_DB=protokit-processor PROCESSOR_POSTGRES_HOST=processor-postgres PROCESSOR_POSTGRES_PORT=5432 PROCESSOR_DATABASE_URL=postgresql://$PROCESSOR_POSTGRES_USER:$PROCESSOR_POSTGRES_PASSWORD@$PROCESSOR_POSTGRES_HOST:$PROCESSOR_POSTGRES_PORT/$PROCESSOR_POSTGRES_DB?schema=public -PROTOKIT_SHOULD_ATTEMPT_PROCESSOR_DB_MIGRATION=true +PROTOKIT_SHOULD_ATTEMPT_PROCESSOR_DB_MIGRATION=false PROTOKIT_PROCESSOR_GRAPHQL_HOST=0.0.0.0 PROTOKIT_PROCESSOR_GRAPHQL_PORT=8082 @@ -56,6 +61,10 @@ PROTOKIT_PROCESSOR_GRAPHIQL_ENABLED=true PROTOKIT_PROCESSOR_INDEXER_GRAPHQL_HOST=indexer +PROTOKIT_WORKER_VARIANT=l2 +PROTOKIT_WORKER_VARIANT_2=l1 + +PUBLIC_DOMAIN=* # expose graphql configuration to the client app-chain NEXT_PUBLIC_PROTOKIT_GRAPHQL_URL=https://localhost/graphql # NEXT_PUBLIC_PROTOKIT_GRAPHQL_URL=http://yourdomain.com/graphql @@ -71,8 +80,6 @@ MINA_ARCHIVE_GRAPHQL_PORT=8282 PROTOKIT_TRANSACTION_FEE_RECIPIENT_PRIVATE_KEY=EKEssvj33MMBCg2tcybTzL32nTKbbwFHm6yUxd3JassdhL3J5aT8 PROTOKIT_TRANSACTION_FEE_RECIPIENT_PUBLIC_KEY=B62qk4sNnzZqqjHp8YQXZUV3dBpnjiNieJVnsuh7mD2bMJ9PdbskH5H -PROTOKIT_SETTLEMENT_ENABLED=true - PROTOKIT_SEQUENCER_PRIVATE_KEY=EKEdKhgUHMuDvwWJEg2TdCMCeiTSd9hh2HrEr6uYJfPVuwur1s43 PROTOKIT_SEQUENCER_PUBLIC_KEY=B62qizW6aroTxQorJz4ywVNZom4jA6W4QPPCK3wLeyhnJHtVStUNniL PROTOKIT_SETTLEMENT_CONTRACT_PRIVATE_KEY=EKErS9gYHZNawqKuwfMiwYYJtNptCrvca491QEvB3tz8sFsS5w66 @@ -84,7 +91,7 @@ PROTOKIT_MINA_BRIDGE_CONTRACT_PUBLIC_KEY=B62qn8XRkWcaBvv6F7kvarKs4cViaKRMbTUHT8F # lightnet only MINA_ACCOUNT_MANAGER_HOST=http://lightnet -MINA_ACCOUNT_MANAGER_PORT=8084 +MINA_ACCOUNT_MANAGER_PORT=8181 MINA_EXPLORER_PORT=3001 TEST_ACCOUNT_1_PRIVATE_KEY=EKF5p3wQTFd4tRBiGicRf93yXK82bcRryokC1qoazRM6wq6gMzWJ @@ -101,4 +108,4 @@ OPEN_TELEMETRY_METRICS_HOST=0.0.0.0 OPEN_TELEMETRY_METRICS_SCRAPING_FREQUENCY=10 GF_SECURITY_ADMIN_USER=admin -GF_SECURITY_ADMIN_PASSWORD=grafana \ No newline at end of file +GF_SECURITY_ADMIN_PASSWORD=grafana diff --git a/packages/chain/src/core/environments/sovereign/chain.config.ts b/packages/chain/src/core/environments/sovereign/chain.config.ts index aa71783..d502385 100644 --- a/packages/chain/src/core/environments/sovereign/chain.config.ts +++ b/packages/chain/src/core/environments/sovereign/chain.config.ts @@ -38,11 +38,18 @@ export default async (args: Arguments): Promise => { ...DefaultConfigs.core({ settlementEnabled, preset: "sovereign" }), ...DefaultConfigs.sequencerIndexer(), //...DefaultConfigs.metrics({ preset: "sovereign" }), - ...DefaultConfigs.redisTaskQueue({ preset: "sovereign" }), + ...DefaultConfigs.redisTaskQueue({ + preset: "sovereign", + overrides: { + redisDb: 1, + }, + }), ...DefaultConfigs.prismaRedisDatabase({ preset: "sovereign", overrides: { - pruneOnStartup: args.pruneOnStartup, + pruneOnStartup: + args.pruneOnStartup || + Boolean(process.env.PROTOKIT_PRUNE_ON_STARTUP ?? "false"), }, }), }, diff --git a/packages/chain/src/core/environments/sovereign/scripts.env b/packages/chain/src/core/environments/sovereign/scripts.env new file mode 100644 index 0000000..3d4c45e --- /dev/null +++ b/packages/chain/src/core/environments/sovereign/scripts.env @@ -0,0 +1,40 @@ +PROTOKIT_PRUNE_ON_STARTUP=false +PROTOKIT_LOG_LEVEL=INFO + +PROTOKIT_PROOFS_ENABLED=false + +PROTOKIT_SETTLEMENT_ENABLED=true + +PROTOKIT_BLOCK_ARGUMENT_BATCH_SIZE=40 +PROTOKIT_STATE_TRANSITION_BATCH_SIZE=25 + +FORCE_COLOR=3 +TS_NODE_TRANSPILE_ONLY=true +PROTOKIT_ENV_FOLDER=sovereign + +# mina endpoints +MINA_NETWORK=lightnet +MINA_NODE_GRAPHQL_HOST=http://localhost +MINA_NODE_GRAPHQL_PORT=8083 +MINA_ARCHIVE_GRAPHQL_HOST=http://localhost +MINA_ARCHIVE_GRAPHQL_PORT=8085 + +PROTOKIT_TRANSACTION_FEE_RECIPIENT_PRIVATE_KEY=EKEssvj33MMBCg2tcybTzL32nTKbbwFHm6yUxd3JassdhL3J5aT8 +PROTOKIT_TRANSACTION_FEE_RECIPIENT_PUBLIC_KEY=B62qk4sNnzZqqjHp8YQXZUV3dBpnjiNieJVnsuh7mD2bMJ9PdbskH5H + +PROTOKIT_SEQUENCER_PRIVATE_KEY=EKEdKhgUHMuDvwWJEg2TdCMCeiTSd9hh2HrEr6uYJfPVuwur1s43 +PROTOKIT_SEQUENCER_PUBLIC_KEY=B62qizW6aroTxQorJz4ywVNZom4jA6W4QPPCK3wLeyhnJHtVStUNniL +PROTOKIT_SETTLEMENT_CONTRACT_PRIVATE_KEY=EKErS9gYHZNawqKuwfMiwYYJtNptCrvca491QEvB3tz8sFsS5w66 +PROTOKIT_SETTLEMENT_CONTRACT_PUBLIC_KEY=B62qjKhzrvDgTPXCp34ozmpFSx4sC9owZe6eDzhdGPdoiUbGPmBkHTt +PROTOKIT_DISPATCHER_CONTRACT_PRIVATE_KEY=EKF9Ei5G9PeB5ULMh9R6P5LfWX2gs15XxPNsect1pbcbMY9vs6v7 +PROTOKIT_DISPATCHER_CONTRACT_PUBLIC_KEY=B62qmAzUJ1jqcsEf2V3K1k2Ec4MLsEKnodEvvJ5uweTFSLYEUALe1zs +PROTOKIT_MINA_BRIDGE_CONTRACT_PRIVATE_KEY=EKFKTGqWU2egLKhMgoxX8mQ21zXSE1RZYkY82mmK9F3BxdSA7E5M +PROTOKIT_MINA_BRIDGE_CONTRACT_PUBLIC_KEY=B62qn8XRkWcaBvv6F7kvarKs4cViaKRMbTUHT8FrDXLnvxuV6n7CHsN + +# lightnet only +MINA_ACCOUNT_MANAGER_HOST=http://localhost +MINA_ACCOUNT_MANAGER_PORT=8084 +MINA_EXPLORER_PORT=3001 + +TEST_ACCOUNT_1_PRIVATE_KEY=EKF5p3wQTFd4tRBiGicRf93yXK82bcRryokC1qoazRM6wq6gMzWJ +TEST_ACCOUNT_1_PUBLIC_KEY=B62qkVfEwyfkm5yucHEqrRjxbyx98pgdWz82pHv7LYq9Qigs812iWZ8 diff --git a/packages/chain/src/core/environments/sovereign/worker.config.ts b/packages/chain/src/core/environments/sovereign/worker.config.ts index 8bfa2e1..9aaf4b2 100644 --- a/packages/chain/src/core/environments/sovereign/worker.config.ts +++ b/packages/chain/src/core/environments/sovereign/worker.config.ts @@ -5,16 +5,51 @@ import { AppChain, LocalTaskWorkerModule, VanillaTaskWorkerModules, + SettlementProvingTask, + SettlementCompileTask, + WorkerRegistrationTask, } from "@proto-kit/sequencer"; +import { BullQueue } from "@proto-kit/deployment"; import runtime from "../../../runtime"; import * as protocol from "../../../protocol"; import { Arguments } from "../../../start"; -import { log, Startable } from "@proto-kit/common"; -import { DefaultConfigs, DefaultModules } from "@proto-kit/stack"; +import { ModulesConfig, Startable } from "@proto-kit/common"; +import { DefaultConfigs } from "@proto-kit/stack"; const settlementEnabled = process.env.PROTOKIT_SETTLEMENT_ENABLED! === "true"; +const variants = { + default: VanillaTaskWorkerModules.allTasks(), + l2: VanillaTaskWorkerModules.withoutSettlement(), + l1: { + SettlementProvingTask, + SettlementCompileTask, + WorkerRegistrationTask, + }, +}; + +const variantConfigs = { + default: VanillaTaskWorkerModules.defaultConfig(), + l2: VanillaTaskWorkerModules.defaultConfig(), + l1: { + SettlementProvingTask: {}, + SettlementCompileTask: {}, + WorkerRegistrationTask: {}, + } satisfies ModulesConfig<(typeof variants)["l1"]>, +}; + +const variant = process.env.PROTOKIT_WORKER_VARIANT ?? "default"; + +function validateVariant( + variant: string +): asserts variant is keyof typeof variants { + if (!(variant in variants)) { + throw new Error(`Worker variant ${variant} not found`); + } +} +validateVariant(variant); + const appChain = AppChain.from({ Runtime: Runtime.from(runtime.modules), Protocol: Protocol.from({ @@ -22,14 +57,8 @@ const appChain = AppChain.from({ ...(settlementEnabled ? protocol.settlementModules : {}), }), Sequencer: Sequencer.from({ - ...DefaultModules.worker(), - ...(!settlementEnabled - ? { - LocalTaskWorkerModule: LocalTaskWorkerModule.from( - VanillaTaskWorkerModules.withoutSettlement() - ), - } - : {}), + TaskQueue: BullQueue, + LocalTaskWorkerModule: LocalTaskWorkerModule.from(variants[variant]), }), }); @@ -40,15 +69,14 @@ export default async (args: Arguments): Promise => { ...protocol.config, ...(settlementEnabled ? protocol.settlementModulesConfig : {}), }, - Sequencer: DefaultConfigs.worker({ - preset: "sovereign", - overrides: { - redisDb: 1, - }, - }), + Sequencer: { + ...DefaultConfigs.redisTaskQueue({ + preset: "sovereign", + overrides: { redisDb: 1 }, + }), + LocalTaskWorkerModule: variantConfigs[variant], + }, }); - log.setLevel("DEBUG"); - return appChain; }; diff --git a/packages/chain/tsconfig.json b/packages/chain/tsconfig.json index 8d4d3bd..a7cbc25 100644 --- a/packages/chain/tsconfig.json +++ b/packages/chain/tsconfig.json @@ -24,6 +24,7 @@ "exclude": ["jest.config.cjs"], "ts-node": { "experimentalResolver": true, - "esm": true + "esm": true, + "transpileOnly": true, } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7eb2f44..289e2c9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: dotenv-cli: specifier: ^7.4.2 version: 7.4.4 + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@20.19.24)(typescript@5.4.5) tslib: specifier: ^2.7.0 version: 2.8.1 @@ -255,7 +258,7 @@ importers: specifier: ^29.6.1 version: 29.7.0 '@prisma/client': - specifier: '5.18' + specifier: ^5.18.0 version: 5.18.0(prisma@5.22.0) '@types/jest': specifier: ^29.5.7 @@ -320,9 +323,6 @@ importers: ts-jest: specifier: ^29.1.1 version: 29.4.5(@babel/core@7.28.5)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.5))(jest-util@29.7.0)(jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@5.4.5)))(typescript@5.4.5) - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@types/node@20.19.24)(typescript@5.4.5) tsconfig: specifier: workspace:* version: link:../tsconfig @@ -346,7 +346,7 @@ importers: devDependencies: '@vercel/style-guide': specifier: ^5.0.0 - version: 5.2.0(@next/eslint-plugin-next@14.0.1)(eslint@8.57.1)(jest@29.7.0)(prettier@3.6.2)(typescript@4.9.5) + version: 5.2.0(@next/eslint-plugin-next@14.0.1)(eslint@8.57.1)(jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)))(prettier@3.6.2)(typescript@4.9.5) eslint-config-turbo: specifier: ^1.10.12 version: 1.13.4(eslint@8.57.1) @@ -2398,15 +2398,16 @@ packages: glob@10.4.5: resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true glob@7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} - deprecated: Glob versions prior to v9 are no longer supported + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me globals@13.24.0: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} @@ -3094,6 +3095,7 @@ packages: next@14.0.1: resolution: {integrity: sha512-s4YaLpE4b0gmb3ggtmpmV+wt+lPRuGtANzojMQ2+gmBpgX9w5fTbjsy6dXByBuENsdCX5pukZH/GxdFgO62+pA==} engines: {node: '>=18.17.0'} + deprecated: This version has a security vulnerability. Please upgrade to a patched version. See https://nextjs.org/blog/security-update-2025-12-11 for more details. hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 @@ -4542,6 +4544,42 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5))': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.19.24 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.8 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node + optional: true + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@20.19.24)(typescript@5.4.5))': dependencies: '@jest/console': 29.7.0 @@ -5467,7 +5505,7 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true - '@vercel/style-guide@5.2.0(@next/eslint-plugin-next@14.0.1)(eslint@8.57.1)(jest@29.7.0)(prettier@3.6.2)(typescript@4.9.5)': + '@vercel/style-guide@5.2.0(@next/eslint-plugin-next@14.0.1)(eslint@8.57.1)(jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)))(prettier@3.6.2)(typescript@4.9.5)': dependencies: '@babel/core': 7.28.5 '@babel/eslint-parser': 7.28.5(@babel/core@7.28.5)(eslint@8.57.1) @@ -5479,9 +5517,9 @@ snapshots: eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.1) eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) eslint-plugin-import: 2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) - eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0)(typescript@4.9.5) + eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)))(typescript@4.9.5) eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1) - eslint-plugin-playwright: 0.16.0(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0)(typescript@4.9.5))(eslint@8.57.1) + eslint-plugin-playwright: 0.16.0(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)))(typescript@4.9.5))(eslint@8.57.1) eslint-plugin-react: 7.37.5(eslint@8.57.1) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.1) eslint-plugin-testing-library: 6.5.0(eslint@8.57.1)(typescript@4.9.5) @@ -5938,6 +5976,22 @@ snapshots: safe-buffer: 5.2.1 sha.js: 2.4.12 + create-jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + optional: true + create-jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@5.4.5)): dependencies: '@jest/types': 29.6.3 @@ -6375,13 +6429,13 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0)(typescript@4.9.5): + eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)))(typescript@4.9.5): dependencies: '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@4.9.5) eslint: 8.57.1 optionalDependencies: '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5) - jest: 29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@5.4.5)) + jest: 29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)) transitivePeerDependencies: - supports-color - typescript @@ -6405,11 +6459,11 @@ snapshots: safe-regex-test: 1.1.0 string.prototype.includes: 2.0.1 - eslint-plugin-playwright@0.16.0(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0)(typescript@4.9.5))(eslint@8.57.1): + eslint-plugin-playwright@0.16.0(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)))(typescript@4.9.5))(eslint@8.57.1): dependencies: eslint: 8.57.1 optionalDependencies: - eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0)(typescript@4.9.5) + eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(typescript@4.9.5))(eslint@8.57.1)(jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)))(typescript@4.9.5) eslint-plugin-react-hooks@4.6.2(eslint@8.57.1): dependencies: @@ -7121,6 +7175,26 @@ snapshots: - babel-plugin-macros - supports-color + jest-cli@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)) + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + chalk: 4.1.2 + create-jest: 29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)) + exit: 0.1.2 + import-local: 3.2.0 + jest-config: 29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + optional: true + jest-cli@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@5.4.5)): dependencies: '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.19.24)(typescript@5.4.5)) @@ -7140,6 +7214,38 @@ snapshots: - supports-color - ts-node + jest-config@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)): + dependencies: + '@babel/core': 7.28.5 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.28.5) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.8 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 20.19.24 + ts-node: 10.9.2(@types/node@20.19.24)(typescript@4.9.5) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + optional: true + jest-config@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@5.4.5)): dependencies: '@babel/core': 7.28.5 @@ -7388,6 +7494,19 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 + jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)) + '@jest/types': 29.6.3 + import-local: 3.2.0 + jest-cli: 29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5)) + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + optional: true + jest@29.7.0(@types/node@20.19.24)(ts-node@10.9.2(@types/node@20.19.24)(typescript@5.4.5)): dependencies: '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@20.19.24)(typescript@5.4.5)) @@ -8472,6 +8591,25 @@ snapshots: '@ts-morph/common': 0.24.0 code-block-writer: 13.0.3 + ts-node@10.9.2(@types/node@20.19.24)(typescript@4.9.5): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.19.24 + acorn: 8.15.0 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.9.5 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optional: true + ts-node@10.9.2(@types/node@20.19.24)(typescript@5.4.5): dependencies: '@cspotcode/source-map-support': 0.8.1