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

WasmEdge for Substrate milestones #1 and #2 #547

Merged
merged 2 commits into from
Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions deliveries/wasmedge_substrate-milestone_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Milestone Delivery :mailbox:

**The [invoice form :pencil:](https://docs.google.com/forms/d/e/1FAIpQLSfmNYaoCgrxyhzgoKQ0ynQvnNRoTmgApz9NrMp-hd8mhIiO0A/viewform) has been filled out correctly for this milestone and the delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grants-Program/blob/master/docs/milestone-deliverables-guidelines.md).**

* **Application Document:** https://github.com/w3f/Grants-Program/blob/master/applications/wasmedge_substrate.md
* **Milestone Number:** 1

**Context** (optional)

Enable Substrate to run on WasmEdge

Substrate version polkadot-v0.9.28 is included as a subtree in our repo, and we tested based on that version.

**Deliverables**

| Number | Deliverable | Link | Notes |
| ------------- | ------------- | ------------- |------------- |
| 0a. | License | https://github.com/second-state/substrate-wasmedge/blob/main/LICENSE | ...|
| 0b. | Documentation | https://github.com/second-state/substrate-wasmedge/blob/main/README.md | ...|
| 0c. | Testing Guide | https://github.com/second-state/substrate-wasmedge/blob/main/README.md | The documentation contains step-by-step guides for testing|
| 0d. | Docker | n/a | We are using standard cross-platform Substrate build instructions. It should work on all flavors of Linux and Windows. No Docker is needed. |
| 0e. | Article | https://blog.secondstate.io/post/20220811-substrate-on-wasmedge/ | ...|
| 1. | Rust API | https://github.com/WasmEdge/WasmEdge/tree/master/bindings/rust | Docs: https://wasmedge.org/book/en/embed/rust.html |
| 2. | Host wrapper | https://github.com/second-state/substrate-wasmedge/tree/main/substrate | It is implemented in our forked version of Substrate. |
| 3. | Test | https://drive.google.com/file/d/1N6P1PesOWRQzatWfwb24oVbKRojM4Bp5/view?usp=sharing | A screencast demo showing the steps in the testing guide (README). |

**Additional Information**

None.
28 changes: 28 additions & 0 deletions deliveries/wasmedge_substrate-milestone_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Milestone Delivery :mailbox:

**The [invoice form :pencil:](https://docs.google.com/forms/d/e/1FAIpQLSfmNYaoCgrxyhzgoKQ0ynQvnNRoTmgApz9NrMp-hd8mhIiO0A/viewform) has been filled out correctly for this milestone and the delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grants-Program/blob/master/docs/milestone-deliverables-guidelines.md).**

* **Application Document:** https://github.com/w3f/Grants-Program/blob/master/applications/wasmedge_substrate.md
* **Milestone Number:** 2

**Context** (optional)

Create docs and config options to select between multiple WebAssembly runtimes

We want to support both WasmEdge and wasmtime as runtimes for substrate.

**Deliverables**

| Number | Deliverable | Link | Notes |
| ------------- | ------------- | ------------- |------------- |
| 0a. | License | https://github.com/second-state/substrate-wasmedge/blob/main/LICENSE | ...|
| 0b. | Documentation | https://github.com/second-state/substrate-wasmedge/blob/main/README.md | ...|
| 0c. | Testing Guide | https://github.com/second-state/substrate-wasmedge/blob/main/README.md | The documentation contains step-by-step guides for testing|
| 0d. | Docker | n/a | We are using standard cross-platform Substrate build instructions. It should work on all flavors of Linux and Windows. No Docker is needed. |
| 0e. | Article | https://blog.secondstate.io/post/20220811-substrate-on-wasmedge/ | ...|
| 1. | Software | https://github.com/second-state/substrate-wasmedge/ | The `--wasm-execution` CLI option in `cargo run` allows us to choose between the two WebAssembly runtime (WasmEdge or wasmtime) for the substrate node. |
| 2. | Upstream PR | n/a | We would like to get guidance from Substrate developers in terms of whether / how they would like us to contribute back to the upstream Substrate project. We would like to postpone the upstream PR to milestone #3 after this discussion. |
alxs marked this conversation as resolved.
Show resolved Hide resolved

**Additional Information**

You can see the `--wasm-execution` option at work from the screencast demo video: https://drive.google.com/file/d/1N6P1PesOWRQzatWfwb24oVbKRojM4Bp5/view?usp=sharing