Quieten merkletrie exceptions (#4378)

* quieten the txpool merkletrie exceptions
* move prepareBlock stacktraces to debug

Signed-off-by: garyschulte <garyschulte@gmail.com>
pull/4390/head
garyschulte 2 years ago committed by GitHub
parent 6dc07494bb
commit 26e23ac808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinator.java
  2. 16
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPool.java

@ -195,7 +195,7 @@ public class MergeCoordinator implements MergeMiningCoordinator, BadChainListene
.whenComplete(
(bestBlock, throwable) -> {
if (throwable != null) {
LOG.warn("something went wrong creating block", throwable);
LOG.debug("something went wrong creating block", throwable);
} else {
final var resultBest = validateBlock(bestBlock);
if (resultBest.blockProcessingOutputs.isPresent()) {

@ -40,6 +40,7 @@ import org.hyperledger.besu.ethereum.mainnet.TransactionValidationParams;
import org.hyperledger.besu.ethereum.mainnet.ValidationResult;
import org.hyperledger.besu.ethereum.mainnet.feemarket.FeeMarket;
import org.hyperledger.besu.ethereum.transaction.TransactionInvalidReason;
import org.hyperledger.besu.ethereum.trie.MerkleTrieException;
import org.hyperledger.besu.evm.account.Account;
import org.hyperledger.besu.metrics.BesuMetricCategory;
import org.hyperledger.besu.plugin.data.TransactionType;
@ -279,10 +280,17 @@ public class TransactionPool implements BlockAddedObserver {
.getMutable(chainHeadBlockHeader.getStateRoot(), chainHeadBlockHeader.getHash(), false)
.map(
worldState -> {
final Account senderAccount = worldState.get(transaction.getSender());
return getTransactionValidator()
.validateForSender(
transaction, senderAccount, TransactionValidationParams.transactionPool());
try {
final Account senderAccount = worldState.get(transaction.getSender());
return getTransactionValidator()
.validateForSender(
transaction, senderAccount, TransactionValidationParams.transactionPool());
} catch (MerkleTrieException ex) {
LOG.debug(
"MerkleTrieException while validating transaction for sender {}",
transaction.getSender());
return ValidationResult.invalid(CHAIN_HEAD_WORLD_STATE_NOT_AVAILABLE);
}
})
.orElseGet(() -> ValidationResult.invalid(CHAIN_HEAD_WORLD_STATE_NOT_AVAILABLE));
}

Loading…
Cancel
Save