cardano-foundation / cardano-rosetta

An implementation of Rosetta for Cardano
https://www.rosetta-api.org
Apache License 2.0
95 stars 49 forks source link

Transaction created with 2.2.5+v9 is not being accepted #562

Closed mbratfisch-bc closed 1 month ago

mbratfisch-bc commented 1 month ago

Summary

Creating a transaction with rosetta construction preprocess, metadata, input works but when I try to submit to /construction/submit it fails with:

{"code":5006,"message":"Error when sending the transaction","retriable":true,"details":{"message":"Error: Command failed: transaction submit  Error: Failed to decode the ledger's CDDL serialisation format. TextEnvelopeCddl error: /tmp/7e21773e-4ec2-45b4-858d-4902c604b11d: TextEnvelopeCddl type error:  Expected one of: Witnessed Tx ShelleyEra, Witnessed Tx AllegraEra, Witnessed Tx MaryEra, Witnessed Tx AlonzoEra, Witnessed Tx BabbageEra, Witnessed Tx ConwayEra, Unwitnessed Tx ByronEra, Unwitnessed Tx ShelleyEra, Unwitnessed Tx AllegraEra, Unwitnessed Tx MaryEra, Unwitnessed Tx AlonzoEra, Unwitnessed Tx BabbageEra, Unwitnessed Tx ConwayEra Actual: TextEnvelopeType \"Tx AlonzoEra\""}}%

If I get the same transaction and send to rosetta 2.1 with node 8.7, it is accepted and processed just fine.

Steps to reproduce the bug

  1. Create a transaction using preprocess/metadata/input from rosetta interface
  2. sign it
  3. try to submit to /construction/submit

Actual Result

{"code":5006,"message":"Error when sending the transaction","retriable":true,"details":{"message":"Error: Command failed: transaction submit Error: Failed to decode the ledger's CDDL serialisation format. TextEnvelopeCddl error: /tmp/7e21773e-4ec2-45b4-858d-4902c604b11d: TextEnvelopeCddl type error: Expected one of: Witnessed Tx ShelleyEra, Witnessed Tx AllegraEra, Witnessed Tx MaryEra, Witnessed Tx AlonzoEra, Witnessed Tx BabbageEra, Witnessed Tx ConwayEra, Unwitnessed Tx ByronEra, Unwitnessed Tx ShelleyEra, Unwitnessed Tx AllegraEra, Unwitnessed Tx MaryEra, Unwitnessed Tx AlonzoEra, Unwitnessed Tx BabbageEra, Unwitnessed Tx ConwayEra Actual: TextEnvelopeType \"Tx AlonzoEra\""}}%

Expected Result

Transaction to be accepted and broadcasted as it happens in the old node/rosetta.

Environment

v9.0.0 cardano v2.2.5 rosetta

Platform

Platform version

No response

Docker version

No response

Kammerlo commented 1 month ago

Hello, we haven't upgraded Rosetta to Node 9.0, since it has a dependency to db-sync. This will be the issue, since Rosetta is submitting transaction through the cardano-cli. The cli will be updated in the process as well. I'll keep you updated, when I'm done upgrading.

mbratfisch-bc commented 1 month ago

@Kammerlo just to be sure but the plan is to have this updated before 9.0 is enabled in mainnet, right?

Godspeed-exe commented 1 month ago

@mbratfisch-bc correct, there will be a new Rosetta release which is compatible with node 9.x in the near future. As Thomas mentioned, there is a dependency on db-sync - which is still pending release at the moment.

Kammerlo commented 1 month ago

@mbratfisch-bc we are nearly ready, the current upgrade progress can be seen within this PR: https://github.com/cardano-foundation/cardano-rosetta/pull/564 We will build a new release as soon as we merged it to main

Kammerlo commented 1 month ago

@mbratfisch-bc We released the latest version yesterday. Could you check if this release solves your issue?

mbratfisch-bc commented 1 month ago

@Kammerlo seems the problem is still there, just tried executing a new transaction and I get:

Error: Command failed: transaction submit  Error: Failed to decode the ledger's CDDL serialisation format. TextEnvelopeCddl error: /tmp/b627c735-84c5-4134-9582-8fc77821d8c9: TextEnvelopeCddl type error:  Expected one of: Witnessed Tx ShelleyEra, Witnessed Tx AllegraEra, Witnessed Tx MaryEra, Witnessed Tx AlonzoEra, Witnessed Tx BabbageEra, Witnessed Tx ConwayEra, Unwitnessed Tx ByronEra, Unwitnessed Tx ShelleyEra, Unwitnessed Tx AllegraEra, Unwitnessed Tx MaryEra, Unwitnessed Tx AlonzoEra, Unwitnessed Tx BabbageEra, Unwitnessed Tx ConwayEra Actual: TextEnvelopeType ""Tx AlonzoEra"
Kammerlo commented 1 month ago

Sorry for the delay, I will start working on it today. I'll keep you updated about the progress. Thanks for your patience!

Kammerlo commented 1 month ago

@mbratfisch-bc we got a fix and tested it on preview. Could you check if it fixes your problem? We want to be sure before we merge it into master. https://github.com/cardano-foundation/cardano-rosetta/pull/569

mbratfisch-bc commented 1 month ago

Seems to fix, yeah.