Expose storage price calculations and meaningful stamp purchase errors

オープン
#5,301 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
go
領域
api, backend

調査の方向性

Start by locating the /chainstate handler and the stamp purchase validation and error paths; the issue does not name files or tests. Read how current price, amount, depth, and duration are represented, then identify relevant tests before changing behavior. Done means exposing the requested calculations and returning actionable constraint errors with price context; the exact endpoint and calculation details remain to be designed.

索引モデルが issue の本文から書いたものです。

説明

seen

Summary

Users currently need to call Gnosis RPC and inspect smart contracts to calculate storage costs. The Bee node has this information (via /chainstate) but doesn't expose it in a user-friendly way with calculations.

Additionally, when stamp purchases fail (e.g., duration too short), users get unhelpful error messages.

Current Behavior

  • /chainstate returns raw currentPrice (PLUR per chunk per block), but no calculations
  • Stamp purchase failures return generic errors without explaining why or what's needed

Expected Behavior

1. Storage price calculations endpoint

Extend /chainstate or add new endpoint that provides:

  • Current storage price (PLUR per chunk per block) - already in chainstate
  • Calculator: given amount + depth → expected duration
  • Calculator: given duration + depth → required amount
  • Calculator: given duration + depth → total cost to pay
2. Meaningful stamp purchase errors

When a stamp purchase fails due to constraints, return a clear error explaining:

  • Why it failed (e.g., "duration less than minimum 24 hours")
  • What's required (e.g., "use amount of at least XXX for 24h minimum")
  • Include current price context so user can adjust

Use Case

Developers and users want to purchase stamps without needing to:

  1. Query Gnosis RPC directly
  2. Understand PLUR/chunk/block calculations manually
  3. Guess why their purchase failed

This would significantly improve the stamp purchasing UX.

主要言語
Go
スター
1.5k
フォーク
390
平均マージ
2日 22時間
マージ済み PR(30日)
24

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ethersphere/bee のほかの issue

ethersphere/bee の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。