feat(sdk-lib-mpc): EddsaRetrofitData type + DKG retrofit constructor + getFirstMessage routing - #9481
Merged
Conversation
Contributor
ralph-bitgo
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 12, 2026 07:05
e79929c to
990112e
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 12, 2026 07:22
990112e to
54a371c
Compare
ralph-bitgo
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 12, 2026 07:22
54a371c to
045559a
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 12, 2026 08:30
045559a to
e94d057
Compare
ralph-bitgo
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 12, 2026 08:31
e94d057 to
cf3cb10
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 12, 2026 10:53
cf3cb10 to
b5193dd
Compare
ralph-bitgo
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 12, 2026 10:53
b5193dd to
fdf95f7
Compare
Base automatically changed from
WCI-1263-getMpcV2RetrofitDataFromMpcV1Key-EdDSA
to
master
August 13, 2026 06:24
bitgo-ai-agent-dev
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 13, 2026 06:27
fdf95f7 to
d219ede
Compare
ralph-bitgo
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
2 times, most recently
from
August 13, 2026 06:49
8f72917 to
58ebac8
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 13, 2026 07:24
58ebac8 to
8d67c7c
Compare
ralph-bitgo
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
2 times, most recently
from
August 13, 2026 08:39
9ad91ef to
20b67fd
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 13, 2026 10:16
20b67fd to
9ade6eb
Compare
ralph-bitgo
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 13, 2026 10:16
9ade6eb to
61fb76a
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
2 times, most recently
from
August 13, 2026 14:30
20a5005 to
6117b6d
Compare
Marzooqa
marked this pull request as ready for review
August 13, 2026 15:59
Contributor
Contributor
|
Claude finished @Marzooqa's task —— View job PR Review: EdDSA Retrofit Data ImplementationFinal Review SummaryThis PR successfully implements EdDSA retrofit functionality for MPCv1 → MPCv2 migration. The implementation is well-designed, secure, and thoroughly tested. ✅ Strengths1. Clean Architecture & API Design
2. Security Best Practices
3. Implementation Quality
4. Excellent Test Coverage
5. Code Quality
✅ Requirements Met
📝 Minor Notes
Overall Assessment: LGTM 🎉 This PR is ready for merge. The retrofit functionality enables seamless MPCv1 → MPCv2 migration while maintaining the same aggregate public key, exactly as specified. --- | |
vibhavgo
reviewed
Aug 14, 2026
vibhavgo
reviewed
Aug 14, 2026
Marzooqa
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 14, 2026 07:55
6117b6d to
502e157
Compare
…tructor Add optional `retrofitData` parameter to the `DKG` constructor so parties can seed a retrofit DKG ceremony from their existing MPCv1 scalar instead of generating fresh key material. - Import and store `EddsaRetrofitData` on the `DKG` class instance. - Constructor gains a 4th optional param: `retrofitData?: EddsaRetrofitData`. - `getFirstMessage` branches on `this.retrofitData`: when set it calls `wasm.ed25519_dkg_round0_import` (ships in WCI-1217) passing the party's clamped scalar, aggregate public key, and chain code; otherwise it falls through to the existing `ed25519_dkg_round0_process` path. - Clear `retrofitData` once consumed, and persist/restore it in the session blob so a restored party can still run round 0. - Export `EddsaRetrofitData` as a named type from `eddsa-mps/index.ts` so callers can import it directly without going through `MPSTypes`. Tests derive retrofit inputs via `buildRetrofitData`, mirroring `Eddsa.keyShare` + `keyCombine`, and cover routing, determinism, and session export/restore. Ticket: WCI-1261 Co-authored-by: Cursor <cursoragent@cursor.com>
Marzooqa
force-pushed
the
WCI-1261-EddsaRetrofitData-DKG-constructor
branch
from
August 14, 2026 08:03
502e157 to
06cf112
Compare
vibhavgo
approved these changes
Aug 14, 2026
Marzooqa
enabled auto-merge
August 14, 2026 08:14
lokesh-bitgo
approved these changes
Aug 14, 2026
Marzooqa
added this pull request to the merge queue
Aug 14, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to Branch Protection failures
Aug 14, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.
louib
added this pull request to the merge queue
Aug 14, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to Branch Protection failures
Aug 14, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.
louib
added this pull request to the merge queue
Aug 14, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to Branch Protection failures
Aug 14, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.
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.
What
constructor in `modules/sdk-lib-mpc/src/tss/eddsa-mps/dkg.ts`.
`wasm.ed25519_dkg_round0_import` with the party's clamped scalar,
aggregate public key, and chain code; otherwise fall through to the
existing `ed25519_dkg_round0_process` path.
callers can import it directly without going through the `MPSTypes` namespace.
`ed25519_dkg_round0_import` with a proper TypeScript signature — no
`as any` cast needed) and update `yarn.lock` accordingly.
`retrofitData` params and forward them to the `DKG` constructor.
Why
hold a valid EdDSA scalar (`pShare.u`). Generating fresh key material would
produce a new public key, breaking wallet continuity.
retrofit DKG ceremony that produces MPCv2 shares for the same aggregate
public key, enabling transparent migration without user action.
produce identical `dkgStateBytes` format, so no downstream code changes.
Test plan
Ticket: WCI-1261