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
I see the second option as more of an exception to parse existing on-chain register values. With the first option being a "default" way of encoding tuples. Is that the correct assumption?
Side note. With Tuple constrained to EvaluatedCollection, I don't see a way to have an arbitrary expression as an item in Tuple, which make both above options semantically equivalent to me. Am I missing something?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We have two ways to encode tuples:
as Scala tuples (
Coll[Any]
2+ items), see - https://github.com/ScorexFoundation/sigmastate-interpreter/blob/08627b714f04794b8f8cc785452aa8dc58bc9c48/sigmastate/src/main/scala/sigmastate/serialization/DataSerializer.scala#L126-L131as
Tuple
, see https://github.com/ScorexFoundation/sigmastate-interpreter/blob/08627b714f04794b8f8cc785452aa8dc58bc9c48/sigmastate/src/main/scala/sigmastate/serialization/TupleSerializer.scala#L26-L35I see the second option as more of an exception to parse existing on-chain register values. With the first option being a "default" way of encoding tuples. Is that the correct assumption?
Side note. With
Tuple
constrained toEvaluatedCollection
, I don't see a way to have an arbitrary expression as an item inTuple
, which make both above options semantically equivalent to me. Am I missing something?Beta Was this translation helpful? Give feedback.
All reactions