Feat/archival resilience - #475
Open
akinboyewaSamson wants to merge 7 commits into
Open
Conversation
Contributor
…/methods Add missing ERROR_DESC entries for AssetNotFound (21) and PaymentArchived (22). Add missing METHOD_AUTH/METHOD_DESC entries for list_assets, allowlist_count, rebuild_allowlist_index, and extend_history_ttl. Regenerate schema.json to include all 22 errors and 27 methods so the ABI drift CI check passes.
Cedarich
requested changes
Aug 25, 2026
Cedarich
left a comment
Contributor
There was a problem hiding this comment.
Kindly reduce the change made to the files
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.
closes #465
Summary
This PR overhauls the TTL management and archival behavior of the
invoice-paymentcontract to ensure that critical audit logs and payment history remain discoverable and recoverable even after ledger archival. It moves the contract away from a short touch-to-live expiration strategy to an explicit retention policy.Related Issue(s)
Type of Change
Description
MIN_TTLto 3,153,600 ledgers (~6 months) andBUMP_TTLto 6,312,000 ledgers (~1 year).has()andget()functions. APaymentArchived = 22error code is explicitly returned when an entry has been archived rather than treating it as missing.PaymentHistoryPagenow differentiates between missing history slots witharchived_skippedandcorrupt_skippedrather than a genericgaps_skipped. The TypeScript client definitions (types.ts,codec.ts, anderror-manifest.ts) were updated to reflect this.extend_history_ttladmin entry point inlib.rsand the TS client for batched extensions of historical index records.invoke-restore-payment.sh, that leveragesstellar contract restorefor manual operations recovery of archived footprints.history_index_statusto scan the entire index and distinctly report intact, archived, and corrupted record counts.Testing Evidence
cargo test -p invoice-payment. All 168 tests, including newly implemented tests verifying index status reporting and administrative TTL extension rules, successfully pass.npm run buildinsoroban/client, verifying proper typings.Screenshots
N/A - No UI visual behavior changes involved.
Checklist