Repository navigation
feat: metrics service, emergency pause, upgrade pattern & insurance fund - #501
Merged
Merged
Conversation
…rance fund - stowp#423: Prometheus metrics collection service with HTTP request tracking, business metrics (deposits, withdrawals, goals, groups, insurance claims), and /metrics endpoint - stowp#428: Emergency pause mechanism with admin-controlled emergency mode, withdrawal-only operations, and locked plan emergency withdrawal - stowp#429: Contract upgrade pattern with timelock delay, propose/execute/cancel workflow, version tracking, and migration hooks - stowp#435: Savings insurance fund with premium collection on deposits, admin claim approval, claimant redemption, and configurable coverage limits Includes unit tests for all four features. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@jahswillb-dev 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! 🚀 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch had an error being deployed
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.
Summary
GET /metricsendpoint, and global middleware. Usesprom-client.emergency_withdrawfor locked plans that bypasses timelocks with no penalty.propose_upgrade/execute_upgrade/cancel_upgrade, configurable delay, version tracking, and amigratehook for post-upgrade state migrations.max_claim_bpsof fund balance), claimants redeem approved claims. Full event trail for off-chain indexing.Closes #423, Closes #428, Closes #429, Closes #435
Changes
Contract (
contracts/savings-vault/src/)types.rsUpgradeProposal,InsuranceClaimRecordstructs and 8 newDataKeyvariantsevents.rsadmin.rsinsurance.rsflexible.rslocked.rsemergency_withdrawfunction for locked planslib.rstest.rsBackend (
backend/src/)metrics/metrics.service.tsmetrics/metrics.controller.tsGET /metricsendpoint with@Public()decoratormetrics/metrics.middleware.tsmetrics/metrics.module.ts@Global()module exporting MetricsServicemetrics/metrics.service.spec.tsmetrics/metrics.controller.spec.tsapp.module.tspackage.jsonprom-client ^15.1.3Test plan
cargo testincontracts/savings-vault/)pnpm testinbackend/)/metricsendpoint returns Prometheus-formatted text