Real-time view of what's in this repo. Read this before chasing a doc link.
Phase: Phase 1 / Slice 1 complete. Production Go runtime (consumers, decoders, sidecar, reconciler) shipped and green. Slices 2β4 are next per ROADMAP.md.
Last updated: 2026-06-11 (Slice 1 done β phases AβG, exit criterion Β§15 met).
- β
cmd/psβ single binary, cobra subcommands:fileplugin --bootstrap,consumer block,consumer supplier,sync-upgrades,reconciler,migrate,deregister-consumer,version,inspect cursors,inspect streams,doctor(indexerand fileplugin live-tail are deferred β seedocs/TECH-DEBT.md) - β
internal/filepluginβ sidecar: reads FilePlugin output, fans out per-tx/event/KV to NATS (ADR-022), stampsPocket-Block-Timeheader, publishespokt.block.{H}envelope last as the per-height completeness fence - β
internal/consumerβ genericBatchRuntime: buffers messages per height, flushes in one Postgres tx on the fence, ADR-024 triggers 1β3 (fence / size-5000 / time-5s valves), partial-flush viastore.FlushOnly(no cursor advance), orphan eviction with seen-count protocol; ack-after-commit invariant intact - β
internal/consumer/blockandinternal/consumer/supplierβ module consumers (full supplier lifecycle:MsgStakeSupplier,MsgUnstakeSupplier, 5 event types, Supplier/ServiceConfigUpdate KV across versions) - β
internal/decoders/β 9 versioned decoder packages covering all 32 mainnet-applied protocol versions (shape-range strategy:v0_1_0,v0_1_8,v0_1_10,v0_1_20,v0_1_27,v0_1_28,v0_1_29,v0_1_30,v0_1_34) - β
internal/routerβ DB-driven heightβdecoder dispatch;NewStaticRouterfor unit tests;TestDecoderForAllMainnetBoundariespins all 32 boundaries - β
internal/storeβ pgx v5 + sqlc;ProcessHeight,FlushOnly, cursor, AND-seal,RequiredSet,IsSealed,FirstValidHeights - β
internal/reconcilerβ upgrades-table refresh loop (immediate first sync,pocketscribe_reconciler_syncs_total/sync_errors_total, signal-aware shutdown) - β
ps sync-upgradesβ populatesupgradestable from mainnet LCD (golden-tested)
- β
27 spec test scenarios (Β§11.1) green β including valves + eviction end-to-end, sidecar 256KiB/1MiB caps, migrate-down round-trip, rollback after partial write, upgrade boundary
v0_1_26βv0_1_27, partial simultaneous restart - β ~80 fixture triplets β 9 fixture heights with multi-version golden blobs (real mainnet data: v0.1.0/8/10/20/27/28/29 eras; supplier activity confirmed at 7 heights)
- β
make ciβ vet + fmt-check + lint + lint-integration + test-race (fast, no containers) - β
make ci-fullβ ci + integration + coverage gate (100% decoders / β₯90% internal/, composition rootsinternal/app/*excluded) - β
.github/workflows/ci.ymlβ lint (both tag modes) + race + integration/coverage jobs
- β
4 Claude Code skills in
.claude/skills/:generate-decoder,generate-migration-from-diff,verify-migrations,add-decoder-version - β
41 schema migrations in
schema/migrations/β validated end-to-end via TimescaleDB+goose - β
34 proto-shape snapshots in
docs/research/.shapes/β one per poktroll release v0.1.0 β v0.1.34 - β
Archeology run in
archeology/β 32 patched binaries (via Git LFS), scripts (with tip-mode orchestrator), 3 patches, and consolidated docs (README, FINDINGS, VERSIONS)
- β
CLAUDE.md,README.md,ROADMAP.md,STATUS.md,CONTRIBUTING.md - β
docs/architecture/(12 documents) - β
docs/decisions/β 28 ADRs (ADR-001 through ADR-028) - β
docs/research/β investigations (poktroll-sync-from-genesis, poktroll-versions, etc.)
- β
configs/networks/βmainnet.yaml,beta.yaml,localnet.yaml - β
configs/{dev,downstream,observability}/β templates - β
buf.yaml,buf.gen.yaml,sqlc.yaml,go.mod(toolchain configs) - β
Makefileβci,ci-full,coverage,test,test-race,test-integration,verify-migrations, and more
- β Continuous aggregates + bucket sealing loop (
ps sealing) β Slice 2 - β Hasura + PostgREST deployment +
COMMENT ONpass β Slice 3 - β NATS WebSocket bridge (
ps ws-bridge) + full reconciler entity drift β Slice 4 - β Production deploy manifests (helm/kustomize) β Phase 3;
deploy/dev/+Tiltfilecover the local kind stack today (postgres, NATS, migrate, sync-upgrades, consumers, era-replay sidecar)
The schema generation skill produces:
- Framework tables β
decoder_version,block,processed_heights,consumer_consolidation,consumer_registry,aggregate_registry,bucket_seal,cagg_dirty_buckets,param_history,upgrades - Poktroll state entities β Supplier, Application, Gateway, Service, Session, Claim, Proof, SessionSMT, RelayMiningDifficulty, PendingApplicationTransfer + Morse migration accounts
- Cosmos-sdk state entities β BaseAccount, ModuleAccount, Bank Metadata/Balance, Staking Validator/Delegation/Redelegation/Pool/HistoricalInfo, Distribution FeePool + per-validator rewards, Gov Proposal/Vote/Deposit, Upgrade Plan, Slashing ValidatorSigningInfo, Feegrant Grant
- ~80 stateless event/msg hypertables β auto-included via FQN regex rules
- Module Params β one stateful table per poktroll module + per cosmos module
- Genesis state β one table per module (forensic record)
See ADR-028 for the design rationale.
The skill generates additive only migrations (CREATE TABLE IF NOT EXISTS / ALTER ADD COLUMN IF NOT EXISTS). Total = 33 decoder migrations (one per version) covering both poktroll-owned and cosmos-sdk-owned shape changes.
Two cosmos-sdk versions are vendored (deduped):
cosmos-sdk v0.50.13for poktroll v0.1.0 β v0.1.11cosmos-sdk v0.53.0for poktroll v0.1.12 β v0.1.33
The cosmos-sdk version is detected automatically from each poktroll release's go.mod.
See ROADMAP.md. Slice 1 foundation is proven. Slice 2 (aggregates + sealing) is next.