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

Trie log preload timeout #4

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Trie log preload timeout #4

wants to merge 12 commits into from

Conversation

siladu
Copy link
Owner

@siladu siladu commented Jul 24, 2024

@greptileai

PR description

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment was generated by Greptile

PR Summary

Introduced a timeout mechanism for trie log preloading and adjusted the Bonsai Trie log pruning window size.

  • Timeout Mechanism: Added a timeout for trie log preloading in ethereum/core/src/main/java/org/hyperledger/besu/ethereum/trie/diffbased/common/trielog/TrieLogPruner.java using ScheduledExecutorService.
  • Exception Handling: Throws TimeoutException if preloading exceeds 30 seconds, ensuring the process doesn't run indefinitely.
  • Logging Enhancements: Improved logging for better visibility into preloading and pruning processes.
  • Configuration Change: Reduced DEFAULT_BONSAI_TRIE_LOG_PRUNING_WINDOW_SIZE from 30,000 to 5,000 in ethereum/core/src/main/java/org/hyperledger/besu/ethereum/worldstate/DataStorageConfiguration.java, impacting performance and resource usage.

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment was generated by Greptile

PR Summary

(updates since last review)

The recent changes focus on enhancing transaction management and peer discovery mechanisms, along with some refactoring for better code organization.

  • Transaction Penalization: Introduced penalization logic for transactions in ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/layered/AbstractPrioritizedTransactions.java and related classes, improving transaction prioritization.
  • Peer Discovery: Added includeBootnodesOnPeerRefresh option in ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/config/DiscoveryConfiguration.java to enhance peer discovery in PoA networks.
  • Refactoring: Moved multiple test files from operations to operation package in evm/src/test/java/org/hyperledger/besu/evm/operation, aligning with naming conventions.
  • EIP-3540 Support: Updated ExtCodeCopyOperation.java, ExtCodeHashOperation.java, and ExtCodeSizeOperation.java to support EIP-3540 semantics, ensuring compatibility with new Ethereum improvements.
  • New Tests: Added TrieLogSubCommandTest.java to verify bonsai-limit-trie-logs-enabled configuration handling in various subcommands.

72 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants