-
Notifications
You must be signed in to change notification settings - Fork 684
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
Worst case Wasm CPU soak test #3120
Comments
This seems like a good use case for a fuzzer. |
@olonho what is the status of this issue? |
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. |
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. |
This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. |
Motivation
We are currently using this code https://github.com/nearprotocol/nearcore/blob/master/runtime/runtime-params-estimator/test-contract/src/lib.rs#L681 to compute the ratio
<num CPU instructions>/<num Wasm operations>
. However this code might not be pessimistic enough, it might not be emitting the worst case Wasm operations. This might lead us to underestimating the cost of Wasm operations which might open the potential abuse vector.Goal
We need to write Wasm code that emits as many as possible CPU instructions per Wasm operation. It cannot use thread-specific stuff so atomics cannot be used.
The text was updated successfully, but these errors were encountered: