-
Notifications
You must be signed in to change notification settings - Fork 354
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
Benchmark Wasm via argon2 and change gas price to 150_000 per op #1120
Conversation
145fd63
to
5cbaf45
Compare
5cbaf45
to
40a9e6a
Compare
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.
Good stuff
millisecond. This idea is [inspired by NEAR][neargas] and we encourage you to | ||
read their excellent docs on that topic. | ||
|
||
In order to meet this target, we execute Argon2 in a test contract ([#1120]). |
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 a great document.
The one question I raise is the reproduceability of "this consumed 96837752 gas and took 15ms on our CI system". They may upgrade the CI sometime.
It is fine for now, but we should have a better benchmark system sometime. (Can be in a few months)
ed25519_batch_verify_one_pubkey_cost: GasConfig::calc_crypto_cost( | ||
GasConfig::ED255219_BATCH_VERIFY_ONE_PUBKEY_FACTOR, | ||
), | ||
// ~154 us in crypto benchmarks |
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 looks very sensible and coherent pricing now.
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.
Lgtm. Only question I have is, if it's perhaps 'Teragas' instead of 'Terragas'.
Absolutely! Thank you for the hint. Will update. |
On reflection, this means that it is 150ns per wasm op? |
Oh, Terragas not Gigagas. Much nicer 😄 1 cosmwasm gas = 1 femtosecond of execution. |
No description provided.