Skip to content

Conversation

@daniel-makerx
Copy link
Contributor

No description provided.

Comment on lines +765 to +785
"Fees were too small to resolve execution info via simulate. "
"You may need to increase an app call transaction maxFee."
)
failed_at = group_response.get("failed-at", [0])[0]
details = ""
if "logic eval error" not in msg:
# extract last pc from trace so we can format an error that can be parsed into a LogicError
try:
trace = group_response["txn-results"][failed_at]["exec-trace"]
except (KeyError, IndexError):
pass
else:
try:
program_trace = trace["approval-program-trace"]
except KeyError:
program_trace = trace["clear-program-trace"]
pc = program_trace[-1]["pc"]
details = f". Details: pc={pc}"
raise ValueError(
f"Error resolving execution info via simulate in transaction {failed_at}: "
f"{group_response['failure-message']}{details}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these exceptions surface will it be confusing to developers, i.e. "Error resolving execution" -> "Why is it trying to "resolve execution, what does that mean?", or will these exceptions be clear that they are raised as part of resolving an error in a call?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Ah I see these are the existing error messages anyway, although the question still stands).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They will be transformed into a LogicError (in the client error handling) which should map it to the appropriate TEAL or error message if they have an app spec

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously (on the TS side) this error was specific to resource population (Error populating resources...). When we added fee coverage support, the auto simulate behaviour would execute for that scenario too, so the error needed to be more generic.

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit_utils
   _debugging.py1411887%21, 40–42, 45, 54, 62, 81, 87, 96, 110–114, 133, 141–143
   account.py330%1–12
   algorand.py1051487%66–67, 81–82, 112–113, 140–141, 176–177, 321, 344, 360, 379
   application_client.py330%1–11
   application_specification.py770%1–39
   config.py782963%23, 30–34, 73–74, 90, 95, 100, 111–116, 140–156
   deploy.py330%1–10
   logic_error.py330%1–10
src/algokit_utils/_legacy_v2
   _ensure_funded.py72199%96
   _transfer.py72396%14, 77–78
   account.py931386%15–18, 71–75, 109, 126, 156, 159, 203
   application_client.py5377786%56–57, 176, 181, 210, 320, 325–326, 328, 330, 799, 814, 832–835, 929, 969, 981, 994, 1036, 1096–1102, 1106–1111, 1113, 1149, 1156, 1269, 1305, 1319, 1357–1359, 1361, 1371–1428, 1439–1444, 1464–1467
   asset.py80495%24–27
   common.py13192%13
   deploy.py4072295%32–35, 170, 174–175, 193, 249, 339–340, 361, 395, 406–414, 429, 437, 593–594, 618
   network_clients.py73593%79–80, 105–106, 139
src/algokit_utils/accounts
   account_manager.py2553985%167, 183–184, 211–216, 295–305, 339–344, 391–393, 422, 461, 481–485, 498, 557, 578, 735, 841, 920, 925, 940–941, 964
   kmd_account_manager.py731086%47–53, 94, 150, 157
src/algokit_utils/applications
   abi.py1396950%14, 75, 111, 117, 119, 121, 141–160, 176, 179–185, 201–214, 227–239, 254–265
   app_client.py77323170%66–74, 136, 144, 331–334, 337, 340, 343, 346, 358–361, 364, 367, 370, 373, 385, 394, 403, 406–468, 481–539, 563–565, 582–585, 593–596, 604–607, 615–618, 626–629, 640–643, 656, 752–755, 789, 801, 813, 825, 837, 852, 867, 877, 887, 897, 907, 917, 954–967, 983, 1000, 1017, 1034, 1055, 1076, 1166, 1222, 1363, 1427–1428, 1477, 1479, 1485, 1538–1546, 1579–1582, 1585–1588, 1609, 1657, 1720–1722, 1735–1746, 1791, 1808, 1810, 1813, 1817, 1964–1983, 2013, 2026–2028, 2032, 2043–2044, 2072, 2082–2084, 2087–2109, 2119, 2128–2143, 2148–2153
   app_deployer.py2373784%96, 270, 277, 287–292, 295–299, 375–376, 591, 603–617, 629, 634–637, 646, 660, 667, 674, 703, 714–755
   app_factory.py2712790%430, 451, 460, 652, 662, 712, 944, 958–963, 974–975, 1008, 1046, 1064–1065, 1108, 1116–1129
   app_manager.py2231892%258, 279–280, 350–351, 396–401, 433, 457–458, 488, 516–519, 551, 560
src/algokit_utils/applications/app_spec
   arc32.py95892%198–207
   arc56.py5781997%171, 292, 308–309, 379, 399–401, 453, 462, 464, 736, 750, 909, 911, 968, 970–971, 987
src/algokit_utils/assets
   asset_manager.py1281291%282–283, 292, 298–322, 332
src/algokit_utils/clients
   client_manager.py1785470%24–26, 79–86, 111, 143–145, 205, 216–219, 244, 283, 318–323, 358–360, 393, 410, 432, 477–480, 520–523, 564–567, 604–607, 629–654, 692, 705, 717
   dispenser_api_client.py961288%134–135, 139–142, 198–200, 219–221
src/algokit_utils/errors
   logic_error.py561180%14, 105–121
src/algokit_utils/models
   account.py921584%32, 34, 80–81, 128, 136, 144, 168–175, 188, 196, 209, 217
   amount.py1061784%35, 42, 88, 98, 104, 112, 117–119, 126, 131–133, 140, 147, 160, 166
   application.py66198%8
   state.py41588%61, 65–68
   transaction.py51394%66, 86, 91
src/algokit_utils/protocols
   account.py11282%17, 22
   typed_clients.py24483%12–24
src/algokit_utils/transactions
   transaction_composer.py114511490%35–39, 91, 101–105, 599, 644, 647, 652, 656–667, 700, 729, 774–775, 779–780, 839, 846, 868, 907, 1004–1033, 1062, 1090–1105, 1110, 1118, 1120, 1122, 1138, 1144, 1182, 1190, 1299, 1349, 1433, 1435–1436, 1829–1830, 1869–1870, 1911, 2124, 2127, 2146, 2151, 2179–2181, 2222–2258, 2265–2272, 2414, 2418, 2551, 2553–2554, 2604–2605
   transaction_creator.py75791%394, 427, 482, 520, 557, 590, 688
   transaction_sender.py1611094%101, 270, 313–314, 712–717, 722–723, 888
TOTAL679293186% 

Tests Skipped Failures Errors Time
419 0 💤 0 ❌ 0 🔥 3m 41s ⏱️

@robdmoore
Copy link
Contributor

These changes presumably also need to be made to typescript utils too

@daniel-makerx
Copy link
Contributor Author

These changes presumably also need to be made to typescript utils too

yeah the one that adds the PC does. The other was python specific

@daniel-makerx daniel-makerx merged commit a80bd6f into main Oct 15, 2025
5 checks passed
@neilcampbell neilcampbell deleted the fix-populate-box-ref branch October 31, 2025 01:53
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

Successfully merging this pull request may close these issues.

4 participants