Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement EIP-4844 #668

Merged
merged 34 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
aefca60
feat: point evaluation precompile
DaniPopes Aug 30, 2023
3342e99
feat: BLOBHASH opcode
DaniPopes Aug 30, 2023
92e627b
refactor: revme runner
DaniPopes Aug 30, 2023
37feea7
renames
DaniPopes Aug 30, 2023
9c048b4
export global kzg settings
DaniPopes Aug 31, 2023
bb0a0e6
feat: include kzg settings bytes with `include_bytes!`
DaniPopes Aug 31, 2023
f4dbaf9
build.rs: remove second option, update docs
DaniPopes Aug 31, 2023
7792a91
revme: remove unused files and dead code
DaniPopes Aug 31, 2023
71a29cb
feat: implement remaining block and tx env fields
DaniPopes Aug 31, 2023
16ff92c
Add tests for helper functions, update constants
DaniPopes Sep 1, 2023
8d94cc5
Add EIP-4844 EF tests to CI, skip outdated ones
DaniPopes Sep 1, 2023
44e5bea
chore: make skip_test more readable
DaniPopes Sep 1, 2023
25f0b83
Merge branch 'main' into eip-4844
DaniPopes Sep 1, 2023
85d25bc
Fix tests
DaniPopes Sep 1, 2023
8c02e4a
Fix fmt
DaniPopes Sep 1, 2023
9bda498
Fix lints, review
DaniPopes Sep 1, 2023
8efe07d
fix: validate new tx, block fields; add to balance check
DaniPopes Sep 1, 2023
9f046d7
Restore `load_access_list`
DaniPopes Sep 1, 2023
5b76449
chore: drop c-kzg fork
DaniPopes Sep 5, 2023
1aea2a4
test: update tests from Geth
DaniPopes Sep 5, 2023
a27a6b8
chore: revert `is_create` change
DaniPopes Sep 5, 2023
a82da3f
chore: fmt toml
DaniPopes Sep 6, 2023
9b8d3c0
chore: unnecessary import
DaniPopes Sep 6, 2023
7bf0578
Merge branch 'main' into eip-4844
DaniPopes Sep 11, 2023
31807d2
Merge remote-tracking branch 'origin/main' into eip4844
rakita Sep 14, 2023
ea2321f
remove unsafe from fake_exponential
rakita Sep 14, 2023
ce19006
Remove kzg global settings, and move it to CfgEnv
rakita Sep 14, 2023
3e6bf70
enable kzg only in std. main README updated
rakita Sep 14, 2023
798bc90
fmt and clippy
rakita Sep 14, 2023
bbfa7de
Merge remote-tracking branch 'origin/main' into eip4844
rakita Sep 14, 2023
54aad80
Update README.md
rakita Sep 14, 2023
8820a34
nits and docs
rakita Sep 15, 2023
ffda4fd
disable exception eip4844 tests, small refactor
rakita Sep 15, 2023
eb8b223
revert back last commit refactor
rakita Sep 15, 2023
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
12 changes: 6 additions & 6 deletions .github/workflows/ethereum-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
cache-on-failure: true

- name: Run Ethereum tests
# TODO: ethtests/EIPTests/StateTests/stEIP4844-blobtransactions/ \
run: |
cargo run --profile ethtests -p revme -- \
statetest \
ethtests/GeneralStateTests/ \
ethtests/LegacyTests/Constantinople/GeneralStateTests/ \
tests/EIPTests/StateTests/stEIP5656-MCOPY/ \
tests/EIPTests/StateTests/stEIP1153-transientStorage/
cargo run --profile ethtests -p revme -- statetest \
ethtests/GeneralStateTests/ \
ethtests/LegacyTests/Constantinople/GeneralStateTests/ \
ethtests/EIPTests/StateTests/stEIP1153-transientStorage/ \
ethtests/EIPTests/StateTests/stEIP5656-MCOPY/
144 changes: 144 additions & 0 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ codegen-units = 1
[profile.ethtests]
inherits = "test"
opt-level = 3

[workspace.dependencies]
# "https://github.com/ethereum/c-kzg-4844"
c-kzg = { git = "https://github.com/danipopes/c-kzg-4844", branch = "export-ffi" }
16 changes: 5 additions & 11 deletions bins/revme/src/cmd.rs
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
use crate::{runner, statetest};
use crate::statetest;
use structopt::{clap::AppSettings, StructOpt};

#[derive(StructOpt, Debug)]
#[structopt(setting = AppSettings::InferSubcommands)]
#[allow(clippy::large_enum_variant)]
pub enum MainCmd {
Statetest(statetest::Cmd),
Run(runner::Cmd),
}

use thiserror::Error as ThisError;

#[derive(Debug, ThisError)]
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("Statetest: {0}")]
Statetest(statetest::Error),
#[error("Generic system error")]
SystemError,
#[error(transparent)]
Statetest(#[from] statetest::Error),
}

impl MainCmd {
pub fn run(&self) -> Result<(), Error> {
match self {
Self::Statetest(cmd) => cmd.run().map_err(Error::Statetest),
_ => Ok(()),
Self::Statetest(cmd) => cmd.run().map_err(Into::into),
}
}
}
8 changes: 4 additions & 4 deletions bins/revme/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
mod cmd;
mod exec;
mod runner;
mod statetest;
use cmd::Error;
use structopt::StructOpt;

mod cli_env;
mod cmd;
mod exec;
mod statetest;

pub fn main() -> Result<(), Error> {
let cmd = cmd::MainCmd::from_args();
Expand Down
4 changes: 0 additions & 4 deletions bins/revme/src/runner/mod.rs

This file was deleted.

2 changes: 1 addition & 1 deletion bins/revme/src/statetest/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct Cmd {
impl Cmd {
pub fn run(&self) -> Result<(), TestError> {
for path in &self.path {
println!("Start running tests on: {path:?}");
println!("\nRunning tests in {}...", path.display());
let test_files = find_all_json_tests(path);
run(test_files, self.single_thread, self.json)?
}
Expand Down
26 changes: 0 additions & 26 deletions bins/revme/src/statetest/main.rs

This file was deleted.

Loading