Skip to content

Commit

Permalink
feat: add stBadOpcode
Browse files Browse the repository at this point in the history
  • Loading branch information
Eikix committed Sep 21, 2023
1 parent fdd6c97 commit 186c486
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ revm-primitives = "1.1"
reth-rlp = { git = "https://github.com/paradigmxyz/reth.git", tag = "v0.1.0-alpha.7" }

# Kakarot deps
kakarot-rpc-core = { git = "https://github.com/kkrt-labs/kakarot-rpc.git", rev = "0894457" }
kakarot-test-utils = { git = "https://github.com/kkrt-labs/kakarot-rpc.git", rev = "0894457" }
kakarot-rpc-core = { git = "https://github.com/kkrt-labs/kakarot-rpc.git", rev = "ae5e220" }
kakarot-test-utils = { git = "https://github.com/kkrt-labs/kakarot-rpc.git", rev = "ae5e220" }

# Starknet deps
katana-core = { git = 'https://github.com/dojoengine/dojo', rev = "b924dac" }
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ KAKAROT_COMMIT := .katana/remote_kakarot_sha
.PHONY: $(EF_TESTS_DIR)
setup: $(EF_TESTS_DIR)

fetch-dump:
fetch-dump: fetch-kakarot-submodule-commit
cargo run --features dump --bin fetch-dump-katana

$(KAKAROT_COMMIT):
fetch-kakarot-submodule-commit:
cargo run --features fetch-commit --bin fetch-kakarot-submodule-commit

# Runs the Ethereum Foundation tests
Expand Down
11 changes: 10 additions & 1 deletion crates/ef-testing/src/models/case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ impl BlockchainTestCase {
pub fn should_skip(path: &Path) -> bool {
let name = path.file_name().unwrap().to_str().unwrap();

// Split up matches in exact match and regex otherwise compiler isn't happy
// and tests fail
matches!(
name,
"calldatacopy.json" // ef-tests #20
Expand Down Expand Up @@ -107,7 +109,14 @@ impl BlockchainTestCase {
| "CallTheContractToCreateEmptyContract.json" // ef-test #115
| "OutOfGasContractCreation.json" // ef-test #116
| "CallContractToCreateContractAndCallItOOG.json" // ef-test #117
)
| "undefinedOpcodeFirstByte.json" // ef-tests #121
| "measureGas.json" // ef-tests #122
| "badOpcodes.json" // ef-tests #123
| "operationDiffGas.json" // ef-tests #124
| "invalidDiffPlaces.json" // ef-tests #125
| "invalidAddr.json" // ef-tests #126
) || matches!(name, name if name.starts_with("opc") && name.ends_with(".json"))
// ef-test #120
}

fn test(&self, test_name: &str) -> Result<&BlockchainTest, RunnerError> {
Expand Down
1 change: 1 addition & 0 deletions crates/ef-testing/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ mod blockchain_tests {
blockchain_tests!(memory_tests, stMemoryTest);
blockchain_tests!(init_code_test, stInitCodeTest);
blockchain_tests!(st_log_tests, stLogTests);
blockchain_tests!(st_bad_opcode, stBadOpcode);
}

0 comments on commit 186c486

Please sign in to comment.