Skip to content

Conversation

thecodingshrimp
Copy link

What ❔

This PR prevents the zksync-era repository from being cloned multiple times during the zkstack ecosystem create command.

Why ❔

When running zkstack ecosystem create with default options, the command would download two copies of the zksync-era repository instead of one. This is a bug.

The root cause is in the create_chain_inner function. It calls resolve_link_to_code to find the genesis config but passes base_path set to the new chains directory. If link-to-code is not set, it would clone zksync-era into the chains path since the path of the newly cloned zksync-era in the root folder of the ecosystem is not passed down.

I propose to remove resolve_link_to_code and use &ecosystem_config.link_to_code because resolve_link_to_code is redundant: An ecosystem and specifically link_to_code always needs to be set before a chain can be created. ItsThis approach is consistent with other parts of the function that already use ecosystem_config (1, 2).

This fix should also fix genesis config related issues as the config from the correct zksync-era version at link_to_code is used.

Is this a breaking change?

  • Yes
  • No

Operational changes

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zkstack dev fmt and zkstack dev lint.

@thecodingshrimp
Copy link
Author

What do you think @sarahschwartz?

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

Successfully merging this pull request may close these issues.

Duplicate copies of zksync-era repo created on zkstack ecosystem create
1 participant