Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -threads and -nonces arguments to be used with -genproof #222

Closed
wants to merge 1 commit into from

Conversation

reythia
Copy link

@reythia reythia commented Aug 17, 2023

Closes #221

@@ -74,6 +77,9 @@ func parseFlags() {
flag.StringVar(&commitmentAtxIdHex, "commitmentAtxId", "", "commitment atx id, in hex (required)")
numUnits := flag.Uint64("numUnits", uint64(opts.NumUnits), "number of units")

flag.UintVar(&nonces, "nonces", 16, "number of nonces for -genproof")
Copy link
Collaborator

Choose a reason for hiding this comment

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

The number of nonces must be a multiple of 16 (a nonce group). How about changing this argument into "number of nonce groups" to avoid setting an invalid value? Also, 16 is unrealistic, perhaps a more typical value like 288 would be better?

Suggested change
flag.UintVar(&nonces, "nonces", 16, "number of nonces for -genproof")
flag.UintVar(&noncesGroups, "nonceGroups", 18, "number of nonce groups for -genproof. Each group consists of 16 nonces.")

And multiply it by 16 later in the code.

OR at least inform the user that it must be a multiple of 16:

Suggested change
flag.UintVar(&nonces, "nonces", 16, "number of nonces for -genproof")
flag.UintVar(&nonces, "nonces", 16, "number of nonces for -genproof. Must be a multiple of 16.")

Comment on lines +38 to +39
log.Printf("Generating proof with: %d nonces and %d threads.\n", options.nonces, options.threads)
logger.Info("proving: start generating proof")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nonces and threads can be added directly into the second log.

Suggested change
log.Printf("Generating proof with: %d nonces and %d threads.\n", options.nonces, options.threads)
logger.Info("proving: start generating proof")
logger.Info("proving: start generating proof", zap.Uint("nonces", options.nonces), zap.Uint("threads", options.threads))

@fasmat
Copy link
Member

fasmat commented Nov 5, 2024

Closing due to inactivity, feel free to re-open if you think this is still useful 🙂

@fasmat fasmat closed this Nov 5, 2024
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.

add -theads and -nonces into postcli -genproof
3 participants