You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: simplify genesis resolution and clean up sidecar task handlers (#49)
## Summary
- **Genesis simplification**: All genesis/ceremony task handlers now
derive S3 coordinates from environment variables (`SEI_GENESIS_BUCKET`,
`SEI_GENESIS_REGION`, `SEI_CHAIN_ID`) instead of receiving them as task
params. Genesis resolution: embedded sei-config first, S3 fallback at
`{bucket}/{chainID}/genesis.json`.
- **Bump sei-config to v0.0.9**: Corrected embedded genesis files for
pacific-1, atlantic-2, arctic-1
- **Remove dead code**: `CommandRunner` type, `parseUploadConfig`, stale
S3 fields from client task types
- **Fix `readLocalNodeID`**: Now derives node ID from Ed25519 key
(matching CometBFT's `p2p.PubKeyToID`), instead of assuming a top-level
`"id"` field in `node_key.json`
- **Consistency fixes**: ConfigPatcher rejects empty files,
`SEI_SNAPSHOT_UPLOAD_INTERVAL` fails fast on invalid value, stale doc
comments cleaned up
- **Env var validation**: `serve.go` validates `SEI_CHAIN_ID`,
`SEI_GENESIS_BUCKET`, `SEI_GENESIS_REGION` at startup
## Deployment notes
- Requires sei-k8s-controller to inject `SEI_GENESIS_BUCKET` and
`SEI_GENESIS_REGION` into sidecar pod specs (see
sei-protocol/sei-k8s-controller `refactor/genesis-env-driven` branch)
- Controller must deploy before this sidecar — new sidecar requires env
vars that the new controller injects
## Test plan
- [x] `go test ./sidecar/...` — all pass (pre-existing
`TestExportS3UploaderFactoryError` unrelated)
- [x] Genesis embedded path tested (pacific-1, atlantic-2)
- [x] Genesis S3 fallback tested (unknown chain)
- [x] Ceremony tasks tested (upload artifacts, assemble genesis, set
peers)
- [x] TypedHandler deserialization integration tests pass for all 17
task types
- [ ] Deploy controller with env var injection, then deploy new sidecar
image
- [ ] Verify genesis ceremony end-to-end on dev cluster
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments