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: adapt zksync_env_config::chain tests for running both in Validium mode and Rollup mode #143

Conversation

jordibonet-lambdaclass
Copy link

What ❔

Update the zksync_env_config::chain test of state_keeper_from_env to take into account the Rollup and Validium mode settings and check that both settings are modified correctly.

Checklist

  • Adapt state keeper config for validium.
  • Update the mock configuration for validium.

Changes

I have separated the expected_state_keeper_config() into two functions to manage the StateKeeperConfig for both modes and updated state_keeper_from_env() test to compare the new mockup configuration and the StateKeeperConfig of the Validium mode.

Check zksync_env_config::chain tests

zk test rust --package zksync_env_config --lib -j 1 -- chain::tests

Copy link
Collaborator

@ilitteri ilitteri left a comment

Choose a reason for hiding this comment

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

This works fine. Let's refactor the code a little bit. I propose making expected_state_keeper_config generic for l1_batch_commit_data_generator_mode, and then we can either split the state_keeper_from_env test into a Validium and a Rollup one or just abstract the repeated logic into another helper function.

Copy link
Collaborator

@ilitteri ilitteri left a comment

Choose a reason for hiding this comment

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

LGTM

@ilitteri ilitteri merged commit d3fa3b4 into feat_validium_pubdata_abstraction Feb 16, 2024
6 of 10 checks passed
@ilitteri ilitteri deleted the adapt-env_config_chain-tests-validium branch February 16, 2024 17:34
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.

Adapt tests for testing both with Rollup and Validium mode in zksync_env_config::chain module
3 participants