geniusyield / smart-order-router

Open-source Smart Order Router framework to connect liquidity from the Genius Yield DEX
https://www.geniusyield.co
Apache License 2.0
59 stars 10 forks source link

DeserialiseFailure 326 "expected word" #37

Closed SmaugPool closed 1 year ago

SmaugPool commented 1 year ago

Describe the bug My SOR bot is regularly submitting order matching transactions, but it also logs a lot of DecoderFailure DeserialiseFailure 326 "expected word" errors (286 in 16 hours).

I'm not sure yet if those errors come from badly constructed transactions or from the bot.

To Reproduce Steps to reproduce the behavior:

  1. Run SOR bot with Kupo provider (* match pattern)
  2. Check logs for DecoderFailure errors

Expected behavior The bot should work without unexpected errors.

Screenshots Log sample at UTC+2 (I can provide more if needed):

[2023-10-16 23:35:16][GeniusYield..SOR][Error][test.smaug.pool.pm][PID 7][ThreadId 15][atlas-cardano-0.3.0-501e1471f205aa71b23c5d142f56d7aaa30f3d576720da46e118209bd03607cb:GeniusYield.Providers.Katip src/GeniusYield/Providers/Katip.hs:22:34] 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)) ('[] *)))))))))) ServerAgency TokBusy) (DeserialiseFailure 326 "expected word")

Station (please complete the following information):

Additional context SOR version:

Docker image: ghcr.io/geniusyield/smart-order-router:latest
tag: sha256:3a3825cc07938191597d794ae4ea42d1d37281b20936d011b75b99ec586c0338
Micrograx commented 1 year ago

Hi, this is something that we also encountered using cardano node version 8.1.2. The underlying issue here is that a transaction is being built with an already spent utxo. For example, if you have the rescan delay too low, the bot will probably build a match using an order that was consumed in the previous iteration.

The weird behavior is the extraneous error instead of the expected BadInputsUTxO. We opened an issue here about that, but we didn't hear back.

SmaugPool commented 1 year ago

Thank you @Micrograx. My scan delay was indeed set to a low value.

this is something that we also encountered using cardano node version 8.1.2

Does this mean you don't encounter this issue anymore with later versions?

Micrograx commented 1 year ago

Does this mean you don't encounter this issue anymore with later versions?

I don't think we tried it with a newer version. But transactions that give the weird error on 8.1.2 throw BadInputsUTxO on earlier node versions according to our testing.