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

we shouldn't COPY .env . in our docker build #356

Closed
0xaatif opened this issue Jul 2, 2024 · 5 comments
Closed

we shouldn't COPY .env . in our docker build #356

0xaatif opened this issue Jul 2, 2024 · 5 comments
Labels
crate: zero_bin Anything related to the zero-bin subcrates.

Comments

@0xaatif
Copy link
Contributor

0xaatif commented Jul 2, 2024

No description provided.

@github-project-automation github-project-automation bot moved this to Backlog in Zero EVM Jul 2, 2024
@Nashtare Nashtare added the crate: zero_bin Anything related to the zero-bin subcrates. label Jul 5, 2024
@BGluth
Copy link
Contributor

BGluth commented Jul 8, 2024

Hmm... The .env is part of the project though. It should be included in the container somehow though eh?

@atanmarko
Copy link
Member

@BGluth Problem is that you usually want to set environment variables for docker-compose or Kubernetes setup. I guess .env should be explicitly mounted? If you just copy it inside docker, wouldn't you effectively hardcode settings and overwrite devops environment setup?

@BGluth
Copy link
Contributor

BGluth commented Jul 8, 2024

Ah makes sense, thanks.

We should also be a bit careful with the tool scripts doing stuff like this:

if [[ $8 == "test_only" ]]; then
# Circuit sizes don't matter in test_only mode, so we keep them minimal.
export ARITHMETIC_CIRCUIT_SIZE="16..17"
export BYTE_PACKING_CIRCUIT_SIZE="9..10"
export CPU_CIRCUIT_SIZE="12..13"
export KECCAK_CIRCUIT_SIZE="14..15"
export KECCAK_SPONGE_CIRCUIT_SIZE="9..10"
export LOGIC_CIRCUIT_SIZE="12..13"
export MEMORY_CIRCUIT_SIZE="17..18"
else
export ARITHMETIC_CIRCUIT_SIZE="16..23"
export BYTE_PACKING_CIRCUIT_SIZE="9..21"
export CPU_CIRCUIT_SIZE="12..25"
export KECCAK_CIRCUIT_SIZE="14..20"
export KECCAK_SPONGE_CIRCUIT_SIZE="9..15"
export LOGIC_CIRCUIT_SIZE="12..18"
export MEMORY_CIRCUIT_SIZE="17..28"
fi

if [[ $TEST_ONLY == "test_only" ]]; then
# Circuit sizes don't matter in test_only mode, so we keep them minimal.
export ARITHMETIC_CIRCUIT_SIZE="16..17"
export BYTE_PACKING_CIRCUIT_SIZE="9..10"
export CPU_CIRCUIT_SIZE="12..13"
export KECCAK_CIRCUIT_SIZE="14..15"
export KECCAK_SPONGE_CIRCUIT_SIZE="9..10"
export LOGIC_CIRCUIT_SIZE="12..13"
export MEMORY_CIRCUIT_SIZE="17..18"
else
if [[ $INPUT_FILE == *"witness_b19240705"* ]]; then
# These sizes are configured specifically for block 19240705. Don't use this in other scenarios
echo "Using specific circuit sizes for witness_b19240705.json"
export ARITHMETIC_CIRCUIT_SIZE="16..19"
export BYTE_PACKING_CIRCUIT_SIZE="16..19"
export CPU_CIRCUIT_SIZE="18..21"
export KECCAK_CIRCUIT_SIZE="15..18"
export KECCAK_SPONGE_CIRCUIT_SIZE="10..13"
export LOGIC_CIRCUIT_SIZE="13..17"
export MEMORY_CIRCUIT_SIZE="20..23"
else
export ARITHMETIC_CIRCUIT_SIZE="16..23"
export BYTE_PACKING_CIRCUIT_SIZE="9..21"
export CPU_CIRCUIT_SIZE="12..25"
export KECCAK_CIRCUIT_SIZE="14..20"
export KECCAK_SPONGE_CIRCUIT_SIZE="9..15"
export LOGIC_CIRCUIT_SIZE="12..18"
export MEMORY_CIRCUIT_SIZE="17..28"
fi
fi

@atanmarko
Copy link
Member

We should also be a bit careful with the tool scripts doing stuff like this:

In general I agree but these are just scripts for testing so no big deal I think :)

@0xaatif
Copy link
Contributor Author

0xaatif commented Jul 8, 2024

Fixed in #357

@0xaatif 0xaatif closed this as completed Jul 8, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Zero EVM Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: zero_bin Anything related to the zero-bin subcrates.
Projects
Status: Done
Development

No branches or pull requests

4 participants