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(cheatcodes): add --fork-retry + --fork-retry-backoff equivalent to vm.create*Fork #9162

Open
anajuliabit opened this issue Oct 22, 2024 · 7 comments
Labels
A-cheatcodes Area: cheatcodes good first issue Good for newcomers T-feature Type: feature

Comments

@anajuliabit
Copy link

Component

Forge

Describe the feature you would like

Most of our integration tests are multichain, meaning we use vm.createFork to set up the forks. We can't use the --fork-url option because we want to ensure that the fork IDs have the same order, regardless of which chain the tests belong to.

For example, we always instantiate the forks in the following order:

  • ID 0: Moonbeam fork
  • ID 1: Base fork
  • ID 2: Optimism fork

When running a Base integration test, the setUp function first fetches the Moonbeam governor and executes any live proposals (that can be cross-chain).

This is why we cannot use --fork-url with forge test.

Please allow the --fork-retry and --fork-retry-backoff flags to be used without requiring the --fork-url.

Additional context

No response

@anajuliabit anajuliabit added T-feature Type: feature T-needs-triage Type: this issue needs to be labelled labels Oct 22, 2024
@github-project-automation github-project-automation bot moved this to Todo in Foundry Oct 22, 2024
@zerosnacks
Copy link
Member

Hi @anajuliabit thanks for your suggestion,

Supportive of the idea, wondering how we can best implement this.
At the moment it doesn't seem like simply allowing --fork-retry / --fork-retry-backoff to be ran without --fork-url would have any effect as the two flows are quite distinct.

We could overload the vm.createFork / vm.createSelectFork cheatcode to pass in additional configuration. This would allow you to configure a per-fork retries and backoff which seems desirable.

@zerosnacks zerosnacks removed the T-needs-triage Type: this issue needs to be labelled label Oct 23, 2024
@zerosnacks zerosnacks changed the title Allow --fork-retry and --fork-retry-backoff without requiring --fork-url feat(cheatcodes): add --fork-retry + --fork-retry-backoff equivalent to vm.create*Fork Oct 23, 2024
@zerosnacks zerosnacks added the A-cheatcodes Area: cheatcodes label Oct 23, 2024
@grandizzy grandizzy added the good first issue Good for newcomers label Nov 7, 2024
@pheobeayo
Copy link

May I take this issue on?

@PedroRosalba
Copy link

Can I work on this, please?

@zerosnacks
Copy link
Member

Can I work on this, please?

I appreciate your enthusiasm but please do not claim tickets you are not intending to work on

You are already assigned to #7248 (comment) and others

@kien6034
Copy link
Contributor

@zerosnacks can i work on this? The #9201 is open, but i believe most of the works is done

@zerosnacks
Copy link
Member

Thanks Kien, all good - assigned to you

@kien6034 kien6034 removed their assignment Nov 22, 2024
@kien6034
Copy link
Contributor

@zerosnacks sorry for taking this long, i forget that i'm assigned to this issue , i've been busy this month, never actually got the time to do this issue

i've just un-assign myself for others to take the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cheatcodes Area: cheatcodes good first issue Good for newcomers T-feature Type: feature
Projects
Status: Todo
Development

No branches or pull requests

7 participants
@grandizzy @pheobeayo @anajuliabit @kien6034 @PedroRosalba @zerosnacks and others