Skip to content

Commit 07dfda5

Browse files
committed
docs: correct AGENTS.md platform and build details
- Note the build fails fast on a JDK/arch mismatch - Scope the lint helper comment to framework main - Fix the generated-protobuf source path (core/, api/ subdirs) - Add the platform module (arch-specific source sets) to the layout - List both plugins jars (Toolkit, ArchiveManifest)
1 parent 95bcc9e commit 07dfda5

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

AGENTS.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Guidance for AI coding assistants and new contributors working on java-tron: how
99

1010
## Build & Test
1111

12-
Supported platforms: **Linux** and **macOS** only. JDK requirement: **JDK 8** on x86_64, **JDK 17** on ARM64/aarch64 (e.g. Apple Silicon Macs, or Linux aarch64 servers such as AWS Graviton).
12+
Supported platforms: **Linux** and **macOS** only. JDK requirement is by CPU architecture: **JDK 8** on x86_64, **JDK 17** on ARM64/aarch64 (e.g. Apple Silicon Macs, or Linux aarch64 servers such as AWS Graviton). The build fails fast if the JDK major version does not match the architecture.
1313

1414
```bash
1515
./gradlew clean build -x test # build without tests
@@ -19,15 +19,15 @@ Supported platforms: **Linux** and **macOS** only. JDK requirement: **JDK 8** on
1919
./gradlew test --tests "org.tron.core.db.TronDatabaseTest" # one class
2020
./gradlew test --tests "org.tron.core.db.TronDatabaseTest.testX" # one method
2121
./gradlew :framework:testWithRocksDb # RocksDB tests (x86 only)
22-
./gradlew lint # Checkstyle (main)
22+
./gradlew lint # Checkstyle (framework main only)
2323
./gradlew checkstyleMain checkstyleTest # Checkstyle main + test (as CI runs)
2424
./gradlew jacocoTestReport # coverage report
2525
```
2626

2727
- Main entry point: `org.tron.program.FullNode`.
2828
- Tests run in parallel locally, serially in CI (detected via the `CI` env var); the test-retry plugin retries up to 5 times.
2929
- On ARM64/aarch64, only the RocksDB storage engine is supported; the build forces RocksDB and skips the LevelDB tests.
30-
- Protobuf / gRPC Java stubs are generated at build time from `protocol/src/main/protos/*.proto` (via the `com.google.protobuf` Gradle plugin) and are git-ignored — rebuild after changing a `.proto`; never hand-edit or commit generated sources.
30+
- Protobuf / gRPC Java stubs are generated at build time from the `.proto` files under `protocol/src/main/protos/` (subdirectories `core/`, `api/`; via the `com.google.protobuf` Gradle plugin) and are git-ignored — rebuild after changing a `.proto`; never hand-edit or commit generated sources.
3131

3232
**Before pushing:**
3333
- `./gradlew checkstyleMain checkstyleTest` and `./gradlew test` must pass.
@@ -44,7 +44,8 @@ Supported platforms: **Linux** and **macOS** only. JDK requirement: **JDK 8** on
4444
| `actuator` | Transaction execution; one Actuator class per transaction type |
4545
| `crypto` | Cryptographic primitives (depends only on `common`) |
4646
| `common` | Shared utilities |
47-
| `plugins` | Standalone tools (e.g. `Toolkit.jar`) |
47+
| `platform` | Architecture-specific implementations selected at build time (separate `x86` / `arm` / `common` source sets): math wrappers, LevelDB/RocksDB order-price comparators — relevant to cross-JVM determinism |
48+
| `plugins` | Standalone tools (`Toolkit.jar`, `ArchiveManifest.jar`) |
4849

4950
**Module dependency direction is one-way — do not introduce reverse dependencies:**
5051

@@ -55,6 +56,8 @@ consensus → chainbase / common (only via ConsensusDelegate; never call Manag
5556
crypto → common
5657
```
5758

59+
`platform` is a leaf module (no project dependencies of its own) that `common`, `framework`, and `plugins` depend on for architecture-specific code.
60+
5861
## Hard Constraints
5962

6063
**Cross-JVM determinism** (consensus, state transition, block ordering):

0 commit comments

Comments
 (0)