matter-labs / era-test-node

In-memory node that can be used for integration testing and debugging.
https://matter-labs.github.io/era-test-node
Apache License 2.0
308 stars 76 forks source link

MacOS needs to bypass permissions #354

Open PatrickAlphaC opened 1 month ago

PatrickAlphaC commented 1 month ago

🐛 Bug Report for zkSync Era In-Memory Node

When running this on a macOS, you get:

Apple could not verify era_test_node is free of malware that may harm your Mac or compromise your privacy.

This is a red flag, and will prevent people from using it.

To get around it, you have to go to your settings and enable using this. It would be great if we didn't have to do this (and also, simplify the installation experience)

dutterbutter commented 1 month ago

Hey @PatrickAlphaC 👋

Can you add reproduction steps here please? I am not familiar with this warning. Also please add macos version running.

PatrickAlphaC commented 1 month ago

Of course!

Steps:

  1. Download era-test-node-v0.1.0-alpha.29-aarch64-apple-darwin.tar.gz
  2. unzip it
  3. mv it to /usr/local/bin/
  4. Attempt to run era_test_node and you'll see the error in a popup

On mac, you then have to go to: Privacy & Security and "allow" it to run

popzxc commented 2 weeks ago

Update here: the issue happens because the binary is manually unpacked and moved to the protected directory. It won't happen e.g. if we would install it similarly to how foundry installs its binaries. The warning would also not appear if chmod +x era_test_node is executed from the terminal.

There are couple of ways to hotfix the issue (e.g. install it to a different directory), but we are also working on integrating era_test_node to foundry-zksync suite. Once done, this issue will be resolved as well. Thus, to not create confusion, we will treat this issue as part of foundry-zksync integration.