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

feat(rpc): Add flags to disable read tx timeout #11856

Merged
merged 3 commits into from
Oct 22, 2024

Conversation

0x00101010
Copy link
Contributor

#11672

Add a flag to disable read tx timeout for long running APIs like debug_executionWitness, eth_getProof, etc

@0x00101010 0x00101010 marked this pull request as ready for review October 17, 2024 21:27
@shekhirin shekhirin added C-enhancement New feature or request A-db Related to the database A-cli Related to the reth CLI labels Oct 18, 2024
Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

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

LGTM, but would also appreciate @mattsse or @joshieDo review, I don't have full confidence that these places are the only ones where we need to pass this argument to.

@shekhirin
Copy link
Collaborator

Let's tackle it via introducing an argument --db.transaction-timeout that can either set the custom timeout via --db.transaction-timeout 10s, or disable it fully via --db.transaction-timeout off.

We already have the logic for custom timeout, so we just need to set it using the CLI argument

/// Set the maximum duration of a read transaction.
pub const fn with_max_read_transaction_duration(
mut self,
max_read_transaction_duration: Option<MaxReadTransactionDuration>,
) -> Self {
self.max_read_transaction_duration = max_read_transaction_duration;
self
}

Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

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

.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm, pending @shekhirin

@shekhirin shekhirin added this pull request to the merge queue Oct 22, 2024
Merged via the queue into paradigmxyz:main with commit 60337d9 Oct 22, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI A-db Related to the database C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants