Repository navigation
fix: record pause timestamp to enforce max pause duration - #1874
Merged
famvilianity-eng merged 1 commit intoOct 23, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR fixes
pause_matchso it records the ledger sequence at which a match is paused, and uses that timestamp to enforceMAX_PAUSE_DURATIONinresume_matchandadmin_resolve_stalled_match. Previously thePausedstate carried no start time, so the max-pause-duration constant could not be applied.Related Issue
Changes
⏸️ Pause Timestamp Tracking
[MODIFY]
contracts/escrow/src/types.rspaused_at_ledger: u32field to the match data so the pause start ledger is persisted alongside thePausedstate.[MODIFY]
contracts/escrow/src/state_machine.rspaused_at_ledgerwhen transitioning a match toPaused.[MODIFY]
contracts/escrow/src/lib.rspause_matchnow stores the current ledger sequence inpaused_at_ledger.resume_matchandadmin_resolve_stalled_matchreadpaused_at_ledgerand enforceMAX_PAUSE_DURATION.[MODIFY]
contracts/escrow/src/tests/admin_stall_resolution.rsVerification Results
Pausedpaused_at_ledgerset inpause_matchMAX_PAUSE_DURATIONis enforced using the recorded timestampresume_matchandadmin_resolve_stalled_matchadmin_stall_resolution.rsCloses #1792