Comments (5)
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.
Most likely this is the same issue as txpipe/pallas#143
from cardano-multiplatform-lib.
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.
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.
This was fixed with #241
from cardano-multiplatform-lib.
Related Issues (20)
- Unexpected serialization of PoolRegistration cert HOT 4
- Alonzo block can't be decoded by MultiEra block HOT 3
- InputBuilder: Sanity check language version when making inline datums
- Failure to parse TransactionBody in a block from Mainnet (Babbage) HOT 8
- Missing JsonSchema for AssetName HOT 1
- Missing WASM exports for `hash.rs`
- Missing WASM address exports
- Missing WASM TransactionUnspentOutputs export? HOT 4
- Missing WASM PlutusScriptWitness constructor HOT 5
- Rename `BigInt` to something else
- Replace `as_` functions in Rust with `From` / `TryFrom`
- Missing `NetworkInfo` in WASM
- Cannot verify signature HOT 1
- TransactionHash Mistmatch HOT 4
- Byron block hash wrong
- ByronBlock / MultiEraBlock explicit era tag HOT 1
- Need help HOT 2
- Error: null pointer passed to rust HOT 1
- Add token information to transaction balance errors
- Conway Proposing/Voting RedeemerTag builder update
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cardano-multiplatform-lib.