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

fix: increase range for the random value of request id in prover #6115

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/prover/src/utils/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,6 @@ export class ELRpc {

getRequestId(): string {
// TODO: Find better way to generate random id
return (Math.random() * 10000).toFixed(0);
return (Math.random() * 100000000000000000).toFixed(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for noticing this! Indeed the range of 10000 is improper for this application.

Math.random is a bad generator regardless. Why not have an incrementing counter @nazarhussain ?

}
}