Skip to content

Add upgrade, pause, and role separation safeguards - #229

Merged
chonilius merged 2 commits into
MergeFi:mainfrom
0xsamuel1:feature/upgrade-pause-pagination-separation
Aug 30, 2026
Merged

Add upgrade, pause, and role separation safeguards#229
chonilius merged 2 commits into
MergeFi:mainfrom
0xsamuel1:feature/upgrade-pause-pagination-separation

Conversation

@0xsamuel1

Copy link
Copy Markdown
Contributor

Summary

  • add separate admin/oracle roles across escrow, milestones, and maintenance-pool, including oracle/admin rotation helpers
  • add admin-gated pause/unpause and upgrade entrypoints, storage version tracking, and paused-state guards for risky flows
  • document Soroban upgrade/storage migration, emergency pause operations, two-key role separation, and maintenance-pool deposit history tradeoffs
  • refresh README ABI snippets, backend operational guidance, and invoke/example scripts for the new initialize shape

Design Notes

  • Routine payout paths now use the oracle key: escrow release, milestone release_issue, and maintenance-pool withdraw.
  • High-trust operations remain admin-gated: pause/unpause, upgrade, role rotation, treasury rotation, and recovery paths.
  • Pausing blocks new funding/deposits and oracle payout paths while keeping refund/recovery paths available where the contract supports them.
  • Existing deployed testnet contracts cannot be retrofitted in place because they lack an upgrade entrypoint; the recommendation is a final redeploy with these safeguards before mainnet.
  • Maintenance-pool pagination is documented as a spike outcome: keep the one-at-a-time getter for now, prefer event indexing for backend history, and revisit pagination after events land.

Tests

  • cargo fmt --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • cargo build --target wasm32v1-none --release -p mergefi-escrow -p mergefi-milestones -p mergefi-maintenance-pool

Closes #15.
Closes #14.
Closes #10.
Closes #13.

@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

@0xsamuel1 is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@0xsamuel1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@chonilius
chonilius merged commit 919aab5 into MergeFi:main Aug 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment