BAC-L2-COSMOS-108Cosmos SDK
Messages, handlers and validation
The entry point for every state change, and therefore the chain's first line of defence.
- Level
- L2 — Appchain developer
- Duration
- 4 h
- Track
- Cosmos SDK
- Maintainer
- Cosmos Lead Architect
Learning objectives
- 01Define a message and its handler
- 02Separate stateless validation from stateful checks
- 03Guarantee atomicity when processing fails
Guided lab
Implement three messages of the traceability module, with their validations and rejections.
Independent lab
Write the rejection-case test suite, hostile inputs included.
Security angle
Missing or misplaced authorisation: the most frequent flaw in application modules.
Assessment
Implemented messages with full coverage of rejection cases.
