Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix inner transaction validation to handle some cases that were accidentally missed #233

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

daniel-makerx
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented May 27, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/puya
   __main__.py31197%116
   arc4_util.py119992%73, 81, 93, 106–107, 121, 133, 135, 194
   arc32.py124298%108, 222
   client_gen.py1061060%1–194
   compile.py2112091%168–171, 183–184, 193–194, 205, 212–213, 230–240, 250–252, 257, 333–334
   context.py40198%48
   errors.py451762%43–53, 65–71
   log.py2123185%36–39, 72, 74, 92, 111, 126–127, 169–171, 174–176, 178, 191–200, 222, 292–294, 303–304, 338, 355
   parse.py2221195%96, 108, 133, 227, 318–323, 327, 425–426, 429
   utils.py1622088%52, 56, 90, 96, 111, 114–116, 123, 145, 158–159, 163, 167–170, 199, 201, 224, 254
src/puya/awst
   nodes.py9094595%90, 94–97, 137, 141–144, 524, 730, 763, 807–808, 871, 975, 1017, 1037, 1088, 1093, 1193, 1341, 1394–1395, 1402–1407, 1449, 1532, 1582, 1586, 1631, 1644, 1686, 1729, 1740, 1742, 1747, 1755, 1760, 1765, 1774, 1779, 1784, 1791
   to_code_visitor.py323399%108, 325, 506
   wtypes.py2902691%21, 185–196, 211–214, 231, 233, 278, 310, 313, 315, 318, 396, 445–446, 455–456, 464–465, 479
src/puya/awst_build
   arc4_utils.py1483477%50, 52, 55, 67, 94, 110, 114, 117, 123, 126, 129, 132, 138, 140, 148, 151, 154–166, 169, 178, 181, 264, 346
   base_mypy_visitor.py1294069%70–76, 94, 102–115, 129, 131, 133, 145, 150, 154, 157, 160, 166, 187, 192, 195, 198, 205, 209, 212, 215, 219, 237, 241, 245, 249, 253, 257, 261, 265, 269, 273, 277, 281, 285
   context.py1401490%62–63, 145, 147–151, 154–155, 175, 180, 184, 211
   contract.py2225376%131–132, 134–137, 145–146, 149, 161, 172, 194, 218, 220, 229, 239, 248, 276, 280, 296–300, 308, 317, 320, 323, 328–329, 332, 340, 343, 346, 349, 352, 355, 358, 361, 364, 392–399, 408–415, 422–423, 446, 456, 464, 470, 492–498
   intrinsic_factory.py31294%82–84
   intrinsic_models.py35197%22
   main.py48394%31, 48, 58
   module.py4007980%75, 143, 157–159, 173–174, 181, 189, 195, 201–205, 210, 222, 247–248, 259, 289, 315–316, 339, 346, 368–369, 392–397, 451–452, 480, 491, 494, 500, 513, 519, 531, 534, 556, 577, 583, 592–595, 613–648, 672, 680–681, 695–697, 699, 701–702, 727, 735, 737
   subroutine.py6025491%271, 277, 345, 354, 368, 409, 552–567, 575, 583, 627–628, 633, 675, 695–696, 720–727, 779, 785, 801, 807, 815–818, 872, 876–877, 881–882, 900, 903, 930, 939, 975, 1017, 1045, 1049, 1149, 1177, 1184, 1194, 1205–1209, 1218, 1221, 1224, 1227, 1230, 1251
   utils.py1641193%40, 77, 95–96, 100, 143–144, 163, 175, 231, 252
src/puya/awst_build/eb
   app_account_state.py1272779%51–54, 62, 78, 80, 112–113, 134–141, 162–163, 168, 175–176, 178, 195–196, 203–204, 233, 238–239
   app_state.py1202182%52–59, 80–81, 86, 99–100, 105, 122–123, 130–131, 172–173, 196, 214
   array.py674434%26–27, 30–32, 37–44, 56–72, 77–79, 82, 85–88, 93–95, 100–102, 111–123
   base.py1774575%125, 131–136, 147–153, 158–164, 172, 178, 188, 198, 202, 208, 222, 227, 232, 235, 238, 241, 246, 249, 292, 295, 300, 303, 306, 309, 312, 317, 320, 354, 388, 393, 402, 409, 416, 419, 422, 427, 434, 439, 445
   biguint.py82495%129, 146–149
   bool.py36392%53–54, 72
   bytes.py1251191%89–90, 110–111, 115, 119, 124, 126, 169, 261–262
   bytes_backed.py30487%37–38, 50–51
   contracts.py44295%57, 61
   ensure_budget.py441273%49–50, 70–71, 79, 91, 97–102
   log.py46589%79–85, 95
   named_int_constants.py20290%23–24
   string.py119893%101–102, 129–130, 185, 243–244, 259
   struct.py291355%20–21, 24, 33, 38–40, 43–48
   subroutine.py51590%48, 63, 89, 92, 107
   template_variables.py471177%25–26, 41, 59–60, 64, 69, 72–73, 82–83
   tuple.py982080%38–39, 46, 57, 59–60, 82–83, 92–93, 106, 112, 130–131, 136–137, 149, 157, 165, 199
   type_registry.py27196%151
   uint64.py72199%144
   unsigned_builtins.py66888%51, 58, 92, 95–96, 126, 129–130
   value_proxy.py391074%24, 30, 33, 36, 41, 56, 66, 75, 84, 90
src/puya/awst_build/eb/arc4
   utils.py1391589%55–56, 58, 61–62, 84–85, 115, 169, 175, 180–182, 226, 231
   abi_call.py1841890%107–108, 112–113, 152, 170, 210, 219–220, 263, 313–319, 352–353, 433, 435
   arrays.py2372291%97–98, 117, 149, 162–163, 187, 191, 250–251, 264, 313–314, 367–368, 390, 400–401, 465–466, 520, 557
   base.py851088%66–67, 116–117, 137, 146, 164–165, 185, 190
   bool.py26292%46–47
   dynamic_bytes.py39295%68–69
   emit.py29293%60–61
   numeric.py109893%73, 80–81, 139–140, 146, 207–208
   string.py62887%58, 87, 106–107, 132–133, 151–152
   struct.py53591%65, 68, 71, 97–98
   tuple.py641183%36, 44, 57, 61–62, 83, 92, 109–110, 120–121
src/puya/awst_build/eb/reference_types
   account.py67199%133
   application.py31197%42
   asset.py52394%48, 89–90
   base.py41198%87
src/puya/awst_build/eb/transaction
   base.py25388%33–34, 41
   group.py53492%87–88, 146–147
   inner.py51492%64–65, 115, 142
   inner_params.py100892%43–44, 54, 115, 150, 174, 190, 222
src/puya/awst_build/validation
   base_invoker.py29583%31, 38, 47–52
   inner_transactions.py180199%159
   scratch_slots.py39490%19, 33, 49, 51
src/puya/ir
   arc4_router.py2441793%131, 149, 157, 309, 485–486, 500, 541–542, 554, 559, 564, 569, 574, 579, 599–603
   avm_ops.py315199%46
   avm_ops_models.py48394%21, 30, 38
   context.py86792%72, 93–99, 104, 115, 132
   main.py218199%432
   models.py5011896%67, 176, 183, 308, 385, 429, 456, 511, 553, 633, 649, 690, 693, 700, 703, 793–794, 817
   ssa.py130298%51–52
   to_text_visitor.py149994%93, 98, 182–183, 189–194
   types.py1061586%49–50, 56, 88–91, 102, 118, 142–145, 177–180
   visitor.py1191587%171, 183, 198, 201, 207, 213, 216, 227, 230, 233, 236, 239, 242, 245, 248
   visitor_mutator.py101298%152–153
   vla.py72199%87
src/puya/ir/builder
   _utils.py76791%78, 157, 204, 237, 240–242
   arc4.py4223791%78, 163–168, 235–236, 486, 643–657, 989–1003, 1029–1052, 1062–1077, 1101, 1265–1282, 1321–1322, 1372, 1405, 1554–1555, 1618
   assignment.py56788%67, 80, 107, 127, 145, 161–162
   blocks.py84298%155, 163
   bytes.py641478%23–55, 139
   callsub.py57198%93
   iteration.py191498%46, 69, 95, 183
   itxn.py2631196%122–123, 125, 138, 186, 206, 231–232, 558, 596–597
   main.py4683593%98, 160, 164, 209, 226, 272, 406, 428–431, 447–448, 488, 514, 555–558, 568, 633, 751, 764, 801, 877, 880, 888, 891–892, 899, 930, 992, 1009, 1059–1060
src/puya/ir/destructure
   coalesce_locals.py1022080%119, 128–129, 132–135, 138–147, 163–166
   parcopy.py84298%47, 83
src/puya/ir/optimize
   collapse_blocks.py92595%65–69
   control_op_simplification.py1011090%159–166, 240–247
   inner_txn.py36197%38
   intrinsic_simplification.py4183093%68, 171, 183, 208, 250, 317, 375, 381, 455, 483, 504, 506, 512, 521, 565, 567, 569, 576, 606, 612, 614, 616, 621, 623, 625, 627, 629, 681–682, 689
   main.py86397%111–112, 128
src/puya/ir/validation
   _base.py30293%24–25
   min_avm_version_validator.py11191%15
   op_run_mode_validator.py20670%19–30
src/puya/mir
   annotaters.py159299%62, 212
   builder.py130795%239–240, 293, 296, 299, 302, 305
   context.py39197%35
   models.py3281695%40, 52, 68, 77, 88, 99, 110, 150, 260, 291, 328, 340, 365–371
   output.py61297%29, 31
   stack.py2501992%72, 119, 135, 146, 157, 167, 184, 201, 211, 230, 250, 256, 258, 297, 310, 334, 366, 371, 409
src/puya/mir/stack_allocation
   baileys.py205399%31, 330–334
   frame_allocation.py80298%21, 68
   koopmans.py61198%55
   peephole.py100694%75, 89, 99, 101, 103, 145
src/puya/teal/optimize
   peephole.py112496%154–164, 172
   repeated_rotations.py30197%13
   repeated_rotations_search.py88693%34, 40–41, 57, 67–68
TOTAL16236133792% 

Tests Skipped Failures Errors Time
302 3 💤 0 ❌ 0 🔥 2m 54s ⏱️

@daniel-makerx daniel-makerx enabled auto-merge (squash) June 6, 2024 04:24
@daniel-makerx daniel-makerx merged commit cd42f02 into main Jun 6, 2024
4 checks passed
@daniel-makerx daniel-makerx deleted the fix-itxn-validation branch June 6, 2024 04:31
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