Commit c73137d
authored
Optionally remove test gas limit in
## Description
This PR adds `--no-gas-limit` CLI option to `forc test`. The option
increases tx gas limit in `forc test` to `u64::MAX`, essentially
removing it.
The motivation for the change was the need to benchmark heavy gas
consuming algorithms. E.g., a brute force prime factorization of the
number 9223372021822390277 took 21_474_836_627 gas units.
The new `TestGasLimit` enum provides a `Limit(limit)` variant which is
currently unused, but added for future extensions, if we want to limit
the test gas to a particular value.
## Checklist
- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.forc test (#7495)1 parent ec51769 commit c73137d
File tree
6 files changed
+70
-14
lines changed- forc-plugins/forc-debug/src/server
- forc-test/src
- forc/src/cli/commands
- test/src/e2e_vm_tests
6 files changed
+70
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | | - | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
| |||
265 | 273 | | |
266 | 274 | | |
267 | 275 | | |
268 | | - | |
| 276 | + | |
269 | 277 | | |
270 | 278 | | |
271 | 279 | | |
| |||
433 | 441 | | |
434 | 442 | | |
435 | 443 | | |
| 444 | + | |
436 | 445 | | |
437 | 446 | | |
438 | 447 | | |
| |||
467 | 476 | | |
468 | 477 | | |
469 | 478 | | |
| 479 | + | |
470 | 480 | | |
471 | 481 | | |
472 | 482 | | |
| |||
663 | 673 | | |
664 | 674 | | |
665 | 675 | | |
| 676 | + | |
666 | 677 | | |
667 | 678 | | |
668 | 679 | | |
669 | 680 | | |
670 | 681 | | |
671 | 682 | | |
672 | 683 | | |
673 | | - | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
674 | 691 | | |
675 | 692 | | |
676 | 693 | | |
| |||
684 | 701 | | |
685 | 702 | | |
686 | 703 | | |
687 | | - | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
688 | 708 | | |
689 | 709 | | |
690 | 710 | | |
691 | | - | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
692 | 717 | | |
693 | 718 | | |
694 | 719 | | |
| |||
697 | 722 | | |
698 | 723 | | |
699 | 724 | | |
| 725 | + | |
700 | 726 | | |
701 | 727 | | |
702 | 728 | | |
| |||
750 | 776 | | |
751 | 777 | | |
752 | 778 | | |
| 779 | + | |
753 | 780 | | |
754 | 781 | | |
755 | 782 | | |
756 | | - | |
757 | | - | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
758 | 789 | | |
759 | 790 | | |
760 | 791 | | |
761 | 792 | | |
762 | 793 | | |
763 | 794 | | |
764 | | - | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
765 | 801 | | |
766 | 802 | | |
767 | 803 | | |
| |||
775 | 811 | | |
776 | 812 | | |
777 | 813 | | |
778 | | - | |
| 814 | + | |
779 | 815 | | |
780 | 816 | | |
781 | 817 | | |
| |||
813 | 849 | | |
814 | 850 | | |
815 | 851 | | |
816 | | - | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
817 | 858 | | |
818 | 859 | | |
819 | 860 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
110 | 120 | | |
111 | 121 | | |
112 | 122 | | |
| |||
123 | 133 | | |
124 | 134 | | |
125 | 135 | | |
126 | | - | |
| 136 | + | |
127 | 137 | | |
128 | 138 | | |
129 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
| |||
0 commit comments