Klevoya WASM Smart Contract Fuzzer grant application#420
Klevoya WASM Smart Contract Fuzzer grant application#420semuelle merged 2 commits intow3f:masterfrom
Conversation
|
Thanks for the application @mtabz. We'll look into it as soon as possible. |
Noc2
left a comment
There was a problem hiding this comment.
Thanks for the application. You should potentially also take a look at the following grant project: #9 or here: https://github.com/pventuzelo/wasm_runtimes_fuzzing. However, this grant was for wasmi/wasmtime and not a polkadot or contract runtime. Why do you think fuzzing a runtime will be useful? Isn’t it possible to ensure through the statistical guarantees of rust that the runtime won’t crash. Did you discuss this with parity directly, since they developed the module?
|
Let me also ping @athei here, who is working on the contract module. |
|
Hello @Noc2, yes we have seen the project #9, however as you have mentioned that project was focused on fuzzing wasmi and our goal is different.
We're not planning on fuzzing the runtime in this grant. Rather our focus is on fuzzing the smart contracts that will be deployed on the contracts pallet. (A good example from the Ethereum ecosystem of the kind of tool we want to develop here is https://github.com/crytic/echidna which is an Ethereum smart contract fuzzer.) We primarily plan to use fuzzing to identify smart contract logic bugs. With regards to memory safety, you are indeed right that with Rust as a smart contract programming language there should be fewer memory safety issues found through fuzzing the smart contracts. However, there are other smart contract programming languages in development by other teams that do not offer the same compile-time memory safety guarantees (e.g. https://github.com/patractlabs/ask which is AssemblyScript based). In this way we hope to help smart contract developers identify a wide range of security issues in their smart contracts.
We have not discussed this with parity. We'd be happy to do so if you can suggest a suitable person to contact? |
|
As the de-facto maintainer of the contracts pallet I would welcome the addition of a fuzzer. However, after reading the proposal I still have some open question:
|
|
Hi @athei, thanks for the response. It appears that the grant proposal could benefit from some additional clarification around the intention as this seems to be unclear. To clarify:
|
|
Thanks. Now it makes more sense to me. Would be nice to have some clarifications in the proposal that mentions what it is not (fuzzer for pallet_contracts, fuzzer for the wasm engine) and maybe mention existing work in those other fields by other teams so we know where it fits in. That said, rebuilding the complete logic and keeping up with changes to pallet_contracts seems to be some non trivial work. Do you think you can get rid of much of the logic or mock it somehow (like gas metering) to keep your implementation simple? Maybe you could add your ahead of time compiling engine as a backend to sp_sandbox so that you don't have to keep your implementation in sync with the production module. Otherwise I am worried that the fuzzer gets outdated quickly. However, I am not sure if this is even feasible. Maybe as a follow up grant. |
|
@athei we have updated the proposal with your feedback on making the project goal more explicit and included details of similar work. Let us know if there are still items we should add to make it clearer. With regards to future maintenance, the plan is to have API level compatibility with the contracts pallet and underlying logic being mocked as much as possible. In this way we hope to reduce the maintenance to a minimum. We are not overly familiar with sp_sandbox, but agree that we can perhaps investigate this in a follow on grant. The latter two points have also been added to the grant proposal. |
alxs
left a comment
There was a problem hiding this comment.
Very happy to support this as well. Good luck with the development!
|
Congratulations! As part of the Open Grants Program, we want to help winning teams acknowledge their grants publicly. To that end, we’ve created a badge for projects that successfully delivered their first milestone. Please observe the foundation’s guidelines when making any announcements; in particular, don’t announce the grant publicly before you've completed at least the first milestone of the project. |
|
Hey @mtabz, care to share a quick status update, along with an ETA if possible? We were expecting to receive your first delivery a bit over 2 months ago. As long as you're actively working on the project, delays aren't a big problem, but please keep us in the loop. Note that if we don't hear from you within the next two weeks, we'll assume you're no longer interested and terminate the agreement. |
* Substrate WASM smart contract fuzzer proposal * Clarified grant goal and similar work. Updated license.
|
Hi @alxs apologies for the delay. I can confirm that we are still working on this project. The reason for the delay is that we started working on it a bit later than envisaged (we were not expecting at the outset for the grant to be approved that quickly!). ETA is in ~1 month. |
|
@mtabz works, no worries and thank you for the update! :) |
|
Hey @mtabz, any news? |
|
@mtabz note that since we haven't heard from you in a while and given the delay, if we don't hear from you in the next two weeks we'll assume you're no longer interested and terminate the grant. |
Grant Application Checklist
project_name.md) and updated.