BAC-L2-COSMOS-110Cosmos SDK
Block lifecycle and automatic processing
What the chain executes on its own each block — expiries, distributions, cleanups — and the time budget that consumes.
- Level
- L2 — Appchain developer
- Duration
- 3 h
- Track
- Cosmos SDK
- Maintainer
- Cosmos Lead Architect
Learning objectives
- 01Implement begin- and end-of-block processing
- 02Bound the cost of automatic processing
- 03Make a long task resumable across blocks
Guided lab
Implement automatic expiry of stale batches in the traceability registry.
Independent lab
Measure the task's effect on block time under heavy state load.
Security angle
An unbounded end-of-block task halts the chain, with no attacker involved at all.
Assessment
Bounded task, demonstrated by measurement under load.
