Commit 0cd97d8
authored
feat: genesis ceremony task handlers and deterministic task IDs (#41)
## Summary
- **Genesis task handlers**: Implements the four sidecar task handlers
needed for genesis ceremony orchestration:
- `generate-identity` — runs `seid init` to create validator keys and
node identity
- `generate-gentx` — three-step pipeline: `keys add` →
`add-genesis-account` → `gentx`
- `upload-genesis-artifacts` — uploads gentx and identity manifest to S3
per-node
- `assemble-and-upload-genesis` — downloads all node gentxs from S3,
runs `collect-gentxs`, uploads assembled genesis.json
- **Deterministic task IDs**: Engine now accepts caller-provided UUIDs
for idempotent task submission with deduplication. `ErrInvalidTaskID`
sentinel for non-UUID IDs. `TaskMeta` struct embedded in all 16 client
task types for ID propagation.
- **Client ergonomics**: Typed `Submit*Task` convenience methods on
`SidecarClient` for all four new genesis tasks. `CommandRunner`
abstraction for testable `seid` CLI invocations.
## Test plan
- [x] `generate-identity`: seid init args, idempotency via marker,
missing params, seid failure
- [x] `generate-gentx`: full 3-step flow, idempotency, missing params,
keys add failure
- [x] `upload-genesis-artifacts`: gentx + identity upload, idempotency,
missing params, no gentx file
- [x] `assemble-and-upload-genesis`: full flow with S3 mock,
idempotency, missing params, S3 download failure, collect-gentxs failure
- [x] Engine: caller-provided ID, invalid ID validation
(`ErrInvalidTaskID`), dedup active/completed/scheduled
- [x] Server: HTTP-level invalid ID → 400, dedup returns existing ID
- [x] Full test suite passes (`go test ./...`)1 parent 8016d84 commit 0cd97d8
19 files changed
Lines changed: 1684 additions & 54 deletions
File tree
- sidecar
- api
- client
- engine
- server
- tasks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
135 | 143 | | |
136 | 144 | | |
137 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments