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
In non-provable framework code (i.e. sequencer, workers, ...), we sometimes use the provable type representations (Field, PublicKey, ...) and sometimes we use the value types (bigint, string, ...)
The way o1js was refactored in the last year gives developers the right tools to only use value types and therefore achieve a better seperation between in-circuit and out-of-circuit code.
We should also use this pattern in our codebase to more clearly distinguish between the actual circuits and adjacent code. Additionally, this make our serializers leaner and saves us on conversions.
Potentially, since sometimes we use o1js-builtin functions to calculate something out of circuits (tree ops, hashing, signature verificatoin), this might also lead to some new conversions needing to happen that might offset the savings of above.
Also, we should think of how to correctly distinguish different conversations having the same js type (PublicKey and PrivateKey both encode to string).
Additionally, bigints aren't supported for json encoding yet - there are workarounds, but we should implement them framework-wide to not repeat ourselves
The text was updated successfully, but these errors were encountered:
In non-provable framework code (i.e. sequencer, workers, ...), we sometimes use the provable type representations (Field, PublicKey, ...) and sometimes we use the value types (bigint, string, ...)
The way o1js was refactored in the last year gives developers the right tools to only use value types and therefore achieve a better seperation between in-circuit and out-of-circuit code.
We should also use this pattern in our codebase to more clearly distinguish between the actual circuits and adjacent code. Additionally, this make our serializers leaner and saves us on conversions.
Potentially, since sometimes we use o1js-builtin functions to calculate something out of circuits (tree ops, hashing, signature verificatoin), this might also lead to some new conversions needing to happen that might offset the savings of above.
Also, we should think of how to correctly distinguish different conversations having the same js type (PublicKey and PrivateKey both encode to string).
Additionally, bigints aren't supported for json encoding yet - there are workarounds, but we should implement them framework-wide to not repeat ourselves
The text was updated successfully, but these errors were encountered: