Skip to content

chore: remove Pyth + SPYX (retirement tail ended) - #312

Merged
Thykof merged 1 commit into
mainfrom
chore/remove-pyth-spyx-cleanup
Jul 29, 2026
Merged

chore: remove Pyth + SPYX (retirement tail ended)#312
Thykof merged 1 commit into
mainfrom
chore/remove-pyth-spyx-cleanup

Conversation

@Thykof

@Thykof Thykof commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Final step of the Pyth exit: delete SPYX and every remaining Pyth code path from synth-subnet.

Why now

SPYX ran its retirement tail on Pyth — validator via Pyth Pro history, miner via Pyth Hermes. Pyth Pro history now returns 401 without a key, so that path is dead: it scores/fetches nothing, and the live CI test (test_live_history_spyx_pyth_tail) failed on the 401 (skipped in a prior PR). SPYX stopped being prompted at the 2026-07-23 SP500 switchover and its window_days=10 moving-average scores have aged out. The plan pre-authorized ending the tail here ("if Pyth paywalls mid-tail… accept the loss").

Changes

Validator

  • price_data_provider.py — remove PYTH_PRO_URL, PYTH_SYMBOL_MAP, fetch_data_pyth, _assert_settled, and the Pyth term in assert_assets_supported. The routing else now raises ValueError for an asset in neither venue map (fail-fast instead of a dead Pyth call). The Binance/Hyperliquid settlement-witness guards are independent and untouched.
  • competition_config.py — drop SPYX from COM_EQU_24H.
  • moving_average.py — drop the SPYX coefficient (SP500 keeps its own).

Miner

  • price_simulation.py — remove TOKEN_MAP, the Hermes URL, and _fetch_price_hermes; get_asset_price raises ValueError for an unmapped asset.
  • simulations.py — drop the SPYX sigma.

Tests

  • Remove the two Pyth _assert_settled tests, the TestPriceDataProviderPythTail class, and the skipped live SPYX test.
  • Add unsupported-asset raise tests for both the validator (fetch_data) and miner (get_asset_price) paths.

Verification

black + flake8 clean (pre-commit passed); 24 unit tests pass (live/network tests excluded).

Follow-ups (not in this PR)

  • CHANGELOG entry + version bump (release metadata).

🤖 Generated with Claude Code

The SPYX rollout tail ran on Pyth (validator: Pyth Pro history; miner:
Pyth Hermes). Pyth Pro now returns 401 without a key, so the tail path
is dead — it scores/fetches nothing, and the live CI test failed on the
401. SPYX stopped being prompted at the 2026-07-23 SP500 switchover; its
moving-average window has aged out. Remove SPYX and every Pyth code path.

Validator (price_data_provider.py): drop PYTH_PRO_URL, PYTH_SYMBOL_MAP,
fetch_data_pyth, _assert_settled, and the PYTH term in
assert_assets_supported; the routing else now raises ValueError for an
asset in neither venue map (the Binance/Hyperliquid settlement-witness
guards are untouched). competition_config.py: drop SPYX from
COM_EQU_24H. moving_average.py: drop the SPYX coefficient.

Miner (price_simulation.py): drop TOKEN_MAP, the Hermes URL and
_fetch_price_hermes; get_asset_price raises ValueError for an unmapped
asset. simulations.py: drop the SPYX sigma (SP500 keeps its own).

Tests: remove the Pyth _assert_settled tests, the Pyth-tail class, and
the skipped live SPYX test; add unsupported-asset raise tests for both
the validator and miner paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the final SPYX/Pyth “retirement tail” by deleting the remaining Pyth/Hermes fetch paths and making unsupported assets fail fast, aligning the validator and reference miner with the post-SP500 switchover.

Changes:

  • Validator: remove Pyth Pro history path and make unknown assets raise ValueError instead of falling through.
  • Miner: remove Pyth Hermes spot-price path and make unknown assets raise ValueError.
  • Config/tests: remove SPYX coefficients/config entries and replace Pyth-tail tests with unsupported-asset raise tests.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
synth/validator/price_data_provider.py Deletes Pyth code paths and changes the “unknown asset” route to a hard ValueError.
synth/validator/moving_average.py Removes the SPYX moving-average coefficient (SP500 remains).
synth/validator/competition_config.py Removes SPYX from the Commodities/Equities 24h competition asset list.
synth/miner/price_simulation.py Deletes Hermes/TOKEN_MAP path and raises ValueError for unsupported assets.
synth/miner/simulations.py Removes SPYX sigma and clarifies SP500 inherits the former SPYX sigma.
tests/test_price_data_provider.py Removes Pyth-tail tests and adds unsupported-asset raise coverage for validator fetch_data.
tests/test_miner_price_simulation.py Removes Hermes-path test and adds unsupported-asset raise coverage for miner get_asset_price.
Comments suppressed due to low confidence (1)

synth/miner/price_simulation.py:90

  • After removing the last Pyth/Hermes code path here, the repository documentation is now stale: CHANGELOG.md still says "Hermes remains only to serve SPYX prompts". Please update/remove that statement (and any similar docs) so it matches the new behavior.
    raise ValueError(f"unsupported asset {asset}")

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread synth/miner/price_simulation.py
Comment thread synth/validator/price_data_provider.py
@Thykof
Thykof merged commit 988d902 into main Jul 29, 2026
6 checks passed
@Thykof
Thykof deleted the chore/remove-pyth-spyx-cleanup branch July 29, 2026 12:20
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