Skip to content

Commit

Permalink
Bump v20, changelog (bluealloy#350)
Browse files Browse the repository at this point in the history
* Bump v20

* Changelog for revm
  • Loading branch information
rakita authored Jan 29, 2023
1 parent 75ef0f1 commit 78296d3
Show file tree
Hide file tree
Showing 15 changed files with 98 additions and 28 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
Because this is workspace with multi libraries, tags will be simplified, and with this document you can match version of project with git tag.

# v20 tag
date 23.01.2023
Big release. primitives and interpreter libs and optimizations.
This tag can be found in `main`

* revm: v3.0.0
* revm-precompile: v2.0.0
* revm-primitives: v1.0.0
* revm-interpreter: v1.0.0

# v19 tag
data 22.11.2022
Bump dependency in revm and precompiles
Found on same branch as v17 tag.

* revm: v2.3.1
* revm_precompiles: v1.1.2
Expand Down
9 changes: 4 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ members = [
default-members = ["crates/revm"]

[profile.release]
debug = true
lto = true
codegen-units = 1

Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ Here is list of things that i would like to use as guide in this project:

structure:
* crates
* revm -> main EVM library
* revm_precompiles -> EVM precompiles are standalone
* revmjs -> Binding for js. (in not finished state)
* revm -> main EVM library.
* revm-primitives -> Primitive data types.
* revm-interpreter -> Execution loop with instructions
* revm-precompiles -> EVM precompiles
* bins:
* revme: cli binary, used for running state test json
* revm-test: test binaries with contracts, used mostly to check performance (will probably merge it inside revme).
* revm-test: test binaries with contracts, used mostly to check performance

There were some big efforts on optimization of revm:
* Optimizing interpreter loop: https://github.com/bluealloy/revm/issues/7
* Introducing Bytecode format (and better bytecode analysis): https://github.com/bluealloy/revm/issues/121
* Unification of instruction signatures: https://github.com/bluealloy/revm/pull/283

# Running eth tests

Expand All @@ -44,9 +46,12 @@ cargo run --package revm-test --release --bin snailtracer
cargo flamegraph --root --freq 4000 --min-width 0.001 --package revm-test --bin snailtracer
```

# Used by
# Used by:

* Foundry project (as their main EVM): https://github.com/foundry-rs/foundry
* Foundry: https://github.com/foundry-rs/foundry
* Helios: https://github.com/a16z/helios
* Hardhat (transitioning to it): https://github.com/NomicFoundation/hardhat/tree/rethnet/main
* Reth: https://github.com/paradigmxyz/reth

(If you want to add your project to the list, ping me or open the PR)

Expand Down
3 changes: 1 addition & 2 deletions bins/revm-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ edition = "2021"
[dependencies]
bytes = "1.1"
hex = "0.4"
revm = { path = "../../crates/revm", version = "2.3.1" }
revm-interpreter = { path = "../../crates/interpreter", version = "3.0.0" }
revm = { path = "../../crates/revm", version = "3.0.0" }
microbench = "0.5"

[[bin]]
Expand Down
6 changes: 3 additions & 3 deletions bins/revm-test/src/bin/snailtracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::time::Duration;
use bytes::Bytes;
use revm::{
db::BenchmarkDB,
interpreter::{analysis::to_analysed, BytecodeLocked, DummyHost},
interpreter::{analysis::to_analysed, BytecodeLocked, Contract, DummyHost, Interpreter},
primitives::{BerlinSpec, Bytecode, TransactTo},
};
extern crate alloc;
Expand Down Expand Up @@ -40,15 +40,15 @@ pub fn simple_example() {
);

// revm interpreter
let contract = revm_interpreter::Contract {
let contract = Contract {
input: evm.env.tx.data,
bytecode: BytecodeLocked::try_from(bytecode).unwrap(),
..Default::default()
};

let mut host = DummyHost::new(env);
microbench::bench(&bench_options, "Snailtracer Interpreter benchmark", || {
let mut interpreter = revm_interpreter::Interpreter::new(contract.clone(), u64::MAX, false);
let mut interpreter = Interpreter::new(contract.clone(), u64::MAX, false);
interpreter.run::<_, BerlinSpec>(&mut host);
host.clear()
});
Expand Down
2 changes: 1 addition & 1 deletion bins/revme/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ hex = "0.4"
indicatif = "0.17"
plain_hasher = "0.2"
primitive-types = { version = "0.12", features = ["rlp", "serde"] }
revm = { path = "../../crates/revm", version = "2.3.1", default-features = false, features = [
revm = { path = "../../crates/revm", version = "3.0.0", default-features = false, features = [
"ethersdb",
"std",
"secp256k1",
Expand Down
5 changes: 3 additions & 2 deletions crates/interpreter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# v3.0.0
# v1.0.0
date: 29.01.2023

Interpreter was extracted from main REVM crate. Before v3.0.0 version, this code was part of REVM.
Interpreter was extracted from main revm crate at the revm v3.0.0 version.
2 changes: 1 addition & 1 deletion crates/interpreter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords = ["no_std", "ethereum", "vm", "evm", "revm", "interpreter"]
license = "MIT"
name = "revm-interpreter"
repository = "https://github.com/bluealloy/revm"
version = "3.0.0"
version = "1.0.0"
readme = "../../README.md"

[dependencies]
Expand Down
5 changes: 5 additions & 0 deletions crates/precompiles/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v2.0.0
date: 29.01.2023

Renamed to `revm-precompiles` from `revm_precompiles`

# v1.1.2
date: 22.11.2022

Expand Down
2 changes: 1 addition & 1 deletion crates/precompiles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords = ["no_std", "ethereum", "evm", "precompiles"]
license = "MIT"
name = "revm-precompiles"
repository = "https://github.com/bluealloy/revm"
version = "1.1.2"
version = "2.0.0"

[dependencies]
revm-primitives = { path = "../primitives", default-features = false }
Expand Down
5 changes: 3 additions & 2 deletions crates/primitives/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# v3.0.0
# v1.0.0
date: 29.01.2023

Interpreter was extracted from main REVM crate. Before v3.0.0 version, this code was part of REVM.
Interpreter was extracted from main revm crate at the revm v3.0.0 version.
2 changes: 1 addition & 1 deletion crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords = ["no_std", "ethereum", "vm", "evm", "revm", "primitives", "types"]
license = "MIT"
name = "revm-primitives"
repository = "https://github.com/bluealloy/revm"
version = "3.0.0"
version = "1.0.0"
readme = "../../README.md"

[dependencies]
Expand Down
50 changes: 50 additions & 0 deletions crates/revm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
# v3.0.0
date 29.01.2022

This is big release that has core changes that breaks compatibility. In summary:
* Project is refactored into `revm-primitives`,`revm-precompiles`,`revm-interpreter` and `revm` to have more flexibility and separation of concerns. And include paths in revm reflect that. So try to find include as `revm::primitives` or `revm::interpreter`
* Parity `primitive-types` was replaced with `ruint` for big numbers and subset of macros are used for native `B160`/`B256` types.
* Interpreter instructions are unified and now all of them have same signature.
* web3 db was replaces with ethers alternative.
* revmjs lib was removed from crates.
* `revm_precompile` was renamed to `revm-precompile.`

* Return types are made to have more insight of what have happened inside revm.
* Snailtracer benchmark got around 20% faster.

Github Changelog:
* dc9818f - (HEAD -> o/bump, origin/bump_v20) Bump v20 (13 hours ago) <rakita>
* 75ef0f1 - (origin/main, origin/HEAD) feat: Staticcall internal return (#349) (13 hours ago) <rakita>
* 0194b37 - (t) fix bug introduced in last commit (13 hours ago) <rakita>
* 7b00f32 - Cleanup imports (#348) (14 hours ago) <rakita>
* c14d7ea - fix: enable the examples to run with the current revm (#347) (16 hours ago) <flyq>
* 329fd94 - Wrap all calls to interpreter.gas.erase_cost with checks if USE_GAS is enabled (#346) (2 days ago) <christn>
* 72355f4 - improvement: add logs & return value to revert (#343) (3 days ago) <Wodann>
* 142a1c9 - expose hashbrown::HashMap in primitives (#345) (3 days ago) <Andy Thomson>
* ba393d7 - fix: disable balance check (#342) (4 days ago) <Wodann>
* 876fad1 - refactor: simplify DatabaseComponentError (#339) (6 days ago) <Wodann>
* 81534ad - chore: includes to libs (#338) (7 days ago) <rakita>
* e2f4d32 - Creating revm-primitives, revm better errors and db components (#334) (10 days ago) <rakita>
* de83db6 - fix: feature flags (#330) (2 weeks ago) <Wodann>
* b60269c - `revm`: mark `with-serde` feature as deprecated (#328) (2 weeks ago) <Enrique Ortiz>
* 63bf475 - make load_account pub (#325) (3 weeks ago) <rakita>
* 0ef0197 - Cleanup, move hot fields toggether in Interpreter (#321) (3 weeks ago) <rakita>
* 81942d6 - enable proptest with arbitrary feature (#323) (3 weeks ago) <joshieDo>
* 2be3798 - feat: revm-interpreter created (#320) (3 weeks ago) <rakita>
* 7e98fef - fix: feature flag compiler errors (#256) (5 weeks ago) <Wodann>
* 488ef8a - Add example for fork + ref_transact impl (#296) (6 weeks ago) <0xDmtri>
* 56e6c22 - feat: allow disabling of balance checks (#297) (6 weeks ago) <Wodann>
* 8661467 - feat: Export CustomPrinter insector from revm (#300) (6 weeks ago) <rakita>
* 222b8e9 - feature: substitute web3db to ethersdb (#293) (6 weeks ago) <0xDmtri>
* fd01083 - feature(revm): Return `bytes` in Create calls (#289) (7 weeks ago) <Nicolas Gotchac>
* 2fb0933 - docs: Correct typo (#282) (7 weeks ago) <Przemyslaw Rzad>
* 90fe01e - feat(interpreter): Unify instruction fn signature (#283) (7 weeks ago) <rakita>
* 54e0333 - bug: Integer overflow while calculating the remaining gas in GasInspector (#287) (8 weeks ago) <rakita>
* acdbaac - native bits (#278) (8 weeks ago) <rakita>
* 69e302b - feat(revm): Add prevrandao field to EnvBlock (#271) (2 months ago) <rakita>
* d1703cd - Export StorageSlot (#265) (3 months ago) <Francesco Cinà>
* 560bb03 - Fix: typos (#263) (3 months ago) <HAPPY>
* 369244e - feat(refactor): make keccak in one place. (#247) (3 months ago) <rakita>
* c96c878 - feat: Migrate `primitive_types::U256` to `ruint::Uint<256, 4>` (#239) (3 months ago) <Alexey Shekhirin>


# v2.3.1
date: 22.11.2022

Expand Down
6 changes: 3 additions & 3 deletions crates/revm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ keywords = ["no_std", "ethereum", "evm", "revm"]
license = "MIT"
name = "revm"
repository = "https://github.com/bluealloy/revm"
version = "2.3.1"
version = "3.0.0"
readme = "../../README.md"

[dependencies]
revm-precompiles = { path = "../precompiles", version = "1.1.2", default-features = false }
revm-interpreter = { path = "../interpreter", default-features = false }
revm-precompiles = { path = "../precompiles", version = "2.0.0", default-features = false }
revm-interpreter = { path = "../interpreter", version = "1.0.0", default-features = false }

auto_impl = { version = "1.0", default-features = false }

Expand Down

0 comments on commit 78296d3

Please sign in to comment.