fork-genesis assemble: zero bonded/notBonded pool bank balances when stripping validator state
まだ誰も着手していません。
評価
調査の方向性
Start in assemble_genesis_fork.go at stripValidatorState, then read the bank and staking genesis handling referenced in the issue. Extend the existing coverage in assemble_genesis_fork_test.go:164-260 to inspect the bonded_tokens_pool and not_bonded_tokens_pool balances. Done means fork assembly leaves both pool balances at zero and seid start no longer panics during InitChain.
索引モデルが issue の本文から書いたものです。
説明
Problem
assemble_genesis_fork.go::stripValidatorState zeros validator/delegation/last_total_power state on the staking module (lines 223-284) but does NOT touch the bank balances on the bonded_tokens_pool / not_bonded_tokens_pool module accounts that the source chain's exported state carries over.
Cosmos staking InitGenesis (sei-cosmos/x/staking/genesis.go:112-126) panics if bondedTokens != sum(validator.tokens). After our fork-assembly:
bondedTokens= 0 (we stripped validators)bonded_tokens_poolbank balance still holds whatever the source chain had
→ seid start panics on InitChain on the first run of the new fork.
Fix
In stripValidatorState, after zeroing staking state, also rewrite the bank module's balances array to set both pool module-account balances to zero. The module-account addresses are deterministic (auth.NewModuleAddress("bonded_tokens_pool") and auth.NewModuleAddress("not_bonded_tokens_pool")).
Related
Discovered via research dive on seid export round-trip (PR sei-protocol/sei-k8s-controller#179). Test coverage in assemble_genesis_fork_test.go:164-260 only inspects staking/slashing/distribution fields, not bank — explains why this didn't surface in unit tests.
Severity
Blocking for any fork ceremony. Fix before first prod run on pacific-1.
🤖 Generated with Claude Code
- 主要言語
- Go
- スター
- 1
- フォーク
- 3
- 平均マージ
- 19分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sei-protocol/seictl のほかの issue
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
sei-protocol/seictl#236 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
sei-protocol/seictl#212 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
sei-protocol/seictl#178 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
sei-protocol/seictl#176 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
sei-protocol/seictl#174 ·
sei-protocol/seictl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
openmcp-project/service-provider-crossplane#330 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
openmcp-project/service-provider-kro#220 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
[FEATURE]: Set fieldPath and reason on the CEL validation rules対応中かも @bjosv が今日担当しました。 オープンenhancement needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
valkey-io/valkey-operator#618 ·
メンテナーはふだん 3 日以内に返信