#830 [Contracts] Implement Keep-Alive Ping Ledger Updates FIXED#890
Merged
ONEONUORA merged 1 commit intoJun 29, 2026
Conversation
|
@Kappa16 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! 🚀 |
Contributor
Author
|
PLEASE REVIEW |
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.
Findings
After reviewing the
InheritXcodebase, the issue was located in the Soroban smart contract:The project is building a Stellar/Soroban-based digital inheritance protocol where a plan owner locks assets and periodically sends a proof-of-life
ping. That ping keeps the inheritance plan alive by resetting the inactivity timer.The existing
pingfunction already did most of the required work:It already:
owner.require_auth().last_pingfield.However, the issue acceptance criteria also required:
That event emission was missing.
Fix Features Added
The fix adds a Soroban event after a successful keep-alive ping.
Updated implementation:
Feature 1 — Keeps Owner Authorization
The ping still requires the plan owner to authorize the call:
This means unauthorized addresses cannot successfully ping another user’s inheritance plan.
Feature 2 — Updates
last_pingCorrectlyThe function now captures the ledger timestamp once:
Then uses that exact value to update the plan:
This ensures the persisted
last_pingmatches the event timestamp exactly.Feature 3 — Preserves Plan TTL Bump
The existing TTL extension behavior is preserved:
So each successful ping keeps the plan’s persistent storage entry alive.
Feature 4 — Emits Keep-Alive Event
The fix adds the missing contract event:
The emitted event contains:
pinglast_pingtimestampThis allows off-chain services, indexers, monitoring tools, or frontend components to track proof-of-life activity.
Feature 5 — Added Regression Tests
I added tests in:
The tests verify that:
pingupdateslast_ping.pingemits the expected contract event.pingwithout owner authorization is rejected.Summary
The root issue was that the
pingentrypoint did not emit a keep-alive event. The fix adds that event while preserving the existing authorization, timestamp update, and TTL bump behavior. This fully satisfies the issue acceptance criteria.CLOSE #830