Skip to content

feat: create dkg command#308

Open
mskrzypkows wants to merge 21 commits intomainfrom
createdkg
Open

feat: create dkg command#308
mskrzypkows wants to merge 21 commits intomainfrom
createdkg

Conversation

@mskrzypkows
Copy link
Copy Markdown
Contributor

Implementation of the pluto create dkg command
fixes #304

@mskrzypkows mskrzypkows changed the title create dkg command feat: create dkg command Apr 2, 2026
Copy link
Copy Markdown
Collaborator

@emlautarom1 emlautarom1 left a comment

Choose a reason for hiding this comment

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

There are some flows that are not 100% matching with Charon. Consider adding tests for them if it can be done in a reasonable time.

Comment thread crates/cli/src/commands/create_dkg.rs Outdated
Comment thread crates/cli/src/commands/create_dkg.rs Outdated
Comment thread crates/cli/src/commands/create_dkg.rs Outdated
Comment thread crates/cli/src/commands/create_dkg.rs Outdated
Comment thread crates/cli/src/commands/create_dkg.rs Outdated
Comment thread crates/cli/src/commands/create_dkg.rs Outdated
Comment thread crates/cli/src/commands/create_dkg.rs Outdated
Comment thread crates/cli/src/commands/create_dkg.rs Outdated

let num_operators =
u64::try_from(operators.len()).map_err(|_| CreateDkgError::OperatorCountOverflow)?;
let safe_thresh = safe_threshold(num_operators)?;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This does not look correct: num_operators = args.operator_addresses.len() + args.operator_enrs.len() when it should be num_operators = operators_len

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

operator_enrs or operator_addresses are mutually exclusive, the result is the same. I'll add a comment to describe it.

Comment thread crates/cli/src/commands/create_dkg.rs Outdated
// Verify signatures when an ETH1 endpoint is available. Skipped when the
// endpoint is empty because the client cannot connect — safe for DKG create
// since operators have no signatures at this stage.
if !args.publish && !args.execution_engine_addr.is_empty() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should not have the !args.execution_engine_addr.is_empty() check: if args.publish == true we must verify the signature. A missing args.execution_engine_addr should be an error (automatically propagated with ?).

Copy link
Copy Markdown
Collaborator

@pinebit pinebit Apr 16, 2026

Choose a reason for hiding this comment

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

Publish and ExecutionEngineAddr are unrelated. Publish controls sending the resulting lock file to Obol API, whereas ExecutionEngineAddr controls on-chain signature verification for gnosis/safe chains. In most cases (ethereum mainnet/testnets) this parameter is omitted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I found the source of the confusion, Charon implements noop eth client for empty execution_engine_addr, added similar behaviour to the Pluto.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You may not need to implement any real eth1 client at this time (as well as EL sig verification), as this is very low priority feature, not a priority for your work, so please don't waste your time for the next milestone.

Comment thread crates/cli/src/commands/create_dkg.rs Outdated
@mskrzypkows
Copy link
Copy Markdown
Contributor Author

@emlautarom1 I've addressed all comments, please check.

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.

Implement cmd/createdkg

3 participants