Open kushti opened 3 months ago
It is replacing following existing PRs:
982 (just started) #984 (just started)
@kushti, it may still be useful to have a separate Numeric.toBytes method because generic serialize
produces ZigZag encoded bytes for numeric types.
We can call it Numeric.toBigEndianBytes.
This will be consistent with the existing longToByteArray
, byteArrayToLong
, byteArrayToBigInt
, but will work for all numeric types.
Implement Global.serialize function with SAny -> SByteArray signature to serialize an instance of any type.
It is replacing following existing PRs:
https://github.com/ScorexFoundation/sigmastate-interpreter/pull/982 (just started) https://github.com/ScorexFoundation/sigmastate-interpreter/pull/984 (just started) https://github.com/ScorexFoundation/sigmastate-interpreter/issues/974
Header serialization can be found in https://github.com/ScorexFoundation/sigmastate-interpreter/issues/974
Do round-trip tests against Global.deserialize[T] from https://github.com/ScorexFoundation/sigmastate-interpreter/pull/979