Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rpc): apply blockhashes update in witness RPC #10419

Merged
merged 1 commit into from
Aug 21, 2024
Merged
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
12 changes: 11 additions & 1 deletion crates/rpc/rpc/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use reth_provider::{
BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, HeaderProvider, StateProofProvider,
StateProviderFactory, TransactionVariant,
};
use reth_revm::database::StateProviderDatabase;
use reth_revm::{database::StateProviderDatabase, state_change::apply_blockhashes_update};
use reth_rpc_api::DebugApiServer;
use reth_rpc_eth_api::{
helpers::{Call, EthApiSpec, EthTransactions, TraceExt},
Expand Down Expand Up @@ -589,6 +589,16 @@ where
)
.map_err(|err| EthApiError::Internal(err.into()))?;

// apply eip-2935 blockhashes update
apply_blockhashes_update(
&mut db,
&this.inner.provider.chain_spec(),
block.timestamp,
block.number,
block.parent_hash,
)
.map_err(|err| EthApiError::Internal(err.into()))?;

// Re-execute all of the transactions in the block to load all touched accounts into
// the cache DB.
for tx in block.raw_transactions() {
Expand Down
Loading