runtimeverification / avm-semantics

BSD 3-Clause "New" or "Revised" License
15 stars 4 forks source link

Application arguments representation #183

Closed nwatson22 closed 1 year ago

nwatson22 commented 1 year ago

According to the go-algorand documentation, the apaa transaction field should be of type bytes[][]. Previously we had been allowing the user to input any of multiple data types, which were then converted internally to bytes. But to better adhere to the standard, we should switch to requiring this array to be bytes only. If users wish to input other types, they must encode them before submitting the transaction, as is typically done in py-algorand-sdk. This should only require modifying the rule for inputting app call transactions to only accept bytes in the array and changing all the tests that use the wrong types in the application args field.

nwatson22 commented 1 year ago

I have converted the tests, but the way these byte arrays are stored in the JSON file is as base-64 encoded strings. I haven't been able to find an easy way to deal with these in K. I suspect we may have to add a hook similar to the one already used for address encoding/decoding (which is in base 32).