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

Add upgrade unsafeFromRight reporting workaround #383

Closed

Conversation

klarkc
Copy link
Contributor

@klarkc klarkc commented Apr 12, 2024

I'm encountering an upgrade (#363 (comment)) decode error again (but for different reasons), and just like before, it's not being reported. Therefore, I'm proposing this change until we establish a better method for reporting decode errors in the upgrade function.

Related #363

@KtorZ
Copy link
Member

KtorZ commented Apr 16, 2024

@klarkc not a big fan of the change 😬 ... this kind of temporary fix ends up being more permanent than we usually want initially.

So I am more for biting the bullet and getting those async exception handled properly. It might just be a matter of linking the async thread with the parent as this should crash the entire connection.

Do you have an easy reproduction step here by the way? I can always just shove an artificial undefined here and there, but I am genuinely curious about what's causing this now?

@klarkc
Copy link
Contributor Author

klarkc commented Apr 16, 2024

@KtorZ It happened with ogmios v6.1.0 and cardano-node 8.8.0-pre when trying to evaluateTransaction. Like before, it is happening with any script version (PlutusV1, V2, and V3). Removing the node and ogmios volume did not fix the issue this time. The error (not being reported) is the same:

"DecoderErrorDeserialiseFailure "witness" (DeserialiseFailure 38 "expected bytes")"

I don't have a reproduction repo now as I'm already moving to ogmios v6.2.0 with cardano-node 8.9.1, but if this version also fails, I'll try to provide a repo 👍

@KtorZ
Copy link
Member

KtorZ commented Apr 21, 2024

Hey, @klarkc I've been trying to reproduce by forcing the an exception at upgrade's call site but the server behaves "as expected":

{
  code: -32603,
  message: '"foo"\n' +
    'CallStack (from HasCallStack):\n' +
    '  error, called at src/Relude/Debug.hs:296:11 in rld-1.2.1.0-1d38cbc5:Relude.Debug\n' +
    '  error, called at src/Ogmios/App/Protocol/TxSubmission.hs:296:39 in ogmios-0-inplace:Ogmios.App.Protocol.TxSubmission\n' +
    '  unsafeFromRight, called at src/Ogmios/App/Protocol/TxSubmission.hs:293:28 in ogmios-0-inplace:Ogmios.App.Protocol.TxSubmission'
}

Maybe it's the cardano-transaction-lib that isn't handling server errors properly?

@klarkc
Copy link
Contributor Author

klarkc commented Apr 22, 2024

@KtorZ In your reproduction, did ogmios throw something in the server log? Here, it only closed the connection WebSocketConnectionEnded as seen in #363 log and CloseEvent in the browser.

I'm now in process of upgrading to the new sancho tip (node 8.10.0-pre), if I see the issue here I'll provide a reproduction.

@KtorZ
Copy link
Member

KtorZ commented Apr 25, 2024

That's a good point. I didn;'t check the server logs (🤦) because I got a response from the client side already.

@KtorZ KtorZ closed this in 9519fb6 May 7, 2024
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.

None yet

2 participants