Skip to content

Fix simulation trace writer to ensure large integers are wrapped into str values #199

@aorumbayev

Description

@aorumbayev

Subject of the issue

algokit utils py when persisting simulation traces for avm debugger are using a serializer from py algorand sdk. Which behaves in a different manner from js algorand sdk v3. Large integer values that can't fit into a Number are not wrapped to strings hence avm vscode debugger fails during debug flow as large big int values can loose precision.

Your environment

Reference
simulation trace that can be tested in avm vscode debugger to test the issue. Note issue is reported in this repo as the root cause can be fixed at the utils py level.

Steps to reproduce

  1. Load the trace in debugger
  2. Observe invalid integer errors and large ints loosing precision.

Expected behaviour

utils py persists simulation traces in format that wraps big integers into str values such that js algorand sdk v3 decoder can recognize it when used inside algokit avm vscode debugger.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions