Skip to content
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
9 changes: 6 additions & 3 deletions crates/op-rbuilder/src/builders/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,12 @@ impl OpPayloadBuilderCtx {
// Create and sign the transaction
let builder_tx =
signed_builder_tx(db, builder_tx_gas, message, signer, base_fee, chain_id)?;
Ok(op_alloy_flz::data_gas_fjord(
builder_tx.encoded_2718().as_slice(),
))
Ok(
op_alloy_flz::tx_estimated_size_fjord(builder_tx.encoded_2718().as_slice())
// Downscaled by 1e6 to be compliant with op-geth estimate size function
// https://github.com/ethereum-optimism/op-geth/blob/optimism/core/types/rollup_cost.go#L563
.wrapping_div(1_000_000),
)
})
.transpose()
.unwrap_or_else(|err: PayloadBuilderError| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async fn data_availability_block_fill() -> eyre::Result<()> {
// Set block big enough so it could fit 3 transactions without tx size limit
let call = harness
.provider()?
.raw_request::<(i32, i32), bool>("miner_setMaxDASize".into(), (0, 1600 * 3))
.raw_request::<(i32, i32), bool>("miner_setMaxDASize".into(), (0, 100 * 3))
.await?;
assert!(call, "miner_setMaxDASize should be executed successfully");

Expand Down
4 changes: 3 additions & 1 deletion crates/op-rbuilder/src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ impl MaybeInteropTransaction for FBPooledTransaction {

impl DataAvailabilitySized for FBPooledTransaction {
fn estimated_da_size(&self) -> u64 {
op_alloy_flz::data_gas_fjord(self.inner.encoded_2718())
// Downscaled by 1e6 to be compliant with op-geth estimate size function
// https://github.com/ethereum-optimism/op-geth/blob/optimism/core/types/rollup_cost.go#L563
op_alloy_flz::tx_estimated_size_fjord(self.inner.encoded_2718()).wrapping_div(1_000_000)
}
}

Expand Down
Loading