diff --git a/CHANGELOG.md b/CHANGELOG.md index f619ac8e5e9..5bbce464364 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Update to tuweni 2.7.2 [#9338](https://github.com/hyperledger/besu/pull/9338) ### Bug fixes +- Performance: Fix CompletableFuture tracking to correctly cancel parallel txs threads [#9360](https://github.com/hyperledger/besu/pull/9360) ## 25.10.0 This is a recommended update for Hoodi users for the Fusaka hardfork. diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/parallelization/ParallelizedConcurrentTransactionProcessor.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/parallelization/ParallelizedConcurrentTransactionProcessor.java index 1335ac87edb..a15e8a287e8 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/parallelization/ParallelizedConcurrentTransactionProcessor.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/parallelization/ParallelizedConcurrentTransactionProcessor.java @@ -116,18 +116,19 @@ public void runAsyncBlock( /* * All transactions are executed in the background by copying the world state of the block on which the transactions need to be executed, ensuring that each one has its own accumulator. */ - CompletableFuture.runAsync( - () -> - runTransaction( - protocolContext, - blockHeader, - transactionLocation, - transaction, - miningBeneficiary, - blockHashLookup, - blobGasPrice, - blockAccessListBuilder), - executor); + completableFuturesForBackgroundTransactions[i] = + CompletableFuture.runAsync( + () -> + runTransaction( + protocolContext, + blockHeader, + transactionLocation, + transaction, + miningBeneficiary, + blockHashLookup, + blobGasPrice, + blockAccessListBuilder), + executor); } }