Emurgo / cardano-serialization-lib

This is a library, written in Rust, for serialization & deserialization of data structures used in Cardano's Haskell implementation of Alonzo along with useful utility functions.
Other
230 stars 124 forks source link

Conway [12.0.0-alpha.4] - Anchor URL limited to 64 chars #641

Closed Ryun1 closed 10 months ago

Ryun1 commented 10 months ago

Using Conway Alpha Build: @emurgo/cardano-serialization-lib-nodejs@12.0.0-alpha.4.

When running:

    const dataHash = CSL.AnchorDataHash.from_hex("9bba8233cdd086f0325daba465d568a88970d42536f9e71e92a80d5922ded885");
    const url = CSL.URL.new("https://raw.githubusercontent.com/Ryun1/gov-metadata/main/governace-action/metadata.jsonld");
    const anchor = CSL.Anchor.new(url, dataHash);

I get: Deserialization failed in URL because: Out of range: 90 - must be in range 0 - 64

Describe the bug

Expected behaviour

lisicky commented 10 months ago

It is limit from CDDL https://github.com/input-output-hk/cardano-ledger/blob/cf05d70ea4e8eae4ce2ad349ed17850c0c8204d1/eras/conway/test-suite/cddl-files/conway.cddl#L371

Ryun1 commented 10 months ago

Oh that is an unfortunate restriction! -- thank you