Skip to content

Allow PlutusMap with duplicate keys #35

@nielstron

Description

@nielstron

The original Haskell implementation allows PlutusMap to contain duplicate keys, just as the official CBOR standard does. This is completely bogus and hence correctly ignored by cbor2, which is used by uplc to handle PlutusMap.

However this leads to the issue that it is currently not possible to correctly simulate the behaviour of contracts when passed a CBOR with duplicate keys as dictionary, leading to a potential for oversight of specific attacks.

A potential fix has been begun in https://github.com/OpShin/uplc/tree/feat/support_invalid_plutus_map, however the rigidness of the CBOR encoder/decoder implementation from cbor2 presents some significant challenges for this endeavor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions