Repository navigation
Conversation
Port libp2p PRs tronprotocol#181-185 from release-v2.3.0 after java-tron tronprotocol#7098: - tronprotocol#181 d6292c8: limit inbound PINGs per connection - tronprotocol#182 d55df73: correct DNS TXT handling and publication ordering - tronprotocol#183 49c8b24: rate limit UDP rejection logs and bound packet previews - tronprotocol#184 f4a69fe: expand HELLO capacity and bound pre-handshake frames - tronprotocol#185 18da461: exclude cross-network STATUS candidates Retain java-tron's blocked-IP policy, logger convention and existing regressions. Migrate upstream tests, adapt DNS fixtures to the new behavior, and update source provenance and networking limits.
SeriousCoding789
approved these changes
Nov 24, 2026
3for
approved these changes
Nov 24, 2026
xxo1shine
approved these changes
Nov 24, 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.
What does this PR do?
Synchronize java-tron's in-tree
:p2pmodule with the five libp2p PRs merged after java-tron #7098, based onrelease_v4.8.3. The source comparison onrelease-v2.3.0runs from94dbc75896dc68c72934276c8d3143b4a3540363through18da461f1312cb7d7c8d13dccf992e5f78a55a36.d6292c8d55df7349c8b24f4a69fe18da461Retain java-tron's blocked-IP policy, logging field convention, deterministic math substitutions, and existing test coverage. Adapt three existing DNS tests to the new behavior, and update the README's source revision and connection/logging limits.
Why are these changes required?
Unbounded inbound PING replies and repeated UDP rejection logs can consume networking resources. The previous pending-HELLO capacity was easy to exhaust, while unverified connections could retain large receive buffers and incomplete frames. The new pre-handshake limits apply to both directions and trusted peers, with established peers retaining their existing frame limit.
Malformed or coexisting TXT records could prevent DNS synchronization or publication, and publication could expose a root before its dependencies. Route53 startup also required global zone-listing access even with a configured zone. Foreign-network STATUS probes could feed unusable nodes into both the probe and discovery-fallback candidate paths.
This PR has been tested by:
Local validation on macOS ARM64 / JDK 17:
./gradlew clean build -x test --console=plainpassed, including FullNode, standalone P2P and tools packaging, P2P main/test Checkstyle, and protobuf lint../gradlew test :framework:checkstyleMain :framework:checkstyleTest :plugins:checkstyleMain --console=plainpassed: 5,977 tests, 16 skipped, zero failures/errors. This includes all 684 P2P tests (4 skipped).bash .github/scripts/check_math_usage.shpassed with no output.git diff --cached --checkpassed. No dependencies or generated sources are changed.Regression coverage includes PING bursts and per-connection allowances, HELLO deadlines and slot release, pre-handshake frame boundaries and real TCP receive allocations, foreign-network STATUS probes and discovery fallback, UDP log preview/counter/task cleanup, malformed node records, coexisting root TXT records, root selection, and Route53 publication ordering, timeout and interruption. Three existing java-tron DNS tests were adapted to the changed query and record-handling behavior.
Follow up
Run the CI matrix on JDK 8 / x86_64 and JDK 17 / aarch64.
Extra details
The per-IP pending limit remains two and the HELLO deadline remains 10 seconds. PING limiting retains Guava's default burst behavior. STATUS network mismatches do not apply an IP-wide ban; a later matching discovery update can make the endpoint eligible again. DNS provider regressions use SDK stubs.