Skip to content

Add freeze-reason-scoped unfreeze allowing partial thaw when only one reason is cleared #811

Description

@thlpkee20-wq

Description

When multiple freeze reasons apply, clearing one should not automatically unfreeze the account. Add reason-scoped unfreeze semantics that only thaws when all reasons are cleared.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: src/test_freeze_matrix.rs
  • Reason set persisted as bitmask under FreezeReasonSet

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feat/freeze-scoped-unfreeze
  • Implement changes
    • Persist reason bitmask
    • clear_freeze_reason(reason) clears bit and re-evaluates
    • Emit freeze_reason_cleared event
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • cargo test --all
  • Cover edge cases
    • Clear the only-set reason (full unfreeze)
  • Include test output and security notes

Example commit message

feat: scoped-unfreeze by reason bitmask

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions