-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Promise never resolve or reject when submitting an invalid transaction #346
Comments
Quoting from the discussion we had in private @KtorZ:
|
I request reopening the issue. It still reproduces with Ogmios 6.0.0-rc5 and this transaction cbor: Websocket closes. The following error can be seen in ogmios/cardano-node logs:
|
Yes. That is expected. And the promise on the client side should also have been rejected? This error is actually a bug from the node / ledger, so there's nothing Ogmios can really do to mitigate it. So failing is the expected behavior. Yet, that failure should bubble down to the client handlers and it wasn't the case. |
The failure doesn't bubble down. This is my test script and run output: ➜ testSubmitter cat testSubmitter.ts
const { TransactionSubmission, createInteractionContext } = require('@cardano-ogmios/client');
(async () => {
const context = await createInteractionContext(
(err) => {
console.log('error', err);
},
(reason) => {
console.log('context disconnected', reason);
},
{
connection: {
host: 'localhost',
port: 1341
}
}
);
const txClient = await TransactionSubmission.createTransactionSubmissionClient(context);
const result = await txClient.submitTransaction(
'84a40081825820b69ae3404901b22ca88bdf53520bd8129d6cc2858a0ff10de44350814dabf7c601018282583900f7fa5ddf2c3c46ed4d913812d38dd43d585adfa884938adaa7a075dd1bf1e138f2f8beabc963c94cc28ee8ed4b41744601f2edaf50b21efd1a002dc6c082583900f7fa5ddf2c3c46ed4d913812d38dd43d585adfa884938adaa7a075dd1bf1e138f2f8beabc963c94cc28ee8ed4b41744601f2edaf50b21efd1b000000025104e928021a0002a98d048183078200581c1bf1e138f2f8beabc963c94cc28ee8ed4b41744601f2edaf50b21efd1a001e8480a1008182582005c7f4f3f949d0678171ae3a01f30b836b64d037f9e27377877e4c2db1dbeed45840eec07067ba2c10d20942c058db85607e48f7d6ad987dbe1586c7c16e6114dc1307d5af1179d45143990a277583c1e2ba6b3ff17fa453de589ed5955edeace00bf5f6'
).catch(err => console.log('error in txClient.submitTransaction', err));
console.log('Submitted:', result);
})()
.then(() => console.log('tx sent'))
.catch((error) => console.log('error', error));
➜ testSubmitter
➜ testSubmitter
➜ testSubmitter node testSubmitter.ts
context disconnected 1006
➜ testSubmitter And this is the ogmios version running:
|
Fixes #346. This is tricky, because it is codec exception in the node, which is obviously a bug so we don't necessarily want to accomodate with special handling logic for that on the server. In particular, it's hard to tell whether the server needs to send a response or not at this level. So it's better handled client-side. We need to notify the team about this.
What Git revision / release tag are you using?
v6.0.0-rc4
Do you use any client SDK? If yes, which one?
TypeScript
Describe what the problem is?
When submitting an invalid transaction, websocket connection closes with
{ code: 1006 } Connection closed
. Client is then indefinitely awaiting for some kind of response here.What should be the expected behavior?
There are 2 issues:
If applicable, what are the logs from the server around the occurence of the problem?
The text was updated successfully, but these errors were encountered: