-
Notifications
You must be signed in to change notification settings - Fork 149
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
Update Docker image for smart-contract-verifier #1247
base: main
Are you sure you want to change the base?
Conversation
Update `docker-compose.yml` and `README.md` to use pre-built Docker image for smart-contract-verifier service. * **docker-compose.yml** - Update the `image` field to `ghcr.io/blockscout/smart-contract-verifier:main`. - Remove the `build` section. - Ensure the `ports` and `environment` fields remain unchanged. * **README.md** - Add instructions for pulling the Docker image using `docker pull ghcr.io/blockscout/smart-contract-verifier:main`. - Update the section on running the service to use the pulled Docker image. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/blockscout/blockscout-rs?shareId=XXXX-XXXX-XXXX-XXXX).
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (2)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes update the smart-contract verifier service documentation and configuration. The README file now includes new sections with instructions on pulling the Docker image from the GitHub Container Registry and running the service using that image, complete with details on command usage, port mappings, and environment file configuration. Additionally, the formatting of the links section has been adjusted by adding a newline at the end. In parallel, the Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
smart-contract-verifier/README.md (1)
53-59
: Enhance the service running instructions.While the instructions are clear, consider adding:
- Description of what each port is used for (8050, 8051)
- Reference to the environment variables section for configuring the env file
- Instructions for mounting volumes for compiler directories (as they default to
/tmp/solidity-compilers
and/tmp/vyper-compilers
)Here's a suggested enhancement:
## Running the Service To run the smart-contract-verifier service using the pulled Docker image, use the following command: ```sh docker run -p 8050:8050 -p 8051:8051 --env-file <path-to-your-env-file> ghcr.io/blockscout/smart-contract-verifier:main
+The service exposes:
+- Port 8050: Main API endpoint
+- Port 8051: Metrics endpoint
+
+For the environment file configuration, refer to the Envs section above.
+
+If you want to persist the compiler downloads, mount volumes for the compiler directories:
+
+```sh
+docker run -p 8050:8050 -p 8051:8051 \
- -v /path/to/solidity/compilers:/tmp/solidity-compilers \
- -v /path/to/vyper/compilers:/tmp/vyper-compilers \
- --env-file \
- ghcr.io/blockscout/smart-contract-verifier:main
+```</blockquote></details> <details> <summary>smart-contract-verifier/docker-compose.yml (1)</summary><blockquote> `4-4`: **Consider using a specific version tag or SHA digest.** While using the `main` tag works, it's recommended to use a specific version tag or SHA digest for better stability and security. This ensures: - Reproducible builds - Protection against unintended updates - Clear version tracking Example: ```diff - image: ghcr.io/blockscout/smart-contract-verifier:main + image: ghcr.io/blockscout/smart-contract-verifier:v1.2.3
Let's check the available tags for this image:
❌ Verification inconclusive
🏁 Script executed:
#!/bin/bash # Description: Get available tags for the smart-contract-verifier image curl -s -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/orgs/blockscout/packages/container/smart-contract-verifier/versions" \ | jq -r '.[].metadata.container.tags[]' \ | sort -VLength of output: 263
Below is a new shell script to inspect the raw JSON output from the GitHub API. This will help us verify if stable version tags are available:
Verify available image version tags before deployment
While switching to a pre-built image is a good step, using the
main
tag instead of a specific version tag (or SHA digest) can lead to unintended updates. Please manually verify the available stable tags using the output from the script above or by checking GitHub Container Registry details. Once confirmed, update the Docker Compose configuration accordingly to ensure reproducible builds and better security.
🏁 Script executed:
#!/bin/bash # Fetch the raw JSON response to inspect its structure. curl -s -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/orgs/blockscout/packages/container/smart-contract-verifier/versions" | jq .Length of output: 347
Ensure stable image version tags by manually verifying available tags
The automated API call returned an authentication-required error (HTTP 401), so it wasn't possible to retrieve the available tags automatically. Please manually verify the available stable version tags for the smart-contract-verifier image (for example, via the GitHub Container Registry UI) and update the docker-compose file with a specific version tag or SHA digest instead of using the
main
tag. This will ensure reproducible builds and better security.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
smart-contract-verifier/README.md
(1 hunks)smart-contract-verifier/docker-compose.yml
(1 hunks)
🔇 Additional comments (3)
smart-contract-verifier/README.md (2)
43-44
: LGTM! Good addition of the releases link.The addition of the releases link provides valuable version history information, and the newline improves formatting.
45-51
: LGTM! Clear instructions for pulling the Docker image.The section provides clear and accurate instructions for pulling the Docker image, using proper formatting and the correct image URL.
smart-contract-verifier/docker-compose.yml (1)
5-18
: LGTM! Configuration properly preserved.The service configuration maintains all essential elements:
- Port mappings for both service endpoints (8050, 8051)
- Flexible environment configuration through both file and variables
- Volume mounts for custom configuration and compiler persistence
npm install @0xsplits/splits-kit |
// Export the data required to re-instantiate the wallet. The data contains the seed and the ID of the wallet. // You should implement the "store" method to securely persist the data object, |
Update
docker-compose.yml
andREADME.md
to use pre-built Docker image for smart-contract-verifier service.docker-compose.yml
image
field toghcr.io/blockscout/smart-contract-verifier:main
.build
section.ports
andenvironment
fields remain unchanged.README.md
docker pull ghcr.io/blockscout/smart-contract-verifier:main
.For more details, open the Copilot Workspace session.
Summary by CodeRabbit
Documentation
Chores