Skip to content

populateAppCallResources inconsistent transaction composition #444

@Kozer4

Description

@Kozer4

Problem

Problem in:
populateAppCallResources from @algorandfoundation/algokit-utils

inside:
executionInfo.groupUnnamedResourcesAccessed (boxes, accounts, etc.)
in a different order on each run — apparently as a result of simulation.

This leads to non-deterministic behavior, which in turn causes:

  • inconsistent transaction composition,
  • and potential failures when resource limits depend on order.

Solution

Resources (boxes, accounts, assets, apps) should be returned(or used in population) in a deterministic order to ensure reproducibility.

Proposal

Resources (boxes, accounts, assets, apps) should be returned(or used in population) in a deterministic order to ensure reproducibility.

Pros and Cons

Pros: deterministic behavior, reproducible simulations, stable tests.
Cons: maybe slight performance overhead

Dependencies

Maybe No external dependencies.

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