Skip to content

Commit 5732f62

Browse files
authored
chore: add links to arch page (#2297)
1 parent 398ef74 commit 5732f62

File tree

3 files changed

+24
-25
lines changed

3 files changed

+24
-25
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ Part of the links point to the code documentation or the book. code docs are the
5858
* Release procedure and changelogs explanation. [book](https://bluealloy.github.io/revm/release_procedure.html)
5959
* How to use revme (Revm binary with few commands) can be found here. [code](https://github.com/bluealloy/revm/tree/main/bins/revme)
6060
* How to run Ethereum test can be found here: [book](https://bluealloy.github.io/revm/dev.html#running-eth-tests)
61-
* How to run examples and benchmark with `samply` to check performance. (book)
6261
* If there is more explanations please open PR request for it.
6362

6463
### Community:
@@ -71,4 +70,4 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
7170

7271
### Security
7372

74-
For any security questions or findings, please reach out to me directly via email at [email protected] or contact me on Keybase under the username [draganrakita](https://keybase.io/draganrakita/).
73+
For any security questions or findings, please reach out to me directly via email at [email protected] or contact me on Keybase under the username @draganrakita.

book.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ title = "Revm - Rust Ethereum Virtual Machine"
77

88
[output.linkcheck]
99
optional = true
10-
follow-web-links = true
10+
follow-web-links = false

book/src/architecture.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,38 @@ You can use REVM in two main ways:
99

1010
To see usage examples you can check the [examples folder](https://github.com/bluealloy/revm/tree/main/examples). Other than documentation, examples are main resource to see and learn about Revm.
1111

12-
The main `revm` library combines all crates into one package and reexports them, standalone library are useful if there is need to import functionality with smaller scope. You can see overview of revm crates in [crates folder](https://github.com/bluealloy/revm/tree/main/crates).
12+
The main [`revm`](https://crates.io/crates/revm) library combines all crates into one package and reexports them, standalone library are useful if there is need to import functionality with smaller scope. You can see overview of revm crates in [crates folder](https://github.com/bluealloy/revm/tree/main/crates).
1313

1414
REVM works in `no_std` environments which means it can be used in zero-knowledge virtual machines (zkVMs) and it is the standard library in that use case. It also has very few external dependencies.
1515

1616
# Execution API
1717

18-
`Evm` the main structure for executing mainnet ethereum transaction is built with a `Context` and a builder, code for it looks like this:
18+
[`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:
1919

2020
```rust,ignore
2121
let mut evm = Context::mainnet().with_block(block).build_mainnet();
2222
let out = evm.transact(tx);
2323
```
2424

25-
`Evm` struct contains:
26-
* `Context` - Environment and evm state.
27-
* `Instructions` - EVM opcode implementations
28-
* `Precompiles` - Built-in contract implementations
29-
* `Inspector` - Used for tracing.
25+
[`Evm`](https://docs.rs/revm-context/1.0.0/revm_context/evm/struct.Evm.html) struct contains:
26+
* [`Context`](https://docs.rs/revm-context/latest/revm_context/context/struct.Context.html) - Environment and evm state.
27+
* [`Instructions`](https://docs.rs/revm-handler/latest/revm_handler/instructions/trait.InstructionProvider.html) - EVM opcode implementations
28+
* [`Precompiles`](https://docs.rs/revm-handler/latest/revm_handler/trait.PrecompileProvider.html) - Built-in contract implementations
29+
* [`Inspector`](https://docs.rs/revm-inspector/latest/revm_inspector/trait.Inspector.html) - Used for tracing.
3030

31-
And `Context` contains data used in execution:
32-
* Environment data, the data that is known before execution starts are `Transaction`, `Block`, `Cfg`.
33-
* `Journal` is place where internal state is stored. Internal state is returned after execution ends.
34-
* And `Database` is a interface that allows fetching external data that is needed in runtime. That data are account, storage and bytecode. When loaded they are stored in `Journal`
31+
And [`Context`](https://docs.rs/revm-context/latest/revm_context/context/struct.Context.html) contains data used in execution:
32+
* Environment data, the data that is known before execution starts are [`Transaction`](https://docs.rs/revm-context-interface/latest/revm_context_interface/transaction/trait.Transaction.html), [`Block`](https://docs.rs/revm-context-interface/latest/revm_context_interface/block/trait.Block.html), [`Cfg`](https://docs.rs/revm-context-interface/latest/revm_context_interface/cfg/trait.Cfg.html).
33+
* [`Journal`](https://docs.rs/revm-context-interface/latest/revm_context_interface/journaled_state/trait.JournalTr.html) is place where internal state is stored. Internal state is returned after execution ends.
34+
* And `Database` is a interface that allows fetching external data that is needed in runtime. That data are account, storage and bytecode. When loaded they are stored in [`Journal`](https://docs.rs/revm-context-interface/latest/revm_context_interface/journaled_state/trait.JournalTr.html)
3535

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

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

43-
For inspection API to be enabled, `Evm` needs to be created with inspector.
43+
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.
4444

4545
```rust,ignore
4646
let mut evm = Context::mainnet().with_block(block).build_mainnet().with_inspector(inspector);
@@ -57,12 +57,12 @@ Each trait needed to build custom EVM has detailed documentation explaining how
5757

5858
In summary, REVM is built around several key traits that enable customizable EVM functionality. The core traits include:
5959

60-
* **EvmTr**: The core EVM trait that provides access to `Context`, `Instruction`, `Precompiles`:
61-
* **ContextTr**: Accessed through EvmTr, defines the execution environment including Tx/Block/Journal/Db.
62-
* **Handler**: Implements the core execution logic, taking an EvmTr implementation. The default implementation follows Ethereum consensus.
60+
* [`EvmTr`](https://docs.rs/revm-handler/latest/revm_handler/evm/trait.EvmTr.html): The core EVM trait that provides access to `Context`, `Instruction`, `Precompiles`:
61+
* [`ContextTr`](https://docs.rs/revm-context-interface/latest/revm_context_interface/context/trait.ContextTr.html): Accessed through EvmTr, defines the execution environment including Tx/Block/Journal/Db.
62+
* [`Handler`](https://docs.rs/revm-handler/latest/revm_handler/handler/trait.Handler.html): Implements the core execution logic, taking an EvmTr implementation. The default implementation follows Ethereum consensus.
6363

6464
And traits that provide support for inspection and tracing:
6565

66-
* **InspectorEvmTr**: Extends EvmTr to enable inspection mode execution with an associated `Inspector` type
67-
* **InspectorHandler**: Extends Handler with inspection-enabled execution paths that make `Inspector` callbacks
68-
* **Inspector**: User-implementable trait for EVM inspection/tracing
66+
* [`InspectorEvmTr`](https://docs.rs/revm-inspector/latest/revm_inspector/trait.InspectorEvmTr.html): Extends EvmTr to enable inspection mode execution with an associated [`Inspector`](https://docs.rs/revm-inspector/latest/revm_inspector/trait.Inspector.html) type
67+
* [`InspectorHandler`](https://docs.rs/revm-inspector/latest/revm_inspector/handler/trait.InspectorHandler.html): Extends Handler with inspection-enabled execution paths that make [`Inspector`](https://docs.rs/revm-inspector/latest/revm_inspector/trait.Inspector.html) callbacks
68+
* [`Inspector`](https://docs.rs/revm-inspector/latest/revm_inspector/trait.Inspector.html): User-implementable trait for EVM inspection/tracing

0 commit comments

Comments
 (0)