feat(stellar): add differential test harness for stealth-registry vs reference impl#142
Open
Tenny150 wants to merge 1 commit into
Open
Conversation
…reference impl Adds a property-based differential test comparing the on-chain stealth-registry contract against a pure-Rust reference implementation. - reference/mod.rs: normative reference impl with TTL model, event tracking, and 8 unit tests covering register/remove/lookup/expiry - differential.rs: proptest harness generating random op sequences, asserting identical per-operation results and final state - Uses WRAITH_PROPTEST_CASES env var (default 1024, nightly 16384) - Excludes TTL expiration from proptest strategies (Soroban SDK invariant); modelled in reference unit tests - Updates .gitignore: anchors reference/ to root, adds test_snapshots and proptest-regressions patterns Closes wraith-protocol#110
|
@Tenny150 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
Closes #110
Adds a property-based differential test comparing the on-chain stealth-registry Soroban contract against a pure-Rust reference implementation.
Changes
New files
stellar/stealth-registry/tests/reference/mod.rs— Pure-Rust reference implementationstellar/stealth-registry/tests/differential.rs— Proptest differential testWRAITH_PROPTEST_CASESenv var (default 1024, nightly 16384)Modified files
.gitignore: Anchoredreference/pattern to root only, added patterns fortest_snapshots/andproptest-regressions/Design Decisions
properties.rstests. The reference tracks events internally for documentation and future use.EnvTestConfig { capture_snapshot_at_drop: false }matching the existingproperties.rspattern.Test Results
Acceptance (from #110)
stealth-registry/tests/reference/cargo test --test differentialpasses with 1024 cases