From 933f2db115d15179870374d1bab84a944e813452 Mon Sep 17 00:00:00 2001 From: Danil Date: Thu, 23 May 2024 11:00:57 +0200 Subject: [PATCH 1/3] Change some texts Signed-off-by: Danil --- .../zk_inception/src/commands/chain/args/init.rs | 2 +- .../zk_inception/src/commands/ecosystem/args/create.rs | 10 ++++++---- .../zk_inception/src/commands/ecosystem/args/init.rs | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/args/init.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/args/init.rs index 84ae83aa1ff1..19956f41fa23 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/args/init.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/args/init.rs @@ -21,7 +21,7 @@ pub struct InitArgs { impl InitArgs { pub fn fill_values_with_prompt(self, config: &ChainConfig) -> InitArgsFinal { let deploy_paymaster = self.deploy_paymaster.unwrap_or_else(|| { - common::PromptConfirm::new("Do you want to deploy paymaster contract?") + common::PromptConfirm::new("Do you want to deploy a test paymaster?") .default(true) .ask() }); diff --git a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/create.rs b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/create.rs index d5e20bc3881f..214217c49573 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/create.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/create.rs @@ -40,7 +40,7 @@ impl EcosystemCreateArgs { let link_to_code = self.link_to_code.unwrap_or_else(|| { let link_to_code_selection = PromptSelect::new( - "Select the origin of zksync-era repository", + "Add the (recommended) to the clone option", LinkToCodeSelection::iter(), ) .ask(); @@ -72,9 +72,11 @@ impl EcosystemCreateArgs { let chain = self.chain.fill_values_with_prompt(0); let start_containers = self.start_containers.unwrap_or_else(|| { - PromptConfirm::new("Do you want to start containers after creating the ecosystem?") - .default(true) - .ask() + PromptConfirm::new( + "Do you want to start database and L1 containers after creating the ecosystem?", + ) + .default(true) + .ask() }); EcosystemCreateArgsFinal { diff --git a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/init.rs b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/init.rs index 6be1a9ca1778..36a93594942b 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/init.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/init.rs @@ -19,7 +19,7 @@ pub struct EcosystemArgs { impl EcosystemArgs { pub fn fill_values_with_prompt(self) -> EcosystemArgsFinal { let deploy_ecosystem = self.deploy_ecosystem.unwrap_or_else(|| { - PromptConfirm::new("Do you want to deploy ecosystem contracts?") + PromptConfirm::new("Do you want to deploy ecosystem contracts? (Not needed if you already have an existing one)") .default(true) .ask() }); @@ -64,7 +64,7 @@ impl EcosystemInitArgs { .ask() }); let deploy_erc20 = self.deploy_erc20.unwrap_or_else(|| { - PromptConfirm::new("Do you want to deploy test ERC20?") + PromptConfirm::new("Do you want to deploy some test ERC20s?") .default(true) .ask() }); From e250350d472626a88cb0a6b0d031bce9d86cc89d Mon Sep 17 00:00:00 2001 From: Danil Date: Thu, 23 May 2024 11:19:27 +0200 Subject: [PATCH 2/3] Rename error for start containers Signed-off-by: Danil --- zk_toolbox/crates/zk_inception/src/commands/containers.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zk_toolbox/crates/zk_inception/src/commands/containers.rs b/zk_toolbox/crates/zk_inception/src/commands/containers.rs index 094391557ae0..f05618373c3e 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/containers.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/containers.rs @@ -34,7 +34,10 @@ pub fn initialize_docker(shell: &Shell, ecosystem: &EcosystemConfig) -> anyhow:: } pub fn start_containers(shell: &Shell) -> anyhow::Result<()> { - docker::up(shell, DOCKER_COMPOSE_FILE).context("Failed to start containers") + docker::up(shell, DOCKER_COMPOSE_FILE).context( + "Failed to start containers. Make sure there is nothing running on + default ports for Ethereum node l1 and postgres", + ) } fn create_docker_folders(shell: &Shell) -> anyhow::Result<()> { From 06dbb87840e6bb36846da8c48ed0d7b429bd6448 Mon Sep 17 00:00:00 2001 From: Danil Date: Thu, 23 May 2024 11:37:00 +0200 Subject: [PATCH 3/3] Update dokcer compose start text Signed-off-by: Danil --- .../zk_inception/src/commands/containers.rs | 15 +++++++++++---- .../src/commands/ecosystem/args/create.rs | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/zk_toolbox/crates/zk_inception/src/commands/containers.rs b/zk_toolbox/crates/zk_inception/src/commands/containers.rs index f05618373c3e..82bb2b48520e 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/containers.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/containers.rs @@ -34,10 +34,17 @@ pub fn initialize_docker(shell: &Shell, ecosystem: &EcosystemConfig) -> anyhow:: } pub fn start_containers(shell: &Shell) -> anyhow::Result<()> { - docker::up(shell, DOCKER_COMPOSE_FILE).context( - "Failed to start containers. Make sure there is nothing running on - default ports for Ethereum node l1 and postgres", - ) + while let Err(err) = docker::up(shell, DOCKER_COMPOSE_FILE) { + logger::error(err.to_string()); + if !common::PromptConfirm::new( + "Failed to start containers. Make sure there is nothing running on default ports for Ethereum node l1 and postgres. Want to try again?", + ).default(true) + .ask() + { + return Err(err); + } + } + Ok(()) } fn create_docker_folders(shell: &Shell) -> anyhow::Result<()> { diff --git a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/create.rs b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/create.rs index 214217c49573..6786b07d6776 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/create.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/ecosystem/args/create.rs @@ -40,7 +40,7 @@ impl EcosystemCreateArgs { let link_to_code = self.link_to_code.unwrap_or_else(|| { let link_to_code_selection = PromptSelect::new( - "Add the (recommended) to the clone option", + "Select the origin of zksync-era repository", LinkToCodeSelection::iter(), ) .ask(); @@ -112,7 +112,7 @@ impl EcosystemCreateArgsFinal { #[derive(Debug, Clone, EnumIter, Display, PartialEq, Eq)] enum LinkToCodeSelection { - #[strum(serialize = "Clone for me")] + #[strum(serialize = "Clone for me (recommended)")] Clone, #[strum(serialize = "I have the code already")] Path,