Skip to content

fix(verifier): use reachable solc list mirror and persist compilers#2

Open
vriveraPeersyst wants to merge 1 commit into
xrplevm:masterfrom
vriveraPeersyst:fix/verifier-solc-list-egress
Open

fix(verifier): use reachable solc list mirror and persist compilers#2
vriveraPeersyst wants to merge 1 commit into
xrplevm:masterfrom
vriveraPeersyst:fix/verifier-solc-list-egress

Conversation

@vriveraPeersyst

Copy link
Copy Markdown

Why

The smart-contract-verifier could not verify contracts (error: Couldn't fetch the file … https://solc-…). From inside the container it failed to fetch the Solidity compiler list from https://binaries.soliditylang.org/linux-amd64/list.json. Without that catalog the service cannot resolve/download the requested compiler (e.g. 0.8.30), so verification fails.

⚠️ Root cause not fully confirmed from the container. The fetch fails, but the exact cause (egress firewall vs. DNS vs. server-side 403/429 vs. Cloudflare blocking datacenter IPs / non-browser clients) has not been read from the container logs yet. See How to confirm below. This PR is the repo-level remedy for the most likely causes; if the container has no GitHub egress either, the fix must be at the network layer.

What

  1. Repoint the Solidity LIST_URL to the canonical GitHub mirror — https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/linux-amd64/list.json. Same content binaries.soliditylang.org is served from, confirmed current (contains 0.8.30). Original soliditylang URL kept as a commented fallback with a WHY note. The blockscout/solc-bin mirror was rejected — stale (max 0.8.14).
  2. Persist the compiler caches — bind-mount volumes for /tmp/solidity-compilers and /tmp/vyper-compilers (matching the existing stats-db-data / redis-data convention) so downloaded compilers survive container restarts.
  3. gitignore the two new data dirs.

Files: docker-compose/envs/common-smart-contract-verifier.env, docker-compose/services/smart-contract-verifier.yml, .gitignore.

How to confirm the root cause (from the Docker host)

docker logs smart-contract-verifier 2>&1 | grep -i -A3 'list\|fetch\|solc'
docker exec smart-contract-verifier sh -c \
  'wget -S -O /dev/null https://binaries.soliditylang.org/linux-amd64/list.json'
#   timeout            -> egress blocked
#   403/429            -> server/Cloudflare refusing (datacenter IP / non-browser client)
#   could not resolve  -> DNS
#   200 OK             -> URL works; cause is elsewhere (this PR would not be the fix)

How to test

  1. Deploy with these env/compose changes.
  2. From the container, confirm it reaches the new mirror: docker exec smart-contract-verifier sh -c 'wget -S -O /dev/null https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/linux-amd64/list.json' → expect 200 OK.
  3. Verify a contract compiled with 0.8.30 / cancun; should succeed.
  4. Restart the container and re-verify — compiler should already be cached.

Notes

  • docker unavailable in the dev environment; changes validated by inspection. Runtime test-verify is the deployment step above.
  • Upstream blockscout/blockscout ships these two files identically — no upstream fix to port; the default assumes the container has egress to soliditylang.

🤖 Generated with Claude Code

The smart-contract-verifier could not verify contracts because it failed
to fetch the Solidity compiler list from binaries.soliditylang.org from
inside the container.

Point the Solidity LIST_URL to the ethereum/solc-bin gh-pages mirror
(identical content, served over GitHub) and keep the original URL as a
commented fallback. Add bind-mount volumes for the solc/vyper compiler
caches so downloaded compilers survive container restarts, matching the
repo's existing bind-mount convention (stats-db-data, etc.).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant