Repository: paradigmxyz/reth (language: rust)

Issue:
Avoid propagating transactions with conditionals
Using `TransactionOrigin::External` results in transactions with conditionals being propagated through p2p. We want to avoid this as when propagating we are losing context about conditionals making it possible for transaction to get included even when some of the conditions do not hold

https://github.com/paradigmxyz/reth/blob/cf73f6eed609b79ada2b9baf19e117eb1bc45e0b/crates/optimism/rpc/src/eth/ext.rs#L135

We need to change origin to `TransactionOrigin::Private` 



Avoid propagating transactions with conditionals
Using `TransactionOrigin::External` results in transactions with conditionals being propagated through p2p. We want to avoid this as when propagating we are losing context about conditionals making it possible for transaction to get included even when some of the conditions do not hold

https://github.com/paradigmxyz/reth/blob/cf73f6eed609b79ada2b9baf19e117eb1bc45e0b/crates/optimism/rpc/src/eth/ext.rs#L135

We need to change origin to `TransactionOrigin::Private` 





Discussion / hints:
I'd be happy to pick this up.
I'd be happy to pick this up.

Fix patch:
diff --git a/crates/optimism/rpc/src/eth/ext.rs b/crates/optimism/rpc/src/eth/ext.rs
index ed464f21f734..bba522aa4611 100644
--- a/crates/optimism/rpc/src/eth/ext.rs
+++ b/crates/optimism/rpc/src/eth/ext.rs
@@ -132,9 +132,11 @@ where
         } else {
             // otherwise, add to pool with the appended conditional
             tx.set_conditional(condition);
-            let hash = self.pool().add_transaction(TransactionOrigin::External, tx).await.map_err(
-                |e| OpEthApiError::Eth(reth_rpc_eth_types::EthApiError::PoolError(e.into())),
-            )?;
+            let hash =
+                self.pool().add_transaction(TransactionOrigin::Private, tx).await.map_err(|e| {
+                    OpEthApiError::Eth(reth_rpc_eth_types::EthApiError::PoolError(e.into()))
+                })?;
+
             Ok(hash)
         }
     }


Test patch: