{"id":13818146,"url":"https://github.com/ewasm/scout","last_synced_at":"2025-04-13T16:32:30.903Z","repository":{"id":41092031,"uuid":"188506356","full_name":"ewasm/scout","owner":"ewasm","description":"Scout is a Ethereum 2.0 Phase 2 execution prototyping engine.","archived":false,"fork":false,"pushed_at":"2020-01-25T21:02:17.000Z","size":68,"stargazers_count":91,"open_issues_count":22,"forks_count":16,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-23T23:37:31.676Z","etag":null,"topics":["eth2","ethereum","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ewasm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-25T01:24:24.000Z","updated_at":"2024-12-14T01:45:04.000Z","dependencies_parsed_at":"2022-07-30T20:48:01.252Z","dependency_job_id":null,"html_url":"https://github.com/ewasm/scout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewasm%2Fscout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewasm%2Fscout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewasm%2Fscout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewasm%2Fscout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ewasm","download_url":"https://codeload.github.com/ewasm/scout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248743956,"owners_count":21154776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eth2","ethereum","webassembly"],"created_at":"2024-08-04T07:00:34.294Z","updated_at":"2025-04-13T16:32:30.655Z","avatar_url":"https://github.com/ewasm.png","language":"Rust","funding_links":[],"categories":["Prototyping"],"sub_categories":["Scout"],"readme":"# Scout\n\nScout is a Ethereum 2.0 Phase 2 execution prototyping engine.\n\n**Warning: this is super experimental**\n\n## Goals\n\n1) Create a (black boxed) execution prototyping engine\n2) Create some example contracts (\"execution scripts\")\n3) Enable \"easy\" onboarding for creating scripts\n4) By having actual real world use cases in scripts, we can benchmark the design and identify bottlenecks\n\n## What is this?\n\nThis engine intentionally avoids a lot of details and therefore it is not usable as a Eth 2.0 client.\nInstead of being a client, it should support reading and outputting shard/beacon states in a YAML format.\n\n## How to use this?\n\nInstall Rust first. Add the wasm32 target to the toolchain and install `chisel` using cargo:\n```sh\nrustup target add wasm32-unknown-unknown\nrustup component add rustfmt\nrustup update\ncargo install chisel\n```\n\nThere is a `Makefile` to make building easy:\n- `build` will build all components (the runner and the example scripts)\n- `test` will run tests using the YAML test files\n- `all` will do both\n\nThe runner is called scout and is available at `target/release/phase2-scout` after being built.\n\nThe runner expects a YAML test file:\n```yaml\nbeacon_state:\n  execution_scripts:\n    - scripts/helloworld/target/wasm32-unknown-unknown/release/phase2_helloworld.wasm\nshard_pre_state:\n  exec_env_states:\n    - \"0000000000000000000000000000000000000000000000000000000000000000\"\nshard_blocks:\n  - env: 0\n    data: \"\"\n  - env: 0\n    data: \"\"\nshard_post_state:\n  exec_env_states:\n    - \"0000000000000000000000000000000000000000000000000000000000000000\"\n```\n\nThe runner expects a filename pointing to the test file or will default to `test.yaml` in the local directory if nothing was specified.\n\n## How to code scripts?\n\nAn example script is located in `scripts/helloworld`. It uses [ewasm-rust-api](https://github.com/ewasm/ewasm-rust-api) with the experimental `eth2` feature.\n\n```rust\nextern crate ewasm_api;\n\nuse ewasm_api::*;\n\n#[cfg(not(test))]\n#[no_mangle]\npub extern \"C\" fn main() {\n    let pre_state_root = eth2::load_pre_state_root();\n\n    assert!(eth2::block_data_size() == 0);\n\n    // No updates were made to the state\n    let post_state_root = pre_state_root;\n\n    eth2::save_post_state_root(post_state)\n}\n```\n\nA better example is located in `scripts/bazaar` which is in essence a stateless contract. It uses SSZ serialisation. A test case is included in `bazaar.yaml`.\n\nIt should be possible to import any Rust crate as long as it can be compiled to the wasm32 target.\n\n## Maintainer\n\n* Alex Beregszaszi\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewasm%2Fscout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fewasm%2Fscout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewasm%2Fscout/lists"}