Skip to content

Conversation

@aorumbayev
Copy link
Contributor

Proposed Changes

Add support for unhashable map keys (e.g., dict keys in txleases) by
introducing _msgpack_pairs_hook to convert unhashable keys to hashable
tuples. Enhanced _normalize_msgpack with fallback handling for edge cases.

Refactor block model structure by extracting ApplyData and introducing
SignedTxnWithAD intermediate type for better separation of concerns.

Refine ledger state delta models:

  • Simplify decode functions and remove redundant None checks
  • Add default values for optional fields
  • Rename fields: txids→tx_ids, txleases→tx_leases, ndeltas→n_deltas
  • Use suppress context manager for cleaner error handling

Enhance serde to recursively collect wire aliases from flattened fields.

Improve ledger state delta tests with parameterization for mainnet/testnet.

@github-actions
Copy link

github-actions bot commented Nov 13, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit_algod_client
   client.py84663825%40, 52–72, 82–112, 123–155, 165–185, 199–227, 236–254, 263–281, 291–311, 320–338, 347–365, 377–397, 409–431, 446–475, 486–510, 523–548, 560–584, 593–611, 622–644, 656–678, 688–708, 718–738, 776, 786–806, 816–836, 845–863, 873–893, 902–920, 954, 964–988, 998–1018, 1029–1053, 1065–1091, 1100–1118, 1128–1148, 1157–1175, 1184–1202, 1211–1229, 1239–1263, 1277–1308, 1317–1335, 1344–1362, 1371–1389, 1423, 1463, 1475–1505, 1516–1536, 1546–1566, 1614, 1623–1641, 1653–1685, 1695–1725, 1736–1766, 1793, 1802–1820, 1830–1850, 1863, 1868, 1870, 1875, 1879, 1884, 1968–1973, 1978, 1981–1985, 1992–2004, 2012–2017, 2039–2053, 2058–2060
   exceptions.py7357%13–15
src/algokit_algod_client/models
   _block.py1443278%44–46, 54–60, 66–68, 77–83, 87–94, 99, 111–113
   _serde_helpers.py1397149%18–22, 26, 31, 37, 49–51, 55–65, 69–77, 82, 86, 93, 103–110, 114–123, 132–150, 160, 172, 182
src/algokit_common
   address.py19479%7, 10, 15, 21
src/algokit_common/serde
   _core.py2853289%83, 139, 145, 214, 227, 237, 239, 252, 256, 259–260, 268, 304–305, 325, 329–332, 350–351, 361–362, 397, 425–426, 447, 453, 462, 468, 477, 483
   _primitives.py732467%5–7, 11–13, 17, 23, 35–37, 41–43, 47–49, 55, 60–61, 122, 126, 128, 130
src/algokit_indexer_client
   client.py61250218%41, 52–70, 87–118, 133–164, 178–206, 221–252, 267–298, 324–388, 399–421, 433–455, 472–509, 525–559, 571–593, 621–691, 703–725, 778–828, 841–866, 891, 894, 897, 913, 930–968, 988–1032, 1067, 1070, 1073, 1076, 1079, 1082, 1088, 1091, 1094, 1097, 1100, 1103, 1106, 1109, 1112, 1115, 1118, 1121, 1124, 1140, 1149–1165, 1168–1175, 1245, 1250–1264, 1268, 1271–1275, 1279–1310, 1313–1318, 1322–1351
src/algokit_indexer_client/models
   _serde_helpers.py13910227%18–22, 26, 31, 35–37, 41–51, 55–65, 69–77, 81–88, 93, 103–110, 114–123, 132–150, 159–167, 171–173, 181–184, 192–195
src/algokit_kmd_client
   client.py44429933%40, 82, 92–122, 132–162, 202, 212–242, 252–282, 322, 333–363, 373–403, 413–443, 453–483, 523, 563, 573–603, 631, 644, 684, 694–724, 734–764, 774–804, 814–844, 854–884, 894–924, 933–951, 963–969, 972–976, 980, 983–986, 1056, 1061–1075, 1079, 1082–1086, 1090–1121, 1124–1129, 1133–1162
   exceptions.py7357%13–15
src/algokit_kmd_client/models
   _serde_helpers.py13910227%18–22, 26, 31, 35–37, 41–51, 55–65, 69–77, 81–88, 93, 103–110, 114–123, 132–150, 159–167, 171–173, 181–184, 192–195
src/algokit_transact/codec
   signed.py35586%18, 20, 23, 39, 43
   transaction.py41295%16, 65
src/algokit_transact/models
   app_call.py32220337%67–81, 85–88, 96, 98, 101, 114, 119, 125, 132–144, 148–251, 295–298, 306, 312–314, 326, 330–332, 341, 354–355, 361–362, 366, 369–375, 378–389, 392–396, 399–402, 405–413, 416–426, 429–436
   state_proof.py1052180%95, 103, 118, 124, 131–142, 148–154
src/algokit_transact/ops
   fees.py20195%28
   group.py21290%15, 22
   validate.py209399%60, 74, 76
src/algokit_transact/signing
   multisig.py541965%17, 19, 21, 32–45, 60, 66, 68, 73
   types.py28968%10, 14, 18–24
src/algokit_utils
   _debugging.py1401490%41–43, 46, 55, 63, 82, 86, 95, 109–113, 139
   algorand.py1051487%66–67, 81–82, 112–113, 140–141, 176–177, 321, 344, 360, 379
   config.py782963%23, 30–34, 73–74, 90, 95, 100, 111–116, 140–156
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.py861286%53–59, 104, 108, 134, 172, 179
src/algokit_utils/applications
   abi.py1376850%75, 111, 117, 119, 121, 141–160, 176, 179–185, 201–214, 227–239, 254–265
   app_client.py76522970%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, 1685–1688, 1691, 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.py2393984%96, 270, 277, 287–292, 295–299, 375–376, 591, 603–617, 629, 634–637, 646, 660, 667, 674, 703, 715–758
   app_factory.py2702790%429, 450, 459, 651, 661, 711, 943, 957–962, 973–974, 1007, 1045, 1063–1064, 1107, 1115–1128
   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.py5741997%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.py1735171%79–86, 111, 143–145, 205, 216–219, 244, 283, 318–323, 358–360, 393, 414, 435, 480–483, 523–526, 567–570, 607–610, 632–657, 695, 708, 720
   dispenser_api_client.py912078%89, 93, 134–135, 139–142, 190–200, 210–221
src/algokit_utils/errors
   logic_error.py541180%90, 105–121
src/algokit_utils/models
   account.py921584%32, 34, 80–81, 128, 136, 144, 168–175, 188, 196, 209, 217
   amount.py1021783%35, 42, 88, 98, 104, 112, 117–119, 126, 131–133, 140, 147, 160, 166
   state.py41588%61, 65–68
   transaction.py51394%66, 86, 91
src/algokit_utils/transactions
   transaction_composer.py112610691%91, 101–105, 599, 644, 647, 652, 656–667, 699, 736, 816, 823, 845, 884, 981–1010, 1039, 1067–1082, 1087, 1095, 1097, 1099, 1115, 1121, 1159, 1167, 1276, 1326, 1410, 1412–1413, 1806–1807, 1846–1847, 1888, 2101, 2104, 2123, 2128, 2156–2158, 2199–2235, 2242–2249, 2391, 2395, 2528, 2530–2531, 2581–2582
   transaction_creator.py75791%394, 427, 482, 520, 557, 590, 688
   transaction_sender.py1611094%101, 270, 313–314, 712–717, 722–723, 888
TOTAL11353285075% 

Tests Skipped Failures Errors Time
481 0 💤 0 ❌ 0 🔥 1m 41s ⏱️

@aorumbayev aorumbayev force-pushed the decoupling-algod-refinements branch from 164a94d to 32bd9d7 Compare November 13, 2025 14:02
@aorumbayev aorumbayev marked this pull request as draft November 13, 2025 16:43
… ts constraints; Add Missing ParticipationUpdates model
@aorumbayev aorumbayev marked this pull request as ready for review November 14, 2025 15:15
@aorumbayev aorumbayev merged commit dd2cb6d into decoupling Nov 14, 2025
5 checks passed
@aorumbayev aorumbayev deleted the decoupling-algod-refinements branch November 14, 2025 15:20
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.

2 participants