IntersectMBO / cardano-api

Cardano API
Apache License 2.0
22 stars 20 forks source link

[BUG] - Cardano api 9.1 backward compatibility issue #617

Open spannercode opened 1 month ago

spannercode commented 1 month ago

Internal/External External

Area Plutus Related to Plutus Scripts (Babbage).

Summary Using latest code cardano-api-9.1, we're not able to connect to the node 8.9.4 at BabbageEra, even though it is supposed to be backward compatible.

Error

 Create Ref Script-buildAndSubmit : FrameworkError: ConnectionError: "
QueryEraHistory: DecoderFailure (LocalStateQuery 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)) ('[] )))))))) 

Query (BlockQuery (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)) ('[] *))))))))))) 
ServerAgency TokQuerying BlockQuery (QueryHardFork GetInterpreter)) 

(DeserialiseFailure 13 "Size mismatch when decoding EraParams.\nExpected 4, but found 3.")"

What is working ?

What is not working?

Additional context Originally reported and tracked here: cardanoapi/hardfork-testing #50

Jimbo4350 commented 1 month ago

Can you try with the latest released node.

spannercode commented 4 weeks ago

Using the latest node 9.1.0 is working as expected. However, using the latest cardano-api (9.2.0) to query 8.9.4 node is not working. Is it expected to break?

carbolymer commented 4 weeks ago

Yes. You should use either cardano-api version mentioned in "Individual packages' changelogs" on the release page https://github.com/IntersectMBO/cardano-node/releases/tag/8.9.4 or upgrade the node.

spannercode commented 4 weeks ago

That was one of our thoughts as well which we did try. On cardano-node 8.9.4, the cardano-api == 8.39.3.0 which already includes the conway era changes. Unless we got something wrong, it was not compatible as well.