Skip to content

test: add property-based fuzz tests for Stellar scalar arithmetic#46

Open
TheDEV111 wants to merge 2 commits into
wraith-protocol:mainfrom
TheDEV111:feat/stellar-property-tests
Open

test: add property-based fuzz tests for Stellar scalar arithmetic#46
TheDEV111 wants to merge 2 commits into
wraith-protocol:mainfrom
TheDEV111:feat/stellar-property-tests

Conversation

@TheDEV111
Copy link
Copy Markdown

@TheDEV111 TheDEV111 commented Jun 2, 2026

Closes #3


Implements property-based fuzz tests covering Stellar scalar arithmetic invariants using fast-check, configures nightly high-run CI, and optimizes verification performance.

devhenryno and others added 2 commits May 27, 2026 20:11
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.
@truthixify
Copy link
Copy Markdown
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 src/chains/stellar/* and test/chains/stellar/announcements.test.ts because the branch is pre-develop. Could you rebase?

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-lease

After 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Property-based fuzz tests for Stellar scalar arithmetic

2 participants