Skip to content

Commit

Permalink
Fix all tests that before Cancun hard fork
Browse files Browse the repository at this point in the history
  • Loading branch information
mrLSD committed Apr 8, 2024
1 parent 7e2ef13 commit c99a650
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion evm-tests/ethjson/src/spec/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ pub enum ForkSpec {
London,
/// Paris - The Merge (#15,537,394, 2022-09-15)
Merge,
/// Paris - The Merge (#15,537,394, 2022-09-15)
Paris,
/// Shanghai (#17,034,870, 2023-04-12)
Shanghai,
/// Cancun
/// Cancun (2024-03-13)
Cancun,

/// Byzantium transition test-net
Expand Down
6 changes: 4 additions & 2 deletions evm-tests/jsontests/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ fn test_run(name: &str, test: Test) {
ethjson::spec::ForkSpec::London => (Config::london(), true),
ethjson::spec::ForkSpec::Merge => (Config::merge(), true),
ethjson::spec::ForkSpec::Shanghai => (Config::shanghai(), true),
ethjson::spec::ForkSpec::Cancun => (Config::shanghai(), true),
// ethjson::spec::ForkSpec::Cancun => (Config::cancun(), true),
spec => {
println!("Skip spec {spec:?}");
continue;
Expand All @@ -252,7 +252,9 @@ fn test_run(name: &str, test: Test) {
}
let vicinity = vicinity.unwrap();
let caller = test.unwrap_caller();
let caller_balance = original_state.get(&caller).unwrap().balance;
let caller_balance = original_state
.get(&caller)
.map_or_else(U256::zero, |acc| acc.balance);

for (i, state) in states.iter().enumerate() {
print!("Running {}:{:?}:{} ... ", name, spec, i);
Expand Down
2 changes: 2 additions & 0 deletions evm-tests/jsontests/tests/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ const SKIPPED_CASES: &[&str] = &[
// run, whereas this test runner parses everything up-front before
// running the test.
"stTransactionTest/ValueOverflow",
"stTransactionTest/ValueOverflowParis",
// The below test cases are failing in geth too and as such are
// skipped here until they are fixed there (otherwise we don't know
// what the expected value should be for each test output).
"stTransactionTest/HighGasPrice",
"stTransactionTest/HighGasPriceParis",
"stCreateTest/CreateTransactionHighNonce",
];

Expand Down

0 comments on commit c99a650

Please sign in to comment.