{"id":13729655,"url":"https://github.com/vorot93/evmodin","last_synced_at":"2025-03-16T09:33:41.107Z","repository":{"id":43821895,"uuid":"378993307","full_name":"vorot93/evmodin","owner":"vorot93","description":"Ethereum Virtual Machine implementation","archived":false,"fork":false,"pushed_at":"2022-02-17T15:01:13.000Z","size":368,"stargazers_count":162,"open_issues_count":2,"forks_count":18,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-11T12:47:37.625Z","etag":null,"topics":["ethereum","evm","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vorot93.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":"2021-06-21T16:21:12.000Z","updated_at":"2025-02-06T17:25:41.000Z","dependencies_parsed_at":"2022-09-23T07:21:27.749Z","dependency_job_id":null,"html_url":"https://github.com/vorot93/evmodin","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/vorot93%2Fevmodin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorot93%2Fevmodin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorot93%2Fevmodin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorot93%2Fevmodin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vorot93","download_url":"https://codeload.github.com/vorot93/evmodin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809888,"owners_count":20351407,"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":["ethereum","evm","rust"],"created_at":"2024-08-03T02:01:03.445Z","updated_at":"2025-03-16T09:33:40.800Z","avatar_url":"https://github.com/vorot93.png","language":"Rust","funding_links":[],"categories":["EVM"],"sub_categories":["Cairo"],"readme":"# evmodin\n\nFast EVM implementation with support for resumability. Port of [evmone](https://github.com/ethereum/evmone) to Rust.\n\n## Usage\n```rust\nuse evmodin::{*, host::*, util::*, tracing::*};\nuse ethereum_types::*;\nuse hex_literal::hex;\n\nlet my_code = Bytecode::new()\n    .mstore8_value(0, b'h')\n    .mstore8_value(1, b'e')\n    .mstore8_value(2, b'l')\n    .mstore8_value(3, b'l')\n    .mstore8_value(4, b'o')\n    .ret(0, 5)\n    .build();\n\nlet message = Message {\n    kind: CallKind::Call,\n    is_static: true,\n    depth: 0,\n    gas: 200,\n    recipient: Address::zero(),\n    code_address: Address::zero(),\n    sender: Address::zero(),\n    input_data: vec![].into(),\n    value: U256::zero(),\n};\n\nassert_eq!(\n    AnalyzedCode::analyze(my_code)\n        .execute(\u0026mut DummyHost, \u0026mut NoopTracer, None, message, Revision::latest()),\n    Output {\n        status_code: StatusCode::Success,\n        gas_left: 146,\n        output_data: b\"hello\".to_vec().into(),\n        create_address: None,\n    }\n)\n```\n\n## Host / interpreter separation\n`evmodin` is not a standalone execution implementation - it is only an EVM interpreter with gas metering that must be coupled with Host, as defined in EVMC, for state access and inducing sub-calls. `MockedHost` is shipped in `evmodin`, but is only useful in tests.\n\n[Akula](https://github.com/akula-bft/akula), a fully-fledged Ethereum implementation, features its own version of Host for execution. Akula+evmodin pairing is considered to be the reference execution implementation which passes all Ethereum consensus tests.\n\n## Resumability\n`evmodin` is an interpreter loop that runs until host interaction/data is necessary. Then it exits with an interrupt. Each interrupt contains a value to be supplied to the host, and `resume` method which may accept data from Host, depending on interrupt. `AnalyzedCode::execute` simply loops, using data from `Host` to resume interrupts. You can make your own reactor that will handle interrupts instead, please see `ExecutionStartInterrupt::run_to_completion_with_host` for reference implementation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvorot93%2Fevmodin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvorot93%2Fevmodin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvorot93%2Fevmodin/lists"}