Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0eece87
chore(p2p): add libp2p v2.2.9 source as p2p module
Aug 13, 2026
d92ffea
style(p2p): conform vendored source to project conventions
Aug 13, 2026
e4da855
build(common): switch from external libp2p to local p2p module
Aug 13, 2026
35bb851
test(p2p): move tests to framework and cover the module
Aug 13, 2026
ef88c66
build: track netty-codec-protobuf via a root nettyVersion
Aug 22, 2026
5071aec
build(framework): declare the direct :p2p dependency
Aug 22, 2026
5c6aa16
test(p2p): stop NodeTableTest sharing one id array between two nodes
Aug 22, 2026
7ff48c7
test(p2p): raise vendored p2p coverage toward the delta gate
Aug 23, 2026
7cf3aef
test(p2p): cover the UDP decode path, Channel core, keep-alive and me…
Aug 23, 2026
8623869
test(p2p): cover peer admission, Tree publish output and address parsing
Aug 23, 2026
0c05458
test(p2p): cover Route53 record collection, pool bookkeeping and node…
Aug 23, 2026
71f4441
test(p2p): cover AliClient deploy and the changeThreshold decision
Aug 23, 2026
b74982d
style(test): fix import order and spacing in the new p2p tests
Aug 23, 2026
b676956
test(p2p): act on cubic's review of the new tests
Aug 23, 2026
83f21c6
test(p2p): move the module's tests into p2p/src/test
Aug 27, 2026
3dd3d42
test(p2p): replace the example sourceSet with a usage contract test
Aug 27, 2026
add086a
docs(p2p): give the module a README and make StartApp actually runnable
Aug 27, 2026
2e33149
chore(p2p): drop the vendored logback sample
Aug 27, 2026
a0a98c6
fix(p2p): restore the coverage the module move dropped
Aug 27, 2026
dc97162
build(p2p): ship a runnable standalone jar, and stop repeating versions
Aug 28, 2026
fa9b1c3
build(p2p): put .proto files where the protobuf plugin looks for them
Aug 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ plugins {

ext {
grpcVersion = "1.83.0"
// Netty 4.2 split io.netty.handler.codec.protobuf out of netty-codec into its
// own artifact. Both :framework and :p2p put the varint32 framing codecs on
// their channel pipelines and so must declare it explicitly. Netty itself
// arrives transitively through grpc-netty, so this version has to move with
// grpcVersion above — keeping it here makes that coupling visible instead of
// leaving two literals to drift apart.
nettyVersion = "4.2.15.Final"
// Shared by :protocol and :p2p, which both generate from .proto files.
protobufVersion = "3.25.8"
// Shared by :framework, :plugins and :p2p.
checkstyleVersion = "8.7"
}

allprojects {
Expand Down
18 changes: 1 addition & 17 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,7 @@ dependencies {
api 'org.aspectj:aspectjrt:1.9.8'
api 'org.aspectj:aspectjweaver:1.9.8'
api 'org.aspectj:aspectjtools:1.9.8'
api group: 'io.github.tronprotocol', name: 'libp2p', version: '2.2.9',{
exclude group: 'io.grpc', module: 'grpc-context'
exclude group: 'io.grpc', module: 'grpc-core'
exclude group: 'io.grpc', module: 'grpc-netty'
exclude group: 'com.google.protobuf', module: 'protobuf-java'
exclude group: 'com.google.protobuf', module: 'protobuf-java-util'
// https://github.com/dom4j/dom4j/pull/116
// https://github.com/gradle/gradle/issues/13656
// https://github.com/dom4j/dom4j/issues/99
exclude group: 'jaxen', module: 'jaxen'
exclude group: 'javax.xml.stream', module: 'stax-api'
exclude group: 'net.java.dev.msv', module: 'xsdlib'
exclude group: 'pull-parser', module: 'pull-parser'
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'org.bouncycastle', module: 'bcprov-jdk18on'
exclude group: 'org.bouncycastle', module: 'bcutil-jdk18on'
}
api project(":p2p")
api project(":protocol")
api project(":platform")
}
Expand Down
27 changes: 21 additions & 6 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ apply plugin: 'checkstyle'

mainClassName = 'org.tron.program.FullNode'

def versions = [
checkstyle: '8.7',
]




Expand All @@ -40,7 +38,7 @@ dependencies {
// end local libraries
implementation group: 'com.beust', name: 'jcommander', version: '1.78'
implementation group: 'io.dropwizard.metrics', name: 'metrics-core', version: '3.1.2'
implementation('io.netty:netty-codec-protobuf:4.2.15.Final') {
implementation("io.netty:netty-codec-protobuf:${rootProject.nettyVersion}") {
exclude group: 'com.google.protobuf'
exclude group: 'com.google.protobuf.nano'
}
Expand All @@ -61,17 +59,28 @@ dependencies {

testImplementation group: 'org.springframework', name: 'spring-test', version: "${springVersion}"
testImplementation group: 'javax.portlet', name: 'portlet-api', version: '3.0.1'

implementation group: 'org.zeromq', name: 'jeromq', version: '0.5.3'
api project(":chainbase")
api project(":protocol")
api project(":actuator")
api project(":consensus")
// org.tron.p2p is used directly in 17 files under src/main/java (org.tron.core.net
// and org.tron.core.config.args). It currently arrives only transitively, three
// hops away, because :common exposes it via `api project(":p2p")` -- and :common
// has to, since CommonParameter publishes P2pConfig/PublishConfig in its own API.
// Declare the direct use here as well, so framework keeps compiling if that
// transitive chain is ever narrowed. api, not implementation: framework does
// re-export p2p types -- P2pEventHandlerImpl extends org.tron.p2p.P2pEventHandler,
// HelloMessage.getFrom() returns org.tron.p2p.discover.Node, PeerManager takes
// org.tron.p2p.connection.Channel, Args.loadDnsPublishConfig returns PublishConfig.
api project(":p2p")
}

check.dependsOn 'lint'

checkstyle {
toolVersion = "${versions.checkstyle}"
toolVersion = "${rootProject.checkstyleVersion}"
configFile = file("config/checkstyle/checkStyleAll.xml")
maxWarnings = 0
}
Expand Down Expand Up @@ -187,8 +196,14 @@ def binaryRelease(taskName, jarName, mainClass) {
}

// explicit_dependency
// :p2p is included because :common now exposes it via `api project(":p2p")`,
// so p2p-1.0.0.jar is on runtimeClasspath and gets zipped into the fat jar.
// Without it Gradle reports an implicit_dependency and disables execution
// optimizations, and a parallel build could assemble FullNode.jar before
// :p2p:jar has been written.
dependsOn (project(':actuator').jar, project(':consensus').jar, project(':chainbase').jar,
project(':crypto').jar, project(':common').jar, project(':protocol').jar, project(':platform').jar)
project(':crypto').jar, project(':common').jar, project(':protocol').jar,
project(':platform').jar, project(':p2p').jar)

from {
configurations.runtimeClasspath.collect {
Expand Down
21 changes: 21 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,14 @@
<sha256 value="afded6e6a690fbf3ad4ae65ada397f0a90a5f630b303d1b741b9c97926fdd4de" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.code.gson" name="gson" version="2.9.0">
<artifact name="gson-2.9.0.jar">
<sha256 value="c96d60551331a196dac54b745aa642cd078ef89b6f267146b705f2c2cbef052d" origin="Generated by Gradle"/>
</artifact>
<artifact name="gson-2.9.0.pom">
<sha256 value="7190d0b07f278e9f4c603f44e543940f81cf1a2559f851c6f298c9bb2be2978c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.code.gson" name="gson-parent" version="2.13.2">
<artifact name="gson-parent-2.13.2.pom">
<sha256 value="83ab528a9d50fd76aeb8ad6f727b3ee9cb766586255774ed16ca8c4c76d9dacd" origin="Generated by Gradle"/>
Expand All @@ -463,6 +471,11 @@
<sha256 value="b16e026e63427c1972ad0fc68703ec379b1576e411ba49c32fa9a31ab0bbcffb" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.code.gson" name="gson-parent" version="2.9.0">
<artifact name="gson-parent-2.9.0.pom">
<sha256 value="af781c9a5766ffea311a0df0536576a64decc661aa110c4de5c73ac8bf434424" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_annotation" version="2.42.0">
<artifact name="error_prone_annotation-2.42.0.jar">
<sha256 value="e8ef6e0314bd0ab5595e4274b7cf78964c525685827ae5f4f3d0feffb4da5f11" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -1985,6 +1998,14 @@
<sha256 value="ce7abb4a91ba5d2a73fdf17a3df4762e3605a0392cc7983ef2f1ae16cd384cc3" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.bouncycastle" name="bcutil-jdk18on" version="1.84">
<artifact name="bcutil-jdk18on-1.84.jar">
<sha256 value="b374e16963421fb9cfb01cc20d7ad8fd2f8b8188e3eef0ec0a8965e245f7619a" origin="Generated by Gradle"/>
</artifact>
<artifact name="bcutil-jdk18on-1.84.pom">
<sha256 value="0b0cb81a65ee1737d51286350a9e56489336b8f9908198febd0494243eea2978" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.checkerframework" name="checker-compat-qual" version="2.0.0">
<artifact name="checker-compat-qual-2.0.0.jar">
<sha256 value="a40b2ce6d8551e5b90b1bf637064303f32944d61b52ab2014e38699df573941b" origin="Generated by Gradle"/>
Expand Down
2 changes: 2 additions & 0 deletions p2p/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# protobuf generated code (rebuilt by ./gradlew :p2p:generateProto)
src/main/java/org/tron/p2p/protos/
Loading
Loading