Skip to content

Feature/fly 2232#444

Merged
Hakob23 merged 13 commits intov2.6.0from
feature/FLY-2232
Apr 17, 2026
Merged

Feature/fly 2232#444
Hakob23 merged 13 commits intov2.6.0from
feature/FLY-2232

Conversation

@Hakob23
Copy link
Copy Markdown
Collaborator

@Hakob23 Hakob23 commented Mar 12, 2026

What

Implement Hard and Soft Pause functionality, and add corresponding test cases

The Task

https://rsklabs.atlassian.net/browse/FLY-2232?atlOrigin=eyJpIjoiZDUwNzE3ODY3OTUxNDk5NmFhMDFmOWEwOTg5MmMwY2EiLCJwIjoiaiJ9

@Hakob23 Hakob23 requested a review from a team as a code owner March 12, 2026 01:17
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 12, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 0fe3c05.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@rsksmart/btc-transaction-solidity-helper 0.3.0-beta 🟢 6.5
Details
CheckScoreReason
Binary-Artifacts🟢 10no binaries found in the repo
Branch-Protection🟢 8branch protection is not maximal on development and all release branches
CI-Tests🟢 1014 out of 14 merged PRs checked by a CI test -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Code-Review🟢 3Found 5/14 approved changesets -- score normalized to 3
Contributors🟢 3project has 1 contributing companies or organizations -- score normalized to 3
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Dependency-Update-Tool🟢 10update tool detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Packaging⚠️ -1packaging workflow not detected
Pinned-Dependencies🟢 10all dependencies are pinned
SAST🟢 8SAST tool is not run on all commits -- score normalized to 8
Security-Policy🟢 10security policy file detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Vulnerabilities⚠️ 014 existing vulnerabilities detected

Scanned Files

  • package-lock.json

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a two-level emergency pause system (soft vs. hard) across Flyover contracts, adds hard-pause window accounting for time/block-based expirations, and updates tests to validate the new pause semantics.

Changes:

  • Add pause levels (0/1/2) and hard-pause window tracking/overlap computation in PauseRegistry.
  • Update core contracts to differentiate “no new business” (soft pause) vs “full freeze” (hard pause) via new modifiers.
  • Extend pause-related tests to cover level behavior and hard-pause overlap logic.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
test/tasks/PauseSystem.t.sol Updates mock pause registry to satisfy the expanded IPauseRegistry interface.
test/Pause.t.sol Adjusts pause reason expectations and adds tests for soft/hard pause behavior and overlap calculations.
src/PegOutContract.sol Applies soft/hard pause modifiers; adjusts expiry/penalty logic to account for hard-pause overlap and records deposit block.
src/PegInContract.sol Applies soft/hard pause modifiers; adjusts slashing timing logic to account for hard-pause overlap.
src/PauseRegistry.sol Implements pause levels, hard-pause logging, and overlap computation helpers.
src/interfaces/IPauseRegistry.sol Extends interface with pause levels and overlap APIs.
src/FlyoverDiscovery.sol Switches registration to soft pause and provider updates to hard pause gating.
src/EmergencyPause/EmergencyPause.sol Replaces single pause modifier with soft/hard pause modifiers.
src/CollateralManagement.sol Gates “new business” actions on soft pause and withdrawals/resign on hard pause; excludes hard-pause blocks from resignation delay.
Comments suppressed due to low confidence (1)

src/EmergencyPause/EmergencyPause.sol:40

  • The new whenNotSoftPaused/whenNotHardPaused modifiers replace the old whenNotPaused, but the module-level docstring and related comments still refer to whenNotPaused. This is now misleading for maintainers/users of EmergencyPause; update the documentation to reference the new modifier names and semantics (soft vs hard).
    /// @notice Reverts at pause level >= 1 (soft pause: no new business)
    modifier whenNotSoftPaused() {
        if (_getEmergencyPauseStorage().pauseRegistry.pauseLevel() > 0) {
            revert Flyover.EnforcedPause();
        }
        _;
    }

    /// @notice Reverts at pause level >= 2 (hard pause: full freeze)
    modifier whenNotHardPaused() {
        if (_getEmergencyPauseStorage().pauseRegistry.pauseLevel() > 1) {
            revert Flyover.EnforcedPause();
        }
        _;
    }

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/PauseRegistry.sol Outdated
Comment thread src/PauseRegistry.sol Outdated
Comment thread src/PauseRegistry.sol Outdated
Comment thread src/PegInContract.sol Outdated
Comment thread src/PegOutContract.sol Outdated
Comment thread src/PegOutContract.sol Outdated
Comment thread src/PauseRegistry.sol Outdated
Copy link
Copy Markdown
Collaborator

@alexjavabraz alexjavabraz left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread src/interfaces/IPauseRegistry.sol Outdated
Comment thread src/interfaces/IPauseRegistry.sol
Comment thread src/PauseRegistry.sol Outdated
Comment thread src/PauseRegistry.sol Outdated
Comment thread src/PauseRegistry.sol
Comment thread src/PauseRegistry.sol
Comment thread src/PauseRegistry.sol
Comment thread src/PauseRegistry.sol
Comment thread src/PauseRegistry.sol
Comment thread src/PauseRegistry.sol Dismissed
Hakob23 added 2 commits March 30, 2026 17:53
…rameter and improve clarity, remove pause/unpause
…eamline pause management and enhance clarity in PauseSystem and tests
@Hakob23 Hakob23 merged commit 29ad611 into v2.6.0 Apr 17, 2026
6 checks passed
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.

5 participants