RewardAccount: validate header type bits and bech32 prefix
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- api
調査の方向性
packages/evolution/src/RewardAccount.ts の FromBech32 と FromBytes から始め、次に Address.FromBech32 にある既存のチェックと #391 に関連する変更を比較します。reward ではないヘッダーと stake ではないプレフィックスを拒否しつつ、有効な stake および stake_test のラウンドトリップを維持するテストを追加します。これらのケースが指定どおりにパースされるか失敗すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
RewardAccount parsing is looser than Address parsing for the same class of input. RewardAccount.FromBech32 does not check the bech32 human-readable prefix, and RewardAccount.FromBytes does not validate the CIP-19 header type nibble. As a result, a non-stake prefix and a non-reward header type can still parse into a RewardAccount. This is the RewardAccount-side counterpart to #391, which added the equivalent checks on Address / EnterpriseAddress / BaseAddress.
Affected
- packages/evolution/src/RewardAccount.ts — FromBech32 (prefix not checked)
- packages/evolution/src/RewardAccount.ts — FromBytes (header type nibble not validated)
Fix
FromBytes: require the header type to be a reward type (14/15); reject others.FromBech32: require the prefix to bestake/stake_testand to agree with the header networkId.
Mirror the checks already present in Address.FromBech32.
Test
Add coverage asserting that a non-reward header and a non-stake prefix both fail to parse as a RewardAccount, and that valid stake / stake_test inputs still round-trip.
- 主要言語
- TypeScript
- スター
- 22
- フォーク
- 30
- 平均マージ
- 4日 13時間
- マージ済み PR(30日)
- 25
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
IntersectMBO/evolution-sdk のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
IntersectMBO/evolution-sdk#559 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
IntersectMBO/evolution-sdk#557 ·
メンテナーはふだん 1 日以内に返信
-
dependencies good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 93/100
IntersectMBO/evolution-sdk#541 ·
メンテナーはふだん 1 日以内に返信
-
bug external-review
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
IntersectMBO/evolution-sdk#530 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
IntersectMBO/evolution-sdk#518 ·
メンテナーはふだん 1 日以内に返信
IntersectMBO/evolution-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
openedx/frontend-app-authoring#3274 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
area/documentation status/need-triage
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
google-gemini/gemini-cli#29548 ·
メンテナーはふだん 1 日以内に返信
-
sdk-typescript vector-store
難易度 2/5 半日 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信