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
JSON format is currently serializing data that may be unusable, wasting loads of bandwidth + cpu cycles
Not a total waste in cases where the bytestream can be serialized
Switching to msgpack is replete with all sorts of quirks across various languages, the biggest being the main Javascript library can't even decode it without issues
We technically could "fix" the JSON response to use surrogate escaping like Python supports, but again not every client would support that and that could actually break code that is currently working.
Which really sounds like the ideal answer, and then using path-versioning like /v2.1/blocks to provide a new endpoint to maintain legacy endpoint functioning.
Subject of the issue
When using the
json
format on/v2/blocks
it returns serializedlg
data that is unusable / garbage in many cases.In this case, the bad serialization is most easily identifiable by the visual presence of utf-8 replacement characters -> https://www.compart.com/en/unicode/U+FFFD
Steps to reproduce
Method One
Look at
txn
index 16 (assuming start index of 0) which is a Tinyman swap:https://mainnet-api.algonode.cloud/v2/blocks/41335116
Fields in
dt.ld.1
have garbage data along withlg
, particularly logs likeoutput_asset_id
andoutput_amount
Method Two
Run this script to see a more thorough example of trying to access Tinyman log data, which is provided by
v2/blocks
injson
format.Thoughts
There are a few issues here:
msgpack
is replete with all sorts of quirks across various languages, the biggest being the main Javascript library can't even decode it without issuesWhich really sounds like the ideal answer, and then using path-versioning like
/v2.1/blocks
to provide a new endpoint to maintain legacy endpoint functioning.The text was updated successfully, but these errors were encountered: