Skip to content

fix: oracle ops config and error hygiene - #628

Open
goldandrew wants to merge 2 commits into
SO4-Markets:mainfrom
goldandrew:fix/oracle-ops-and-error-hygiene
Open

fix: oracle ops config and error hygiene#628
goldandrew wants to merge 2 commits into
SO4-Markets:mainfrom
goldandrew:fix/oracle-ops-and-error-hygiene

Conversation

@goldandrew

@goldandrew goldandrew commented Jul 27, 2026

Copy link
Copy Markdown

Summary

  • Add configurable SET_PRICES_TX_FEE / KEEPER_TX_FEE env vars, replacing hardcoded transaction inclusion fees in the keeper loop.
  • Fix config.rs env-parsing blocks whose return/? targeted the wrong error type (EnvErrors vs EnvError), which failed to compile.
  • Carry truncated HTTP response bodies into Binance/Coinbase/Pyth/RPC error variants for better diagnostics.
  • De-duplicate keeper low-balance log spam: error! only on transition into low-balance, debug! while sustained, info! on recovery.
  • Fix build_spot_price_url ignoring the caller's base_url, which caused Binance wiremock tests to silently hit the live API instead of the mock server.
  • Remove dead/duplicated code in binance.rs and signing.rs.
  • Add MIT license field to oracle/shared-config crates and a LICENSE file.

Test plan

  • cargo build --workspace
  • cargo test --workspace

closes #576
closes #574
closes #567
closes #568

- Add configurable SET_PRICES_TX_FEE / KEEPER_TX_FEE env vars, replacing
  hardcoded transaction inclusion fees in the keeper loop.
- Fix config.rs env-parsing blocks that used bare `{}` blocks with `return`/`?`
  targeting the wrong Result type (EnvErrors vs EnvError), which failed to
  compile; wrap them in closures so early returns resolve correctly.
- Fix ConfigError -> EnvError conversion for price_feed loading.
- Carry truncated HTTP response bodies into Binance/Coinbase/Pyth/RPC error
  variants for better diagnostics.
- De-duplicate keeper low-balance log spam: only emit `error!` on the
  transition into a below-minimum state, `debug!` while it persists, and
  `info!` on recovery.
- Fix build_spot_price_url ignoring the caller's base_url, which caused
  Binance wiremock tests to hit the live API instead of the mock server.
- Remove dead/duplicated code in binance.rs and signing.rs.
- Add MIT license field to oracle/shared-config crates and LICENSE file.
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@goldandrew Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@goldandrew
goldandrew force-pushed the fix/oracle-ops-and-error-hygiene branch from d3f5d7f to 83d83f7 Compare July 27, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment