You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The computation of the unique constructor id is currently dependent on the stringified representation of the type of PlutusData attributes. This makes much sense for primitives and container types. However, the type may also be another Plutus Data class - this may lead to the problem that the stringified representation of such a class is very difficult to predict from the perspective of another language. The implementation should stay agnostic to the actual Python implementation though.
There are two ways to mitigate this: instead of the stringification of the type, we use
the stringification of the type structure (recursively resolved to primitive types)
the constructor id of the type
The constructor id however may not be unique in all cases so I would vouch for the first approach.
The computation of the unique constructor id is currently dependent on the stringified representation of the type of PlutusData attributes. This makes much sense for primitives and container types. However, the type may also be another Plutus Data class - this may lead to the problem that the stringified representation of such a class is very difficult to predict from the perspective of another language. The implementation should stay agnostic to the actual Python implementation though.
There are two ways to mitigate this: instead of the stringification of the type, we use
The constructor id however may not be unique in all cases so I would vouch for the first approach.
References:
https://github.com/Python-Cardano/pycardano/blob/0a95536e9e3779dcfc90eda7fcfa23e389a79c3f/pycardano/plutus.py#L484C43-L484C47
I am willing to work on a reference solution to fix this
The text was updated successfully, but these errors were encountered: