Skip to content

feat: implement milestone time-locks - #54

Merged
meshackyaro merged 1 commit into
trustflow-protocol:mainfrom
Lynndabel:milestone
Jul 30, 2026
Merged

feat: implement milestone time-locks#54
meshackyaro merged 1 commit into
trustflow-protocol:mainfrom
Lynndabel:milestone

Conversation

@Lynndabel

Copy link
Copy Markdown
Contributor

Add time-lock checks to ensure milestones cannot be claimed prematurely.

  • Add release_time field to Milestone struct (u32 for ledger sequence)
  • Add MilestoneTimeLocked error variant for premature release attempts
  • Implement time-lock validation in release_milestone_tranche
  • Add comprehensive unit tests for time-lock functionality
  • Update all existing tests to include release_time: 0 for backward compatibility
  • Event emission for indexing remains intact

Acceptance Criteria:

  • Feature accurately implements time-lock checks
  • No Rust errors introduced
  • All 62 tests pass
  • WASM build successful
  • Code formatted with cargo fmt
  • Clippy checks pass

Closes #2

Add time-lock checks to ensure milestones cannot be claimed prematurely.

- Add release_time field to Milestone struct (u32 for ledger sequence)
- Add MilestoneTimeLocked error variant for premature release attempts
- Implement time-lock validation in release_milestone_tranche
- Add comprehensive unit tests for time-lock functionality
- Update all existing tests to include release_time: 0 for backward compatibility
- Event emission for indexing remains intact

Acceptance Criteria:
- Feature accurately implements time-lock checks
- No Rust errors introduced
- All 62 tests pass
- WASM build successful
- Code formatted with cargo fmt
- Clippy checks pass

@meshackyaro meshackyaro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, with all the acceptance criteria met and this is ready for merge. Well done

@meshackyaro
meshackyaro merged commit d72ff42 into trustflow-protocol:main Jul 30, 2026
2 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Jul 30, 2026
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Milestone Time-locks

2 participants