Commit 5fd0b10
Neo
[P1-1] Route storage/compute + oracle-price legs to the real service
The compute/storage routes (/api/v1/compute/store, /ipfs/pin, /arweave/store)
called a non-existent 'compute' service with mismatched param names, yielding a
misleading 404. Point each at the real privacy-service method
(decentralized_store / pin_to_ipfs / store_on_arweave) with correctly-mapped
params so the leg executes and returns a real record.
The oracle price route passed an invalid oracle_type='price'; use the valid
'price_feed'. Harden the honest-failure contract so a non-eth-usd pair returns
a real result or an honest 400 (unsupported pair) and never a bare 500:
- _call maps a service ValueError to 400 (invalid value = client error),
mirroring the existing TypeError->400 mapping;
- price_feeds._get_contract validates the pair before importing web3, so an
unsupported pair is a 400 regardless of chain-backend availability;
- the oracle handler maps any residual upstream 5xx to an honest 503.
Adds tests/test_p1_route_fixes.py exercising the full HTTP path.1 parent f3dbcb6 commit 5fd0b10
3 files changed
Lines changed: 144 additions & 17 deletions
File tree
- gateway
- runtime/blockchain/services/oracle_gateway
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
648 | 656 | | |
649 | 657 | | |
650 | 658 | | |
| |||
1327 | 1335 | | |
1328 | 1336 | | |
1329 | 1337 | | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
1335 | 1352 | | |
1336 | 1353 | | |
1337 | 1354 | | |
| |||
1713 | 1730 | | |
1714 | 1731 | | |
1715 | 1732 | | |
1716 | | - | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
1720 | 1737 | | |
1721 | 1738 | | |
1722 | 1739 | | |
1723 | 1740 | | |
1724 | 1741 | | |
1725 | 1742 | | |
1726 | 1743 | | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
1730 | 1748 | | |
1731 | 1749 | | |
1732 | 1750 | | |
1733 | 1751 | | |
1734 | 1752 | | |
1735 | 1753 | | |
1736 | 1754 | | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
1740 | 1758 | | |
1741 | 1759 | | |
1742 | 1760 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| 197 | + | |
| 198 | + | |
196 | 199 | | |
197 | 200 | | |
198 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
0 commit comments