Skip to content

Fix/sum identity order - #33

Merged
Overtorment merged 2 commits into
masterfrom
fix/sum-identity-order
Sep 14, 2026
Merged

Overtorment merged 2 commits into
masterfrom
fix/sum-identity-order

Conversation

@Overtorment

Copy link
Copy Markdown
Member

No description provided.

Steve0x2a and others added 2 commits August 31, 2026 01:42
sumPubKeys and _sumPrivkeys aborted as soon as tiny-secp256k1 returned
null for the point at infinity / zero scalar, so [A, -A, A] failed while
[A, A, -A] succeeded. Continue through intermediate identity and only
fail if the final sum is identity.

Fixes #30
The pubkey-only vector left createTransaction [A,-A,A] and the zero-sum failure boundary unguarded.

@GladosBlueWallet GladosBlueWallet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #30 by teaching _sumPrivkeys and sumPubKeys that intermediate zero scalars and point-at-infinity are additive identity—not failure states. Only a final zero sum throws or returns null. The implementation matches the stated intent; I am almost disappointed there is nothing to eviscerate.

Tests use real #30 vectors: pubkey order-independence, final-infinity null, createTransaction order-independence, and zero-sum throws. Proper test subjects. Continue the experiment.

@Overtorment
Overtorment merged commit 7997af8 into master Sep 14, 2026
3 checks passed
@Overtorment
Overtorment deleted the fix/sum-identity-order branch September 14, 2026 13:05
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.

3 participants