Giter VIP home page Giter VIP logo

Comments (5)

SebastienGllmt avatar SebastienGllmt commented on July 17, 2024 2

Seems this issue (#74) also affects PlutusData. It can apparently also have duplicate keys with the same value, but CML throws an error at https://github.com/dcSpark/cardano-multiplatform-lib/blob/develop/rust/src/plutus.rs#L1634

When this happens, parsing fails and No variant matched is thrown

Note this would also be resolved by #86

Example

Here is an example of a TransactionWitnessSet that suffers from this issue

fn plutus_tx_witness_set_roundtrip_test() {
        let data = "a10481d8799fd8799f581ccf07540d800c4f1d657cb964dbaaaa6b0c8d8b1b963af7a7580270caff1a08f0d1800a01d8799f581c723df65c1030de6f6ebd937d9fa3970b39767d05e3361e9b3dc52a5dffd87a80d8799fa1581cf914e63b747bbbab11f8b32a810edb583b1e087cf53e9f77c573c888ab46666c756964310146666c756964370147666c75696431300146666c756964320146666c756964330146666c756964340146666c756964350146666c756964360146666c756964370146666c756964380146666c7569643901ffff";
        let witness_set = TransactionWitnessSet::from_bytes(hex::decode(data).unwrap()).unwrap();
        let round_trip = witness_set.to_bytes();

        assert_eq!(data, hex::encode(&round_trip));
    }
}

You can see from cbor.me that the key fluid7 in the map is repeated twice

from cardano-multiplatform-lib.

SebastienGllmt avatar SebastienGllmt commented on July 17, 2024

Most likely this is the same issue as txpipe/pallas#143

from cardano-multiplatform-lib.

Et9797 avatar Et9797 commented on July 17, 2024

I'm getting a same issue when using Ogmios (v5.5.1)
Deserialization failed in PlutusDataEnum.PlutusDataEnum because: No variant matched

from cardano-multiplatform-lib.

rooooooooob avatar rooooooooob commented on July 17, 2024

It's weird since when I tried out that block CBOR on develop it parsed completely fine. It could be an issue somewhere else in the stack outside of CML. Either that or that is not actually the failing block CBOR hex and it got mixed up somehow.

from cardano-multiplatform-lib.

rooooooooob avatar rooooooooob commented on July 17, 2024

This was fixed with #241

from cardano-multiplatform-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.