Repository navigation
fix: deflake //rs/tests/cross_chain:ic_xc_cketh_test by compiling contracts offline - #10459
Merged
basvandijk merged 2 commits intoJun 15, 2026
Merged
Conversation
…tracts offline
The test was flaky in data centers with unreliable IPv4 connectivity (e.g.
dm1), panicking in `deploy_smart_contract` with:
error sending request for url (https://binaries.soliditylang.org/linux-amd64/list.json)
... Network unreachable (os error 101)
Root cause: the foundry container ships no `solc`, so `forge create` downloads
the Solidity compiler from binaries.soliditylang.org at test runtime. That is
why the foundry UVM was created with `.enable_ipv4()`. The download fails
whenever the UVM's IPv4 connectivity is unavailable.
Fix: vendor the required `solc` compilers (0.8.18 and 0.8.20) as pinned,
hash-verified Bazel `http_file` dependencies, ship them in the ckETH UVM config
image, bind-mount them into the foundry container, and pass them to
`forge create --use <path>`. Compilation now happens fully offline and the
`.enable_ipv4()` dependency is removed.
This also removes a source of non-determinism: contracts declaring
`pragma solidity ^0.8.20` previously let svm pick the latest 0.8.x available at
runtime; they are now pinned to exactly 0.8.20. EthDepositHelper.sol stays on
0.8.18 to remain faithful to the deployed mainnet helper contract.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR deflakes the ckETH cross-chain system tests by vendoring specific solc binaries and making forge create compile contracts fully offline inside the foundry UVM, removing the runtime dependency on external IPv4 connectivity.
Changes:
- Vendor
solc0.8.18 and 0.8.20 as pinned, hash-verified Bazelhttp_filedependencies. - Ship the vendored
solcbinaries in the ckETH UVM config image and copy them to an executable, writable location at UVM startup. - Update the test to mount the appropriate
solcinto the foundry container and pass it viaforge create --use, while removing.enable_ipv4().
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
rs/tests/cross_chain/ic_xc_cketh_test.rs |
Removes IPv4 requirement and forces offline contract compilation by bind-mounting pinned solc binaries into the foundry container. |
rs/tests/cross_chain/BUILD.bazel |
Adds the two vendored solc binaries to the ckETH UVM config image. |
MODULE.bazel |
Introduces pinned, hash-verified solc 0.8.18/0.8.20 http_file dependencies for offline compilation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
@basvandijk Thanks for that PR! I tried twice to run in the devenv container (also after a bazel clean) but I'm getting some errors |
gregorydemay
approved these changes
Jun 15, 2026
basvandijk
enabled auto-merge
June 15, 2026 09:10
nmattia
approved these changes
Jun 15, 2026
Address review feedback on #10459: name the vendored solc compilers by role rather than version, so a future compiler bump only touches the `http_file` URL and sha256 instead of every reference. - MODULE.bazel: rename repos solc_linux_amd64_0_8_20 -> solc and solc_linux_amd64_0_8_18 -> solc_eth_deposit_helper (+ matching downloaded_file_path). - BUILD.bazel: update the cketh_uvm_config_image srcmap accordingly. - ic_xc_cketh_test.rs: rename SOLC_V0_8_20 -> SOLC and SOLC_V0_8_18 -> SOLC_ETH_DEPOSIT_HELPER. EthDepositHelper.sol keeps its own compiler since it pins an older Solidity version to match its immutable mainnet deployment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
//rs/tests/cross_chain:ic_xc_cketh_testand…:ic_xc_cketh_test_head_nnsareflaky in data centers with unreliable IPv4 connectivity (e.g.
dm1), panickingin
deploy_smart_contract:Root cause
The
foundrycontainer shipsforge/cast/anvilbut nosolc. Whenforge createcompiles a helper contract, it downloads the Solidity compiler frombinaries.soliditylang.orgat test runtime (first the release indexlist.json, then thesolcbinary). That is why the foundry UVM was created with.enable_ipv4(). Whenever the UVM's IPv4 connectivity is unavailable, the download fails and the test flakes.This is a third, distinct source of flakiness from the two fixed in #9209.
This is also preventing these tests to run on the local system-test backend which doesn't have external network access.
Fix
Vendor the required
solccompilers as pinned, hash-verified Bazelhttp_filedependencies, ship them in the ckETH UVM config image, bind-mount them into the foundry container, and pass them toforge create --use <path>. Compilation now happens fully offline and the.enable_ipv4()dependency is removed.solcandsolc_eth_deposit_helperhttp_filedeps (sha256 taken fromlist.json). The compilers are named by role rather than version, so a future compiler bump only touches thehttp_fileURL and sha256.cketh_uvm_config_imagesrcmap (→/config/solcand/config/solc_eth_deposit_helper)..enable_ipv4(); copy the compilers to a writable path +chmod +x(vfat drops the exec bit); pass the compiler matching each contract'spragmatoforge create --use.This also removes a source of non-determinism: contracts declaring
pragma solidity ^0.8.20previously letsvmpick the latest 0.8.x available at runtime; they are now pinned to exactly 0.8.20.EthDepositHelper.solstays on 0.8.18 to remain faithful to the deployed mainnet helper contract, so it gets its ownsolc_eth_deposit_helpercompiler.Verification
Ran on
dm1(the flaky environment) with caching disabled:The foundry UVM came up without IPv4,
forge create --usecompiled and deployed all four contracts from the vendored compilers, and every ETH/ERC-20/subaccount deposit flow passed — no network fetch tobinaries.soliditylang.org.