Simplify staking contract migration for node operators
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- go
- 領域
- backend, blockchain
調査の方向性
Start with Bee’s go-storage-incentives-abi package and the storage-incentives code-generation pipeline described in the issue, then trace the existing staking clients and HTTP API. The first tier is intended to stand alone: add an explicitly triggered migration operation using generated deployment IDs. Done means legacy stake can be migrated through the API with progress and partial failures distinguishable; the issue does not identify specific Bee files or tests.
索引モデルが issue の本文から書いたものです。
説明
Summary
Bee should make it straightforward for node operators to move stake from an obsolete staking contract into the current deployment using only a new Bee release. Operators should not need to run an old Bee version (as suggested in the v2.3.0 migration guide, restart Bee specifically to perform the migration, or find and supply historical contract addresses and ABIs.
These UX improvements could be delivered in three progressively more automated tiers:
- An explicitly triggered API operation in the latest Bee version that performs the legacy withdrawal and optionally deposits the recovered stake into the current staking contract.
- An opt-in startup flag or configuration value that asks the latest Bee version to perform the same migration during daemon startup.
- A scheduled migration coordinated around a chain-specific fork block known to Bee in advance.
Motivation
When the staking contract is replaced, stake may remain associated with node accounts in the old deployment. Bee's normal configuration follows the current deployment, so recovering that stake can require historical release knowledge and manual contract interaction. This is especially awkward for operators using automated Docker deployments, where the expected workflow is to pull the latest Bee image and manage the node through configuration and its HTTP API.
I believe the known operational complexity of executing stake migrations may be having a chilling effect on rolling out chain protocol upgrades that require a new stake registry. If that's true, alleviating this complexity could significantly improve the agility of the protocol improvement process.
The suggested operator experience is:
- upgrade to the latest Bee release;
- explicitly approve migration through the API or configuration;
- let Bee identify the relevant legacy deployment, submit the required transactions, and report progress or partial failure;
- continue operating against the current staking deployment.
The operation must remain triggered by explicit opt-in because it moves tokens and submits on-chain transactions.
Implementation
Bee currently ingests smart contract deployment configuration via the go-storage-incentives-abi package, which in turn is generated as part of the release CI process of the storage-incentives repo (codegen script here). The lowest footprint way to get legacy staking contract configurations into bee is therefore to extend the codegen pipeline so that go-storage-incentives-abi preserves versioned historical staking deployments instead of exposing only the latest generated staking values.
Each generated record should include an externally assigned deployment ID, chain ID, address, deployment block, and enough of the staking ABI to execute a migration. If scheduled migration (tier 3) is desired, the complete ABI must be included. The existing storage-incentives release tag is a suitable deployment ID; several release IDs may map to the same contract address.
Bee can then select supported current and legacy deployment records in its chain configuration and construct allowlisted staking clients for them. API and configuration inputs should refer only to generated deployment IDs. An operator should never need to provide a contract address or ABI.
The three UX tiers are:
- Manual API migration. Add an endpoint such as
POST /stake/migrations/{deployment_id}. One request should inspect the node's stake in the selected legacy deployment and call its paused-contract migration operation. Optionally, depositing the recovered amount into the current deployment could be bundled into the same call. The response and status API must distinguish full success from cases where withdrawal succeeded but approval or redeposit did not. - Opt-in startup migration. Add a flag or configuration value identifying an approved generated deployment ID. During startup, Bee performs or resumes the migration before enabling staking-dependent operation. This needs persistent progress and transaction tracking so restarts are safe.
- Scheduled migration block. Publish the old deployment, new deployment, and chain-specific migration block before the upgrade. Bee continues to treat the old contracts as fully operational before that block, switches to the new deployment at the block, and begins migration only for operators who approved it. The administrator's pause of the old contract must be coordinated with the same transition.
The first tier can be implemented and reviewed independently. The later tiers can reuse the same generated deployment catalog and migration orchestration.
Considerations
- Retaining full historical staking ABIs increases the generated ABI module size.
- If the maintainer ever wishes to remove legacy ABIs from the codebase, there should be an explicit social contract as to how long legacy ABIs will be supported.
- Supporting multiple legacy deployments increases configuration and test coverage in Bee (though this can be mitigated by ensuring that migration ABIs are stable).
- Withdrawal, token approval, and redeposit are separate transactions. If bee is to bundle these together into a single user action, it must be able to expose and recover from partial completion.
- Startup automation requires durable state and careful idempotency to avoid duplicate transactions after a crash.
- A coordinated fork block introduces chain-head and reorganization handling and requires release coordination between contract administrators, Bee maintainers, and node operators.
AI Disclosure
- This issue contains suggestions and text generated by an LLM.
- I have reviewed the AI generated content thoroughly and made adjustments for clarity.
- I possess the technical expertise to responsibly review the AI generated content mentioned in this issue.
- 主要言語
- Go
- スター
- 1.5k
- フォーク
- 390
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 24
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ethersphere/bee のほかの issue
-
Chequebook deployment uses a fixed 175,000 gas limit; it needs about 630,000 under Glamsterdam (live on Sepolia since 2026-10-06)対応中かも @sbackend123 が 16 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
ethersphere/bee#5650 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
ethersphere/bee#5666 ·
メンテナーはふだん 2 日以内に返信
-
Add a transaction inbox for outbound chain transactions対応中かも @sbackend123 が 10 日前に担当しました。 オープンseen
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
ethersphere/bee#5660 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
ethersphere/bee#5659 · コメント 6 件 ·
メンテナーはふだん 2 日以内に返信
-
accepted seen
難易度 4/5 3〜5日 初心者へのやさしさ 40/100
ethersphere/bee#5648 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
ethersphere/bee の issue をすべて見る
似ている issue
-
Project submission:オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
slavakurilyak/awesome-ai-agents#845 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
[BUG] deploy.restart_policy without condition drops the restart policy対応中かも @akshat-lakhera が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
docker/compose#14383 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
Azure/azure-storage-fuse#2429 ·
メンテナーはふだん 1 日以内に返信