Skip to content

Commit f2d1863

Browse files
author
Solar Mithril
authored
feat: fix tx da scaling (#16558)
1 parent ca9f94c commit f2d1863

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ op-alloy-rpc-types-engine = { version = "0.17.2", default-features = false }
507507
op-alloy-network = { version = "0.17.2", default-features = false }
508508
op-alloy-consensus = { version = "0.17.2", default-features = false }
509509
op-alloy-rpc-jsonrpsee = { version = "0.17.2", default-features = false }
510-
op-alloy-flz = { version = "0.13.0", default-features = false }
510+
op-alloy-flz = { version = "0.13.1", default-features = false }
511511

512512
# misc
513513
aquamarine = "0.6"

crates/optimism/txpool/src/transaction.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ impl<Cons: SignedTransaction, Pooled> OpPooledTransaction<Cons, Pooled> {
6969
}
7070
}
7171

72-
/// Returns the estimated compressed size of a transaction in bytes scaled by 1e6.
72+
/// Returns the estimated compressed size of a transaction in bytes.
7373
/// This value is computed based on the following formula:
74-
/// `max(minTransactionSize, intercept + fastlzCoef*fastlzSize)`
74+
/// `max(minTransactionSize, intercept + fastlzCoef*fastlzSize) / 1e6`
7575
/// Uses cached EIP-2718 encoded bytes to avoid recomputing the encoding for each estimation.
7676
pub fn estimated_compressed_size(&self) -> u64 {
7777
*self
7878
.estimated_tx_compressed_size
79-
.get_or_init(|| op_alloy_flz::tx_estimated_size_fjord(self.encoded_2718()))
79+
.get_or_init(|| op_alloy_flz::tx_estimated_size_fjord_bytes(self.encoded_2718()))
8080
}
8181

8282
/// Returns lazily computed EIP-2718 encoded bytes of the transaction.

0 commit comments

Comments
 (0)