test: add property-based fuzz tests for Stellar scalar arithmetic#46
Open
TheDEV111 wants to merge 2 commits into
Open
test: add property-based fuzz tests for Stellar scalar arithmetic#46TheDEV111 wants to merge 2 commits into
TheDEV111 wants to merge 2 commits into
Conversation
Implements all eight properties from issue wraith-protocol#3: - Scalar addition: associativity, commutativity, additive identity - Round-trip: bytesToScalar(scalarToBytes(a)) == a - seedToScalar: determinism and distinct-seed collision resistance - Stealth equation: (m + s_h)*G == m*G + s_h*G (homomorphism) - View-tag uniformity: chi-square over 10k sequential inputs - signWithScalar: signature verification, wrong-message/wrong-key rejection Default run: 1000 cases. FC_RUNS=100000 via pnpm test:fuzz. Nightly CI job (slow-tests) runs the high-case version at 02:00 UTC.
Contributor
|
Welcome back. Earlier I closed your #28 as duplicate of #15 since #15 was opened first, but #15 has gone stale (no push since 2026-05-23) while you've re-opened with fresh work. Happy to land this one first if you rebase cleanly. Your current diff is still showing 1082 line deletions across git fetch origin
git rebase origin/develop
# keep your new properties.test.ts and the package.json/CI additions
# drop the stale-base reverts to src/chains/stellar/* and test/chains/stellar/announcements.test.ts
git push --force-with-leaseAfter the rebase the diff should only show your additions (properties.test.ts + package.json scripts + CI nightly + README + vitest config). Then I'll merge and close #15 as superseded. Thanks @TheDEV111. |
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 #3
Implements property-based fuzz tests covering Stellar scalar arithmetic invariants using fast-check, configures nightly high-run CI, and optimizes verification performance.