feat: resolve Stellar Wave issues #336, #359, #373#386
Merged
1nonlypiece merged 2 commits intoMay 28, 2026
Merged
Conversation
…#373 (Stellar Wave) Issue Disciplr-Org#336 — optimistic concurrency for vault writes - Add PATCH /api/vaults/:id route that accepts X-Vault-Revision header and surfaces 409 ConflictError when the revision is stale - Add two new concurrency tests: revision-advances-after-update and three-concurrent-updates-exactly-one-succeeds (7 tests total, all pass) Issue Disciplr-Org#359 — persistent storage TTL bumping for active vaults - Create contracts/accountability_vault/src/lib.rs (Soroban contract) - bump_vault_ttl / bump_checkin_ttl extend TTL to end_timestamp on every write/read of an active vault; terminal vaults are not extended - Add Cargo.toml for the contract crate Issue Disciplr-Org#373 — emit settlement-summary event on claim/slash_on_miss - emit_settlement_summary publishes topic=["settle"] with (released_amount, slashed_amount, verified_count, final_status) from both claim() and slash_on_miss() - Add 'settlement_summary' to EventType in src/types/horizonSync.ts - Add SettlementSummaryEventPayload interface to horizonSync.ts - Add 11 contract tests in contracts/accountability_vault/src/test.rs - Document TTL strategy and event schema in contracts/README.md Closes Disciplr-Org#336, Disciplr-Org#359, Disciplr-Org#373
|
@middalukawunti-lang 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! 🚀 |
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
Resolves three Stellar Wave issues assigned to @middalukawunti-lang in a single PR.
Issue #336 — Optimistic concurrency version column for vault writes
Problem: Concurrent updates to a vault could race and clobber each other since
vaultStore.tsperformed read-modify-write without versioning.Solution:
PATCH /api/vaults/:idroute insrc/routes/vaults.tsthat accepts anX-Vault-Revisionheader and returns409 Conflictwhen the revision is stale.Issue #359 — Persistent storage TTL bumping for active vaults
Problem:
contracts/accountability_vault/src/lib.rswroteVaultandCheckInentries without extending their storage TTL, risking archival for long-running vaults before theirend_timestamp.Solution:
contracts/accountability_vault/src/lib.rs(Soroban contract).bump_vault_ttl/bump_checkin_ttlcallextend_ttlon every write/read of an active vault, extending to at leastend_timestamp.Completed/Slashed) are not extended.Issue #373 — Emit settlement-summary event on claim/slash_on_miss
Problem:
claim/slash_on_missonly emitted a single amount, so the ETL pipeline had to re-query the ledger for analytics.Solution:
emit_settlement_summarypublishes topic["settle"]with(released_amount, slashed_amount, verified_count, final_status)from bothclaim()andslash_on_miss().'settlement_summary'toEventTypeinsrc/types/horizonSync.tsand a newSettlementSummaryEventPayloadinterface.contracts/accountability_vault/src/test.rs.contracts/README.md.Testing
npx jest src/tests/vaultStore.test.ts→ 7/7 passcd contracts/accountability_vault && cargo test→ 11 testsCloses #336
Closes #359
Closes #373