forked from bluealloy/revm
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement EIP-4844 (bluealloy#668)
* feat: point evaluation precompile * feat: BLOBHASH opcode * refactor: revme runner * renames * export global kzg settings * feat: include kzg settings bytes with `include_bytes!` * build.rs: remove second option, update docs * revme: remove unused files and dead code * feat: implement remaining block and tx env fields * Add tests for helper functions, update constants * Add EIP-4844 EF tests to CI, skip outdated ones * chore: make skip_test more readable * Fix tests * Fix fmt * Fix lints, review * fix: validate new tx, block fields; add to balance check * Restore `load_access_list` * chore: drop c-kzg fork * test: update tests from Geth See: <ethereum/go-ethereum#28026> * chore: revert `is_create` change * chore: fmt toml * chore: unnecessary import * remove unsafe from fake_exponential * Remove kzg global settings, and move it to CfgEnv * enable kzg only in std. main README updated * fmt and clippy * Update README.md Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * nits and docs * disable exception eip4844 tests, small refactor * revert back last commit refactor --------- Co-authored-by: rakita <dragan0rakita@gmail.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Waylon Jepsen <57912727+0xJepsen@users.noreply.github.com>
- Loading branch information
1 parent
07b9ab6
commit 70ac321
Showing
40 changed files
with
5,606 additions
and
454 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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), | ||
} | ||
} | ||
} |
Oops, something went wrong.