Skip to content

Commit f60a4ec

Browse files
authored
dont' recover signer in a hot loop (#212)
## 📝 Summary This is pretty serious regression that I've missed while reviewing external PR on one of the reth upgrades. We need to be careful to not allow something like that slip in the future. ## 💡 Motivation and Context calling recover_signer verifies transaction signature every time we try to executing something in the vm. --- ## ✅ I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
1 parent 66613c9 commit f60a4ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/rbuilder/src/building/order_commit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ impl<'a, 'b, Tracer: SimulationTracer> PartialBlockFork<'a, 'b, Tracer> {
420420
}
421421

422422
let mut tx_env = TxEnv::default();
423-
let tx_signed = tx_with_blobs.internal_tx_unsecure().clone().into_signed();
424-
tx_signed.fill_tx_env(&mut tx_env, tx_signed.recover_signer().unwrap());
423+
let tx_signed = tx_with_blobs.internal_tx_unsecure();
424+
tx_signed.fill_tx_env(&mut tx_env, tx_signed.signer());
425425

426426
let env = Env {
427427
cfg: ctx.initialized_cfg.cfg_env.clone(),

0 commit comments

Comments
 (0)