Skip to content

Commit

Permalink
fix: no_std for revm-database (#2077)
Browse files Browse the repository at this point in the history
* chore: backport op l1 fetch perf

* bump versions and rm comment

* fmt

* fix(compile): no_std for revm-database

* add database to ci

* fix ci
  • Loading branch information
rakita authored Feb 12, 2025
1 parent 125a3c0 commit 8858a31
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
- run: |
cargo check --target riscv32imac-unknown-none-elf --no-default-features --features=${{ matrix.features }}
cargo check --target riscv32imac-unknown-none-elf -p revm-optimism --no-default-features --features=${{ matrix.features }}
cargo check --target riscv32imac-unknown-none-elf -p revm-database --no-default-features
check:
name: check ${{ matrix.features }}
Expand Down
4 changes: 4 additions & 0 deletions crates/database/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
//! Database implementations.
#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(not(feature = "std"))]
extern crate alloc as std;

#[cfg(feature = "alloydb")]
mod alloydb;
Expand Down
7 changes: 4 additions & 3 deletions crates/database/src/states/reverts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ use super::{
changes::PlainStorageRevert, AccountStatus, BundleAccount, PlainStateReverts,
StorageWithOriginalValues,
};
use core::ops::{Deref, DerefMut};
use core::{
cmp::Ordering,
ops::{Deref, DerefMut},
};
use primitives::{Address, HashMap, U256};
use std::cmp::Ordering;

use state::AccountInfo;
use std::vec::Vec;

Expand Down
2 changes: 1 addition & 1 deletion examples/erc20_gas/src/handler.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use core::cmp::Ordering;
use revm::{
context::Cfg,
context_interface::{
Expand All @@ -10,7 +11,6 @@ use revm::{
specification::hardfork::SpecId,
state::EvmState,
};
use std::cmp::Ordering;

use crate::{erc_address_storage, token_operation, TOKEN, TREASURY};

Expand Down
Binary file removed graph.png
Binary file not shown.

0 comments on commit 8858a31

Please sign in to comment.