Skip to content

Commit

Permalink
sync upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsing committed Jan 2, 2025
1 parent 9f9d54c commit 6d89360
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 32 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/ethereum-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ concurrency:

on:
push:
branches: [ main, "release/**", "scroll-evm-executor/**" ]
branches: [main, "release/**", "scroll-evm-executor/**"]
pull_request:
branches: [ main, "release/**", "scroll-evm-executor/**" ]
branches: [main, "release/**", "scroll-evm-executor/**"]

jobs:
tests-stable:
Expand All @@ -17,8 +17,8 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
profile: [ ethtests, release ]
target: [ i686-unknown-linux-gnu, x86_64-unknown-linux-gnu ]
profile: [ethtests, release]
target: [i686-unknown-linux-gnu, x86_64-unknown-linux-gnu]
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand Down Expand Up @@ -48,13 +48,9 @@ jobs:
ethtests/EIPTests/StateTests/stEIP1153-transientStorage/ \
ethtests/EIPTests/StateTests/stEIP4844-blobtransactions/ \
ethtests/EIPTests/StateTests/stEIP2537/ \
ethtests/EIPTests/StateTests/stEOF \
tests/eof_suite/eest/state_tests \
tests/eof_suite/evmone/state_tests \
tests/prague_suite/state_tests
# - name: Run EOF validation tests
# run: |
# cross run --target ${{matrix.target}} --profile ${{ matrix.profile }} -p revme -- eof-validation \
# ethtests/EOFTests \
# tests/eof_suite/eest/eof_tests/prague \
# tests/eof_suite/evmone/eof_tests
- name: Run EOF validation tests
run: |
cross run --target ${{matrix.target}} --profile ${{ matrix.profile }} -p revme -- eof-validation \
tests/eof_suite/eest/eof_tests/osaka
12 changes: 2 additions & 10 deletions crates/primitives/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,8 @@ impl Env {
pub fn validate_tx<SPEC: Spec>(&self) -> Result<(), InvalidTransaction> {
// Check if the transaction's chain id is correct
if let Some(tx_chain_id) = self.tx.chain_id {
cfg_if::cfg_if! {
if #[cfg(not(feature = "scroll"))] {
if tx_chain_id != self.cfg.chain_id {
return Err(InvalidTransaction::InvalidChainId);
}
} else {
if !self.tx.scroll.is_l1_msg && tx_chain_id != self.cfg.chain_id {
return Err(InvalidTransaction::InvalidChainId);
}
}
if tx_chain_id != self.cfg.chain_id {
return Err(InvalidTransaction::InvalidChainId);
}
}

Expand Down
1 change: 0 additions & 1 deletion crates/primitives/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ impl Default for AccountInfo {
}

impl PartialEq for AccountInfo {
#[allow(clippy::let_and_return)]
fn eq(&self, other: &Self) -> bool {
self.balance == other.balance
&& self.nonce == other.nonce
Expand Down
27 changes: 18 additions & 9 deletions crates/revm/src/db/states/bundle_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,8 @@ mod tests {
let acc1 = AccountInfo {
balance: U256::from(10),
nonce: 1,
..Default::default()
code_hash: KECCAK_EMPTY,
code: None,
};

let mut bundle_state = BundleState::default();
Expand Down Expand Up @@ -914,7 +915,8 @@ mod tests {
Some(AccountInfo {
nonce: 1,
balance: U256::from(10),
..Default::default()
code_hash: KECCAK_EMPTY,
code: None,
}),
HashMap::from_iter([
(slot1(), (U256::from(0), U256::from(10))),
Expand All @@ -927,7 +929,8 @@ mod tests {
Some(AccountInfo {
nonce: 1,
balance: U256::from(10),
..Default::default()
code_hash: KECCAK_EMPTY,
code: None,
}),
HashMap::default(),
),
Expand All @@ -954,7 +957,8 @@ mod tests {
Some(AccountInfo {
nonce: 3,
balance: U256::from(20),
..Default::default()
code_hash: KECCAK_EMPTY,
code: None,
}),
HashMap::from_iter([(slot1(), (U256::from(0), U256::from(15)))]),
)],
Expand All @@ -963,7 +967,8 @@ mod tests {
Some(Some(AccountInfo {
nonce: 1,
balance: U256::from(10),
..Default::default()
code_hash: KECCAK_EMPTY,
code: None,
})),
vec![(slot1(), U256::from(10))],
)]],
Expand All @@ -979,7 +984,8 @@ mod tests {
AccountInfo {
nonce: 1,
balance: U256::from(10),
..Default::default()
code_hash: KECCAK_EMPTY,
code: None,
},
)
.state_storage(
Expand All @@ -992,7 +998,8 @@ mod tests {
AccountInfo {
nonce: 1,
balance: U256::from(10),
..Default::default()
code_hash: KECCAK_EMPTY,
code: None,
},
)
.revert_address(0, account1())
Expand All @@ -1010,7 +1017,8 @@ mod tests {
AccountInfo {
nonce: 3,
balance: U256::from(20),
..Default::default()
code_hash: KECCAK_EMPTY,
code: None,
},
)
.state_storage(
Expand All @@ -1024,7 +1032,8 @@ mod tests {
Some(Some(AccountInfo {
nonce: 1,
balance: U256::from(10),
..Default::default()
code_hash: KECCAK_EMPTY,
code: None,
})),
)
.revert_storage(0, account1(), vec![(slot1(), U256::from(10))])
Expand Down

0 comments on commit 6d89360

Please sign in to comment.