Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use testgen-hs for deserializing ApplyTxErrors #93

Merged
merged 5 commits into from
Nov 29, 2024

Conversation

michalrus
Copy link
Collaborator

@michalrus michalrus commented Nov 27, 2024

Context

Related to #42.

See the video in Slack.

Important Changes Introduced

Now, transaction errors are being deserialized by the Haskell tool, testgen-hs. It's built on Hydra, and kept in a separate repository with binary artifacts.

The errors are processed in a streaming manner through stdin/stdout (very fast) – we do not launch a new process for each request.

But we are able to detect and self-heal when that worker process was killed from the outside (this is also tested in the unit test).

@michalrus michalrus self-assigned this Nov 27, 2024
@michalrus michalrus added this to the v0.0.1 milestone Nov 27, 2024
Copy link

cloudflare-workers-and-pages bot commented Nov 27, 2024

Deploying blockfrost-platform with  Cloudflare Pages  Cloudflare Pages

Latest commit: df8f27d
Status: ✅  Deploy successful!
Preview URL: https://921a306f.blockfrost-platform.pages.dev
Branch Preview URL: https://feat-haskell-cbor-deserializ.blockfrost-platform.pages.dev

View logs

@michalrus michalrus force-pushed the feat/haskell-cbor-deserializer branch from cf100a5 to 8e60e29 Compare November 28, 2024 10:29
@michalrus michalrus force-pushed the feat/haskell-cbor-deserializer branch from 9fe6fa4 to 4299eba Compare November 28, 2024 11:53
Artifacts being: GitHub Workflow artifacts (including Windows), Nix packages, Docker image.
@michalrus michalrus force-pushed the feat/haskell-cbor-deserializer branch from 3f28303 to 5275170 Compare November 28, 2024 15:09
@vladimirvolek vladimirvolek self-requested a review November 29, 2024 00:45
@vladimirvolek vladimirvolek merged commit 7a37054 into main Nov 29, 2024
5 checks passed
@michalrus michalrus deleted the feat/haskell-cbor-deserializer branch November 29, 2024 08:24
michalrus added a commit that referenced this pull request Dec 3, 2024
Related to #42.

Follow up to #93.

I realized that we potentially have an infinite loop (although each
iteration slept for 1 s). If a user broke the deployment so that
`testgen-hs` became inaccessible, the request to deserialize a CBOR
would never be fulfilled, not even with an error. We only returned
deserialization errors from a working Haskell tool itself. Lower-level
errors were only logged to our `stdout`.

After this change, a "repeated internal failure" is returned after
the *2nd* attempt to deserialize the same request fails on a lower
level (e.g. because the child binary cannot be found, because someone
moved it).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants