Skip to content

[docs-agent] HyperCore private-preview docs: contract-only update - #1510

Merged
SahilAujla merged 2 commits into
mainfrom
docs/hypercore-preview-contracts-update
Aug 7, 2026
Merged

[docs-agent] HyperCore private-preview docs: contract-only update#1510
SahilAujla merged 2 commits into
mainfrom
docs/hypercore-preview-contracts-update

Conversation

@alchemy-bot

Copy link
Copy Markdown
Contributor

Summary

Apply the latest HyperCore private-preview overlay from abdulmanan-creator/alchemy-hypercore-docs@92a2d56 (docs-repo-overlay/content/) onto alchemyplatform/docs. This is a straight follow-up to PR #1488 (DOCS-167, already merged); all pages continue to sit under hidden: true sections, so nothing on the live site becomes visible in nav or search from this change.

The change is contract work, not formatting:

  • gRPC contracts corrected and narrowed (7 pages under content/api-reference/hypercore-grpc/)
  • WebSocket contracts expanded with concrete parameter/payload semantics (10 pages under content/api-reference/websockets/hypercore/)
  • Shared HyperCore semantics consolidated into concepts pages to prevent transport drift (concepts + overview pages under content/api-reference/data/hypercore/ and content/api-reference/hyperliquid/hypercore/)

Diff shape

26 files under content/api-reference/ change:

  • 25 modifications
  • 1 net-new shared include: content/api-reference/websockets/hypercore/ledger-delta-types.mdx, referenced by user-non-funding-ledger-updates.mdx and all-user-non-funding-ledger-updates.mdx via <Markdown src="./ledger-delta-types.mdx" />

No content/docs.yml change. No OpenAPI/OpenRPC spec changes (overlay src/ matches the current repo state bit-for-bit).

Repo checks

  • pnpm run lint — only pre-existing baseline warnings on MDX_FEATURES.md and content/wallets/pages/smart-wallets/session-keys/legacy-session-keys.mdx; no warnings or errors on the HyperCore diff.
  • pnpm run validate:docs-yml — passes.
  • pnpm run generate:rest / pnpm run generate:rpc / validate:rest / validate:rpc — skipped intentionally; src/openapi/ and src/openrpc/ are unchanged.
  • Defensive sweep for - list markers in the HyperCore diff — none present.
  • Defensive sweep for docs.alchemy.com/reference/ legacy URLs and bare /wallets/… links in the HyperCore diff — none present.

Linear

DOCS-180 — HyperCore private-preview docs: contract-only update

Requested by

@abdulmanan-creator (via Slack thread)

Apply docs-repo-overlay/content/ from abdulmanan-creator/alchemy-hypercore-docs@92a2d56.

Contract work, not formatting:
* gRPC contracts corrected and narrowed
* WebSocket contracts expanded with concrete parameter/payload semantics
* Shared HyperCore semantics consolidated into concepts pages

26 files changed under content/api-reference/ (25 modifications + one new shared
include, content/api-reference/websockets/hypercore/ledger-delta-types.mdx).
No docs.yml change; no OpenAPI/OpenRPC spec changes.

Refs DOCS-180

Requested-by: @abdulmanan-creator
@alchemy-bot
alchemy-bot requested a review from a team as a code owner August 7, 2026 17:10
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

🔗 Preview Mode

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Aug 7, 2026, 5:22 PM

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df8df1a2d1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

4. Subscribe to `l2BookDiff` for the same coin scope and apply only diffs that follow the installed snapshot once the ordering contract is confirmed.
5. If replay reports a gap, or a cursor is rejected, discard local state and start again from a fresh snapshot.
2. The snapshot establishes the local book state.
3. Subscribe to `l2BookDiff` for the same coin scope and apply its diffs to that state.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use a sequence-bearing snapshot for diffs

When clients follow this bootstrap, an update can occur between the l2Book snapshot and the later l2BookDiff subscription, but the l2Book snapshot has no seq/prev_seq or cursor position to prove which diffs follow it. That means consumers can apply diffs to a stale snapshot and silently build an invalid local book; the procedure should start from a diff-stream isSnapshot message or document a snapshot position that can be checked against the first diff.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Deferred — flagging to <@abdulmanan-creator> for a design call. The finding is real: the l2Book snapshot has no cursor or per-market seq, so the current bootstrap flow (subscribe to l2Book, then subscribe to l2BookDiff) has a race where diffs between the two subscriptions can be silently lost. Two directions from your comment: (a) start from the diff stream's isSnapshot: true message (matches this file's own Recovery section, but assumes the server pushes an initial snapshot on subscribe — needs confirmation from the HyperCore team), or (b) surface a snapshot position on l2Book that a client can check against the first diff's prev_seq (larger contract change). Not applying unilaterally here since it re-shapes the intended bootstrap flow; posted this in Slack for Abdul to weigh in.

Comment thread content/api-reference/websockets/hypercore/l4-book-updates.mdx Outdated
Comment thread content/api-reference/websockets/hypercore/tpsl-updates.mdx Outdated
Comment thread content/api-reference/hypercore-grpc/stream-bbo-book.mdx Outdated
Comment thread content/api-reference/hypercore-grpc/stream-l2-book.mdx Outdated
Four internal-contradiction fixes flagged by codex on PR #1510:

* content/api-reference/websockets/hypercore/l4-book-updates.mdx —
  Recovery bullets told clients to persist per-market `seq` and check
  `prev_seq`, but the payload table has neither. The shared concepts page
  (`timestamps-cursors-and-replay#detecting-gaps`) classifies this stream as
  server-side gap detection with no client sequence bookkeeping. Dropped the
  seq/prev_seq bullets, kept cursor-based persistence + isSnapshot handling,
  and added a one-line pointer to the shared model.

* content/api-reference/websockets/hypercore/tpsl-updates.mdx — Same fix as
  above (`tpslUpdates` is also classified as server-side detection).

* content/api-reference/hypercore-grpc/stream-bbo-book.mdx — Key-fields
  section documented a `bbo` tuple, but the `BboBookUpdate` proto right above
  it defines separate `bid` and `ask` `Level` fields. Split the entry to match
  the proto.

* content/api-reference/hypercore-grpc/stream-l2-book.mdx — Key-fields section
  documented a `levels` tuple, but the `L2BookUpdate` proto defines separate
  `bids` and `asks` repeated-`Level` arrays. Split the entry to match the proto.

Refs DOCS-180

Requested-by: @abdulmanan-creator
@SahilAujla
SahilAujla merged commit 6adc425 into main Aug 7, 2026
10 of 21 checks passed
@SahilAujla
SahilAujla deleted the docs/hypercore-preview-contracts-update branch August 7, 2026 19:01
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