Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump revm #4884

Merged
merged 6 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions Cargo.lock

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

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ reth-eth-wire = { path = "./crates/net/eth-wire" }
reth-ecies = { path = "./crates/net/ecies" }

# revm
# TODO: Switch back to bluealloy/revm once #724 lands
revm = { git = "https://github.com/Evalir/revm/", branch = "reintroduce-alloy-rebased" }
revm-primitives = { git = "https://github.com/Evalir/revm/", branch = "reintroduce-alloy-rebased" }
revm = "3.5.0"
revm-primitives = "1.3.0"

## eth
alloy-primitives = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion crates/payload/builder/src/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl PayloadBuilderAttributes {
// if the parent block did not have excess blob gas (i.e. it was pre-cancun), but it is
// cancun now, we need to set the excess blob gas to the default value
let blob_excess_gas_and_price = parent
.next_block_blob_fee()
.next_block_excess_blob_gas()
.map_or_else(
|| {
if cfg.spec_id == SpecId::CANCUN {
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/constants/eip4844.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub const TARGET_BLOBS_PER_BLOCK: u64 = TARGET_DATA_GAS_PER_BLOCK / DATA_GAS_PER
pub const BLOB_GASPRICE_UPDATE_FRACTION: u64 = 3_338_477u64; // 3338477

/// Minimum gas price for a data blob
pub const BLOB_TX_MIN_BLOB_GASPRICE: u64 = 1u64;
pub const BLOB_TX_MIN_BLOB_GASPRICE: u128 = 1u128;

/// Commitment version of a KZG commitment
pub const VERSIONED_HASH_VERSION_KZG: u8 = 0x01;
Expand Down
4 changes: 2 additions & 2 deletions crates/primitives/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl Header {
/// Returns the blob fee for _this_ block according to the EIP-4844 spec.
///
/// Returns `None` if `excess_blob_gas` is None
pub fn blob_fee(&self) -> Option<u64> {
pub fn blob_fee(&self) -> Option<u128> {
self.excess_blob_gas.map(calc_blob_gasprice)
}

Expand All @@ -194,7 +194,7 @@ impl Header {
/// Returns `None` if `excess_blob_gas` is None.
///
/// See also [Self::next_block_excess_blob_gas]
pub fn next_block_blob_fee(&self) -> Option<u64> {
pub fn next_block_blob_fee(&self) -> Option<u128> {
self.next_block_excess_blob_gas().map(calc_blob_gasprice)
}

Expand Down
4 changes: 2 additions & 2 deletions crates/transaction-pool/src/pool/txpool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ pub(crate) struct AllTransactions<T: PoolTransaction> {
/// Expected base fee for the pending block.
pending_basefee: u64,
/// Expected blob fee for the pending block.
pending_blob_fee: u64,
pending_blob_fee: u128,
/// Configured price bump settings for replacements
price_bumps: PriceBumpConfig,
}
Expand Down Expand Up @@ -1366,7 +1366,7 @@ impl<T: PoolTransaction> AllTransactions<T> {
transaction =
self.ensure_valid_blob_transaction(transaction, on_chain_balance, ancestor)?;
let blob_fee_cap = transaction.transaction.max_fee_per_blob_gas().unwrap_or_default();
if blob_fee_cap >= self.pending_blob_fee as u128 {
if blob_fee_cap >= self.pending_blob_fee {
state.insert(TxState::ENOUGH_BLOB_FEE_CAP_BLOCK);
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions crates/transaction-pool/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ pub struct CanonicalStateUpdate<'a> {
/// EIP-4844 blob fee of the _next_ (pending) block
///
/// Only after Cancun
pub pending_block_blob_fee: Option<u64>,
pub pending_block_blob_fee: Option<u128>,
/// A set of changed accounts across a range of blocks.
pub changed_accounts: Vec<ChangedAccount>,
/// All mined transactions in the block range.
Expand Down Expand Up @@ -1040,7 +1040,7 @@ pub struct BlockInfo {
///
/// Note: this is the derived blob fee of the _next_ block that builds on the block the pool is
/// currently tracking
pub pending_blob_fee: Option<u64>,
pub pending_blob_fee: Option<u128>,
}

/// The limit to enforce for [TransactionPool::get_pooled_transaction_elements].
Expand Down
3 changes: 1 addition & 2 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ unknown-registry = "warn"
unknown-git = "deny"
allow-git = [
# TODO: remove, see ./Cargo.toml
"https://github.com/Evalir/revm",
# "https://github.com/bluealloy/revm",
"https://github.com/bluealloy/revm",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"https://github.com/bluealloy/revm",

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can keep this, I think we'll have to use via git again eventually


"https://github.com/ethereum/c-kzg-4844",
"https://github.com/sigp/discv5",
Expand Down
Loading