fix(ton): use ctf network, with unique volumes#2393
Merged
Conversation
…inlink-testing-framework into jade/ton-ctf-devenv
This was referenced Feb 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the TON localnet testcontainer setup to share the CTF Docker network, avoid host port conflicts via dynamic LiteServer ports, and prevent DB lock issues by using unique volume names.
Changes:
- Switch TON container networking to
framework.DefaultNetworkNamewith a stable alias for DNS-based connectivity. - Use Docker-assigned host ports for LiteServer while keeping container internal ports fixed.
- Use per-container named volumes to avoid cross-instance DB lock contention.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
archseer
approved these changes
Feb 12, 2026
skudasov
approved these changes
Feb 12, 2026
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.
This PR unblocks ton devenv, while compatible with existing integration tests in chainlink-ton
Summary
(
framework.DefaultNetworkName) instead of creating an isolated network, enabling DNS-basedcommunication with other containers (e.g., Chainlink nodes in devenv)
multiple TON instances in parallel
(
/var/ton-work/db/adnl/LOCK: Resource temporarily unavailable)Context
This is a rework of #2339 (reverted in #2371). The previous fix changed the container's
internal ports to match host ports, which was fragile. This fix keeps internal ports fixed
(8000 for HTTP, 40000 for LiteServer) and only controls host-side mapping via nat.PortMap.
Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The changes improve container configuration and networking for TON blockchain nodes by removing unnecessary port and network complexities, simplifying environment setup, and enhancing port mapping for better accessibility and integration with the host system.
What
strconv.liteServerPortOffsetandportMappingstruct which were previously used for calculating port numbers and mapping.NetworksandNetworkAliasesconfigurations to explicitly define the network the container should connect to and its aliases, improving network predictability and accessibility.PortBindingsin theHostConfigModifierfunction to explicitly map the container's ports to the host, including dynamic assignment for the LiteServer port, which enhances the container's accessibility from the host system.