Skip to content
New issue

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

Msgpack maps with object keys support needed for proper LedgerStateDelta decoding #885

Open
jasonpaulos opened this issue Aug 16, 2024 · 2 comments

Comments

@jasonpaulos
Copy link
Contributor

Problem

The LedgerStateDelta object as returned from algod has the field Txleases which is a map with an object key, as show in https://github.com/algorand/go-algorand/blob/8e2e2e4f4f714e40d6156ed77cbd1b4b4763d11a/ledger/ledgercore/statedelta.go#L105

Unfortunately if this object is present, this SDK will be unable to decode any part of the msgpack state delta, since object keys are not supported by our msgpack library, https://github.com/algorand/msgpack-javascript.

Solution

Modify and release a new version of https://github.com/algorand/msgpack-javascript with support for decoding & encoding maps with object keys. Then this SDK can use the new version of that library to properly encode & decode LedgerStateDeltas.

@PhearZero
Copy link
Contributor

I noticed getLedgerStateDelta and getTransactionGroupLedgerStateDeltasForRound changed back to number, was this intentional or related to the decoding issue?

@jasonpaulos
Copy link
Contributor Author

Do you mean the arguments to those functions? If so, that was an oversight and I have a fix in #893

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants