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

Support Kupo; was: Kupo crashes when sending transaction via Hydra (tag: 'NewTx') #1785

Open
f0rm4l1ty opened this issue Jan 15, 2025 · 4 comments
Assignees
Labels
💬 feature A feature on our roadmap 💭 idea An idea or feature request

Comments

@f0rm4l1ty
Copy link
Contributor

f0rm4l1ty commented Jan 15, 2025

Context & versions

Versions:
Cardano Node: 10.1.4
Hydra Node: 0.19.0
Kupo: v2.10.0

I'm trying to send a transaction via the Hydra Node websocket (with this body)

{
    tag: 'NewTx',
    transaction: {
      type: 'Tx ConwayEra',
      cborHex: '84a300d9010281825820c9a5fb7ca6f55f07facefccb7c5d824eed00ce18719d28ec4c4a2e4041e85d9700018282581d605e4e214a6addd337126b3a61faad5dfe1e4f14f637a8969e3a05eefd1a000f424082581d6069830961c6af9095b0f2648dff31fa9545d8f0b6623db865eb78fde81a05e41793021a0002872da100d9010281825820f953b2d6b6f319faa9f8462257eb52ad73e33199c650f0755e279e21882399c058400b9b2c50b8dcf8ed0fec76676987c571b0fc1c12e6d5d4b956c635cde15592230908b40f45bea2f0b6cf62f49abc2a888a86e360c48fbbd5c70422011ba84c05f5f6'
    }
  }

Everything works in terms of the transaction being sent. However Kupo crashes when I send the event, with the following error.

{"severity":"Error","timestamp":"2025-01-15T02:25:55.24663166Z","thread":"11","message":{"Kupo":{"tag":"KupoUnexpectedError","exception":"MalformedOrUnexpectedResponse {bytesReceived = "{\"headId\":\"84e657e3dd5241caac75b749195f78684023583736cc08b2896290ab\",\"seq\":7,\"tag\":\"TxValid\",\"timestamp\":\"2025-01-15T02:25:55.244424483Z\",\"transaction\":{\"cborHex\":\"84a300d9010281825820c9a5fb7ca6f55f07facefccb7c5d824eed00ce18719d28ec4c4a2e4041e85d9700018282581d605e4e214a6addd337126b3a61faad5dfe1e4f14f637a8969e3a05eefd1a000f424082581d6069830961c6af9095b0f2648dff31fa9545d8f0b6623db865eb78fde81a05e41793021a0002872da100d9010281825820f953b2d6b6f319faa9f8462257eb52ad73e33199c650f0755e279e21882399c058400b9b2c50b8dcf8ed0fec76676987c571b0fc1c12e6d5d4b956c635cde15592230908b40f45bea2f0b6cf62f49abc2a888a86e360c48fbbd5c70422011ba84c05f5f6\",\"description\":\"Ledger Cddl Format\",\"txId\":\"a44363352298df3d9c5b3619ad9a8f2eee287b3c3dd25f4e97094e51cd1ef37c\",\"type\":\"Witnessed Tx ConwayEra\"}}", errorPath = [], hint = "DecoderErrorDeserialiseFailure \"PartialTransaction\" (DeserialiseFailure 3 \"expected list len or indef\")"}"}},"version":"v2.10.0+cd75b5"}

While this isn't necessarily a bug that causes me to not be able to use the Hydra Node; I've been told by the Kupo creator (KtorZ) that there may be an issue with "the format of the binary serialization of transactions" in the Hydra Node?

Direct quote from KtorZ (from the TxPipe Discord #Kupo channel)

The integration between Kupo and Hydra relies on binary serialisation of transactions; Kupo is now using the latest format as per the Cardano ledger, but Hydra is likely lagging a bit behind. The best way to "fix" this is to have Hydra upgrade to use a more recent ledger version.

I plan on heavily relying on Kupo (via the Kupmios Provider in Blaze https://github.com/butaneprotocol/blaze-cardano) to build transactions on L1 (to send to L2) for commit's, etc. I can also use Blaze + Kupo to decommit funds from Hydra back to L1 as well.

I understand that Hydra provides the /snapshot/utxos endpoint, but the rest of my script/backend for Cardano related stuff is utilizing Kupo, so it would be awesome for it to work.

This being said, it sounds like the Hydra Node is a little behind on how things get Deserialized (compared to Kupo maybe?). Is this something where I unfortunately will just have to wait for things to catch up on Hydra's side? I don't mind if that's the case.. just will need to figure out an alternative if the timeframe for the synchronization/fix is like a few months.

Thanks so much in advance for any insight you can provide. Thanks!

@f0rm4l1ty f0rm4l1ty added the bug 🐛 Something isn't working label Jan 15, 2025
@noonio noonio moved this from Triage 🏥 to Todo 📋 in ☕ Hydra Team Work Jan 20, 2025
@ch1bo
Copy link
Member

ch1bo commented Jan 20, 2025

@f0rm4l1ty instead of using the kupmios provider (which requires a ogmios instance for transaction submission AFAIK), you could look into using this recently contributed Hydra provider butaneprotocol/blaze-cardano#230

@ch1bo
Copy link
Member

ch1bo commented Jan 20, 2025

We'll look into kupo support anyways using this issue.

@f0rm4l1ty
Copy link
Contributor Author

We'll look into kupo support anyways using this issue.

Awesome thanks! And yeah, i'm going to use the Hydra provider in the meantime. 👍

@noonio noonio changed the title Kupo crashes when sending transaction via Hydra (tag: 'NewTx') Support Kupo; was: Kupo crashes when sending transaction via Hydra (tag: 'NewTx') Jan 31, 2025
@noonio noonio added 💬 feature A feature on our roadmap 💭 idea An idea or feature request and removed bug 🐛 Something isn't working labels Jan 31, 2025
@jinglescode
Copy link

@f0rm4l1ty we released the package, https://meshjs.dev/providers/hydra. Tested both submitTx (tag: 'NewTx) and commit are working.

@ch1bo ch1bo self-assigned this Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 feature A feature on our roadmap 💭 idea An idea or feature request
Projects
Status: Todo 📋
Status: No status
Development

No branches or pull requests

5 participants
@jinglescode @ch1bo @noonio @f0rm4l1ty and others