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

refactor(cheatcode): use rate limit args in create fork cheatcode #6193

Merged
merged 4 commits into from
Nov 2, 2023

Conversation

Evalir
Copy link
Member

@Evalir Evalir commented Nov 1, 2023

Rebases #6085 to use the new file structure and refactor—couldn't rebase online on github and it was going to be a pain. Thanks @gr4yha7!

@Evalir Evalir requested a review from mattsse November 1, 2023 22:00
Copy link
Member

@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.

we need to add the retry option to the cli args otherwise this will never be set.

This changes the defaults slightly, from 8,800ms to what the default provider is using. I guess we can update the provider defaults instead, 800ms seems more reasonable anyway

and actually, it turns out the no-rate-limit argument was already respected via:

if self.no_rpc_rate_limit {

@@ -24,6 +24,9 @@ pub struct EvmOpts {
/// pins the block number for the state fork
pub fork_block_number: Option<u64>,

/// The number of retries
pub fork_retries: Option<u32>,
Copy link
Member

Choose a reason for hiding this comment

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

we don't have a correspond cli arg for this like

/// Initial retry backoff on encountering errors.
///
/// See --fork-url.
#[clap(long, requires = "fork_url", value_name = "BACKOFF")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fork_retry_backoff: Option<u64>,

so this will also be None

Copy link
Member

@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

@Evalir Evalir merged commit 9421571 into master Nov 2, 2023
16 checks passed
@Evalir Evalir deleted the evalir/respect-fork-rate branch November 2, 2023 14:04
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