English | 中文
System-level integration test suite for java-tron (GreatVoyage-v4.8.1 Democritus). Covers all 34 system contracts, gRPC/HTTP/JSON-RPC APIs, TVM instructions, Stake 2.0, multi-signature, DEX, and privacy features via end-to-end testing against live TRON nodes.
All private keys in this repository are randomized test keys with no sensitive information.
| Component | Version | Notes |
|---|---|---|
| Java | 1.8 (x86) / 17 (ARM) | Aligned with java-tron |
| Gradle | 7.6.4 (wrapper) | Aligned with java-tron |
| TestNG | 6.14.3 | Primary test framework |
| Protobuf | 3.25.5 | Protocol serialization |
| gRPC | 1.60.0 | Node communication |
| BouncyCastle | 1.78.1 | Cryptography |
| JaCoCo | 0.8.11 | Code coverage |
| jqwik | 1.7.4 | Property-based testing |
system-test/
├── protocol/ # Protobuf definitions + gRPC code generation
├── testcase/ # Main test module (649 test classes)
│ ├── build.gradle # Test dependencies & task definitions
│ └── src/test/
│ ├── java/stest/tron/wallet/
│ │ ├── account/ # Account functionality tests
│ │ ├── transfer/ # TRX transfer tests
│ │ ├── block/ # Block operation tests
│ │ ├── witness/ # SR/witness tests
│ │ ├── committee/ # Governance proposal tests
│ │ ├── multisign/ # Multi-signature tests
│ │ ├── contract/ # Smart contract tests (linkage + scenario)
│ │ ├── exchangeandtoken/ # DEX & TRC-10 tests
│ │ ├── dailybuild/ # Daily regression tests (42 sub-packages)
│ │ │ ├── account/ # Freeze V2, delegation, resources
│ │ │ ├── http/ # HTTP API tests
│ │ │ ├── jsonrpc/ # JSON-RPC interface tests
│ │ │ ├── tvmnewcommand/ # TVM new instruction tests
│ │ │ ├── freezeV2/ # Stake 2.0 tests
│ │ │ ├── eventquery/ # Event system tests
│ │ │ └── ... # 36 more sub-packages
│ │ ├── fulltest/ # Full integration tests
│ │ ├── onlinestress/ # Stress tests
│ │ └── common/client/ # Shared utilities
│ │ ├── Configuration.java # HOCON config loader
│ │ └── utils/
│ │ ├── PublicMethod.java # Core test helper (8400+ lines)
│ │ ├── RetryListener.java # TestNG retry listener
│ │ └── ... # 100+ utility classes
│ └── resources/
│ ├── testng.xml # Core test suite (4 threads)
│ ├── daily-build.xml # Daily regression suite
│ ├── testng.conf # Main config (node addresses, test accounts)
│ └── config-system-test.conf # Config used by java-tron CI
├── docs/reference/
│ └── java-tron-notes.md # TRON protocol reference
├── build.gradle # Root build config
└── LICENSE # LGPL-3.0
- JDK 8 (x86_64) or JDK 17 (ARM64), Temurin distribution recommended
- Solidity compiler: tronprotocol fork solc v0.8.26 in
solcDIR/solc(auto-downloaded by./gradlew downloadTools) - Running TRON node(s): private network, Nile Testnet, or Shasta Testnet
| Network | Use Case | Docs |
|---|---|---|
| Private Network | Local development, fast iteration | Setup Guide |
| Nile Testnet | Forward-looking features (ahead of mainnet) | Faucet: nileex.io |
| Shasta Testnet | Mirrors mainnet parameters | Via TronGrid only |
./gradlew stest./gradlew dailyBuild./gradlew trident./gradlew leveldbTest./gradlew mainnetReplayQuery./gradlew fuzzTestTests Base58, ByteArray, Sha256, ECKey, and address validation with randomized inputs using jqwik.
To run the dailyBuild test suite locally, you need a private network with 2 Witness FullNodes + 1 Solidity node. Pre-built configuration files are provided in:
testcase/src/test/resources/dailybuild-witness-conf/
├── witness1_config.conf # Witness FullNode 1 (block producer, needSyncCheck=false)
├── witness2_config.conf # Witness FullNode 2 (block producer, needSyncCheck=true, RocksDB + keystore)
└── solidity_config.conf # Solidity node (no witness key)
| Node | P2P Port | gRPC | HTTP Full | HTTP Solidity | HTTP PBFT | JSON-RPC Full | Prometheus |
|---|---|---|---|---|---|---|---|
| Witness 1 | 18889 | 50051 | 8090 | 8091 | 8098 | 50545 | 9528 |
| Witness 2 | 18892 | 50052 | 8093 | 8094 | 8099 | 50546 | 9527 |
| Solidity | 18893 | 50053 | 8096 | 8097 | — | 50547 | 9529 |
- Solidity Compiler (solc): Download the tronprotocol fork from tronprotocol/solidity/releases, place the binary in
solcDIR/and name itsolc. Current version:v0.8.26. - gRPCurl: Download from fullstorydev/grpcurl/releases, place the binary in
gRPCurl/and name itgrpcurl. - Slack Notifications (Optional): Configure a custom
slackcommand in the test execution environment to automatically receive notifications for failed test cases.
Witness 2 is configured with MongoDB event subscription. Before starting:
- Start a MongoDB service
- Download the event plugin from tronprotocol/event-plugin
- Edit
witness2_config.confand set:event.subscribe.path— absolute path to the plugin zip (e.g.,/path/to/plugin-mongodb-1.0.0.zip)event.subscribe.server— MongoDB address (e.g.,172.17.0.1:27017)event.subscribe.dbconfig—dbname|username|password|version
# Build java-tron first
cd /path/to/java-tron
./gradlew build -x test
# Start Witness 1 (first node, produces blocks)
java -jar build/libs/FullNode.jar --witness --es -c witness1_config.conf
# Start Witness 2 (syncs from Witness 1, then produces blocks)
java -jar build/libs/FullNode.jar --witness --es -c witness2_config.conf
# Start Solidity node (syncs confirmed blocks)
java -jar build/libs/FullNode.jar --solidity -c solidity_config.conf
--esenables the event subscription service.--soliditystarts the node in Solidity mode.
After all 3 nodes are running and producing blocks, run the dailyBuild suite:
./gradlew dailyBuildFor the full environment setup guide (JDK, solc, grpcurl), see Setup Guide.
This repository is automatically invoked by java-tron's CI pipeline via the system-test.yml workflow:
- java-tron CI builds
FullNode.jar - Checks out this repo's
release_workflowbranch - Copies
config-system-test.confinto java-tron - Starts FullNode as a background process (
--witnessmode) - Polls
http://localhost:8090/wallet/getblockbynum?num=1until ready (max 5 min) - Runs
./gradlew --info stest --no-daemon - Timeout: 60 minutes
Test configuration is loaded from testcase/src/test/resources/testng.conf (HOCON format):
- Node addresses:
fullnode.ip.list,solidityNode.ip.list,httpnode - Test accounts:
foundationAccount.key1,witness.key1throughwitness.key5 - Ports: gRPC (50051), HTTP (8090), JSON-RPC (8545)
For java-tron CI integration, use config-system-test.conf with fast test parameters:
maintenanceTimeInterval = 300000(5 min vs production 6 hours)proposalExpireTime = 600000(10 min vs production 3 days)
| Repository | Description |
|---|---|
| java-tron | TRON full node implementation |
| protocol | Protobuf API & message definitions |
| tron-docker | Docker automation for TRON nodes |
| tips | TRON Improvement Proposals (127 TIPs) |
| documentation-en | Official English documentation |
| trident | Lightweight Java SDK |
| tronweb | JavaScript/TypeScript API library |
| Document | Description |
|---|---|
| Setup Guide | 5-minute quick start, private network setup, tool installation |
| 安装指南 (中文) | 中文版快速开始、工具安装、国内镜像 |
| Architecture | Test infrastructure, base classes, execution model |
| Network Topology | Single/multi-node setup, port mapping, Docker |
| Style Guide | Code conventions, naming rules, assertion patterns |
| FAQ | Common issues and solutions |
| Contributing | Branch naming, commit format, PR process |
See CONTRIBUTING.md for guidelines on commit format, branch naming, and PR process.
New to the project? Here is how to start contributing:
- Good First Issues: Browse curated beginner tasks or filter by
good first issueon GitHub. - Contributing Guide: Read CONTRIBUTING.md for setup, conventions, and PR process.
- Report Bugs: Open a bug report with reproduction steps and environment details.
- Contributors: See CONTRIBUTORS.md for the list of contributors and how to get recognized.
This project is licensed under the GNU Lesser General Public License v3.0.