Skip to content

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

Merged
truthixify merged 2 commits into
wraith-protocol:developfrom
TheDEV111:feat/stellar-property-tests
Jun 3, 2026
Merged

test: add property-based fuzz tests for Stellar scalar arithmetic#46
truthixify merged 2 commits into
wraith-protocol:developfrom
TheDEV111:feat/stellar-property-tests

Conversation

@TheDEV111

@TheDEV111 TheDEV111 commented Jun 2, 2026

Copy link
Copy Markdown

Closes #3


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

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

@truthixify truthixify changed the base branch from main to develop June 3, 2026 01:57
@truthixify

Copy link
Copy Markdown
Contributor

Quick re-check after recent merges. The current diff is much cleaner now (3-way merge preserves everything on develop). Only two real conflicts remaining:

  • vitest.config.ts
  • .github/workflows/ci.yml
git fetch origin
git rebase origin/develop
git push --force-with-lease

Note: #15 by @kaycke1337 also targets issue #3 and has been stale since 2026-05-23. Whoever rebases first lands; I will close the other as superseded. Thanks @TheDEV111.

devhenryno and others added 2 commits June 3, 2026 14:54
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.
@TheDEV111 TheDEV111 force-pushed the feat/stellar-property-tests branch from b4e100f to b5a14a8 Compare June 3, 2026 13:55
@TheDEV111

Copy link
Copy Markdown
Author

@truthixify kindly review

@truthixify

Copy link
Copy Markdown
Contributor

Clean rebase, test merge into develop is clean. Properties test file lands cleanly alongside develop's evolved CI matrix. Merging. Thanks @TheDEV111.

@truthixify truthixify merged commit 4db8ee0 into wraith-protocol:develop Jun 3, 2026
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