Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 6 additions & 2 deletions crates/networking/p2p/rlpx/connection/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,12 @@ async fn handle_incoming_message(
for tx in &txs.transactions {
// Reject blob transactions in L2 mode
#[cfg(feature = "l2")]
if is_l2_mode && matches!(tx, Transaction::EIP4844Transaction(_)) {
debug!(peer=%state.node, "Rejecting blob transaction in L2 mode - blob transactions are not supported in L2");
if is_l2_mode
&& (matches!(tx, Transaction::EIP4844Transaction(_))
|| matches!(tx, Transaction::PrivilegedL2Transaction(_)))
{
let tx_type = tx.tx_type();
debug!(peer=%state.node, "Rejecting transaction in L2 mode - {tx_type} transactions are not broadcasted in L2");
continue;
}

Expand Down
7 changes: 7 additions & 0 deletions crates/networking/p2p/rlpx/eth/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@ impl PooledTransactions {
continue;
}
} else {
if matches!(tx, P2PTransaction::PrivilegedL2Transaction(_)) && is_l2_mode {
debug!(
peer=%node,
"Rejecting privileged L2 transaction in L2 mode - privileged L2 transactions are not broadcasted",
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The error message is inconsistent with the one in server.rs (line 941). Consider using a similar pattern by extracting the transaction type to make messages consistent: let tx_type = tx.tx_type(); debug!(peer=%node, \"Rejecting transaction in L2 mode - {tx_type} transactions are not broadcasted in L2\");

Suggested change
debug!(
peer=%node,
"Rejecting privileged L2 transaction in L2 mode - privileged L2 transactions are not broadcasted",
let tx_type = tx.tx_type();
debug!(
peer=%node,
"Rejecting transaction in L2 mode - {tx_type} transactions are not broadcasted in L2",

Copilot uses AI. Check for mistakes.
);
continue;
}
let regular_tx = tx
.try_into()
.map_err(|error| MempoolError::StoreError(StoreError::Custom(error)))?;
Expand Down
Loading