test: add property-based fuzz tests for Stellar scalar arithmetic#46
Conversation
|
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. |
|
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:
git fetch origin
git rebase origin/develop
git push --force-with-leaseNote: #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. |
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.
b4e100f to
b5a14a8
Compare
|
@truthixify kindly review |
|
Clean rebase, test merge into develop is clean. Properties test file lands cleanly alongside develop's evolved CI matrix. Merging. Thanks @TheDEV111. |
Closes #3
Implements property-based fuzz tests covering Stellar scalar arithmetic invariants using fast-check, configures nightly high-run CI, and optimizes verification performance.