Skip to content

feat: align keeper + MM with 1 PH/s/day contract unit#33

Merged
shev-titan merged 7 commits into
devfrom
feat/ph-contract-unit
Jul 9, 2026
Merged

feat: align keeper + MM with 1 PH/s/day contract unit#33
shev-titan merged 7 commits into
devfrom
feat/ph-contract-unit

Conversation

@lsheva

@lsheva lsheva commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keeper + MM (unit change): read CONTRACT_SIZE_HPS_DAY / ORACLE_UNIT_HPS_DAY from the venues and apply the contract-size rebase to off-chain oracle prices (keeper priceFeed, MM rawOracle + perps/futures venue adapters), matching on-chain getMarketPrice(). Removes the deliveryDurationDays multiplier from the keeper predict/solve/snapshot layers and futures venue. PME getNetPositionDelta comment clarified (per-day delta, no duration factor).
  • Second commit (unrelated): in-progress portfolio market-maker work (portfolio runner, circuit breaker, nonce/tx coordination, collateral/health, schemas) included as-is per request — not part of the unit change.

Test plan

  • pnpm test (keeper) — 272 passing, 0 failing
  • pnpm typecheck after ABI deps are republished/re-resolved (needs the new CONTRACT_SIZE_HPS_DAY() getters + futures initialize signature)
  • Keeper integration suite (live chain) after ABI refresh
  • Review/validate the portfolio-MM commit separately

Migration note

ABI deps (derivatives-marketplace-abi, futures-marketplace-abi) are pinned to old commits; republish the regenerated ABIs and repin the lockfile before typecheck/integration pass.

shev-titan and others added 7 commits July 8, 2026 17:13
Read CONTRACT_SIZE_HPS_DAY / ORACLE_UNIT_HPS_DAY from the venues and apply the
contract-size rebase to off-chain oracle prices (keeper priceFeed, MM rawOracle
and the perps/futures venue adapters), matching on-chain getMarketPrice(). Remove
the deliveryDurationDays multiplier from the keeper predict/solve/snapshot layers
and the futures venue. PME getNetPositionDelta comment clarified (per-day delta,
no duration factor). Keeper unit + integration tests updated.
Separate, unrelated in-progress portfolio market-maker feature (portfolio runner,
circuit breaker, nonce/tx coordination, collateral/health tracking, schemas and
config) committed as-is per request. Not part of the PH/s contract-unit change.
Repin derivatives-marketplace (c8078b9e) and futures-marketplace (5e28bb34)
to exact post-merge dev commits so lockfiles and CI resolve the ABIs carrying
CONTRACT_SIZE_HPS_DAY, avoiding pnpm's cached #dev branch drift.
Pin the Matchstick binary to 0.6.0 in both indexers so `graph test` no
longer hits the GitHub API for the "latest" release tag — that call gets
rate-limited on CI and returns no tag_name, throwing "Invalid version.
Must be a string" and breaking the points-subgraph deploy.

Drop the public /health smoke-test from the keeper deploy: the keeper is
behind an internal (VPC/VPN-only) ALB, so keeper.{env}.hashpower.exchange
is unreachable from GitHub-hosted runners. Rollout health is already
asserted via the ECS deployment state + ALB target-group health check.
Pin the Matchstick binary to 0.6.0 in both indexers so `graph test` no
longer hits the GitHub API for the "latest" release tag — that call gets
rate-limited on CI and returns no tag_name, throwing "Invalid version.
Must be a string" and breaking the points-subgraph deploy.

Drop the public /health smoke-test from the keeper deploy: the keeper is
behind an internal (VPC/VPN-only) ALB, so keeper.{env}.hashpower.exchange
is unreachable from GitHub-hosted runners. Rollout health is already
asserted via the ECS deployment state + ALB target-group health check.
ci: fix flaky subgraph tests and unreachable keeper health check
@shev-titan shev-titan merged commit ce00917 into dev Jul 9, 2026
21 of 22 checks passed
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