Skip to content

NONEVM-1954: support multiple ton networks #1862

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

Conversation

jadepark-dev
Copy link
Collaborator

@jadepark-dev jadepark-dev commented Jun 5, 2025

This PR enables multiple concurrent TON network instances for parallel testing

Primary Changes

  • Added unique instance ID generation for isolated TON network deployment
  • Implemented dynamic port allocation to prevent conflicts between multiple networks
  • Updated containers to use instance-specific network names and volumes

Testing Support

  • Added parallel TON test configuration supporting multiple blockchain instances

Others

  • Refactored network creation to use testcontainers API for seamless clean up
  • Updated container naming with instance identifiers

Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes introduce a new parallel testing setup for TON, enhance the blockchain component to support dynamic port allocation for TON services, and ensure that the TON blockchain component is properly configured for testing environments. These changes aim to improve the flexibility and robustness of testing different configurations and scenarios within the TON blockchain network, specifically addressing the need for parallel execution and dynamic networking.

What

  • .github/workflows/framework-golden-tests.yml
    • Added a new test configuration TestTonParallel with its respective TOML file parallel_ton.toml and timeout setting.
  • framework/components/blockchain/ton.go
    • Refactored environment variable names to be consistent (changed CommonDBVars to commonDBVars).
    • Implemented dynamic port allocation for TON services to avoid port conflicts during parallel testing.
    • Introduced a new function generateUniquePortsFromBase to create a unique set of ports for each TON service based on a given base port.
    • Modified the TON service container setup to use dynamically allocated ports instead of hardcoded ones.
    • Simplified the network creation process using the network package from testcontainers-go.
  • framework/examples/myproject/parallel_ton.toml
    • Created a new TOML configuration file for parallel TON testing with two blockchain instances running on different ports.
  • framework/examples/myproject/parallel_ton_test.go
    • Added a new test file to execute parallel TON blockchain instances and perform basic validation, wallet tests, and port isolation checks.
  • framework/examples/myproject/smoke_ton.toml
    • Updated the TOML file to include a port configuration for the TON blockchain instance, ensuring consistency with the new dynamic port allocation approach.

@jadepark-dev jadepark-dev marked this pull request as ready for review June 5, 2025 21:07
@jadepark-dev jadepark-dev requested a review from a team as a code owner June 5, 2025 21:07
@jadepark-dev jadepark-dev merged commit f38d4e4 into main Jun 6, 2025
62 checks passed
@jadepark-dev jadepark-dev deleted the NONEVM-1954-mylocalton-CTF-randomize-ports-clean-up-volumes-on-close branch June 6, 2025 08:56
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.

2 participants