Skip to content

Conversation

@joyqvq
Copy link
Collaborator

@joyqvq joyqvq commented Nov 25, 2025

Description

create wrapper to cargo commands and sui cli to simplify the dkg steps.

Test plan

tested local rotations 0 -> 1 -> 2

Copy link
Collaborator

@benr-ml benr-ml left a comment

Choose a reason for hiding this comment

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

Very nice!


```bash
cargo run --bin dkg-cli process-all --messages-dir ./dkg-messages
**For new members**: Just run the command without old share.
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is this needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i did not like the rename from init to create-message from last pr since a new member is just initializing the state locally here.

let state = DkgState {

```

TODO: Discuss what to do with old share.
Store your old master share securely. It is needed for future rotation.
Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm, why do we need it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because a continuing member in dkg needs to create message with the old share?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

    pub fn new_advanced<R: AllowedRng>(
        enc_sk: ecies_v1::PrivateKey<EG>,
        nodes: Nodes<EG>,
        t: u16, // The number of parties that are needed to reconstruct the full key/signature (f+1).
        random_oracle: RandomOracle, // Should be unique for each invocation, but the same for all parties.
        secret: Option<G::ScalarType>, // Should be used only for key rotation. <= this
        old_t: Option<u16>,          // Used only for key rotation
        rng: &mut R,
    ) -> FastCryptoResult<Self> {

@joyqvq joyqvq force-pushed the joy/dkg-cli-improve branch from 31b5a53 to d2fb869 Compare December 2, 2025 15:27
- fix license
@joyqvq joyqvq force-pushed the joy/dkg-cli-improve branch from a3bc3c3 to 016ee3a Compare December 2, 2025 15:32
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