Skip to content

Commit b157344

Browse files
authored
fix: regression on recoverying transaction address after version update (#1858)
1 parent 022a646 commit b157344

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

bin/trin-execution/src/e2hs/beacon.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use alloy::{
22
consensus::{transaction::SignerRecoverable, TxEnvelope},
33
eips::eip4895::Withdrawal,
44
};
5+
use anyhow::anyhow;
56
use ethportal_api::{
67
consensus::beacon_block::{
78
SignedBeaconBlock, SignedBeaconBlockBellatrix, SignedBeaconBlockCapella,
@@ -120,12 +121,12 @@ fn process_transactions(
120121
.into_par_iter()
121122
.map(|transaction| {
122123
transaction
123-
.recover_signer()
124+
.recover_signer_unchecked()
124125
.map(|sender_address| TransactionsWithSender {
125126
sender_address,
126127
transaction,
127128
})
128-
.map_err(|err| anyhow::anyhow!("Failed to recover signer: {err:?}"))
129+
.map_err(|err| anyhow!("Failed to recover signer: {err:?}"))
129130
})
130131
.collect::<anyhow::Result<Vec<_>>>()
131132
}

bin/trin-execution/src/e2hs/utils.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::time::Duration;
22

33
use alloy::{consensus::transaction::SignerRecoverable, primitives::bytes::Bytes};
4+
use anyhow::anyhow;
45
use e2store::e2hs::{BlockTuple, E2HSMemory, BLOCKS_PER_E2HS};
56
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
67
use reqwest::Client;
@@ -22,11 +23,12 @@ pub fn process_e2hs_file(raw_e2hs: &[u8]) -> anyhow::Result<ProcessedE2HS> {
2223
.transactions
2324
.par_iter()
2425
.map(|tx| {
25-
tx.recover_signer()
26+
tx.recover_signer_unchecked()
2627
.map(|sender_address| TransactionsWithSender {
2728
transaction: tx.clone(),
2829
sender_address,
2930
})
31+
.map_err(|err| anyhow!("Failed to e2hs recover signer: {err:?}"))
3032
})
3133
.collect::<Result<Vec<_>, _>>()?;
3234
blocks.push(ProcessedBlock {

0 commit comments

Comments
 (0)