Commit 40c85cb
feat(execute): skip deterministic factory deploy when it can't be bootstrapped (#2944)
* feat(execute): skip the deterministic factory deploy (and dependent tests) when it can't be bootstrapped
The deterministic deployment proxy is bootstrapped in an autouse session
fixture via a keyless transaction with a fixed gas limit. On chains where the
contract-creation intrinsic gas exceeds that limit (so the keyless tx can never
be mined), the deploy aborted the entire execute session, blocking even tests
that never use the factory.
- Pre-flight the deploy with `eth_estimateGas`: if the network requires more
gas for the creation than the keyless tx's fixed gas limit, raise instead of
attempting it (no funding tx, no doomed send, no inclusion wait).
- Make the session fixture best-effort: warn instead of raising, so tests that
don't need the factory still run.
- Skip a test that requests a deterministic deployment when the factory is
unavailable.
- Add `EthRPC.estimate_gas` for the pre-flight.
* chore: update comment
---------
Co-authored-by: LouisTsai <q1030176@gmail.com>1 parent 55f61ab commit 40c85cb
3 files changed
Lines changed: 64 additions & 9 deletions
File tree
- packages/testing/src/execution_testing
- cli/pytest_commands/plugins/execute
- rpc
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
| |||
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
99 | 128 | | |
100 | 129 | | |
101 | 130 | | |
| |||
Lines changed: 19 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| |||
171 | 175 | | |
172 | 176 | | |
173 | 177 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
180 | 185 | | |
181 | 186 | | |
182 | 187 | | |
| |||
794 | 799 | | |
795 | 800 | | |
796 | 801 | | |
797 | | - | |
| 802 | + | |
798 | 803 | | |
799 | 804 | | |
800 | 805 | | |
801 | | - | |
802 | | - | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
803 | 813 | | |
804 | 814 | | |
805 | 815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
637 | 653 | | |
638 | 654 | | |
639 | 655 | | |
| |||
0 commit comments