Description
If enroll() fails repeatedly for a specific course in contracts/hamplard/src/lib.rs (e.g., due to a broken token contract), there is no circuit breaker that automatically pauses the course after N consecutive failures. The course remains in Active status indefinitely, causing ongoing failed transactions.
Affected modules: contracts/hamplard/src/lib.rs
No circuit breaker allows persistently-failing courses to remain active, wasting student transaction fees.
Expected Behavior
Track consecutive enrollment failure counts per course. After a configurable threshold is exceeded, automatically transition the course to Paused and emit an alert event.
Tasks
Description
If
enroll()fails repeatedly for a specific course incontracts/hamplard/src/lib.rs(e.g., due to a broken token contract), there is no circuit breaker that automatically pauses the course after N consecutive failures. The course remains inActivestatus indefinitely, causing ongoing failed transactions.Affected modules:
contracts/hamplard/src/lib.rsNo circuit breaker allows persistently-failing courses to remain active, wasting student transaction fees.
Expected Behavior
Track consecutive enrollment failure counts per course. After a configurable threshold is exceeded, automatically transition the course to
Pausedand emit an alert event.Tasks