CultLib/packages/heimdall-stake/tests/vectors/stake_golden.csv
Libby 84f932ec50
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest one-command multiplayer onboarding (pull_request) Has been cancelled
CultMesh portability and performance / windows-latest one-command multiplayer onboarding (pull_request) Has been cancelled
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
CultMesh portability and performance / windows-latest reactive semantics and leases (pull_request) Has been cancelled
CultNet cross-runtime interop / C# / TypeScript / Rust / Python / Kotlin (pull_request) Has been cancelled
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Has been cancelled
heimdall-stake: sybil note and golden vectors
README: the constant 1 in weight = 1 + log_b(amount/unit) is paid once per identity, so splitting
always pays until the log goes negative and no base fixes it; the defence lives outside the function.
Golden vectors (single and split k=1,2,10,100, three bases) computed with 60-digit decimal ln,
pinned by tests/golden.rs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 02:30:58 +00:00

1 KiB

1# kind,base,unit_cents,amount_cents,k,expected_micro
2# single: weight of one identity holding amount. split: budget (amount) split evenly over k identities (first amount%k hold one extra cent), summed.
3# expected values computed independently with 60-digit decimal ln, rounded half up. No floor, cap or minimum.
4single,10,100,100,1,1000000
5single,10,100,1000,1,2000000
6single,10,100,10000,1,3000000
7single,10,100,1000000,1,5000000
8single,10,100,50,1,698970
9single,10,100,10,1,0
10single,10,100,1,1,0
11single,2,100,400,1,3000000
12single,2,100,100,1,1000000
13single,2,1,1,1,1000000
14single,3,500,123456,1,6014537
15single,7,1,987654321,1,11643268
16single,10,1,1,1,1000000
17single,16,250,99999,1,3160960
18split,10,100,10000,1,3000000
19split,10,100,10000,2,5397940
20split,10,100,10000,10,20000000
21split,10,100,10000,100,100000000
22split,2,100,10000,1,7643856
23split,2,100,10000,2,13287712
24split,2,100,10000,10,43219280
25split,2,100,10000,100,100000000
26split,10,100,100000,1,4000000
27split,10,100,100000,2,7397940
28split,10,100,100000,10,30000000
29split,10,100,100000,100,200000000