-
Notifications
You must be signed in to change notification settings - Fork 255
chore(contract-manager) Entropy stress test script #2588
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 6 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this script with latency_entropy_with_callback
. the shared logic is a lot and this is essentially a superset of the other script.
contract_manager/scripts/latency_entropy_with_callback_stress_test.ts
Outdated
Show resolved
Hide resolved
contract_manager/scripts/latency_entropy_with_callback_stress_test.ts
Outdated
Show resolved
Hide resolved
contract: EvmEntropyContract, | ||
privateKey: PrivateKey, | ||
requestId: number, | ||
): Promise<{ EntropyRequestResponse: any; startTime: number }> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we use something better than any
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just the transaction turn object that we get from requestRandomness
}, | ||
"delay": { | ||
type: "number", | ||
desc: "delay between requests", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mention that it is in seconds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ms
"delay": { | ||
type: "number", | ||
desc: "delay between requests", | ||
default: 25, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like a very specific number. any reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, just felt like it. 😅
Summary
Added a script that can send multiple requests from a single wallet to test Entropy.
npx ts-node latency_entropy_with_callback_stress_test.ts --chain berachain_bepolia --private-key $PRIVATE_KEY --nrequests 10 --delay 1
Rationale
How has this been tested?