-
Notifications
You must be signed in to change notification settings - Fork 584
Description
Preliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/MinaProtocol/mina/issues
- This issue is not a question, feature request, RFC, or anything other than a bug report. Please post those things in GitHub Discussions: https://github.com/MinaProtocol/mina/discussions
Description
In 3dbe05a, a log message was added to display received snark work for debugging purposes. This results in a message containing:
"sok_digest":"��c}&�������\u000b[f�VRj�\u0006Mm�˚Hz m1-"
in a nightly CI run. This appears to be because the sok_digest
is this type:
mina/src/lib/mina_base/sok_message.ml
Lines 32 to 33 in 7f94ae0
type t = Mina_stdlib.Bounded_types.String.Stable.V1.t | |
[@@deriving sexp, hash, compare, equal, yojson] |
It looks like we handle the sok_digest
internally as a raw byte string with the string
type, and the to_yojson
instance for string
doesn't do any kind of encoding or decoding on strings. The "�" replacement characters are probably a result of something (the renderer in the logger?) converting the byte string to a UTF-8 string by replacing the invalid bytes with that character.
The sok_digest
should really be rendered as UTF-8 text (probably hex-encoded) if we expect any outside json processing tools to work with it properly.