Repository navigation
Conversation
Nodes sign the exact bytes they publish (domain || subject || body) with their identity key and send Mpc-Node-Id and Mpc-Result-Sig headers. The message body is unchanged, so existing clients keep working. - pkg/resultauth: sign/verify, key lookup, t+1 aggregator, signing queue - result_signing.per_node_results (default false) keeps one copy per node - client: ResultVerifyMode off|log|enforce, NodePublicKeys, RequiredNodeSignatures(+ per-wallet override); copies are acked only after their result is delivered - mpcium-cli export-node-keys builds node_public_keys.json from identity files - examples, e2e (enforce, t+1), setup script and deployment guides updated
- Build the signing payload with append instead of a summed capacity (CodeQL) - Write node_public_keys.json with 0600 (gosec) - Split Aggregator.Add into roundFor and record to cut its complexity (Sonar)
Signing and reshare results are now checked per message (off/log/enforce) and delivered immediately; callers verify them against keys they already hold. Only keygen needs t+1, because a new wallet public key cannot be checked locally. - Remove result_signing.per_node_results; the client requests per-node keygen copies with the Mpc-Keygen-Result-Copies request header - Rename RequiredNodeSignatures to KeygenRequiredNodeSignatures and drop RequiredNodeSignaturesForWallet and the reshare threshold tracking - Add client.VerifySigningResult for secp256k1 and ed25519 results - Update README, deployment guides, examples and e2e
vietddude
approved these changes
Nov 10, 2026
This reverts commit 77f52cf.
Collaborator
|
E2E with fystack/apex#828, 3 local nodes from this branch, keygen t+1 = 3,
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Builds on #174. It keeps node-signed results and client-side verification, and narrows t+1 aggregation to keygen, the only result a client can't check on its own.
client.VerifySigningResult)Changes
Signing and reshare results are checked one message at a time (
off/log/enforce) and delivered as soon as one valid copy arrives. No aggregator, timers or remembered outcomes.New
client.VerifySigningResult(keyType, pubKey, tx, result)verifies secp256k1 and ed25519 signing results against the wallet (or derived child) public key. It turnstxinto the signed message the same way the nodes do.Keygen keeps t+1.
RequiredNodeSignaturesis renamed toKeygenRequiredNodeSignatures, and a value above 1 requiresenforce.RequiredNodeSignaturesForWalletand the reshare-committee threshold tracking are removed.Per-node copies are requested by the client, not configured on nodes.
result_signing.per_node_resultsis removed. WhenKeygenRequiredNodeSignatures > 1,CreateWalletsendsMpc-Keygen-Result-Copies: per-node. The keygen consumer forwards it, and the event consumer adds the node ID to the keygen result's idempotency key for that request only.Why
No node config to coordinate. Under
per_node_results, the setting had to match on every node and be turned on in a fixed order. Turning it on too early gave every client N callbacks per result, and turning it on too late made every operation time out. Now old clients don't send the header and keep getting one copy.Fewer edge cases in the library. The shared aggregator for signing and reshare caused two problems:
OnSignResultreplaced the first callback.Its remembered outcomes were also in-memory only, so they were lost on restart or failover.
Duplicate handling belongs in the application. JetStream delivers at least once, so apps need durable handling by TxID, wallet or session anyway.
Easier to port to
mpcium-client-ts: the signing and reshare check is a stateless per-message function.Compatibility and rollout
KeygenRequiredNodeSignatures > 1. Older nodes ignore the header and send one copy, so keygen would time out.Testing
go test -race ./...passes.CreateWalletsends the header only when t+1 is required;VerifySigningResultfor secp256k1 and ed25519, including a tx with a leading zero byte.