-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Paima Tasks
Generated on 2025-08-04
In Progress (13)
-
Midnight: Block Height Issue (PAI-88)
🐛 Bug
Indexer crash because of buffer{"timestamp":"2025-06-27T19:41:54.566398+00:00[Etc/UTC]","level":"ERROR","target":"indexer_standalone","file":"indexer-standalone/src/main.rs","line":151,"message":"chain-indexer exited with ERROR","kvs":{"backtrace":"disabled backtrace","error":"task 58 panicked with message \"assertion failed: node_block_height >= block.height\””} -
Update to Deno 2.4.2 (PAI-69)
📁 Paima Engine Core | 🚀 Improvement | 👤 Assignee: 8db5d885-a7cd-4317-b236-3089e0ec54f8 - There are some type errors
-
Create Midnight Contract Infrastructure (PAI-60)
📁 Paima Engine Core | ✨ Feature
-
Update Nonces (PAI-56)
📁 Paima Engine Core | ✨ Feature | 👤 Assignee: 8db5d885-a7cd-4317-b236-3089e0ec54f8
Batch Submitted Game Input Nonces
Paima Funnel takes the batched transaction, separates out the
submittedData, and potentially performs two steps of computation for each:- Timestamp checking
- Nonce generation
In timestamp checking, the
millisecondTimestampis converted into seconds and checked whether it is within 24 hours of thetimestampof the block that the batched transaction was included in. In other words, all signed game inputs inside of batch transactions have a 24 hour "validity period". If the difference between the two timestamps is greater than 24 hours, then throw away the submittedData as it is deemed invalid. (As such, it is important for clients to honestly submit the time when signing in order to ensure the game input is accepted.)If timestamp checking succeeds, then the batch submitted game inputs have a nonce generated by Paima Funnel which is a hash of the:
[millisecondTimestamp] + [userAddress] + [game input]Directly Submitted Game Input Nonces
Directly submitted (non-batched) game inputs will be given a nonce by Paima Funnel which is a hash of the:
[blockHeight] + [userAddress] + [game input]Where is this
packages/node-sdk/sm/evm/rpc/paima-l2.tsCheck for
input.noncefield.Check replay protection docs
How to test
Write to contract or write to batcher. Try a repetition to see that is does not pass the second attempt
-
System endpoints must have limits & pagination (PAI-42)
📁 Paima Engine Core | ✨ Feature 🚀 Improvement | 👤 Assignee: 8db5d885-a7cd-4317-b236-3089e0ec54f8
We can start by a simply adding a optional page, starting at 1. And limit to 20 by default
Explorer must be updated to continue working -
Midnight: Block Height Issue (PAI-88)
🐛 Bug
Indexer crash because of buffer{"timestamp":"2025-06-27T19:41:54.566398+00:00[Etc/UTC]","level":"ERROR","target":"indexer_standalone","file":"indexer-standalone/src/main.rs","line":151,"message":"chain-indexer exited with ERROR","kvs":{"backtrace":"disabled backtrace","error":"task 58 panicked with message \"assertion failed: node_block_height >= block.height\””} -
Update to Deno 2.4.2 (PAI-69)
📁 Paima Engine Core | 🚀 Improvement | 👤 Assignee: 8db5d885-a7cd-4317-b236-3089e0ec54f8 - There are some type errors
-
Create Midnight Contract Infrastructure (PAI-60)
📁 Paima Engine Core | ✨ Feature
-
Update Nonces (PAI-56)
📁 Paima Engine Core | ✨ Feature | 👤 Assignee: 8db5d885-a7cd-4317-b236-3089e0ec54f8
Batch Submitted Game Input Nonces
Paima Funnel takes the batched transaction, separates out the
submittedData, and potentially performs two steps of computation for each:- Timestamp checking
- Nonce generation
In timestamp checking, the
millisecondTimestampis converted into seconds and checked whether it is within 24 hours of thetimestampof the block that the batched transaction was included in. In other words, all signed game inputs inside of batch transactions have a 24 hour "validity period". If the difference between the two timestamps is greater than 24 hours, then throw away the submittedData as it is deemed invalid. (As such, it is important for clients to honestly submit the time when signing in order to ensure the game input is accepted.)If timestamp checking succeeds, then the batch submitted game inputs have a nonce generated by Paima Funnel which is a hash of the:
[millisecondTimestamp] + [userAddress] + [game input]Directly Submitted Game Input Nonces
Directly submitted (non-batched) game inputs will be given a nonce by Paima Funnel which is a hash of the:
[blockHeight] + [userAddress] + [game input]Where is this
packages/node-sdk/sm/evm/rpc/paima-l2.tsCheck for
input.noncefield.Check replay protection docs
How to test
Write to contract or write to batcher. Try a repetition to see that is does not pass the second attempt
-
System endpoints must have limits & pagination (PAI-42)
📁 Paima Engine Core | ✨ Feature 🚀 Improvement | 👤 Assignee: 8db5d885-a7cd-4317-b236-3089e0ec54f8
We can start by a simply adding a optional page, starting at 1. And limit to 20 by default
Explorer must be updated to continue working -
Create sample project. (PAI-29)
📁 Sample Project | ✨ Feature
This should be "outside" paima-engine and import the @paima/*This might require to publish the packages for deno
-
Clean up endpoints (PAI-28)
📁 Paima Engine Core | 🚀 Improvement | 👤 Assignee: 8db5d885-a7cd-4317-b236-3089e0ec54f8
-
Make endpoints node endpoints opt-in in production.
-
Safely expose user defined tables
-
Add endpoint to list user defined tables
-
Add endpoint to list primitives tables
- Add pagination and limits for all endpoints that return more that one row
Run with this flags:
PAIMA_E2E_LOG_DEBUG=1 PAIMA_E2E_PAUSE_TIME=10000 deno task -f @example/node testRun the explorer in parallel:
deno task -f @paimaexample/explorer dev
-
-
Demo App: Midnight <- -> EVM w/Paima Engine (PAI-16)
📁 Sample Project | ✨ Feature
Notes: No transactions two way (not possible from only metamask)
Two way demo -> with two wallets.
Todo (32)
-
Midnight: Stuck Unkillable Indexer (PAI-85)
🐛 Bug - Indexer becomes unkillable after SIGINT caused by sqlite crash -
Add Pub/Sub MQTT (PAI-84)
🚀 Improvement ✨ Feature -
Frontend issues (PAI-82)
📁 Sample Project | 🐛 Bug ✨ Feature
-
Add script to check dependencies (deno/node/forge)
-
Viem cannot link from @paimaexample/concise
Uncaught SyntaxError: The requested module '/@fs/Users/edwardalvarado/paima-sample/node_modules/.vite/deps/viem.js?v=03f2d257' does not provide an export named 'privateKeyToAccount' (at c20166c16b25e49e88ff55d6cc25071c46cbb54a2eec1884b340a04e6ceee450:7:10) -
Launch Documentation. We cannot run scripts through tasks.
-
Launch Explorer. We cannot run scripts
vuethrought task. -
Some clean script references not available
-
Clean up created files (workarounds for import with { type: text })
-
Add Midnight Contracts & Wallet Connector
Some unknown error with importing 'node:stream/web'✘ [ERROR] Cannot read file: /Users/edwardalvarado/paima-sample/node_modules/.deno/stream-browserify@3.0.0/node_modules/stream-browserify/web
../../node_modules/.deno/fetch-blob@3.2.0/node_modules/fetch-blob/streams.cjs:14:40: 14 │ ...t.assign(globalThis, require('node:stream/web')) ╵ ~~~~~~~~~~~~~~~~~2:09:23 PM [vite] (client) error while updating dependencies:
Error: Build failed with 1 error:
../../node_modules/.deno/fetch-blob@3.2.0/node_modules/fetch-blob/streams.cjs:14:40: ERROR: Cannot read file: /Users/edwardalvarado/paima-sample/node_modules/.deno/stream-browserify@3.0.0/node_modules/stream-browserify/web
at failureErrorWithLog (/Users/edwardalvarado/paima-sample/node_modules/.deno/esbuild@0.25.8/node_modules/esbuild/lib/main.js:1467:15)wasm is not fully supported on vite, so trying to workaround this
NOTE1: Using the polyfill at
node_modules/.deno/fetch-blob@3.2.0/node_modules/fetch-blob/streams.cjsfixes this issue.NOTE2: Importing directly promises instead fixes the issue
import { promises as stat } from "node:fs";instead of:import { promises as fs } from 'node:fs' const { stat } = fs
Fixes the issue
- Update to Midnight Paima Enginve Version
-
-
Crash Database App - PGLite (PAI-81)
📁 Paima Engine Core | 🐛 Bug
This error occurs randomly.RuntimeError: null function or function signature mismatch
Cannot read properties of undefined (reading '_readableState')
xecProtocolRawSync (file:///Users/edwardalvarado/Library/Caches/deno/npm/registry.npmjs.org/@electric-sql/pglite/0.3.6/dist/index.js:3:227730) at ue.execProtocolRaw (file:///Users/edwardalvarado/Library/Caches/deno/npm/registry.npmjs.org/@electric-sql/p -
Bump pglite version (breaking changes after 0.3.3) (PAI-80)
📁 Paima Engine Core | 🚀 Improvement
-
Implement Paima Level "wait for recipe" (PAI-74)
📁 Paima Engine Core | ✨ Feature
-
Yaci Devkit: Linux error: Text file busy (os error 26) (PAI-68)
📁 Paima Engine Core | 🐛 Bug
Update:
Yaci devkit was making the error happen. We haven't located the issue.
But "worked around" it with DISABLE_LINUX_YACI to not launch yacidev kit in the CICD.
We don't have any cardano e2e test at the time, so test pass.Original Message:
I wanted to enable github actions CICD testing in the paime-engine repo.
So we have a Docker Imageubuntu x86-64that launches and runs the e2e tests, and it works locally on MacOS - looks good enough to run on a github runner.
But then an unexpected errorerror: Text file busy (os error 26)happens in the github action. (ETXTBSY)I tried to move some things around to pinpoint the error, but the error moved around.
It was not clear what was failing - and it's not easy to debug an action. Ah running a emulated linux in Mac, it's still not easy (or possible without paying?)
So I un-dusted a old linux machine, and voilá - the same error.
Now it looks easier to find the error, but it has a very strange behaviour - always happens - but can break different processes.Now running smaller parts, I find a strange behaviour. I cannot know if this is the problem, but might give some hints:
Mydeno.json{ ... tasks: { ... "dolos:fill-template": "deno run -A ./fill-template.ts" ... } ... }The command
> deno task dolos:fill-template throws error: Text file busy (os error 26)There is a console log on the very top, but it does not print
but running> deno run -A ./fill-template.ts works as expected (shows some console.logs to debug)I'm not sure if this is the problem, but only seams to happen when this command is running, that launches a cardano node (that is required for the dolos command)
> deno run -A --node-modules-dir npm:@bloxbean/yaci-devkit upit also happens if yaci is launched with npx instead of deno
-
Manual Patches (
Hardhat@utxorpc/sdk)(PAI-66)📁 Paima Engine Core | 🐛 Bug ✨ Feature
(This task is duplicated)Creating to leave the patch:
comment ./node_modules/.deno/hardhat@3.0.0-next.20/node_modules/hardhat/dist/src/internal/builtin-plugins/solidity/build-system/compiler/compiler.js +49 // await stdoutFileHandle.close(); comment ./node_modules/.deno/@nomicfoundation+hardhat-utils@3.0.0-next.20/node_modules/@nomicfoundation/hardhat-utils/dist/src/fs.js +209 // await fileHandle?.close(); comment ./node_modules/.deno/@nomicfoundation+hardhat-utils@3.0.0-next.20/node_modules/@nomicfoundation/hardhat-utils/dist/src/fs.js +275 // await fileHandle?.close(); patch ./node_modules/.deno/@utxorpc+sdk@0.6.7/node_modules/@utxorpc/sdk/lib/node/index.d.ts +54 < fetchHistory(p: ChainPoint, maxItems?: number): Promise<cardano.Block>; > fetchHistory(p: ChainPoint | undefined, maxItems?: number): Promise<cardano.Block>; patch ./node_modules/.deno/@utxorpc+sdk@0.6.7/node_modules/@utxorpc/sdk/lib/node/index.mjs:130 < startToken: new sync.BlockRef({ > startToken: !p ? undefined : new sync.BlockRef({
-
Remove string from lock mutex (PAI-63)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement ✨ Feature - Better use otel Spans? to figure out what trace is running
-
Finish evm basic primitive processors (PAI-46)
📁 Paima Engine Core | 🚀 Improvement
-
Make Explorer Responsive & Update UI (PAI-40)
📁 Explorer | ✨ Feature 🚀 Improvement
- Move batcher into icon -> popup
- Rename Primitive Data
- Rename State Machine Tables
- Add chain info details into Chains, as hover
- Show the contracts the Primitive Data are following
- Add input search bar to search by hash (?) This might be a harder issue
-
Midnight: Stuck Unkillable Indexer (PAI-85)
🐛 Bug - Indexer becomes unkillable after SIGINT caused by sqlite crash -
Add Pub/Sub MQTT (PAI-84)
🚀 Improvement ✨ Feature -
Frontend issues (PAI-82)
📁 Sample Project | 🐛 Bug ✨ Feature
-
Add script to check dependencies (deno/node/forge)
-
Viem cannot link from @paimaexample/concise
Uncaught SyntaxError: The requested module '/@fs/Users/edwardalvarado/paima-sample/node_modules/.vite/deps/viem.js?v=03f2d257' does not provide an export named 'privateKeyToAccount' (at c20166c16b25e49e88ff55d6cc25071c46cbb54a2eec1884b340a04e6ceee450:7:10) -
Launch Documentation. We cannot run scripts through tasks.
-
Launch Explorer. We cannot run scripts
vuethrought task. -
Some clean script references not available
-
Clean up created files (workarounds for import with { type: text })
-
Add Midnight Contracts & Wallet Connector
Some unknown error with importing 'node:stream/web'✘ [ERROR] Cannot read file: /Users/edwardalvarado/paima-sample/node_modules/.deno/stream-browserify@3.0.0/node_modules/stream-browserify/web
../../node_modules/.deno/fetch-blob@3.2.0/node_modules/fetch-blob/streams.cjs:14:40: 14 │ ...t.assign(globalThis, require('node:stream/web')) ╵ ~~~~~~~~~~~~~~~~~2:09:23 PM [vite] (client) error while updating dependencies:
Error: Build failed with 1 error:
../../node_modules/.deno/fetch-blob@3.2.0/node_modules/fetch-blob/streams.cjs:14:40: ERROR: Cannot read file: /Users/edwardalvarado/paima-sample/node_modules/.deno/stream-browserify@3.0.0/node_modules/stream-browserify/web
at failureErrorWithLog (/Users/edwardalvarado/paima-sample/node_modules/.deno/esbuild@0.25.8/node_modules/esbuild/lib/main.js:1467:15)wasm is not fully supported on vite, so trying to workaround this
NOTE1: Using the polyfill at
node_modules/.deno/fetch-blob@3.2.0/node_modules/fetch-blob/streams.cjsfixes this issue.NOTE2: Importing directly promises instead fixes the issue
import { promises as stat } from "node:fs";instead of:import { promises as fs } from 'node:fs' const { stat } = fs
Fixes the issue
- Update to Midnight Paima Enginve Version
-
-
Crash Database App - PGLite (PAI-81)
📁 Paima Engine Core | 🐛 Bug
This error occurs randomly.RuntimeError: null function or function signature mismatch
Cannot read properties of undefined (reading '_readableState')
xecProtocolRawSync (file:///Users/edwardalvarado/Library/Caches/deno/npm/registry.npmjs.org/@electric-sql/pglite/0.3.6/dist/index.js:3:227730) at ue.execProtocolRaw (file:///Users/edwardalvarado/Library/Caches/deno/npm/registry.npmjs.org/@electric-sql/p -
Bump pglite version (breaking changes after 0.3.3) (PAI-80)
📁 Paima Engine Core | 🚀 Improvement
-
Implement Paima Level "wait for recipe" (PAI-74)
📁 Paima Engine Core | ✨ Feature
-
Yaci Devkit: Linux error: Text file busy (os error 26) (PAI-68)
📁 Paima Engine Core | 🐛 Bug
Update:
Yaci devkit was making the error happen. We haven't located the issue.
But "worked around" it with DISABLE_LINUX_YACI to not launch yacidev kit in the CICD.
We don't have any cardano e2e test at the time, so test pass.Original Message:
I wanted to enable github actions CICD testing in the paime-engine repo.
So we have a Docker Imageubuntu x86-64that launches and runs the e2e tests, and it works locally on MacOS - looks good enough to run on a github runner.
But then an unexpected errorerror: Text file busy (os error 26)happens in the github action. (ETXTBSY)I tried to move some things around to pinpoint the error, but the error moved around.
It was not clear what was failing - and it's not easy to debug an action. Ah running a emulated linux in Mac, it's still not easy (or possible without paying?)
So I un-dusted a old linux machine, and voilá - the same error.
Now it looks easier to find the error, but it has a very strange behaviour - always happens - but can break different processes.Now running smaller parts, I find a strange behaviour. I cannot know if this is the problem, but might give some hints:
Mydeno.json{ ... tasks: { ... "dolos:fill-template": "deno run -A ./fill-template.ts" ... } ... }The command
> deno task dolos:fill-template throws error: Text file busy (os error 26)There is a console log on the very top, but it does not print
but running> deno run -A ./fill-template.ts works as expected (shows some console.logs to debug)I'm not sure if this is the problem, but only seams to happen when this command is running, that launches a cardano node (that is required for the dolos command)
> deno run -A --node-modules-dir npm:@bloxbean/yaci-devkit upit also happens if yaci is launched with npx instead of deno
-
Manual Patches (
Hardhat@utxorpc/sdk)(PAI-66)📁 Paima Engine Core | 🐛 Bug ✨ Feature
(This task is duplicated)Creating to leave the patch:
comment ./node_modules/.deno/hardhat@3.0.0-next.20/node_modules/hardhat/dist/src/internal/builtin-plugins/solidity/build-system/compiler/compiler.js +49 // await stdoutFileHandle.close(); comment ./node_modules/.deno/@nomicfoundation+hardhat-utils@3.0.0-next.20/node_modules/@nomicfoundation/hardhat-utils/dist/src/fs.js +209 // await fileHandle?.close(); comment ./node_modules/.deno/@nomicfoundation+hardhat-utils@3.0.0-next.20/node_modules/@nomicfoundation/hardhat-utils/dist/src/fs.js +275 // await fileHandle?.close(); patch ./node_modules/.deno/@utxorpc+sdk@0.6.7/node_modules/@utxorpc/sdk/lib/node/index.d.ts +54 < fetchHistory(p: ChainPoint, maxItems?: number): Promise<cardano.Block>; > fetchHistory(p: ChainPoint | undefined, maxItems?: number): Promise<cardano.Block>; patch ./node_modules/.deno/@utxorpc+sdk@0.6.7/node_modules/@utxorpc/sdk/lib/node/index.mjs:130 < startToken: new sync.BlockRef({ > startToken: !p ? undefined : new sync.BlockRef({
-
Remove string from lock mutex (PAI-63)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement ✨ Feature - Better use otel Spans? to figure out what trace is running
-
Finish evm basic primitive processors (PAI-46)
📁 Paima Engine Core | 🚀 Improvement
-
Make Explorer Responsive & Update UI (PAI-40)
📁 Explorer | ✨ Feature 🚀 Improvement
- Move batcher into icon -> popup
- Rename Primitive Data
- Rename State Machine Tables
- Add chain info details into Chains, as hover
- Show the contracts the Primitive Data are following
- Add input search bar to search by hash (?) This might be a harder issue
-
Show config - networks - primitives/contracts in Explorer (PAI-39)
📁 Explorer | ✨ Feature - We should be able to see the tracked Contracts and Events in the Explorer
-
Unify Primitive into Unique Definition (PAI-36)
📁 Paima Engine Core | 🚀 Improvement ✨ Feature - We need to allow developers to be able to add new definitions
-
Deno Hardhat (Ignition) 3.0.0+20 Issue (PAI-34)
📁 Paima Engine Core | 🐛 Bug - We had to comment some
file?.close()to get hardhat ignition working -
Deno Crash @ Launching Explorer (PAI-33)
📁 Explorer | 🐛 Bug
Deno has panicked. This is a bug in Deno. Please report this at https://github.com/denoland/deno/issues/new. If you can reliably reproduce this panic, include the reproduction steps and re-run with the RUST_BACKTRACE=1 env var set and include the backtrace in your report. Platform: macos aarch64 Version: 2.4.0+7ale949 Args: ["/Users/username/.deno/bin/deno", "run" ', "-А" :vite"] "--node-modules-dir=auto" , "прт 11:01:44 ERROR explorer: View stack trace at: https://panic.deno.com/v2.4.0+7a1e949c476a3b55d6fb8a1141f74bc96c9da8fb/aarch64-apple-darwin/431sKw67jrBw13wrBws3wrBolkxrBg7znMg76Y thread 'main' panicked at cli/main.rs:426:5: Fatal error in :0: Check failed: heap->isolate() = Isolate::TryGetCurrent). note: run with 'RUST_BACKTRACE=1' environment variable to display a backtrace -
User Documentation (PAI-30)
📁 Sample Project | ✨ Feature - Document how to create / setup a project
-
Clean up types. (PAI-24)
📁 Paima Engine Core | 🚀 Improvement - We can simplify general types specific domain types for e.g., Contract state/events is not needed in the global app state
-
PGLite is not stopped sometimes at shutdown/crash (PAI-23)
📁 Paima Engine Internal DevOps & Quality | 🐛 Bug - Cannot reproduce consistently.
-
Fix issue with yaci devkit osx (rosseta patch) (PAI-22)
📁 Paima Engine Core | ✨ Feature 🐛 Bug
cat /Users/username/.yaci-cli/cardano-node/bin/cardano-node#!/bin/bash echo "${BASH_SOURCE[0]}" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" exec arch -x86_64 "$SCRIPT_DIR/cardano -
Fix dependencies that need manual fixing after deno install --allow scripts (PAI-21)
📁 Paima Engine Core | 🐛 Bug ✨ Feature - We edit manually
fetchHistory(undefined)internal code of some dependency -
Remove "Main" chain, and use ntp time server (PAI-13)
📁 Paima Engine Core | ✨ Feature
I don't think we really have
main chainconcept that much in Paima Engine v2. In practice, we still use EVM, but this won't work if we have a time server. It'd still be good to have some way to connect the block to the main sync protocol, but it should probably be called something more generic like "page" (like we call them in the sync protocols)main_chain_block_hash: Buffer.from(value.blockNumber.toString()),
Done (47)
-
Publish Packages (PAI-76)
📁 Paima Engine Internal DevOps & Quality | ✨ Feature
https://jsr.io/@paimaexampleReference
Publish order (you cannot publish a package that depends on a non-existing - so circular references are not allowed) and some notes on publishin./packages/paima-sdk/utils `deno publish --allow-slow-types` @paimaexample/utils@0.3.0 ./docs/site/deno.json `deno publish` @paimaexample/docs@0.3.0 ./packages/paima-sdk/config/deno.json `deno publish --allow-slow-types` @paimaexample/config@0.3.0 ./packages/paima-sdk/log/deno.json `deno publish --allow-slow-types` @paimaexample/log@0.3.0 # Had to comment @paima/db imports in coroutine to allow publish ./packages/paima-sdk/coroutine/deno.json `deno publish --allow-slow-types @paimaexample/coroutine@0.3.0 ./packages/node-sdk/db/deno.json `deno publish --allow-slow-types` @paimaexample/db@0.3.0 ./packages/paima-sdk/precompile/deno.json `deno publish --allow-slow-types` @paimaexample/precompile@0.3.0 ./packages/paima-sdk/chain-types/deno.json `deno publish --allow-slow-types` @paimaexample/chain-types@0.3.0 ./packages/paima-sdk/concise/deno.json `deno publish --allow-slow-types` @paimaexample/concise@0.3.0 ./packages/node-sdk/sync/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/sync@0.3.0 ./packages/paima-sdk/crypto/deno.json `deno publish --allow-slow-types` @paimaexample/crypto@0.3.0 ./packages/node-sdk/sm/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/sm@0.3.0 # Removed grammar import as it came from example ./packages/node-sdk/runtime/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/runtime@0.3.0 ./packages/node-sdk/batcher/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/batcher@0.3.0 ./packages/chains/evm/contracts/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/evm-contracts@0.3.0 # Some error with react required --no-check ./packages/build-tools/explorer/deno.json `deno publish --allow-slow-types --allow-dirty --no-check` @paimaexample/explorer@0.3.0 # Some error with react required --no-check ./packages/build-tools/tui/deno.json `deno publish --allow-slow-types --allow-dirty --no-check` @paimaexample/tui@0.3.0 ./packages/build-tools/collector/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/collector@0.3.0 ./packages/build-tools/orchestrator/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/orchestrator@0.3.0 -
Update solc version (PAI-70)
📁 Paima Engine Core | 🚀 Improvement - In the docker image we had to patch the current version
-
set up docker build (PAI-67)
-
Hardhat Integration using @paima/evm-contracts (PAI-65)
-
Add E2E test for Midnight where the State Machine Moves when a state is changed in Midnight (PAI-62)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement
-
Midnight Implement ReadPrimitives (PAI-61)
-
Create Midnight Fetcher (readData) (PAI-59)
-
Add Config for Midnight (PAI-58)
-
Add Avail Binaries (PAI-57)
-
Block Hashes (PAI-55)
hash needs to contain a reference to the previous block hash in some waybut I don't think any of this matters so much because:
- Paima has no rollbacks anyway
- Nobody will realistically be checking that transactions are part of a merkle tree in a block, and doing a bunch of hashing and merkle trees just slows down game throughput
// TODO create the hash from the contents (how?) blockHash = `0x${...}` -
Make State Machine Yield Operations (PAI-49)
-
Random Generator (PAI-44)
Add a random generator for the State Machine.block_height: value.blockNumber, ver: 0, main_chain_block_hash: Buffer.from(value.blockNumber.toString()), seed: value.blockNumber.toString(),not convinced we still want "seed"
-
Store BigInts as Strings (PAI-43) - In postgres we don't have a good solution for storing bigints. There are extensions, but they might be a pain to add to pglite
-
Migrate "processing" to schedule events for this block height (instead of calling directly the state-machine). (PAI-41) - This will allow in the future to have parallel processing for the state machine
-
Publish Packages (PAI-76)
📁 Paima Engine Internal DevOps & Quality | ✨ Feature
https://jsr.io/@paimaexampleReference
Publish order (you cannot publish a package that depends on a non-existing - so circular references are not allowed) and some notes on publishin./packages/paima-sdk/utils `deno publish --allow-slow-types` @paimaexample/utils@0.3.0 ./docs/site/deno.json `deno publish` @paimaexample/docs@0.3.0 ./packages/paima-sdk/config/deno.json `deno publish --allow-slow-types` @paimaexample/config@0.3.0 ./packages/paima-sdk/log/deno.json `deno publish --allow-slow-types` @paimaexample/log@0.3.0 # Had to comment @paima/db imports in coroutine to allow publish ./packages/paima-sdk/coroutine/deno.json `deno publish --allow-slow-types @paimaexample/coroutine@0.3.0 ./packages/node-sdk/db/deno.json `deno publish --allow-slow-types` @paimaexample/db@0.3.0 ./packages/paima-sdk/precompile/deno.json `deno publish --allow-slow-types` @paimaexample/precompile@0.3.0 ./packages/paima-sdk/chain-types/deno.json `deno publish --allow-slow-types` @paimaexample/chain-types@0.3.0 ./packages/paima-sdk/concise/deno.json `deno publish --allow-slow-types` @paimaexample/concise@0.3.0 ./packages/node-sdk/sync/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/sync@0.3.0 ./packages/paima-sdk/crypto/deno.json `deno publish --allow-slow-types` @paimaexample/crypto@0.3.0 ./packages/node-sdk/sm/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/sm@0.3.0 # Removed grammar import as it came from example ./packages/node-sdk/runtime/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/runtime@0.3.0 ./packages/node-sdk/batcher/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/batcher@0.3.0 ./packages/chains/evm/contracts/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/evm-contracts@0.3.0 # Some error with react required --no-check ./packages/build-tools/explorer/deno.json `deno publish --allow-slow-types --allow-dirty --no-check` @paimaexample/explorer@0.3.0 # Some error with react required --no-check ./packages/build-tools/tui/deno.json `deno publish --allow-slow-types --allow-dirty --no-check` @paimaexample/tui@0.3.0 ./packages/build-tools/collector/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/collector@0.3.0 ./packages/build-tools/orchestrator/deno.json `deno publish --allow-slow-types --allow-dirty` @paimaexample/orchestrator@0.3.0 -
Update solc version (PAI-70)
📁 Paima Engine Core | 🚀 Improvement - In the docker image we had to patch the current version
-
set up docker build (PAI-67)
-
Hardhat Integration using @paima/evm-contracts (PAI-65)
-
Add E2E test for Midnight where the State Machine Moves when a state is changed in Midnight (PAI-62)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement
-
Midnight Implement ReadPrimitives (PAI-61)
-
Create Midnight Fetcher (readData) (PAI-59)
-
Add Config for Midnight (PAI-58)
-
Add Avail Binaries (PAI-57)
-
Block Hashes (PAI-55)
hash needs to contain a reference to the previous block hash in some waybut I don't think any of this matters so much because:
- Paima has no rollbacks anyway
- Nobody will realistically be checking that transactions are part of a merkle tree in a block, and doing a bunch of hashing and merkle trees just slows down game throughput
// TODO create the hash from the contents (how?) blockHash = `0x${...}` -
Make State Machine Yield Operations (PAI-49)
-
Random Generator (PAI-44)
Add a random generator for the State Machine.block_height: value.blockNumber, ver: 0, main_chain_block_hash: Buffer.from(value.blockNumber.toString()), seed: value.blockNumber.toString(),not convinced we still want "seed"
-
Store BigInts as Strings (PAI-43) - In postgres we don't have a good solution for storing bigints. There are extensions, but they might be a pain to add to pglite
-
Migrate "processing" to schedule events for this block height (instead of calling directly the state-machine). (PAI-41) - This will allow in the future to have parallel processing for the state machine
-
Add scheduled data to explorer (PAI-38) - Explorer should show scheduled data
-
Fix issue where sudo is needed to launch process (PAI-37)
"devkit:kill": "sudo kill -9 $(sudo lsof -t -i:8090) 2>/dev/null || true && sudo kill -9 $(sudo lsof -t -i:10000) 2>/dev/null || true",
-
Implement wallet delegation (PAI-35) - A correct user address alias system is required as well
-
Batcher Verification & Submit (PAI-26)
- Verify Messages in the PaimaL2 event parser.
- Provide some methods for the frontend signing and submitting the request
-
Dynamic orchestrator (PAI-25)
✨ Feature - Orchestrator should be dynamic and based on some configuration object. -
Implement / Check Scheduled Inputs (PAI-19)
-
Basic Explorer (PAI-18)
-
paima rpc infra (for metamask) (PAI-15)
-
implement erc20-transfer transaction (PAI-14)
-
Integrated Contract Deployment (EVM) (PAI-12)
-
Documentation infra (PAI-10) - Add some infra to build markdowns site
-
UI Command: Batcher V2 (PAI-9) - Allow to write to batcher from TUI
-
Batcher (v2) (PAI-8) - Batcher v2 is a state machine, that will do transactions.
-
Add pg_ivm & add to SQLViews to primitives (PAI-7)
👤 Assignee: 36aac980-584f-4b5e-b7f7-acab167d7273 -
Add Midnight Binaries & Process (PAI-6)
-
Connect Primitives "getLogs" (PAI-4)
👤 Assignee: 36aac980-584f-4b5e-b7f7-acab167d7273 -
Connect Basic State Machine (PAI-3)
-
Implement npx Avail (PAI-2)
👤 Assignee: 8db5d885-a7cd-4317-b236-3089e0ec54f8 - Make runnable with npx -
Implement npx Midnight (PAI-1)
👤 Assignee: 8db5d885-a7cd-4317-b236-3089e0ec54f8 - Make midnight runnable with npx
Backlog (41)
-
Move all packages to npm from jsr (PAI-86)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement
-
Shut Down w/Midnight (PAI-83)
📁 Paima Engine Internal DevOps & Quality | 🐛 Bug 🚀 Improvement - Shutting down processes with kill, does not work for docker images (as no macos binary is available for some midnight projects)
-
Bump @utxorpc/sdk (fix should be publish) (PAI-79)
📁 Paima Engine Internal DevOps & Quality | 🐛 Bug - Clean up patch.sh script and related issues
-
Fix for Github Actions stuck at
Check System API Table Data(PAI-78)📁 Paima Engine Internal DevOps & Quality | 🐛 Bug
We implemented a flag: GITHUB_ACTIONS_SHORT_TEST to run less tests.
This error only happens in github actions, we tried to reproduce locally without success.Native
deno task -f @example/node testdeno task -f @example/node testMacOS
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t paima-engine-test-f .github/Dockerfile . DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run paima-engine-test or act --container-architecture linux/amd64Linux
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t paima-engine-test -f .github/Dockerfile . && DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run paima-engine-test -
Improve JSR Publish Metrics (PAI-77)
-
Implement What is Paima Engine Interactive Video (PAI-75)
📁 Paima Engine Internal DevOps & Quality | ✨ Feature
-
Add Avail E2E Test (PAI-73)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement
-
Avail: Contracts, Read Primitives & Process Primitives (PAI-72)
📁 Paima Engine Core | ✨ Feature
-
Avail: Config & Read Data (PAI-71)
📁 Paima Engine Core | ✨ Feature
-
Scheduled blocks and timed block should be sorted by ID before running (PAI-64)
📁 Paima Engine Core | 🚀 Improvement
-
Aviod clearBigInts (PAI-54)
📁 Paima Engine Core | 🚀 Improvement
We shouldn't have to do this. The point of typebox is that we can use Value.Decode and Value.Encode to make sure things are json-safe
If not possible, then move this to paima utils and call from there.
-
Unsafe SQL (PAI-53)
📁 Paima Engine Core | 🚀 Improvement
We have this probable unsafe operation.unsafeQuery = unsafeQuery.replace(":1", unsafeTableName); How can we make this safe?
-
Better Mutex. (PAI-52)
📁 Paima Engine Core | 🚀 Improvement - see
packages/paima-sdk/utils/src/concurrencyfor things you might be able to reuse, or be inspired by. -
Write dyniamic tables for PGTyped (PAI-51)
📁 Paima Engine Core | ✨ Feature
We must run the dynamic table scripts in the user space PGType installation, so they can make queries for IVMs and dynamic tables.Add test to E2E
-
Shutdown Logic (PAI-50)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement
Now we wait for the process to end if they crash.
We should better handle the shutdown sequence.First we need to figure out the problems we have here.
-
Batcher v-next as part of Paima Engine and extendible. (PAI-48)
📁 Paima Engine Core | ✨ Feature
Batcher should be part of the paima-engine, as a endpoint that processes the batches, but user defined - so they can give special behaviour and rules to allow and filterThe PaimaL2 Address is optional.
We need to design this system, to know what is predefined, how it's extended. What part is state-machine, what part is endpoint.
Batcher should use a real database instead of a file system backend.
-
Manage migrations and Paima Engine up scripts, to apply migrations in order. (PAI-47)
📁 Paima Engine Core | 🚀 Improvement
-
Server hangs: If too many http queries are done server gets blocked (PAI-45)
📁 Paima Engine Core | 🐛 Bug
-
Move all packages to npm from jsr (PAI-86)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement
-
Shut Down w/Midnight (PAI-83)
📁 Paima Engine Internal DevOps & Quality | 🐛 Bug 🚀 Improvement - Shutting down processes with kill, does not work for docker images (as no macos binary is available for some midnight projects)
-
Bump @utxorpc/sdk (fix should be publish) (PAI-79)
📁 Paima Engine Internal DevOps & Quality | 🐛 Bug - Clean up patch.sh script and related issues
-
Fix for Github Actions stuck at
Check System API Table Data(PAI-78)📁 Paima Engine Internal DevOps & Quality | 🐛 Bug
We implemented a flag: GITHUB_ACTIONS_SHORT_TEST to run less tests.
This error only happens in github actions, we tried to reproduce locally without success.Native
deno task -f @example/node testdeno task -f @example/node testMacOS
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t paima-engine-test-f .github/Dockerfile . DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run paima-engine-test or act --container-architecture linux/amd64Linux
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t paima-engine-test -f .github/Dockerfile . && DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run paima-engine-test -
Improve JSR Publish Metrics (PAI-77)
-
Implement What is Paima Engine Interactive Video (PAI-75)
📁 Paima Engine Internal DevOps & Quality | ✨ Feature
-
Add Avail E2E Test (PAI-73)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement
-
Avail: Contracts, Read Primitives & Process Primitives (PAI-72)
📁 Paima Engine Core | ✨ Feature
-
Avail: Config & Read Data (PAI-71)
📁 Paima Engine Core | ✨ Feature
-
Scheduled blocks and timed block should be sorted by ID before running (PAI-64)
📁 Paima Engine Core | 🚀 Improvement
-
Aviod clearBigInts (PAI-54)
📁 Paima Engine Core | 🚀 Improvement
We shouldn't have to do this. The point of typebox is that we can use Value.Decode and Value.Encode to make sure things are json-safe
If not possible, then move this to paima utils and call from there.
-
Unsafe SQL (PAI-53)
📁 Paima Engine Core | 🚀 Improvement
We have this probable unsafe operation.unsafeQuery = unsafeQuery.replace(":1", unsafeTableName); How can we make this safe?
-
Better Mutex. (PAI-52)
📁 Paima Engine Core | 🚀 Improvement - see
packages/paima-sdk/utils/src/concurrencyfor things you might be able to reuse, or be inspired by. -
Write dyniamic tables for PGTyped (PAI-51)
📁 Paima Engine Core | ✨ Feature
We must run the dynamic table scripts in the user space PGType installation, so they can make queries for IVMs and dynamic tables.Add test to E2E
-
Shutdown Logic (PAI-50)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement
Now we wait for the process to end if they crash.
We should better handle the shutdown sequence.First we need to figure out the problems we have here.
-
Batcher v-next as part of Paima Engine and extendible. (PAI-48)
📁 Paima Engine Core | ✨ Feature
Batcher should be part of the paima-engine, as a endpoint that processes the batches, but user defined - so they can give special behaviour and rules to allow and filterThe PaimaL2 Address is optional.
We need to design this system, to know what is predefined, how it's extended. What part is state-machine, what part is endpoint.
Batcher should use a real database instead of a file system backend.
-
Manage migrations and Paima Engine up scripts, to apply migrations in order. (PAI-47)
📁 Paima Engine Core | 🚀 Improvement
-
Server hangs: If too many http queries are done server gets blocked (PAI-45)
📁 Paima Engine Core | 🐛 Bug
-
PGLite Crash (PAI-32)
📁 Paima Engine Core | 🐛 Bug
When a lot events are processed quickly we get a low level PGLite Crash2025-06-27T18:55:43.612Z ERROR paima-db: Error: Dynamic linking error: cannot resolve symbol setTempRet0 at e.<computed> (file:///Users/username/paima-engine/node_modules/.deno/@electric-sql+pglite@0.3.3/node_modules/@electric-sql/pglite/dist/index.js:1:89333) at <anonymous> (wasm://wasm/0009251e:1:109038) at invoke_ii (file:///Users/username/paima-engine/node_modules/.deno/@electric-sql+pglite@0.3.3/node_modules/@electric-sql/pglite/dist/index.js:3:238292) at <anonymous> (wasm://wasm/02190c76:1:922777) at <anonymous> (wasm://wasm/02190c76:1:2189246) at <anonymous> (wasm://wasm/02190c76:1:2690420) at <anonymous> (wasm://wasm/02190c76:1:3728154) at <anonymous> (wasm://wasm/02190c76:1:987555) at <anonymous> (wasm://wasm/02190c76:1:3315760) at <anonymous> (wasm://wasm/02190c76:1:3316014)
-
Production Deployment (PAI-31)
📁 Paima Engine Core | ✨ Feature
Allow to do a production deployment.- Contract deployment
- Otel infra
- "Real" PGSql Database
- Disable MUTEX LOCK
- Batcher deployment ?
-
Sync Cardano (PAI-27)
📁 Paima Engine Core | ✨ Feature
Read Data
Read Primitives
Deploy Contracts
Process Primitives -
Test & Fix with real OTel Stack. Clean up Orchestrator "sources" (PAI-20)
📁 Paima Engine Internal DevOps & Quality | ✨ Feature 🚀 Improvement
docker run --name lgtm -p 3000:3000 -p 4317:4317 -p 4318:4318 --rm -ti \ -v "$PWD"/lgtm/grafana:/data/grafana \ -v "$PWD"/lgtm/prometheus:/data/prometheus \ -v "$PWD"/lgtm/loki:/data/loki \ -e GF_PATHS_DATA=/data/grafana \ docker.io/grafana/otel-lgtm:0.8.1example from https://docs.deno.com/runtime/fundamentals/open_telemetry/
We use the orchestrator/logs for both the e2e testing though the STDOUT directly, and for DEVELOPMENT thought the Logs Viewer.
- There are some flags as
if (source === "stderr" && currentOutputs.includes("stderr")) {we need to remove or correctly route the messages.
- There are some flags as
-
Implement missing RPC (eip1193.ts) endpoints (PAI-17)
📁 Paima Engine Core | ✨ Feature
Also check the input schema// Usign viem public client. e.g., rpcClient.getBlockNumber(); // jsonrpc: Type.Literal("2.0"), // method: Type.String(), // params: Type.Array(Type.Any()),
Aknowledged (4)
-
Non-Configurable Nonce and Contract Address Prediction (PAI-89)
🏷️ Midnight 🚀 Improvement - When deploying a contract, the bounce flag is not configurable, which prevents us from predicting the contract’s address ahead of time. This introduces some complexity for frontend applications, where having a hardcoded contract address would be more convenient than having to capture the address dynamically after each deployment. -
Midnight: Indexer/Node Crash UnknownBlock (PAI-87)
🐛 BugClient error: UnknownBlock: State already discardedThis happens when the node runs for a while and its not set up as an archive
-
Non-Configurable Nonce and Contract Address Prediction (PAI-89)
🏷️ Midnight 🚀 Improvement - When deploying a contract, the bounce flag is not configurable, which prevents us from predicting the contract’s address ahead of time. This introduces some complexity for frontend applications, where having a hardcoded contract address would be more convenient than having to capture the address dynamically after each deployment. -
Midnight: Indexer/Node Crash UnknownBlock (PAI-87)
🐛 BugClient error: UnknownBlock: State already discardedThis happens when the node runs for a while and its not set up as an archive