Status route accepts fractional or negative node ids as the chain tip
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 85/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- nextjs, typescript
- 領域
- api
調査の方向性
reference-implementations/dacs-directory/app/api/dacs/status/route.ts:48 から始めます。ここで最初の数値のトランザクション id が取得されるので、54-67 行目を読んで、txsBehind、cursorAheadBy、chainResetSuspected がそこからどのように導出されるかを確認します。src/catalog/scan.ts:493 の observedTip ガードと、src/catalog/contracts.ts:232-233 の integer-or-null スキーマと比較してください。typeof id === "number" チェックを Number.isSafeInteger(id) && id >= 0 に置き換え、次に test/rpc-read-limits.test.ts(56-88 行目)の既存の status-route テストの隣に、fractional-id と negative-id のケースを追加します。その際、chainLatestTx と txsBehind が null になることを期待します。完了とは、それらのテストが通ることです。
索引モデルが issue の本文から書いたものです。
説明
Where: reference-implementations/dacs-directory/app/api/dacs/status/route.ts:48 (on phase0-completion at the linked commit)
What goes wrong: GET /api/dacs/status takes the first transaction id from the node's reply with typeof id === "number" (route.ts:48). A fractional id such as 1270.5, or a negative id, is returned as chainLatestTx and used to compute txsBehind, cursorAheadBy and chainResetSuspected (route.ts:54-67). The status schema declares chainLatestTx and txsBehind as integer-or-null (src/catalog/contracts.ts:232-233), so the reply can break its own schema.
Suggested fix: Accept only safe non-negative integers (Number.isSafeInteger(id) && id >= 0) and leave chainLatestTx null otherwise, as the scanner already does for observedTip (src/catalog/scan.ts:493). Add route tests with a fractional id and a negative id next to the existing status-route tests in test/rpc-read-limits.test.ts (lines 56-88); expect chainLatestTx and txsBehind to be null.
Size: Small
This comes from a code review, not from a failing run, so please confirm it before starting. Send the fix as a pull request to phase0-completion. It merges once tests pass and a maintainer has approved it.
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 3
- 平均マージ
- 20時間 26分
- マージ済み PR(30日)
- 119
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DACS-Agent-commerce/Community のほかの issue
-
Payment safety page: explain 'preimage' and 'claim' and name the cross-chain open state preciselyオープンcontributors-section
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
DACS-Agent-commerce/Community#366 ·
メンテナーはふだん 1 日以内に返信
-
contributors-section
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DACS-Agent-commerce/Community#361 ·
メンテナーはふだん 1 日以内に返信
-
contributors-section
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
DACS-Agent-commerce/Community#359 ·
メンテナーはふだん 1 日以内に返信
-
contributors-section
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DACS-Agent-commerce/Community#354 ·
メンテナーはふだん 1 日以内に返信
-
OpenAPI entry for the listing version route omits its 409 response対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンcontributors-section
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
DACS-Agent-commerce/Community#348 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
DACS-Agent-commerce/Community の issue をすべて見る
似ている issue
-
Y2025: QBI forms print a negative taxable income; Form 8995-A lines 14b/14c check the wrong columnオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
readest/readest#7903 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
type: documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Oddmash/oddmash-ui#72 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
TMHSDigital/steam-mcp#106 ·
-
bug priority:p3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
LCNINE/almondyoung-server#1562 ·
メンテナーはふだん 1 日以内に返信