You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 millisecondTimestamp is converted into seconds and checked whether it is within 24 hours of the timestamp of 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:
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\””}
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 millisecondTimestamp is converted into seconds and checked whether it is within 24 hours of the timestamp of 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:
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
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 vue throught 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'
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)
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 Image ubuntu x86-64 that 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 error error: 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:
My deno.json
{ ... tasks: { ... "dolos:fill-template": "deno run -A ./fill-template.ts" ... } ... }
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 up
it also happens if yaci is launched with npx instead of deno
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 vue throught 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'
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)
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 Image ubuntu x86-64 that 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 error error: 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:
My deno.json
{ ... tasks: { ... "dolos:fill-template": "deno run -A ./fill-template.ts" ... } ... }
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 up
it also happens if yaci is launched with npx instead of deno
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
📁 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)
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 chain concept 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)
Block Hashes (PAI-55)
hash needs to contain a reference to the previous block hash in some way
but 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${...}`
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
Block Hashes (PAI-55)
hash needs to contain a reference to the previous block hash in some way
but 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${...}`
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)
📁 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 test
MacOS
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/amd64
📁 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.
📁 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 filter
The 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 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 test
MacOS
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/amd64
📁 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.
📁 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 filter
The 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)
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.
Client error: UnknownBlock: State already discarded
This 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.
Paima Tasks
Generated on 2025-08-04
📊 View Linear Dashboard
In Progress (13)
Midnight: Block Height Issue (PAI-88)
🐛 Bug
Indexer crash because of buffer
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: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:
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:
Where is this
Check 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
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: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:
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:
Where is this
Check 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
Run with this flags:
Run the explorer in parallel:
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
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
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
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:Fixes the issue
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')
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 Image
ubuntu 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 error
error: 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:
My
deno.jsonThe command
There is a console log on the very top, but it does not print
but running
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)
it 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:
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
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
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
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
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:Fixes the issue
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')
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 Image
ubuntu 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 error
error: 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:
My
deno.jsonThe command
There is a console log on the very top, but it does not print
but running
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)
it 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:
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
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 workingDeno Crash @ Launching Explorer (PAI-33)
📁 Explorer | 🐛 Bug
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
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 dependencyRemove "Main" chain, and use ntp time server (PAI-13)
📁 Paima Engine Core | ✨ Feature
Done (47)
Publish Packages (PAI-76)
📁 Paima Engine Internal DevOps & Quality | ✨ Feature
https://jsr.io/@paimaexample
Reference
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 way
but I don't think any of this matters so much because:
Make State Machine Yield Operations (PAI-49)
Random Generator (PAI-44)
Add a random generator for the State Machine.
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/@paimaexample
Reference
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 way
but I don't think any of this matters so much because:
Make State Machine Yield Operations (PAI-49)
Random Generator (PAI-44)
Add a random generator for the State Machine.
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)
Implement wallet delegation (PAI-35) - A correct user address alias system is required as well
Batcher Verification & Submit (PAI-26)
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
MacOS
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
Improve JSR Publish Metrics (PAI-77)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement -
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
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.
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 filter
The 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
MacOS
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
Improve JSR Publish Metrics (PAI-77)
📁 Paima Engine Internal DevOps & Quality | 🚀 Improvement -
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
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.
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 filter
The 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 Crash
Production Deployment (PAI-31)
📁 Paima Engine Core | ✨ Feature
Allow to do a production 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
example 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.
if (source === "stderr" && currentOutputs.includes("stderr")) {we need to remove or correctly route the messages.Implement missing RPC (eip1193.ts) endpoints (PAI-17)
📁 Paima Engine Core | ✨ Feature
Also check the input schema
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)
🐛 Bug
This 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)
🐛 Bug
This happens when the node runs for a while and its not set up as an archive