Skip to content
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
4 changes: 2 additions & 2 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ No breaking changes
* difference is that `log_full` has `Interpreter` input while `log` does not
and `log` will be called in places where Interpreter is not found.
* `PrecompileError` now contains `Other` as `Cow<'static, str>`
* It allows allows setting both `&'static str` that is without perf penalty and `String` if needed.
* It allows setting both `&'static str` that is without perf penalty and `String` if needed.

# v98 tag

Expand Down Expand Up @@ -158,4 +158,4 @@ No breaking changes
# v67 tag (revm v21.0.0) -> v68 tag ( revm v22.0.0)

* No code breaking changes
* alloy-primitives bumped to v1.0.0 and we had a major bump because of it.
* alloy-primitives bumped to v1.0.0 and we had a major bump because of it.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Revm offers two primary applications: firstly, it functions as an executor where

### How to use:

Here is a straightforward example of using the Execution API: It allows us to create an Ethereum Virtual Machine (EVM) and execute transactions. Additionally, it can be utilized to generate traces with the inspector or more complex example of foundry cheatcodes.
Here is a straightforward example of using the Execution API: It allows us to create an Ethereum Virtual Machine (EVM) and execute transactions. Additionally, it can be utilized to generate traces with the inspector or more complex examples of foundry cheatcodes.

```rust,ignore
let mut evm = Context::mainnet().with_block(block).build_mainnet();
Expand Down Expand Up @@ -49,7 +49,7 @@ The full list of projects that use Revm is available in the [awesome-revm](https

The [book](https://bluealloy.github.io/revm/) and [`Architecture and API`](https://bluealloy.github.io/revm/architecture.html) page is the best starting resource.

Some quick links can be found here. Some point to code documentation or the book. code docs are there to explain usage of a particular part of the code where the book is to get more of an overview of the architecture or how components/projects fit together.
Some quick links can be found here. Some point to code documentation or the book. Code docs are there to explain usage of a particular part of the code where the book is to get more of an overview of the architecture or how components/projects fit together.

* [How to build and use revm](https://bluealloy.github.io/revm/dev.html)
* [Architecture overview](https://bluealloy.github.io/revm/architecture.html)
Expand All @@ -69,8 +69,8 @@ The Minimum Supported Rust Version (MSRV) may be updated at any time, so we can
### Community:
For questions please open a github issue or join the public [telegram group](https://t.me/+Ig4WDWOzikA3MzA0)

### Licence
Revm is licensed under MIT Licence.
### License
Revm is licensed under MIT License.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in these crates by you, shall be licensed as above, without any additional terms or conditions.

Expand Down
6 changes: 3 additions & 3 deletions book/src/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The API is designed around four key execution patterns:
- **Execution with commit**: Run transactions and automatically persist state changes
- **Execution with inspection**: Run transactions with detailed tracing and observation

[`Evm`](https://docs.rs/revm-context/1.0.0/revm_context/evm/struct.Evm.html) the main structure for executing mainnet ethereum transaction is built with a [`Context`](https://docs.rs/revm-context/latest/revm_context/context/struct.Context.html) and a builder, code for it looks like this:
[`Evm`](https://docs.rs/revm-context/1.0.0/revm_context/evm/struct.Evm.html) is the main structure for executing mainnet ethereum transactions. It is built with a [`Context`](https://docs.rs/revm-context/latest/revm_context/context/struct.Context.html) and a builder, code for it looks like this:

```rust,ignore
let mut evm = Context::mainnet().with_block(block).build_mainnet();
Expand All @@ -42,10 +42,10 @@ And [`Context`](https://docs.rs/revm-context/latest/revm_context/context/struct.

REVM provides four ways to execute transactions through traits (API):

* `transact(tx)` and `replay()` are function of [`ExecuteEvm`](https://docs.rs/revm-handler/latest/revm_handler/api/trait.ExecuteEvm.html) trait that allow execution transactions. They return the status of execution with reason, changed state and in case of failed execution an error.
* `transact(tx)` and `replay()` are functions of [`ExecuteEvm`](https://docs.rs/revm-handler/latest/revm_handler/api/trait.ExecuteEvm.html) trait that allow execution transactions. They return the status of execution with reason, changed state and in case of failed execution an error.
* `transact_commit(tx)` and `replay_commit()` are part of [`ExecuteCommitEvm`](https://docs.rs/revm-handler/latest/revm_handler/api/trait.ExecuteCommitEvm.html) that internally commits the state diff to the database and returns status of execution. Database is required to support `DatabaseCommit` trait.
* `inspect()`, `inspect_replay(tx)` and a few others are part of [`InspectEvm`](https://docs.rs/revm-inspector/latest/revm_inspector/trait.InspectEvm.html) trait that allow execution with inspection. This is how tracers are called.
* `inspect_commit()`,`inspect_replay_commit(tx)` are part of the [`InspectCommitEvm`](https://docs.rs/revm-inspector/latest/revm_inspector/trait.InspectCommitEvm.html) trait that extends `InspectEvm` to allow committing state diff after tracing.
* `inspect_commit()`, `inspect_replay_commit(tx)` are part of the [`InspectCommitEvm`](https://docs.rs/revm-inspector/latest/revm_inspector/trait.InspectCommitEvm.html) trait that extends `InspectEvm` to allow committing state diff after tracing.

For inspection API to be enabled, [`Evm`](https://docs.rs/revm-context/1.0.0/revm_context/evm/struct.Evm.html) needs to be created with inspector.

Expand Down
2 changes: 1 addition & 1 deletion book/src/awesome.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A curated list of excellent Revm-related resources. Feel free to contribute to t
- [**Trin**](https://github.com/ethereum/trin) is a Rust implementation of a Portal Network client.

#### EVM Variants
- [**Optimism**](https://github.com/bluealloy/revm/tree/main/crates/op-revm) is a ethereum L2 network.
- [**Optimism**](https://github.com/bluealloy/revm/tree/main/crates/op-revm) is an ethereum L2 network.
- [**Base**](https://www.base.org/) is an Ethereum Layer 2 (L2) chain that offers a safe, low-cost, developer-friendly way to build on-chain
- [**Scroll**](https://github.com/scroll-tech/revm) is its own Layer 2 network built on Ethereum (more specifically, a “zero-knowledge rollup”).

Expand Down
5 changes: 2 additions & 3 deletions book/src/contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ The git repository can be found at [https://github.com/bluealloy/revm/](https://

For questions please open a github issue or join the public [telegram group](https://t.me/+Ig4WDWOzikA3MzA0)

### Licence
### License

Licensed under MIT Licence.
Licensed under MIT License.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in these crates by you, shall be licensed as above, without any additional terms or conditions.

### Security

If there is a security question or finding please contact me directly via email at `dragan0rakita@gmail.com` or on keybase `@draganrakita`

4 changes: 2 additions & 2 deletions book/src/inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub trait Inspector<CTX, INTR: InterpreterTypes> {

// Event tracing
fn log(&mut self, context: &mut CTX, log: Log) {}
fn log_full(&mut self, interp: &mut Interpreter<INTR>, context &mut CTX, log: Log) {
fn log_full(&mut self, interp: &mut Interpreter<INTR>, context: &mut CTX, log: Log) {
self.log(context, log)
}
fn selfdestruct(&mut self, contract: Address, target: Address, value: U256) {}
Expand Down Expand Up @@ -138,4 +138,4 @@ REVM provides several ready-to-use inspectors:
- **Development tools**: Contract interaction tracing
- **Testing frameworks**: Execution verification and state checking

The Inspector trait makes REVM very observable EVM implementations available, enabling sophisticated tooling and analysis capabilities.
The Inspector trait makes REVM one of the most observable EVM implementations available, enabling sophisticated tooling and analysis capabilities.
4 changes: 2 additions & 2 deletions book/src/revme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Revme

Is a binary that allows running statetest and eof validation.
Revme is a binary that allows running statetest and eof validation.

```bash, ignore
$: revme --help
Expand All @@ -27,7 +27,7 @@ Test suites for the latest hardforks can be found in [EEST releases](https://git
Revm can run statetest type of tests with `revme` using the following command:
`cargo run --release -p revme -- statetest folder_path`

For running EEST tests, we can use the `./scripts/run-tests.sh.`
For running EEST tests, we can use the `./scripts/run-tests.sh`.

For legacy tests, we need to first download the repo `git clone https://github.com/ethereum/legacytests` and then run it with `cargo run --release -p revme -- statetest legacytests/Cancun/GeneralStateTests`
All statetest that can be run by revme can be found in the `GeneralStateTests` folder.
2 changes: 1 addition & 1 deletion crates/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Crates version and their description:
* ![revm](https://img.shields.io/crates/v/revm?height=50?label=revm) main crate, it reexports all other crates.
* ![revm](https://img.shields.io/crates/v/revm?height=50?label=revm) main crate. It reexports all other crates.
* ![revm-primitives](https://img.shields.io/crates/v/revm-primitives?label=revm-primitives) contains constants and primitives types that revm uses (alloy-primitives)
* ![revm-interpreter](https://img.shields.io/crates/v/revm-interpreter?label=revm-interpreter) biggest crate in the project, it contains all instructions
* ![revm-precompile](https://img.shields.io/crates/v/revm-precompile?label=revm-precompile) Precompiles defined by ethereum
Expand Down
2 changes: 1 addition & 1 deletion crates/op-revm/src/precompiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub fn granite() -> &'static Precompiles {
})
}

/// Returns precompiles for isthumus spec.
/// Returns precompiles for isthmus spec.
pub fn isthmus() -> &'static Precompiles {
static INSTANCE: OnceLock<Precompiles> = OnceLock::new();
INSTANCE.get_or_init(|| {
Expand Down
2 changes: 1 addition & 1 deletion examples/my_evm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ let _res = my_evm.inspect_commit_replay();
```

### [`revm::SystemCallEvm`]
Allows executing system transaction, only input needed is system contract add address and input
Allows executing a system transaction. Only input needed is system contract address and input.
Validation and pre-execution and most of post execution phases of ordinary transact flow will be skipped.

System calls are needed for inserting of fetching data on pre or post block state.
Expand Down
Loading