We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When requesting a Block from algod and decoding each transaction, the global state deltas of the apply_delta.eval_delta contain incorrect data.
apply_delta.eval_delta
using
const block = await client.block(block_number).do(); // ... block.block.txns.forEach((t) => { if ("dt" in t) { if ("gd" in t["dt"]) { for (const k of Object.keys(t["dt"]["gd"])) { console.log(t["dt"]["gd"][k]); } } } });
logs a string like
'Ibf\x88³\x13|ùGÁ֨쌥g\x00װ§࠲\x93ش\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00.Y«A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ÿÿþ°ݠ\x8Fက\x01O"\x9Fp\x1E\x00\x00\x03^\x04쪅\x00\x00\x00\x92I\x7Fû\x8A\x00\x00\x00\x05ő\x04뀀\x00\x01¾(\x05 \x00\x00\x00\x01
but expecting
'Ibf\x88\xb3\x13|\xf9\xf6&\x9e\xf4G\xc3\x81\xe0\x96(\xec\xcc\xa5g\x00\xd7\xf0\xa7\xe0\xe0\xf2\x93\xd8t\x00\x00\x00\x00\x01\xe1\xabp\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00.Y\xabA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xfe\xb0\xdd`\x8f\xe1\x00\x00\x01O"\x9fp\x1e\x00\x00\x03^\x04\xec\xea\x05\x00\x00\x00\x92I\x7f\xfb\x8a\x00\x00\x00\x05\xc5\x11\x04\xeb\x00\x00\x00\x01\xbe(\x05\xe2\x00\x00\x00\x00\x00\x00'
This seems to be happing in the msgpack.decode call since even with the raw bytes read from disk the same result appears.
msgpack.decode
Using msgpack-lite locally and setting the codec useraw field, the data is decoded correctly:
msgpack-lite
useraw
let rawBlock = await client.block(block_number).doRaw(); const block = mpk.decode(rawBlock, { codec: mpk.createCodec({ useraw: true }), }) as Record<string, any>;
The text was updated successfully, but these errors were encountered:
Thanks for creating @barnjamin, I think the issue is also with local state delta values (but I haven't confirmed this)
Sorry, something went wrong.
Closed in #878, which will be released in v3
No branches or pull requests
Subject of the issue
When requesting a Block from algod and decoding each transaction, the global state deltas of the
apply_delta.eval_delta
contain incorrect data.using
logs a string like
but expecting
This seems to be happing in the
msgpack.decode
call since even with the raw bytes read from disk the same result appears.Using
msgpack-lite
locally and setting the codecuseraw
field, the data is decoded correctly:The text was updated successfully, but these errors were encountered: