{"id":20433875,"url":"https://github.com/flashbots/suave-andromeda-revm","last_synced_at":"2025-08-12T16:40:23.266Z","repository":{"id":218991011,"uuid":"745584530","full_name":"flashbots/suave-andromeda-revm","owner":"flashbots","description":"Andromeda revm execution service","archived":false,"fork":false,"pushed_at":"2024-07-25T10:40:52.000Z","size":6505,"stargazers_count":31,"open_issues_count":6,"forks_count":8,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-07-29T03:11:37.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flashbots.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-19T16:49:07.000Z","updated_at":"2025-01-20T18:16:13.000Z","dependencies_parsed_at":"2024-02-25T20:24:28.527Z","dependency_job_id":"603285fc-48d3-4634-8037-60aa672234de","html_url":"https://github.com/flashbots/suave-andromeda-revm","commit_stats":null,"previous_names":["flashbots/suave-andromeda-revm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flashbots/suave-andromeda-revm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flashbots%2Fsuave-andromeda-revm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flashbots%2Fsuave-andromeda-revm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flashbots%2Fsuave-andromeda-revm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flashbots%2Fsuave-andromeda-revm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flashbots","download_url":"https://codeload.github.com/flashbots/suave-andromeda-revm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flashbots%2Fsuave-andromeda-revm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270099285,"owners_count":24527027,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-15T08:22:07.607Z","updated_at":"2025-08-12T16:40:23.235Z","avatar_url":"https://github.com/flashbots.png","language":"Rust","funding_links":[],"categories":["PBS - Proposer-Builder Separation"],"sub_categories":[],"readme":"\u003e [!WARNING]\n\u003e This repository is a work in progress, and for now only functions as a showcase. This code *is not intended to secure any valuable information*.\n\n# Anrdomeda REVM\n\nThis an EVM with precompiles used internally by SUAVE for key management and boostrapping kettles.\n\n## How the Andromeda precompiles work\n\nThe Andromeda [precompiles](src/precompiles/) rely on features from Gramine, provided through the filesystem. The gramine environment is [provided separately](https://github.com/flashbots/gramine-andromeda-revm). Running the examples and tests here just run locally, approximating this.\n\n- `Suave.localRandom` uses the `RDRAND` instruction [via Gramine's `/dev/urandom`](https://gramine.readthedocs.io/en/stable/devel/features.html#randomness).\n- `Suave.volatile{Set/Get}` uses a simple static `HashMap` in local memory. It does not persist through a service restart.\n- `Suave.attestSgx` uses [Gramine's remote attestation `/dev/attestation/quote`](https://gramine.readthedocs.io/en/stable/devel/features.html#attestation).\n- `Suave.sealingKey` uses [Gramine's pseudo-directory `/dev/attestation/keys`](https://gramine.readthedocs.io/en/stable/devel/features.html#attestation) feature.\n\nAs additional utility precompiles we include:\n- `Suave.doHTTPRequest`, which uses `/etc/ssl/ca-certificates.crt` for HTTPS certificates (the file must be included in the Gramine manifest!).\n\nThe tests include a thin wrapper for the precompiles [examples/Andromeda.sol]. This is a small interface, but it should be sufficient to run the [Key Manager demo](https://github.com/flashbots/andromeda-sirrah-contracts/)\n\n## SUAVE chain state\n\nThe revm itself is statless - we don't keep any chain data inside. To provide chain state we have introduced a witness-based database. The database itself is defined in [remote_db.rs](src/remote_db.rs), and verifying witness is done through [helios](https://github.com/a16z/helios). For SUAVE chain's Proof of Authority we have added a simple [consensus](src/consensus.rs) checker that verifies the blocks were signed by one of the trusted block proposers (`[0x0981717712ed2c4919fdbc27dfc804800a9eeff9, 0x0e5b9aa4925ed1beeb08d1c5a92477a1b719baa7, 0x0e8705e07bbe1ce2c39093df3d20aaa5120bfc7a]`).\n\nState is possibly fetched at two times:\n* Before the execution all of the access list state is pre-fetched\n* During EVM execution if a slot is missing it will be fetched from the execution client\n\n## Stateful executor\n\nThe main service we provide in this repository is the [StatefulExecutor](src/stateful.rs). This is a service which persists volatile memory (for `Suave.volatile{Set/Get}`) and manages the SUAVE chain light client.  \n\nThere are two methods that the `StatefulExecutor` implements:\n* `advance [height=latest]`, which advances the suave chain light client to the requested height\n* `execute tx_env`, which executes the requested call. The `tx_env` is expected to be JSON-encoded [TxEnv](https://github.com/flashbots/revm/blob/extensible-precompiles/crates/primitives/src/env.rs#L509) structure.\n\n## Building\n```shell\nmake build\n```\n\n**_Note:_** `clang` is required for building revm with `c-kzg` or `secp256k1` feature flags as they depend on `C` libraries. If you don't have it installed, you can install it with `apt install clang`.\n\n## Running example locally (no gramine)\n\nTo mock out `/dev/attestation/quote`, and `/dev/attestation/user_report_data`, just try\n```shell\nsudo mkdir /dev/attestation\nsudo chown $USER:$USER /dev/attestation\necho \"dummnyquote\" \u003e /dev/attestation/quote\n```\n\n```shell\nmake examples\n```\n\n## License\n\nThe code in this project is free software under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflashbots%2Fsuave-andromeda-revm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflashbots%2Fsuave-andromeda-revm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflashbots%2Fsuave-andromeda-revm/lists"}