Skip to content

Commit

Permalink
Merge pull request #38 from bnb-chain/merge_v37
Browse files Browse the repository at this point in the history
chore: merge v37 version into develop
  • Loading branch information
unclezoro authored Jun 25, 2024
2 parents e7e3479 + 63b8ab8 commit 5a1e473
Show file tree
Hide file tree
Showing 63 changed files with 771 additions and 616 deletions.
30 changes: 7 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,19 @@ jobs:
# targets: riscv32imac-unknown-none-elf
# - run: cargo check --target riscv32imac-unknown-none-elf --no-default-features

check-no-default-features:
name: check no-default-features
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- run: |
cd crates/revm
cargo check --no-default-features
check-serde:
name: check serde
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- run: |
cd crates/revm
cargo check --no-default-features --features serde
check-std:
name: check std
check:
name: check ${{ matrix.features }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
features: ["", "serde", "std"]
steps:
- uses: actions/checkout@v4
- run: |
cd crates/revm
cargo check --no-default-features --features std
cargo check --no-default-features --features=${{ matrix.features }}
clippy:
name: clippy / ${{ matrix.network }}
Expand Down
53 changes: 36 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
Because this is workspace with multi libraries, tags will be simplified, and with this document you can match version of project with git tag.

# v37 tag
date: 20.06.2024

Audit of the codebase announced: https://hackmd.io/G7zazTX4TtekCnj6xlgctQ
secp256r1 precompile added.

Prague changes:
* EOF bugs squashed.
* Introducing PragueEOF hardfork.
* EIP-2935 (blockhashes) modified for devnet-1.
* Fixed for BLS12-381 curve.

Versions:
* revme: 0.5.0 -> 0.6.0
* revm: 9.0.0 -> 10.0.0
* revm-interpreter: 5.0.0 -> 6.0.0
* revm-primitives: 4.0.0 -> 5.0.0
* revm-precompile: 7.0.0 -> 8.0.0

# v36 tag
date: 12.05.2024

Expand All @@ -10,35 +29,35 @@ Support for prague EIPs.

EOF removed BytecodeLocked, OpCode table got changed, and CallInputs got refactored.

revme: 0.4.0 -> 0.5.0 (⚠️ API breaking changes)
revm: 8.0.0 -> 9.0.0 (⚠️ API breaking changes)
revm-interpreter: 4.0.0 -> 5.0.0 (⚠️ API breaking changes)
revm-primitives: 3.1.1 -> 4.0.0 (⚠️ API breaking changes)
revm-precompile: 6.0.0 -> 7.0.0 (⚠️ API breaking changes)
revm-test: 0.1.0
* revme: 0.4.0 -> 0.5.0 (⚠️ API breaking changes)
* revm: 8.0.0 -> 9.0.0 (⚠️ API breaking changes)
* revm-interpreter: 4.0.0 -> 5.0.0 (⚠️ API breaking changes)
* revm-primitives: 3.1.1 -> 4.0.0 (⚠️ API breaking changes)
* revm-precompile: 6.0.0 -> 7.0.0 (⚠️ API breaking changes)
* revm-test: 0.1.0

# v35 tag
date: 02.04.2024

Small release. Alloy bump. Small refactors and deprecated functions removed.

revme: 0.3.1 -> 0.4.0 (✓ API compatible changes)
revm: 7.2.0 -> 8.0.0 (⚠️ API breaking changes)
revm-interpreter: 3.4.0 -> 4.0.0 (⚠️ API breaking changes)
revm-primitives: 3.1.0 -> 3.1.1 (✓ API compatible changes)
revm-precompile: 5.1.0 -> 6.0.0 (⚠️ API breaking changes)
revm-test: 0.1.0
* revme: 0.3.1 -> 0.4.0 (✓ API compatible changes)
* revm: 7.2.0 -> 8.0.0 (⚠️ API breaking changes)
* revm-interpreter: 3.4.0 -> 4.0.0 (⚠️ API breaking changes)
* revm-primitives: 3.1.0 -> 3.1.1 (✓ API compatible changes)
* revm-precompile: 5.1.0 -> 6.0.0 (⚠️ API breaking changes)
* revm-test: 0.1.0

# v34 tag
date: 20.03.2024

Small release, few utilities and refactoring, precompiles fn and Interpreter helper macros are made public.

revme: 0.3.0 -> 0.3.1 (✓ API compatible changes)
revm: 7.1.0 -> 7.2.0 (✓ API compatible changes)
revm-interpreter: 3.3.0 -> 3.4.0 (✓ API compatible changes)
revm-primitives: 3.0.0 -> 3.1.0 (✓ API compatible changes)
revm-precompile: 5.0.0 -> 5.1.0 (✓ API compatible changes)
* revme: 0.3.0 -> 0.3.1 (✓ API compatible changes)
* revm: 7.1.0 -> 7.2.0 (✓ API compatible changes)
* revm-interpreter: 3.3.0 -> 3.4.0 (✓ API compatible changes)
* revm-primitives: 3.0.0 -> 3.1.0 (✓ API compatible changes)
* revm-precompile: 5.0.0 -> 5.1.0 (✓ API compatible changes)

# v33 tag TODO

Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

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

90 changes: 90 additions & 0 deletions bins/revm-test/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,96 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.1.0](https://github.com/bluealloy/revm/releases/tag/revm-test-v0.1.0) - 2024-06-20

### Added
- EOF (Ethereum Object Format) ([#1143](https://github.com/bluealloy/revm/pull/1143))
- add tests for shift instructions ([#1254](https://github.com/bluealloy/revm/pull/1254))
- EvmBuilder and External Contexts ([#888](https://github.com/bluealloy/revm/pull/888))
- separate initial checks ([#486](https://github.com/bluealloy/revm/pull/486))
- revm-interpreter created ([#320](https://github.com/bluealloy/revm/pull/320))
- *(interpreter)* Unify instruction fn signature ([#283](https://github.com/bluealloy/revm/pull/283))
- Migrate `primitive_types::U256` to `ruint::Uint<256, 4>` ([#239](https://github.com/bluealloy/revm/pull/239))
- Introduce ByteCode format, Update Readme ([#156](https://github.com/bluealloy/revm/pull/156))

### Fixed
- *(eof)* fixture 2 tests ([#1550](https://github.com/bluealloy/revm/pull/1550))
- *(clippy)* fix some clippy lints

### Other
- replace TransactTo with TxKind ([#1542](https://github.com/bluealloy/revm/pull/1542))
- *(deps)* bump regex from 1.10.4 to 1.10.5 ([#1502](https://github.com/bluealloy/revm/pull/1502))
- release ([#1261](https://github.com/bluealloy/revm/pull/1261))
- *(interpreter)* rewrite gas accounting for memory expansion ([#1361](https://github.com/bluealloy/revm/pull/1361))
- revert snailtracer without microbench ([#1259](https://github.com/bluealloy/revm/pull/1259))
- release ([#1231](https://github.com/bluealloy/revm/pull/1231))
- *(deps)* bump other alloy deps 0.7.0 ([#1252](https://github.com/bluealloy/revm/pull/1252))
- *(deps)* bump regex from 1.10.3 to 1.10.4 ([#1223](https://github.com/bluealloy/revm/pull/1223))
- *(deps)* bump bytes from 1.5.0 to 1.6.0 ([#1224](https://github.com/bluealloy/revm/pull/1224))
- release ([#1175](https://github.com/bluealloy/revm/pull/1175))
- tag v32 revm v7.1.0 ([#1176](https://github.com/bluealloy/revm/pull/1176))
- release ([#1125](https://github.com/bluealloy/revm/pull/1125))
- *(deps)* bump alloy-sol-types from 0.6.3 to 0.6.4 ([#1148](https://github.com/bluealloy/revm/pull/1148))
- *(deps)* bump alloy-sol-macro from 0.6.3 to 0.6.4 ([#1136](https://github.com/bluealloy/revm/pull/1136))
- release tag v30 revm v6.1.0 ([#1100](https://github.com/bluealloy/revm/pull/1100))
- clippy cleanup ([#1112](https://github.com/bluealloy/revm/pull/1112))
- *(deps)* bump alloy-sol-types from 0.6.2 to 0.6.3 ([#1103](https://github.com/bluealloy/revm/pull/1103))
- release ([#1082](https://github.com/bluealloy/revm/pull/1082))
- *(deps)* bump alloy-sol-macro from 0.6.2 to 0.6.3 ([#1094](https://github.com/bluealloy/revm/pull/1094))
- license date and revm docs ([#1080](https://github.com/bluealloy/revm/pull/1080))
- release ([#1067](https://github.com/bluealloy/revm/pull/1067))
- tag v27, revm v4.0.0 release ([#1061](https://github.com/bluealloy/revm/pull/1061))
- *(deps)* bump eyre from 0.6.11 to 0.6.12 ([#1051](https://github.com/bluealloy/revm/pull/1051))
- *(deps)* bump alloy-sol-types from 0.6.0 to 0.6.2 ([#1035](https://github.com/bluealloy/revm/pull/1035))
- *(deps)* bump alloy-sol-macro from 0.6.0 to 0.6.2 ([#1013](https://github.com/bluealloy/revm/pull/1013))
- chore(Test) : const to static ([#1016](https://github.com/bluealloy/revm/pull/1016))
- Burntpix criterion bench ([#1004](https://github.com/bluealloy/revm/pull/1004))
- Instruction table ([#759](https://github.com/bluealloy/revm/pull/759))
- rewrite revm-test as a criterion bench ([#579](https://github.com/bluealloy/revm/pull/579))
- optimize stack usage for recursive `call` and `create` programs ([#522](https://github.com/bluealloy/revm/pull/522))
- Bump v24, revm v3.3.0 ([#476](https://github.com/bluealloy/revm/pull/476))
- Release v23, revm v3.2.0 ([#464](https://github.com/bluealloy/revm/pull/464))
- Release v22, revm v3.1.1 ([#460](https://github.com/bluealloy/revm/pull/460))
- v21, revm v3.1.0 ([#444](https://github.com/bluealloy/revm/pull/444))
- remove gas blocks ([#391](https://github.com/bluealloy/revm/pull/391))
- *(deps)* bump bytes from 1.3.0 to 1.4.0 ([#355](https://github.com/bluealloy/revm/pull/355))
- Bump v20, changelog ([#350](https://github.com/bluealloy/revm/pull/350))
- includes to libs ([#338](https://github.com/bluealloy/revm/pull/338))
- Creating revm-primitives, revm better errors and db components ([#334](https://github.com/bluealloy/revm/pull/334))
- Cleanup, move hot fields toggether in Interpreter ([#321](https://github.com/bluealloy/revm/pull/321))
- native bits ([#278](https://github.com/bluealloy/revm/pull/278))
- *(release)* Bump revm and precompiles versions
- Bump primitive_types. Add statetest spec
- Bump revm v2.1.0 ([#224](https://github.com/bluealloy/revm/pull/224))
- revm bump v2.0.0, precompile bump v1.1.1 ([#212](https://github.com/bluealloy/revm/pull/212))
- Cfg choose create analysis, option on bytecode size limit ([#210](https://github.com/bluealloy/revm/pull/210))
- Cargo sort. Bump lib versions ([#208](https://github.com/bluealloy/revm/pull/208))
- Return `ExecutionResult`, which includes `gas_refunded` ([#169](https://github.com/bluealloy/revm/pull/169))
- Bytecode hash, remove override_spec, ([#165](https://github.com/bluealloy/revm/pull/165))
- revm bump 1.8. update libs. snailtracer rename ([#159](https://github.com/bluealloy/revm/pull/159))
- v6 changelog, bump versions
- Big Refactor. Machine to Interpreter. refactor instructions. call/create struct ([#52](https://github.com/bluealloy/revm/pull/52))
- [revm] pop_top and unsafe comments ([#51](https://github.com/bluealloy/revm/pull/51))
- [precompiles] remove unused borsh
- [recompl] Bump precompile deps, cargo sort on workspace
- [revm] output log. Stetetest test log output. fmt
- Bump versions, Changelogs, fmt, revm readme, clippy.
- [revm] Run test multiple times. fmt, BenchmarkDB
- Multiple changes: web3 db, debugger initial commit, precompile load
- Memory to usize, clippy,fmt
- wip optimize i256
- TEMP switch stacks H256 with U256
- [revm] some perfs
- [revm] Perfs stack pop. Benchmark snailtracer.
- [revm] cleanup
- fmt
- EVM Interface changed. Inspector called separately
- Bump revm v0.3.0. README updated
- DB ref mut polished
- And now we debug
- [revm] Interface. Inspector added, Env cleanup. revm-test passes
- Rename bin to bins

## [0.1.0](https://github.com/bluealloy/revm/releases/tag/revm-test-v0.1.0) - 2024-02-07

### Added
Expand Down
2 changes: 1 addition & 1 deletion bins/revm-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
[dependencies]
bytes = "1.6"
hex = "0.4"
revm = { path = "../../crates/revm", version = "9.0.0", default-features=false }
revm = { path = "../../crates/revm", version = "10.0.0", default-features=false }
microbench = "0.5"
alloy-sol-macro = "0.7.0"
alloy-sol-types = "0.7.0"
Expand Down
4 changes: 2 additions & 2 deletions bins/revm-test/src/bin/analysis.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use revm::{
db::BenchmarkDB,
interpreter::analysis::to_analysed,
primitives::{address, bytes, Bytecode, Bytes, TransactTo},
primitives::{address, bytes, Bytecode, Bytes, TxKind},
Evm,
};
use std::time::Instant;
Expand All @@ -17,7 +17,7 @@ fn main() {
.modify_tx_env(|tx| {
// execution globals block hash/gas_limit/coinbase/timestamp..
tx.caller = address!("1000000000000000000000000000000000000000");
tx.transact_to = TransactTo::Call(address!("0000000000000000000000000000000000000000"));
tx.transact_to = TxKind::Call(address!("0000000000000000000000000000000000000000"));
//evm.env.tx.data = Bytes::from(hex::decode("30627b7c").unwrap());
tx.data = bytes!("8035F0CE");
})
Expand Down
6 changes: 3 additions & 3 deletions bins/revm-test/src/bin/burntpix/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use revm::{
db::{CacheDB, EmptyDB},
primitives::{
address, hex, keccak256, AccountInfo, Address, Bytecode, Bytes, ExecutionResult, Output,
TransactTo, B256, U256,
TxKind, B256, U256,
},
Evm,
};
Expand Down Expand Up @@ -38,7 +38,7 @@ fn main() {
let mut evm = Evm::builder()
.modify_tx_env(|tx| {
tx.caller = address!("1000000000000000000000000000000000000000");
tx.transact_to = TransactTo::Call(BURNTPIX_MAIN_ADDRESS);
tx.transact_to = TxKind::Call(BURNTPIX_MAIN_ADDRESS);
tx.data = run_call_data.clone().into();
})
.with_db(db)
Expand Down Expand Up @@ -100,7 +100,7 @@ fn try_from_hex_to_u32(hex: &str) -> eyre::Result<u32> {
}

fn insert_account_info(cache_db: &mut CacheDB<EmptyDB>, addr: Address, code: Bytes) {
let code_hash = hex::encode(keccak256(code.clone()));
let code_hash = hex::encode(keccak256(&code));
let account_info = AccountInfo::new(
U256::from(0),
0,
Expand Down
4 changes: 2 additions & 2 deletions bins/revm-test/src/bin/snailtracer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use revm::{
db::BenchmarkDB,
interpreter::analysis::to_analysed,
primitives::{address, bytes, Bytecode, Bytes, TransactTo},
primitives::{address, bytes, Bytecode, Bytes, TxKind},
Evm,
};

Expand All @@ -14,7 +14,7 @@ pub fn simple_example() {
.modify_tx_env(|tx| {
// execution globals block hash/gas_limit/coinbase/timestamp..
tx.caller = address!("1000000000000000000000000000000000000000");
tx.transact_to = TransactTo::Call(address!("0000000000000000000000000000000000000000"));
tx.transact_to = TxKind::Call(address!("0000000000000000000000000000000000000000"));
tx.data = bytes!("30627b7c");
})
.build();
Expand Down
4 changes: 2 additions & 2 deletions bins/revm-test/src/bin/transfer.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use revm::{
db::BenchmarkDB,
primitives::{Bytecode, TransactTo, U256},
primitives::{Bytecode, TxKind, U256},
Evm,
};

Expand All @@ -16,7 +16,7 @@ fn main() {
.parse()
.unwrap();
tx.value = U256::from(10);
tx.transact_to = TransactTo::Call(
tx.transact_to = TxKind::Call(
"0x0000000000000000000000000000000000000000"
.parse()
.unwrap(),
Expand Down
13 changes: 13 additions & 0 deletions bins/revme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.6.0](https://github.com/bluealloy/revm/compare/revme-v0.5.0...revme-v0.6.0) - 2024-06-20

### Added
- *(EOF)* Put EOF bytecode behind an Arc ([#1517](https://github.com/bluealloy/revm/pull/1517))
- *(revme)* add prague spec ([#1506](https://github.com/bluealloy/revm/pull/1506))

### Fixed
- *(eof)* fixture 2 tests ([#1550](https://github.com/bluealloy/revm/pull/1550))

### Other
- replace TransactTo with TxKind ([#1542](https://github.com/bluealloy/revm/pull/1542))
- skip tests with storage check and return status ([#1452](https://github.com/bluealloy/revm/pull/1452))

## [0.5.0](https://github.com/bluealloy/revm/compare/revme-v0.4.0...revme-v0.5.0) - 2024-05-12

### Added
Expand Down
4 changes: 2 additions & 2 deletions bins/revme/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords = ["ethereum", "evm"]
license = "MIT"
repository = "https://github.com/bluealloy/revm"
description = "Rust Ethereum Virtual Machine Executable"
version = "0.5.0"
version = "0.6.0"

[dependencies]
hash-db = "0.15"
Expand All @@ -15,7 +15,7 @@ hashbrown = "0.14"
indicatif = "0.17"
microbench = "0.5"
plain_hasher = "0.2"
revm = { path = "../../crates/revm", version = "9.0.0", default-features = false, features = [
revm = { path = "../../crates/revm", version = "10.0.0", default-features = false, features = [
"ethersdb",
"std",
"serde-json",
Expand Down
Loading

0 comments on commit 5a1e473

Please sign in to comment.