Commit aa7385a
tests: Fix grafted integration test with dynamic POI computation
The grafted test was failing because it used hardcoded POI values that
became stale when the base subgraph's deployment hash changed. This commit:
- Adds `patch_sources()` to dynamically patch source subgraph placeholders
(e.g., `@base@`) with actual deployment hashes at runtime
- Modifies `deploy()` and `prepare()` to accept source mappings
- Replaces hardcoded POI values with dynamic computation using the same
algorithm graph-node uses (matching spec version transitions)
- Updates Anvil to v1.4.0 for deterministic block hashes
The POI computation correctly handles the Legacy→Fast algorithm transition
when grafting from spec 0.0.5 to 0.0.6, starting from block 0 (genesis).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent a6076fe commit aa7385a
File tree
4 files changed
+273
-52
lines changed- tests
- integration-tests/grafted
- src
- tests
4 files changed
+273
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
50 | 69 | | |
51 | 70 | | |
52 | 71 | | |
53 | 72 | | |
| 73 | + | |
54 | 74 | | |
55 | 75 | | |
56 | 76 | | |
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
60 | 85 | | |
61 | 86 | | |
62 | 87 | | |
| |||
68 | 93 | | |
69 | 94 | | |
70 | 95 | | |
71 | | - | |
72 | | - | |
73 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
74 | 105 | | |
75 | 106 | | |
76 | 107 | | |
| |||
0 commit comments