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

Worst case Wasm CPU soak test #3120

Open
maxzaver opened this issue Aug 8, 2020 · 6 comments
Open

Worst case Wasm CPU soak test #3120

maxzaver opened this issue Aug 8, 2020 · 6 comments
Labels
A-contract-runtime Area: contract compilation and execution, virtual machines, etc T-contract-runtime Team: issues relevant to the contract runtime team

Comments

@maxzaver
Copy link
Contributor

maxzaver commented Aug 8, 2020

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.

@maxzaver maxzaver added the A-transaction-runtime Area: transaction runtime (transaction and receipts processing, state transition, etc) label Aug 8, 2020
@willemneal
Copy link
Contributor

This seems like a good use case for a fuzzer.

@bowenwang1996 bowenwang1996 added A-contract-runtime Area: contract compilation and execution, virtual machines, etc T-contract-runtime Team: issues relevant to the contract runtime team and removed A-transaction-runtime Area: transaction runtime (transaction and receipts processing, state transition, etc) labels Jun 29, 2021
@bowenwang1996
Copy link
Collaborator

@olonho what is the status of this issue?

@stale
Copy link

stale bot commented Sep 27, 2021

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months.
It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the S-stale label Sep 27, 2021
@bowenwang1996
Copy link
Collaborator

@matklad @olonho

@stale stale bot removed the S-stale label Sep 27, 2021
@matklad matklad assigned ailisp and unassigned olonho Oct 14, 2021
@stale
Copy link

stale bot commented Jan 12, 2022

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months.
It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the S-stale label Jan 12, 2022
@stale stale bot removed the S-stale label Jan 22, 2022
@stale
Copy link

stale bot commented Apr 22, 2022

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months.
It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contract-runtime Area: contract compilation and execution, virtual machines, etc T-contract-runtime Team: issues relevant to the contract runtime team
Projects
None yet
Development

No branches or pull requests

6 participants