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

Better error message for a non-deserializable transaction #123

Open
michalrus opened this issue Jan 22, 2025 · 0 comments
Open

Better error message for a non-deserializable transaction #123

michalrus opened this issue Jan 22, 2025 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@michalrus
Copy link
Collaborator

Reproduction

@vladimirvolek noticed (GitHub Actions run), that if you send a non-deserializable transaction to cardano-node, you'll get a cryptic ChannelError(AgentDequeue) error, e.g.:

❯ curl -fsSL http://0:3000/tx/submit -X POST -H "Content-Type: application/cbor" -d "aaaa" | jq .
{
  "status_code": 400,
  "error": "Bad Request",
  "message": "Error during transaction submission: ChannelError(AgentDequeue)",
  "details": null
}

In cardano-node’s log, you can see a more proper error, (DeserialiseFailure 9 "expected list len or indef"):

[lenovo-x:cardano.node.LocalInboundGovernor:Info:77] [2025-01-22 12:08:23.41 UTC] TrResponderErrored (ConnectionId {localAddress = LocalAddress "/home/mw/.local/share/blockfrost-platform/preview/node.socket", remoteAddress = LocalAddress "/home/mw/.local/share/blockfrost-platform/preview/node.socket@35"}) (MiniProtocolNum 6) DecoderFailure (LocalTxSubmission (GenTx (HardForkBlock (': * ByronBlock (': * (ShelleyBlock (TPraos StandardCrypto) (ShelleyEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (AllegraEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (MaryEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (AlonzoEra StandardCrypto)) (': * (ShelleyBlock (Praos StandardCrypto) (BabbageEra StandardCrypto)) (': * (ShelleyBlock (Praos StandardCrypto) (ConwayEra StandardCrypto)) ('[] *)))))))))) (HardForkApplyTxErr (': * ByronBlock (': * (ShelleyBlock (TPraos StandardCrypto) (ShelleyEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (AllegraEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (MaryEra StandardCrypto)) (': * (ShelleyBlock (TPraos StandardCrypto) (AlonzoEra StandardCrypto)) (': * (ShelleyBlock (Praos StandardCrypto) (BabbageEra StandardCrypto)) (': * (ShelleyBlock (Praos StandardCrypto) (ConwayEra StandardCrypto)) ('[] *)))))))))) ClientAgency TokIdle) (DeserialiseFailure 9 "expected list len or indef")

So it seems that a non-deserializable transaction somehow breaks the Ouroboros flow in Pallas?

Desired outcome

We should have a better error message, if getting to (DeserialiseFailure 9 "expected list len or indef") is not possible easily, then maybe just something generic like "Invalid transation"?

@michalrus michalrus added the enhancement New feature or request label Jan 22, 2025
@michalrus michalrus added this to the v0.0.1 milestone Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant